:: Re: [DNG] [announce] s6-rc, a s6-b…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Laurent Bercot
Datum:  
To: dng
Betreff: Re: [DNG] [announce] s6-rc, a s6-based service manager for Unix systems
On 25/09/2015 09:05, Simon Hobson wrote:
> More to the point, I'd rather have reliability over speed any day.


How about you get both?
The dichotomy is a false one. People believe they can't have both
because init systems have never been done right so far, and always
forced them to choose between one and the other. This is what
I'm aiming to change. No less.


> But one trick that the desktop vendors are doing, and I suspect
> SystemD are copying, is to "fake" a fast boot. By prioritising
> certain bits, you get the illusion of a fast boot


Yes. I have no idea how Windows does it, or how other OSes do it,
but systemd sacrifices a lot of reliability to gain a little speed
by starting services before their dependencies are ready. Start
your services before the loggers are ready to log! Who cares if
something goes wrong and you have no logs to analyze to understand
what happened?

This is definitely not what s6-rc is doing - on the contrary.
s6-rc does not cheat: when it says that a service is up, it is
really up - no stuff that keeps loading in the background,
unless the author of the service designed it so.

As I wrote one year ago at
https://forums.gentoo.org/viewtopic-t-994548-postdays-0-postorder-asc-start-25.html#7581522
you gain speed by doing two things:

- eliminating times when the processor is doing nothing
- eliminating times when the processor is doing unnecessary work

The former is what parallelism accomplishes. This is where s6-rc
wins over sysv-rc or OpenRC. (Yes, I'm aware that OpenRC has a
"rc_parallel" option. It is not reliable; it uses ugly, ugly hacks
to make it appear to work. Don't use it.)
The latter is what simplicity accomplishes. This is where s6-rc
wins over systemd - and over basically anything else than starting
your services by hand with zero overhead.


> But, if you are going to boot slowly and methodically, it helps if
> there's signs of progress.


If s6-rc is run with "-v2", it prints in real time to stderr what
it is doing. It's the equivalent of OpenRC's "ebegin" and "eend",
without the pretty-printing.
Anything more elaborated is the domain of a user interface; I'm bad
at user interfaces. But a distribution can add progress bars to
their service start scripts if it wishes, nothing prevents it from
doing so.


> There's nothing that gets people impatient
> better than something that appears to be taking a long time "doing
> nothing" !


Show them a terminal with a lot of scrolling gibberish! That should
convince them that 1. the computer is actually doing something, and
2. the uninitiated should not be questioning what it is doing or the
time it takes - they should shut up and worship! ;)

--
Laurent