LWN.net Logo

Parallel?

Parallel?

Posted Jan 18, 2008 1:30 UTC (Fri) by vonbrand (subscriber, #4458)
In reply to: Parallel? by ncm
Parent article: Reordering the boot for fun and profit

Has been tried, makes almost no difference (they mostly wait for data to arrive from the disk). And the extra complexity is staggering...

This is something that is discussed to death each year or so.


(Log in to post comments)

Parallel?

Posted Jan 18, 2008 2:52 UTC (Fri) by Cato (subscriber, #7643) [Link]

This is not true - reports indicate that initng makes booting much faster due to parallel
execution, and Upstart has the same capability (though it must be configured explicitly to
execute scripts in parallel where possible - see
https://answers.launchpad.net/ubuntu/+question/4763 )


Parallel?

Posted Jan 18, 2008 4:27 UTC (Fri) by Duncan (guest, #6647) [Link]

Gentoo's OpenRC (now an independent project) has had most of this for 
years, altho the parallel stuff only really started working with the 
2.0-rcs -- which also sped things up dramatically as the core is C based 
now, not a shell script (tho shell scripts are still used for ease of 
reconfigurability if necessary for individual services).

Named levels?  Years ago, but still based on the traditional init so folks 
used to it can use that as well.  Here's the (edited) basics 
of /etc/inittab, complete with comments as appropriate:

# Default runlevel.
id:2:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit

# Further system initialization, brings up the boot runlevel.
# (The boot runlevel contains the really critical services
# that run even in single user mode.)
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
# init level 3 and 4 point to default as well,
# unless the admin wants to change them.
l6:6:wait:/sbin/rc reboot
# l9 is my own addition, sort of between single user
# and nonetwork, taking advantage of the fact that
# init can actually handle levels 7-9 too, tho they
# aren't there by default.
l9:9:wait:/sbin/rc basic

# This one is interesting.  Gentoo uses "a" of the a/b/c
# init options to setup xDM, only launching it however
# if it's in the appropriate runlevel
x:a:once:/etc/X11/startDM.sh


All the various level invocations do then is run the scripts in the 
appropriately named directories under /etc/runlevels.

Dependency based ordering?  Again, years ago.  Scripts have default 
dependencies, and as noted in /etc/conf.d/rc ...

# It's possible to define extra dependencies for services like so
#RC_CONFIG="/etc/foo"
#RC_NEED="openvpn"
#RC_USE="net.eth0"
#RC_AFTER="clock"
#RC_BEFORE="local"

OpenRC uses those dependencies to dynamically create a dependency graph 
and start them in the appropriate order.  This info is cached, with the 
files hashed and checked to see if they've changed and the dependency 
graph needs recalculated.

Parallel startup?  The option has been there for years but didn't work all 
that well until the 2.0 rcs, as mentioned above.  Tt works great now 
especially on multi-core/CPU machines loading off of kernel based md/RAID, 
since it can parallelize both the CPU time and disk access that way.  (I'm 
running a dual dual-core Opteron 290, 4-disk md/RAID-1/6/0, makes for a 
nice desktop/workstation with 8 gigs RAM!  Now /that's/ the hardware to 
run a Gentoo system!  With a tmpfs based compiling scratch area and using 
ccache, I can recompile all of KDE4-svn in roughly four hours, two if I do 
it daily -- without disturbing my work flow while I'm doing it! =8^)

Duncan

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