Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ciao-launcher: Limit the number of parallel starts
This commit limits the number of parallel starts to a function of the number of CPUs present in the node. There really isn't much point in allowing 1000 instances to be started on the same node at the same time. Doing so won't increase the start times much and will increase the likelihood of failure due to the resource exhaustion caused by the heavy demands of instance startup. Fixes ciao-project#8 Signed-off-by: Mark Ryan <[email protected]>
- Loading branch information
3fbd92d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me though I'd do:
runtime.NumCPU()*20
There's IO during start up and things block. My rough sense has been that more than 20x overcommit or so during boot was where we started to see slowdown. If you do only 2x, we're liable to run slower than currently in the face of a huge herd of launches, where I take the patch's intent is to speed things.
This argues at having it a defined variable with a default value and an override via a --cpu-overcommit config option.