LWN.net Logo

Improving boot time on a general Linux distribution, not an easy task

Mandriva's Frederic Crozat has a blog entry describing their efforts to reduce Linux boot time. "I thought it would be interesting to explain the various things we tried to save some seconds when booting, since it is a hot topic these days, with impressive results from various people, including Arjan Van de Ven 5s boot on a EEE 901 PC, even if I don't agree with all Arjan conclusions, mostly because it is not always possible to achieve the same kind of tuning with a flexible distribution which can run on many hardware platform, in contrast of a stripped installation and on a single (and now underpowered) hardware platform."
(Log in to post comments)

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 15:31 UTC (Mon) by arjan (subscriber, #36785) [Link]

I'll respectfully disagree with Frederic as far as the quoted part is concerned; basically everything we did is possible in a generic distributions (I'll agree that it needs some work to make the installer or the distro smarter), and specifically, the work we did is not hardware specific. We've run the same image on "normal" laptops as well without any modifications.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 15:39 UTC (Mon) by hummassa (subscriber, #307) [Link]

Arjan, I would like to know what exactly did you did. In the other lwn.net
article, I posted twice asking for some enlightenment (the article itself is
not enough to to get my eeepc booting in five seconds), but you seemed not to
pay attention. Please?

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 15:44 UTC (Mon) by arjan (subscriber, #36785) [Link]

I've posted the slides now on http://www.fenrus.org/plumbers_fastboot.ppt

As for a howto.... you need to realize that that would be a longer document and a lot of work; easiest would be if you used the Moblin rpms, we're putting everything in there.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 15:47 UTC (Mon) by hummassa (subscriber, #307) [Link]

Thanks!! A lot!!

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 17:53 UTC (Mon) by dowdle (subscriber, #659) [Link]

Oh look... a ppt file. Thanks! (argh).

I don't understand why cutting boot time a minute or less is so important. On laptops maybe... but on servers and desktops, who cares? You gripe about things in distros that slow your laptop boot time down and it makes me wonder if certain things done to speed up boot time might have some unexpected negative impact on non-laptops. I'm sure you'll say that if it is done properly, no.

In the case of the EEE PC and other machines shipped with Linux pre-installed... the OEMs can customize their setup to improve boot times. I'm not sure the general distribution should give it much thought... but to be like everyone else, I'm sure they will... darn peer pressure.

To me there are so many things broken (especially with regards to laptops) and in need of improvement, focus on boot time is a little premature. Of course I'm not advocating ignoring obvious, painless changes that improve boot time.

So do your changes to the kernel and/or boot process make general Linux distributions faster than say... Splashtop or the upcoming (has it been released yet?) Dell Instant-On? If they are very close, I'd say the solution already exists for those that want it.

Ignore my controversial approach. I'm just trying to get more discussion on the subject. :)

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 18:29 UTC (Mon) by arjan (subscriber, #36785) [Link]

I can't speak for you, but I end up booting my laptop at least once or twice a day. Same for a desktop box if I had one (I don't anymore), I would turn it off over night.

Suspend-to-disk kinda would deal with that, but not really for me in practice. (And besides that's also slower than just booting)

Improving boot time on a general Linux distribution, not an easy task

Posted Oct 7, 2008 9:56 UTC (Tue) by mdz@debian.org (subscriber, #14112) [Link]

How many of those reboots are because you've modified your kernel, Arjan? :-) You're hardly an average user in this regard.

That said, I agree that boot time is important on netbooks, as explained in the presentation.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 19:07 UTC (Mon) by sjlyall (subscriber, #4151) [Link]

Reducing boot time on servers is important too. For example kernel upgrades require a reboot ( currently anyway ) and people are more likely to do this when the outage times are reduced. A 10 second outage to a server for a reboot is a lot more acceptable than a 1 minute outage since 10 seconds is just quick enough to catch you user hitting the "reload" or "send" button again.

On a bigger scale it means people with clusters of servers can turn the unused ones off completely and then use wake-on-lan to bring them back online quickly when required.

As for desktops I guess you don't have to work with people who reboot daily ( hot desks perhaps ) . It's a lot more fun to do this when it takes 10 seconds than waiting around for a couple of minutes.


Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 7:33 UTC (Tue) by niner (subscriber, #26151) [Link]

Well to be fair: a 10 second reboot on a server seems to be very far away. Even if the
Linux system itself could do it, there would still be the BIOS. And the usual server
hardware takes anywhere between one and two _minutes_ to even reach GRUB. From
there on it's quite quick of course.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 7:36 UTC (Tue) by forthy (guest, #1525) [Link]

I tend to agree with your "10 seconds outtime", but for a real server, the boot time is already limited by the BIOS, especially when it has a larger RAID array attached. Our server here in the office needs more than a minute before it goes to GRUB.

The solution to this is to not reboot the machine after a kernel update, but to kexec into the new kernel. This then could be done in some seconds, supposed the boot phase of the Linux system takes only these few seconds. That would be nice.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 15:29 UTC (Tue) by TRS-80 (subscriber, #1804) [Link]

The development version of Solaris recently got this feature. Another feature recently added is virtual consoles ;-) (text only, X switching hasn't been committed yet).

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 19:33 UTC (Mon) by sbergman27 (guest, #10767) [Link]

"""
Oh look... a ppt file. Thanks! (argh).
"""

Without wishing to detract from the impressive work done, I too was surprised by the powerpoint format. If we don't even use open formats between ourselves when talking about improving FOSS, what chance do open formats really have? I opened it in OO.o, saved it in odp format, and the result seems to work just fine.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 19:38 UTC (Mon) by arjan (subscriber, #36785) [Link]

realistically; if I have to post one, ... ppt everyone can read.

On moblin.org the final one will be posted and that will likely be all formats (eg odp, pdf and ppt)

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 19:56 UTC (Mon) by jake (editor, #205) [Link]

> realistically; if I have to post one, ... ppt everyone can read.

Ouch. Everyone can't read ODF files? OpenOffice.org is not available for some important platforms?

Clearly this issue is off-topic, but important I think.

Though I am definitely not trying to detract from the work Arjan and others are doing on boot time reduction.

jake

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 6:45 UTC (Tue) by Janne (guest, #40891) [Link]

"Ouch. Everyone can't read ODF files? OpenOffice.org is not available for
some important platforms?"

Just because something is available does not mean that it's installed. I'm
typing this on my corporate Windows-laptop, and it most certainly does not
have Openoffice installed. Should I install a behemoth of an office-suite
on this machine, just so I could watch one presentation?

You can open ppt-files with all major office-suite (MS OFfice, Koffice,
OpenOffice and iWork). That does not apply to odf-files.

That said, even better solution would have been to use a pdf-file.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 7:38 UTC (Tue) by niner (subscriber, #26151) [Link]

> Should I install a behemoth of an office-suite on this machine, just so I could watch
one presentation?

No, just one plugin, that's freely available and may help you in such situations.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 14:00 UTC (Tue) by Janne (guest, #40891) [Link]

Or, instead of messing around with plugins, I could simply use a ppt-file
and be done with it.

Improving boot time on a general Linux distribution, not an easy task

Posted Oct 1, 2008 1:12 UTC (Wed) by sbergman27 (guest, #10767) [Link]

And like I say, if even the FOSS community uses MS formats to communicate between themselves, then ODF, dirac, ogg, and theora and the rest are already dead, and we may as well just give up. Have a little backbone, people!

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 8:19 UTC (Tue) by morhippo (subscriber, #334) [Link]

Just install openoffice.org, it can read most ppt files just fine...

I would have preferred PDF, but I have rarely encountered problems with ppt files in Openoffice.org.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 5:58 UTC (Tue) by error27 (subscriber, #8346) [Link]

http://thedailywtf.com/Articles/The-Silver-Scream.aspx

A typical linux server distribution only takes 5 minutes to boot and that only ends up costing 2.8 zillion dollars in the field so it's ok.

Improving boot time on a general Linux distribution, not an easy task

Posted Oct 1, 2008 0:56 UTC (Wed) by sbergman27 (guest, #10767) [Link]

Your linked article says 3 minutes and not 5. (And attributes it to starting cups and samba. Ha! Ha!) I'm quite familiar with RHEL, and from the grub prompt it takes less than a minute to boot to gdm on typical hardware, less to a text console. Unfortunately, server systems tend to have a ridiculously long POST. Even so, I've never seen a RHEL server take more than 1.5 minutes from power-on to prompt.

Improving boot time on a general Linux distribution, not an easy task

Posted Oct 2, 2008 20:30 UTC (Thu) by cdmiller (subscriber, #2813) [Link]

Heh,

Our virtual servers under linux KVM come up in less than 30 seconds. A physical host reboot is another matter. Linux BIOS for Dell/HP/IBM/Sun server hardware would reduce that quite a bit.

Fast boot useful

Posted Sep 30, 2008 8:22 UTC (Tue) by eru (subscriber, #2753) [Link]

I don't understand why cutting boot time a minute or less is so important. On laptops maybe... but on servers and desktops, who cares?

I do. I don't keep my home desktop machine running except when I need it: Why waste electricity for just idling? There are also safety issues: in an old wooden house you don't want to run any unattended electrical equipment unnecessarily, and I once had the machine partly fried by a close lightning strike (had to replace the power and network interface), so now I also disconnect the power cord and network when leaving it for longer time.

The machine in question is a bit hungry at around 200 watts (and I have never got any kind of sleep mode working on it), but at least the 3.4Ghz dual-core Pentium D manages to boot Mandriva Linux in about a minute, which is not totally unreasonable, but faster would be nicer. Come to think about it, this is close to the boot time that my 75Mhz Pentium machine had with a then-current Linux distro 14 years ago! Considering the huge speed difference, one would expect the newer machine to boot in a second or two...

Fast boot useful

Posted Sep 30, 2008 8:48 UTC (Tue) by NAR (subscriber, #1313) [Link]

I think today we have about the same booting time we used to have 25 years ago with MSDOS on an XT or 286. Which is not that nice. Currently I'm a little sceptical about that 5 second boot: it sounds great, but we have to add the BIOS time, the grub timeout, the time of getting IP address via DHCP, etc. I'd be pleasently surprised if we'd managed to get a working desktop 20 seconds after the power button have been pressed. On the other hand I'm sure that there is bloat that could be trimmed down.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 15:27 UTC (Tue) by renox (subscriber, #23785) [Link]

[I don't understand why cutting boot time a minute or less is so important.]
Because most users are willing to wait 5s to google something, not two minutes: there are quite a few times where I would like to check something on my computer but don't do it because I'm not willing to wait.
If I could do it 5s after pushing the button, this would be okay.

Of course with 5s to start the OS, then the BIOS initialisation time matter (especially with the big RAM that we have, I've always thought that the OS should test continuously the RAM at runtime so that the check made in the BIOS could be disabled for faster total startup time)..

Anyway, *thanks a lot* arjan for this work: I've used BeOS on a Celeron333 a few years ago and it started in 14s from the bootloader to the (responsive) GUI included whereas Linux and Windows took much more time (>>1min) to do the same thing(*), you've showed that Linux can boot fast too, this is very nice!

I keep my finger crossed that a distribution will work to enable this feature on regular hardware: they'll have a new user: me!

*: even though their GUI were (and still are) much less responsive..

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 8:13 UTC (Tue) by Zapp (guest, #54389) [Link]

Hi!
I found the sreadahead package on moblin.org, but it does not seem to collect the initial filelist for later readahead. How does one get this list?

Do I have to use the "normal" readahead for this and then post-process the gathered information with the sreadahead/filelist application?

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 30, 2008 21:23 UTC (Tue) by howari (guest, #54419) [Link]

Great work! Hopefully this excellent work will someday be in ubuntu
and other distros.
And we'll hope that bioses boot time can also be reduced to 2 or 3 seconds.

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 16:06 UTC (Mon) by dany (guest, #18902) [Link]

Arjan, very impressive job.

About 2 years ago, I tried to optimize boot time of my laptop running Slackware 11 and easily went from 40s to 20s (gdm+sound+network up, activity down). Just turned off not needed services, loading necessary kernel modules, little modified rc scripts. I thought it was fast.

But seeing it can be done in 5 seconds is stunning. And when I see all that bloat, what every distro does during boot, I can only laugh although its sad.

Keep up good work, you bring light into world of darkness!

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 20:33 UTC (Mon) by fcrozat (subscriber, #175) [Link]

I must confess I based my comments regarding Arjan conclusions based on the (excellent) lwn article describing his talk and the few comments he made on this article, since it was the only material available at the time I wrote my blog entry. Slides don't contain enough informations to be useful and from a a quick look at moblin.org, only source code of sReadhead seems available.

But I'll be happy to read more about your findings in the future and if they can be incorporated in a general Linux distribution.

Improving boot time on a general Linux distribution, not an easy task

Posted Oct 1, 2008 11:43 UTC (Wed) by fb (subscriber, #53265) [Link]

Hello Frederique

Thanks a lot for both working on this, and for writing a somewhat detailed description of what you have been doing (which should help improving the whole "Linux desktop" landscape).

Improving boot time on a general Linux distribution, not an easy task

Posted Sep 29, 2008 20:52 UTC (Mon) by MiguelAtWork (guest, #53380) [Link]

Big kudos to Arjan, and here's hope that distros will take notice of this work.

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