If I understand right, Upstart runs all tasks that are ready to run in parallel.
However, is there a way to limit the amount of parallelisation? That is, the number of parallel tasks that are run should be capped by some constant.
For example, make
allows you to run all tasks in parallel with the -j
option. If you want to restrict the amount of parallel jobs, you can pass a number to it. Thus, -j 2
means run jobs in parallel but not more than two at a time.
I am looking for the equivalent setting in upstart.
Edit I just realized that my question is silly. If the jobs are daemons that never stop, then there is no way for Upstart to decide that they are done. Instead, what I need is a way to limit by disk i/o. That is, when disk i/o is high, upstart shouldn't spawn new jobs. It should only spawn after disk activity cools down.