Investigation Upstart/Sysvinit

Tilman Baumann tilman at baumann.name
Mon Oct 29 15:34:30 CET 2007


Graeme Gregory wrote:
> I have spent some time investigation upstart and how it differs from
> sysvinit which we currently use and these are my finding based on
> documentation and looking at my ubuntu install.
> 
> 1) How it knows what to run.
> 
> Sysvinit uses number files within /etc/rc?.d to decide the order that
> services start. So this is a strict ordering that has no knowledge of
> what services actually need before that startup.
> 
> Upstart has a tree of dependencies as each service says in needs X
> started before it can start. It doesnt yet support parellel starting of
> services but this is planned in the future.


I like to throw cinit and minit in the ring.
Both do this really well and are really smart and simpel.

But upsart has a big advantage over them. Upsarts intends to start 
services on events. Like starting background deamons for user programs 
on demand.

cinit and minit are only replacements for unit don't dont care much 
about dynamic service invocation.

But i think it would be fine if someone would compare them size and 
complexity wise to upsart.

Maybe upsart is not worth having a fat and complex init replacement on 
such a small device? (Is upsart really fat and complez)


> 3) What problems do the system have for embedded systems.
> 
> The bigest problem I find with both systems is they have a tendancy
> to do things like
> 
> BLAH = "cat /blah/blah | grep | awk"
> PS = "ps | grep | awk"
> 
> Which is a whole lot of forking and loading off slow flash that it would
> be nice to do without. A lot of times this would be nicely solved by a
> pidof() or filecontains() type calls which if they could be done
> without invoking shell would improve things greatly.


Most of them are just bad style and focus on the usual sysv-init way of 
doing things. Most deamons will work without comlex scripts on systems 
like upstart because it has all that magic built in.

> 4) What do we do from here
> 
> I think upstart shows promise if we want to clean up the whole init
> system as it lends itself better to some form of auto generation of
> scripts within OE. Also as its still under development maybe there is
> some manner to add the common function that are needed without invoking
> sh half a dozen time to execute them.

I too think upsatert will be the right choice. But i think it would be 
worth evaluating the usual more embedded focused init replacements like 
the one i mentioned.

PS: I really appreciate that finally someone is doing something to 
improve the init situation. SysV is clearly not the way to go on such a 
deive. Thank you. ;)

Regards
  Tilman



More information about the distro-devel mailing list