LWN.net Logo

Advertisement

Front, Kernel, Security, Distributions, Development. See your byline here on LWN.net.

Advertise here

LPC: Upstart 1.0 plans: manifesto for a new init

September 24, 2008

This article was contributed by Don Marti

Let's make two things clear about Upstart, a proposed replacement for the Linux "init" process. First, it's not there to speed up boot, and second, it's not intended to parallelize startup. "Upstart is not for what most people think it is for," said its author, Scott James Remnant, in a talk in the dbus miniconference at the Linux Plumbers Conference. What it is there for is to expand the capabilities of "init" on Linux, replace some scripts and workarounds with rules that are intended to be easier to understand and modify, and enable future improvements. Remnant is a Canonical employee, and Upstart is in Fedora as of version 9, making it a welcome example of a Canonical-sponsored project finding its way into other distributions.

While Greg Kroah-Hartman mentioned a list of core software on the Linux platform in his Plumbers Conference talk, "the one thing he never put in there was init," Remnant said. The Linux init, originally by Miquel van Smoorenburg, has been unchanged for years, and is modeled on the System V Unix init, which is even older. Instead of updating it, Remnant says that, for too long, distributions have just worked around it. The startup process has traditionally consisted of shell scripts, started by init, but containing workarounds and extensions accumulated over the years. For example, Debian has a wrapper program called start-stop-daemon, that manages PID files, to keep track of what process ID a daemon process ends up with. Upstart handles that itself.

Current features of upstart include sending notifications for system events, for example, when a service starts; eliminating race conditions, by offering dependency tracking; and removing some service startups from the critical path for boot, again by handling dependencies. Upstart allows a distribution or sysadmin to spell out the critical path in a script, and also specify dependencies. Tracking dependencies allows distributions to eliminate "sleep" loops from the boot sequence, and instead take actions based on events.

Events are not limited to the runlevel changes familiar to sysvinit users, but can depend on other things on the system. But what other things? Future directions for Upstart could be ambitious. For 1.0, Remnant is considering adding the ability to do tasks based on cron-like criteria such as "hourly." But should upstart really replace cron? Another possibly useful direction would be an "idle" event. The Common Unix Printing System (CUPS) is a service that makes sense to start "30 seconds before the user thinks of clicking on the print button," he said. CUPS is not in the critical path for boot, but needs to be running to detect printers before the user needs them. Should it be possible to start non-critical services when the system becomes idle?

Even though fast boot isn't the goal of upstart, Remnant is optimistic about being able to help. Some of the slow booting problems that Arjan van de Ven and Auke Kok identified at the conference are deep in the weeds of nested scripts, and might be smoked out by a simpler init layout. "To make boot fast we have to do a bunch of different stuff. it makes it easy for us to do the real work," Remnant said.


(Log in to post comments)

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 25, 2008 2:22 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link]

"Upstart is in Fedora as of version 9, making it a welcome example of a Canonical-sponsored project finding its way into other distributions."

Last I heard, Upstart is being developed by Scott is his own time and this was apparently confirmed by him earlier on. Nevertheless the software itself is a useful contribution. Distributions that currently use it are still using the old init scripts under compatibility mode and haven't migrated to new upstart style scripts yet which is probably the important step. We won't see any advantages till then.

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 25, 2008 14:37 UTC (Thu) by ballombe (subscriber, #9523) [Link]

... and to add to the confusion, Scott is a Debian developer (and so is Miquel van Smoorenburg).

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 25, 2008 7:33 UTC (Thu) by aleXXX (subscriber, #2742) [Link]

Not sure about the current state: in kUbuntu 7.10 upstart doesn't support
some relatively basic init feature, I think it was the different run
levels, i.e. I think I was not able to get different stuff running e.g.
for runlevels 3 and 4 or so.
Will this be supported in 1.0 ?

Alex

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 25, 2008 10:05 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link]

This works just fine in Fedora 9.

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 25, 2008 11:08 UTC (Thu) by pdewacht (subscriber, #47633) [Link]

Debian, and I guess Ubuntu too, by default setup runlevels 2--5 to be identical, because there's no agreement on how they should differ. If you want different stuff in different runlevels, you'll have to configure it yourself.

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 25, 2008 10:00 UTC (Thu) by melo@simplicidade.org (subscriber, #4380) [Link]

A lot of what upstart is doing is similar to what Darwin launchd does.

I wonder if there isn't good ideas to be taken from launchd. I personally use the directory watchers
with great results.

Best regards,

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 28, 2008 18:38 UTC (Sun) by Oddscurity (subscriber, #46851) [Link]

The Common Unix Printing System (CUPS) is a service that makes sense to start "30 seconds before the user thinks of clicking on the print button," he said.
Upstart will feature precognition? Now that is impressive.

LPC: Upstart 1.0 plans: manifesto for a new init

Posted Sep 28, 2008 20:25 UTC (Sun) by nix (subscriber, #2304) [Link]

If you look at it right, it already does. :)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds