Speeding up the boot process

Steve Flynn anothermindbomb at gmail.com
Sat Dec 13 10:14:37 UTC 2008


Whilst sitting on the train yesterday, bored, I was digging around in
the boot-up scripts. I admit it - I have no life.

I started with up looking at /etc/init.d/rc as its the first
interesting script that gets called in the boot sequence.

At the top of the file is the following text:

# Specify method used to enable concurrent init.d scripts.
# Valid options are 'none', 'shell' and 'startpar'.  To enable the
# concurrent boot option, the init.d script order must allow for
# concurrency.  This is not the case with the default boot sequence in
# Debian as of 2008-01-20.  Before enabling concurrency, one need to
# check the sequence values of all boot scripts, and make sure only
# scripts that can be started in parallel have the same sequence
# number, and that a scripts dependencies have a earlier sequence
# number. See the insserv package for a away to reorder the boot
# automatically to allow this.
CONCURRENCY=none


On a whim, and not knowing if the default scripts as set up by Ubuntu
had indeed been labeled so that concurrent scripts were indeed using
the same sequence number, I made the change to

CONCURRENCY=shell

and restarted the machine. The result was a machine which came up in
about half the time it normally does (if you boot with noquiet and an
nosplash you'll see the scripts being started concurrently).

Thinking I was some kind of pioneer in this field, I checked this out
on the net last night and and was slightly dismayed to see that's it's
a relatively well known modification but not one I've seen posted in
here (that I can recall).

You can also squeeze a little more speed out of the startup-sequence
by booting with a kernel parameter of "profile" tagged onto your
kernel options. This will rebuild the look-ahead cache from the
default supplied by the Ubuntu installation to one which is more
suitable for your specific machine with your specific boot
requirements. You need only do this once.

I knew about the "profile" option from previous reading but I admit
I'd forgotten all about it.

I've already tweaked my laptop with this, without taking a copy of the
readahead files (/etc/init.d/readahead and readahead-desktop I
believe) so I'm not sure if there is much of a difference between the
default and a "tuned" version. Perhaps someone who's not performed a
"profile" from the default install could perform a before/after
comparison (or even post me the default files so I can compare and
contrast myself)

Also, my laptop doesn't have bootchart installed so I have no
snapshots/graphs of "before" with which I can compare the "after". If
anyone does have some previous bootgraphs and fancies performing this
"tweak" I'd be interested in seeing the results... purely for my own
curiosity.

-- 
Steve
When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0




More information about the ubuntu-users mailing list