Re: runsvdir polling

From: Steve Litt <>
Date: Sun, 15 Jan 2017 12:28:49 -0500

On Sun, 15 Jan 2017 01:40:13 -0800 wrote:

> On Sat, Jan 14, 2017 at 04:10:07PM -0500, Steve Litt wrote:
> > On Fri, 13 Jan 2017 21:12:27 -0800
> > wrote:
> >
> > > 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
> >
> > How much time in how much uptime? Which process are you looking at
> > with this accumulated time? Here's what I get:
> runsvdir has used 1m 55s over a bit under 5 days. The runsv instances
> are way less (but then they have no reason to wake). Load average is
> 0.00.
> > On my computer, none of this in any practical way affects my
> > computing. I would guess on a more heavily used computer, any
> > deleterious effects of runit time consumption could be solved by
> > running runsvdir and all the runsv's with a positive nice value.
> >
> > In my opinion, by far the greatest benefit of runit is its
> > simplicity, and there's no way I'd trade that for a theoretical
> > efficiency benefit.
> That sounds sensible on a desktop. In my case the motivation is to
> trim a source of power draw for an image that's going to run on a
> battery-powered device that will be awake but idle a lot of the time.
> Why Linux? Pretty much familiarity & tooling, if power is ok then I
> get to have my cake and eat it too.

Why not try s6? IIRC, s6 doesn't poll, is a little more complex than
runit, but like runit, it's a daemontools descendent. I've used it and
like it.

One thing to consider: What is the relationship between the 1m:55s and
power consumed? Is power consumption proportional to CPU time, or does
it depend on the kind of activity being done? Are disk accesses more,
or less power hungry than loops with calculations or other CPU
intensive stuff? How would you even find out the answers to these

Another question: What sized battery, is it rechargable, and how long
do you expect it to last between replacements or recharges? What I'm
getting at is this: If power draw is proportional to time, then in 50
days runsvdir would have consumed just under 20 minutes, which is
almost nothing if you're using a good sized battery.

Are you going to use a superserver? This sounds like a good case for a
superserver. You could use xinetd, or the djb-type superserver (can't
remember its name).

This sounds interesting.


Steve Litt
January 2017 featured book: Troubleshooting: Just the Facts
Received on Sun Jan 15 2017 - 17:28:49 UTC

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