[TriLUG] Speeding up the boot process of a Linux box

Craig Taylor ctalkobt at gmail.com
Tue Mar 27 14:32:11 EDT 2007


I've increased my boot time on my laptop from 1.5 minutes to 20
seconds by doing the following:

1) Disabled dhcpd and started using a static ip address. The initial
delay while it brought up dhcpd and waited for a reply consumed at
times, upwards of 20 seconds (only at boot time 'tho - it seemed like
it was waiting for the wireless card to settle). Setting it to static
wasn't a big deal for me.

2) Removing un-necessary services from startup (such as mysql, apache
etc). My laptop is both a dev box and entertainment box - I can set up
my own scripts to bring up services I need depending on what role I
want to use it in.

3) Setup some necessary tasks to start up in the background (This is a
dangerous part ... I went into some of the init.d scripts and had them
execute their most time consuming section in the background if I
wanted the daemon running but I knew that nothing subsequent didn't
"depend" on it being live. If I was running mysqld or apache they
would be configured this way.).

Examing /var/log/boot and spotting where the most time is consumed and
optimizing that section is the best bet. As a success indication: my
drive light is on roughly 85% of the boot time now as opposed to
roughly 25%.

I haven't taken a look at the parallezing boot programs but I wonder
if they wouldn't be doing the equivlent of what I'm doing except to
add an additional layer of complexity in the system. (init.d / rcX.d
are fairly straightforward).

On 3/27/07, Kevin Otte <nivex at nivex.net> wrote:
> On Tue, Mar 27, 2007 at 12:13:05PM -0400, Steve Litt wrote:
> > Here's a reason I might not want a machine to boot faster...
> >
> > The boot procedures on my Mandriva machine are made to accommodate a wide
> > variety of situations. They include hardware and network detection. They've
> > encountered thousands of hours of testing, and are proven. It takes less than
> > 5 minutes to boot, and I boot usually only once a day, in the morning when I
> > begin work.
>
> That's just it.  They are time tested (roughly 30 years in fact) and proven
> serial methods of booting.  With the advent of hotplug hardware and the
> like, the ability to handle such things has been grafted on to the process.
> What upstart seeks to do is make the entire shooting match event driven such
> that handling of these events happens closer to the core.  This just happens
> to (hopefully) have the added benefit of a faster boot time.
>
> > Less than 5 minutes, during which I can do other stuff anyway, is a tiny price
> > to pay for the privelege of having rugged, tested and versatile boot code.
>
> My laptop (an old Mobile Celeron) boots up in about a minute and small
> change.  I'm looking forward to seeing if upstart can improve on that.  I
> imagine most other distros will wait to see if Ubuntu sinks or swims on
> upstart before they look at it.  It may be quite awhile before it gets
> adopted wide scale, but by then it will be rugged, tested, and definitely
> more versatile code.
>
> --
> Kevin Otte, N8VNR
> nivex at nivex.net
> http://www.nivex.net/
>
> -=-
>
> "Those who cannot remember the past are condemned to repeat it."
> -- George Santayana
>
> "It seems no one reads Santayana anymore."
> -- Cdr. Susan Ivanova, Babylon 5
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list