[clue-tech] upstart

dennisjperkins at comcast.net dennisjperkins at comcast.net
Mon Sep 8 17:38:23 MDT 2008


 -------------- Original message ----------------------
From: Nate Duehr <nate at natetech.com>
> Kevin Fenzi wrote:
> > On Mon, 08 Sep 2008 15:00:08 -0600
> > mjhammel at graphics-muse.org ("Michael J. Hammel") wrote:
> > 
> >> On Mon, 2008-09-08 at 18:50 +0000, dennisjperkins at comcast.net wrote:
> >>> Has anyone investigated upstart?  It is Ubuntu's replacement for
> >>> sysvinit and is event based.  Fedora and Frugalware using it too.
> >>> Ubuntu and Fedora are still using it in SysV-compatible mode for
> >>> now, so it will be interesting to see how it performs in full
> >>> native mode.
> > 
> > Yeah, it will be. Although they have discovered some fundamental
> > problems with the way it was designed and will be re-writing a bunch of
> > it in the coming months. ;) 
> > 
> >> I noticed this when I upgraded to F9.  I'm trying to figure out why
> >> they changed what wasn't broken. 
> > 
> > SysVinit isn't maintained anymore. It has no upstream aside from
> > RedHat/Fedora, and no one there wanted to keep patching it with more
> > and more band-aids. ;) 
> 
> One could argue either side here... Sun replaced their startup in Sol 10 
> also, looking for "better ways" to do startup too.
> 
> Linux is just mimicking that, in my opinion.  Me too, me too!
> 
> Whether or not either fancy new startup system really solves as many 
> problems as they create, is yet to be seen.
> 
> We're stuck with both now, so it'll be fun to watch.
> 
> There were certainly higher priority things for Linux to work on, that 
> got ignored, though.   That's also fairly typical.
> 
> "Let's rework the startup system."
> 
> "But no one's having any problems starting things up... the problems our 
> customer have are x, y and z."
> 
> "Yeah, but this is more fun to fix than those!"  (Or insert whatever 
> other excuse here.)
> 
> Nate
> _______________________________________________
> clue-tech mailing list
> clue-tech at cluedenver.org
> http://www.cluedenver.org/mailman/listinfo/clue-tech

I wasn't aware that sysvinit was not being maintained.  It isn't broken but apparently a lot of people think it is creaking.  Sun has their own replacement.  Apple has launchd.  There is runit, initng, and another one whose name escapes me at the moment.

Some of these, maybe all of them, try to do dependency ordering.  Determine the dependencies and then start them in the correct order.

Upstart has chosen to use events instead.  Events start and stop jobs.  A startup event triggers some jobs, like mounting the kernel filesystems.  The completion of these jobs triggers other jobs until the basic initializations are done and universal services are started.  Then Fedora and Ubuntu trigger the rc or rcS job, which will trigger the appropriate runlevel job.  This conservative approach probably doesn't improve the startup and shutdown times that much because the runlevel jobs are still sequentially started.  If there is any real improvement in speed, the system might be using dash instead of bash to execute the scripts.

Frugalware has decided to abandon SysV compatibility and runlevels.  Udev and some other services are started after the partitions in fstab are mounted.  This is more like BSD, Slackware and Arch Linux.  Possibly like Gentoo as well, but I'm not certain about its boot structure.  Frugalware's job files appear to be cleaner than many bootscripts and the Fedora developers seem to think upstart will reduce the bloat in their scripts.  And the jobs can be started in parallel.

I doubt that the 6 run levels used by sysvinit are necessary.  Almost everyone either runs in single or multiuser mode.  I read somewhere that the 6 levels (actually there are more but are not used) are modelled after some switching device that ATT or some company had, and someone thought it was a good idea to copy it.

Upstart can also handle the addition and removal of USB devices.  This is being done by udev or HAL in most systems but an upstart job can do it instead.  DeviceKit is apparently going to replace HAL at some point, but that is the extent of my knowledge about DeviceKit right now.

Abandoning run levels runs counter to LSB.  I don't know if the big distros are 100% compliant, but some distros ignore it because they feel some of LSB is wrong.



The development of upstart started in Aug 2006.  It reached 0.5.0 this summer.  The development plan seems to be small, incremental steps.  Build the basic parts first.  Run it.  Refine it.  Redo parts that don't work as expected.  Kernel development is the same way.  Look at how many schedulers the kernel has discarded.

One goal is to add time-based events.  This means cron capability is planned at some point in the future.  Replacing D-Bus, acpid, etc, are not planned.  They handle different tasks.

Upstart can track daemons.  Sysvinit cannot.  If a daemon crashes, upstart can try to restart it automatically.  The number of restarts can be limited.

There are probably other things that could be mentioned, but I think this is enough for now.



As far as higher priority things needed to be addressed first, there are plenty of hackers out there.  Upstart is not distracting the kernel hackers, the KDE hackers, or the GNOME hackers.  Upstart and its competitors are the result of an itch by distro developers for a problem they appear to have with hot-pluggable devices and dependencies between some programs.


More information about the clue-tech mailing list