Alternative Init System
Scott James Remnant
scott at ubuntu.com
Thu Mar 2 20:20:44 GMT 2006
On Tue, 2006-02-28 at 08:08 -0600, Rocco Stanzione wrote:
> ps. OK one more thing. Most of the ubuntu-devel thread was comprised of
> comparisons of startup times on various operating systems. People care about
> this. As I said when I started the original thread, it comes up several
> times a day on #ubuntu. I've only ever seen one machine whose user had taken
> the time to fully replace sysV init with runit-run, and I witnessed 8 seconds
> from power-on to desktop, and this was on a so-so machine. I would love to
> have this on the list of reasons to choose Ubuntu. For those of you
> unfamiliar with the system or who need a refresher, here's a good place to
> start: http://smarden.org/runit/benefits.html
>
Sorry, it's time to dispel a myth.
Replacing the init system will not make any difference to Ubuntu's boot
time.
It's simply untrue, and here's why.
The reason they claim that it makes boot faster is that you can start
everything at the same time with their system. Here's the reason that's
not a benefit:
1) You can do exactly the same thing with SysV-style init. There's no
reason that the /etc/init.d/rc script (which processes the rc*.d
directories) can't background things when it starts.
So parallel startup is *not* a benefit of other init systems, it's
just something they happen to have on by default.
2) You can't parallel start most of the system anyway; /etc/rcS.d is
pretty much a critical path. Anything in this that could be started
alongside the next script, I've already placed in the background
manually.
So we're mostly just talking about rc2.d here... and if you look at
a current dapper bootchart (this one from my laptop[0]):
http://people.ubuntu.com/~scott/bootcharts/dapper-20060302-2.png
you'll firstly notice that a lot happens in parallel already.
You'll also notice that rc2.d only counts for 10s of the entire boot
sequence! and is mostly parallel anyway.
Now let's look at some reasons to change the Init system, which we are
considering doing for dapper+1.
Service Supervision; fantastic ... "keep apache up", and log when it
goes down.
I want to combine that with devices too, "keep podcastd running while
my iPod is plugged in" ... "keep bittorrentd running while a network
interface is up" ... etc.
Cron Replacement: Having separate systems for init, cron, at, inetd,
etc. all seems wrong to me. Wouldn't it be great if you could do:
"15 minutes after the machine has booted, start postgresql and keep it
running until shutdown. After it has been stopped, run this script
to vacuum the databases and copy them to a backup location."
Scott
[0] note that there's a S40networking bug I'm trying to track down
here ... it should take 0s not 15s ... the boot should be ~50s
--
Scott James Remnant
scott at ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/sounder/attachments/20060302/e9cfcc8e/attachment.pgp
More information about the sounder
mailing list