On 04/06/2015 22:41, Jameson Graef Rollins wrote:
> What I would like is to somehow stagger the startup of the processes, to
> avoid the resource contention. I could do this by putting a random
> sleep into the ./run scripts, but this would also cause random startup
> delays on subsequent process restarts via "sv restart" or the like
> (which we occasionally need to do).
You could also have an "initial" ./run that would sleep a random amount
of time, then atomically replace itself with the "normal" run script before
executing itself.
Of course, it requires read-write service directories. This is one of
the reasons why I generally advocate keeping the working copy of
service directories in a tmpfs.
--
Laurent
Received on Thu Jun 04 2015 - 22:01:56 UTC