Re: staggering runsv startup

From: Laurent Bercot <>
Date: Fri, 05 Jun 2015 00:01:56 +0200

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.

Received on Thu Jun 04 2015 - 22:01:56 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC