Re: runsvdir polling

From: Laurent Bercot <>
Date: Sat, 14 Jan 2017 09:24:42 +0000

>I'm using runit as my primary init on Linux to good effect but have
>that it accumulates CPU time even while the system is idle. I suspect
>this is a consequence of runsvdir polling the service directory for
>and that using inotify would reduce this. This would introduce some
>complexity and variance between platforms but bring the benefit of
>a source of CPU wake-ups. Has using inotify been considered and
>for another reason?

  I suspect non-portability and complexity are the main reasons.
  The current runsvdir implementation is very simple. It's originally
on daemontools' "svscan" design, which polls every 5 seconds. runsvdir
only polls 14 seconds, which is almost 3 times better. ;)

  s6-svscan (s6's equivalent of runsvdir) does not poll at all by
it only rescans when you tell it to, via an external command
(s6-svscanctl -a). That allows you to, for instance, set up a service
an inotifyd triggering a rescan on scandir changes, if that's the
you want.

Received on Sat Jan 14 2017 - 09:24:42 UTC

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