I have a UpStart service job that has many (~100) instance that need to be started. Each of them is a resource-heavy process that does a lot of disk reading/writing during startup. When all of them start or respawn at the same time, they cause trouble due to excessive disk read/write requests.
I need a way to limit the number of instances that UpStart tries to start or respawn simultaneously. For example, is there a way to let UpStart hold off launching another instance until, say 30 seconds, after the startup or respawning of another instance has begun?
You can start them in sequence by using
start on started otherUpstartService
You can use pre-start or post-stop to pause after each job. E.g post-stop exec sleep 5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With