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

 I suspect non-portability and complexity are the main reasons.
The current runsvdir implementation is very simple. It's originally based
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 default:
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 with an inotifyd triggering a rescan on scandir changes, if that's the workflow
you want.

--
 Laurent

Reply via email to