Forgot your password?
typodupeerror
Operating Systems Software Linux

How Kernel Hackers Boosted the Speed of Desktop Linux 380

Posted by timothy
from the mild-claims dept.
chromatic writes "Kernel hackers Arjan van de Ven and Auke Kok showed off Linux booting in five seconds at last month's Linux Plumbers Conference. Arjan and other hackers have already improved the Linux user experience by reducing power consumption and latency. O'Reilly News interviewed him about his work on improving the Linux experience with PowerTOP, LatencyTOP, and Five-Second Boot."
This discussion has been archived. No new comments can be posted.

How Kernel Hackers Boosted the Speed of Desktop Linux

Comments Filter:
  • by pwnies (1034518) * <j@jjcm.org> on Thursday October 02, 2008 @04:17PM (#25237899) Homepage Journal
    Not only is this an impressive accomplishment, but if this can be applied generically to most distributions then it should present an excellent opportunity for advertisement. Showing how you can boot, check your email, read the latest news, and be done with all you need to have done while a fellow Vista machine is still booting says a lot. Even if we can get most distributions down to 15sec average, it's a huge leap. Grats to these guys.
  • Does it matter? (Score:4, Insightful)

    by suso (153703) * on Thursday October 02, 2008 @04:19PM (#25237923) Homepage Journal

    I see a lot of comments on the LWN article of people talking about starting services after the user sees the desktop as cheating. However, I ask, does this really all matter. I'm not sure how everyone else uses their computer but I only need to boot my Linux machine about once every 30-60 days. I don't need to dual boot like I did back in say 2002 and comparitively, the amount of time it takes for Linux and X to start up are practically irrelivent. I can imagine laptop users may feel much differently about this, but I thought that was the point of being able to suspend/hibernate.

    One thing that worries me is that a focus on ensuring a quick boot at the expense of a potentially less stable system is not a good thing. Fortunately however quick booting is not something that Linux requires, its something that distributions can decide to do or not, which is one of the strengths of the open source/Linux way.

  • Re:Does it matter? (Score:5, Insightful)

    by arth1 (260657) on Thursday October 02, 2008 @04:36PM (#25238189) Homepage Journal

    Being able to boot in NN seconds isn't so impressive when you look at the incompatibilities it creates.

    On my networks, the servers connect to the DHCP server and get not only an IP back, but also the name of NIS servers, who in turn returns (among other things) autofs maps which are used to mount the home directories as well as providing login authentication. The xdm login window returns a list of currently available X servers.
    In other words, there are reasons why things run in the order they run, and any deviation will cause things to stop working.

    Improving things are fine, but not when it's at the expense of current and well-known functionality.

  • by SilentChris (452960) on Thursday October 02, 2008 @04:43PM (#25238289) Homepage

    The only issue is that they had to cut some corners to make this work. Axing sendmail? Ok, I understand that (I think was arguing that 10 years ago -- still don't wonder why that's on by default in the desktop distributions). But "The 'done booting' time did not include bringing up the network"? Um, ok... no. With the proliferation of devices solely used to read information from networks (Netbooks, those "quick-loading" Linux apps some laptop manufacturers are including so people can check their email, etc.) accessing the network is one of the main purposes for turning on the machine in the first place. It would royally piss people off to have a quick loading screen, log in and then see "Hold up, still starting up the network". (Just as frustrating as starting a Windows or Mac, getting to the desktop and still waiting while services and programs are loaded).

    Come to think of it, what people really need to do is take a good look at modern OSes and determine EXACTLY what still needs to be there and what's cruft. Some of the daemons/services we're launching made sense 15-20 years ago. Does the fax daemon really need to start on my Mac? Does the Group Policy Client need to be started on my Vista box when I'm not on a domain? There's lots of stuff that at one point probably made sense to someone but now is just extraneous.

  • Re:Yeah but... (Score:2, Insightful)

    by Anonymous Coward on Thursday October 02, 2008 @04:45PM (#25238333)

    desktop OSes are so complex that using re-flashable ROM adds a great deal of complexity and cost to the design.

    Flash is almost dirt cheap. $10 buys you more Flash memory than most systems have RAM. Just save the state of a freshly booted OS in Flash and when the computer starts, load just what you need to access flash and handle page faults, then start as if you've already loaded everything into RAM and start copying from Flash to RAM. Whenever a page fault occurs, load that page from Flash next. This way you don't need to wait until everything is copied to RAM.

  • Re:Does it matter? (Score:3, Insightful)

    by chromatic (9471) on Thursday October 02, 2008 @04:53PM (#25238433) Homepage

    On my networks...

    ... you can't take advantage of all of these improvements. Why penalize everyone who doesn't use NIS and autofs?

  • by nschubach (922175) on Thursday October 02, 2008 @04:54PM (#25238451) Journal

    ... but an OEM can. (If they were so inclined.)

  • Re:Does it matter? (Score:5, Insightful)

    by tepples (727027) <tepples AT gmail DOT com> on Thursday October 02, 2008 @04:54PM (#25238455) Homepage Journal

    On my networks, the servers connect to the DHCP server and get not only an IP back, but also the name of NIS servers, who in turn returns (among other things) autofs maps which are used to mount the home directories as well as providing login authentication.

    What you describe is similar to what Windows calls "domain authentication". Not every computer logs on to a domain, especially in the home or home office environment where a fast boot is paramount.

    The xdm login window returns a list of currently available X servers.

    Then have it refresh the list whenever a network interface comes up.

  • by baka_toroi (1194359) on Thursday October 02, 2008 @04:59PM (#25238515) Journal
    Man, WTF? I used to use Windows 95 on a 486 with 16 MB and it didn't take nearly as much as that. It should be blazing fast on a Pentium III.
  • Re:Does it matter? (Score:4, Insightful)

    by sofar (317980) on Thursday October 02, 2008 @05:01PM (#25238539) Homepage

    so you are saying that you would rather stare at a hung boot in text mode instead of having the possibility of working in offline mode in X?

    that does not make sense at all :)

    for network-client setups like you describe, we should still start X immediately and if the network fails or is slow, at least provide some interaction with the system (work offline, nudge network with login attempt etc).

  • by schwaang (667808) on Thursday October 02, 2008 @05:09PM (#25238659)

    Sendmail's main purpose in the typical Linux desktop configuration (say, Fedora) is delivering logwatch output to root. [Logwatch attempts to distill the important stuff from system log files.]

    But sendmail can be started lazily (in the background) so as not to slow the boot. Or sendmail can be replaced with a lighter weight smtp daemon. Truly though, logwatch-by-email should die for non-enterprise desktops. It's so 1980s it just hurts.

    IMHO logwatch should be replaced by some kind of graphical notification widget which requires authentication to actually view the details, since they can be sensitive. As it is, I haven't read my logwatch emails in months, but if SMART is complaining about an immanent disk failure I'd *really* like to know.

  • Re:Does it matter? (Score:3, Insightful)

    by gollito (980620) on Thursday October 02, 2008 @05:13PM (#25238699) Homepage

    How ironic, with all the Vista bashing that tends to go on in threads like these. Vista boots relatively quickly, and hasn't been powered down for me for weeks since suspend/wake works perfectly. But at least someone, somewhere can boot linux in 5 seconds.

    Agreed. The only time I reboot my laptop is after updates/new software install. IMO the power management in Vista is the best I've seen.

  • by Theolojin (102108) on Thursday October 02, 2008 @05:26PM (#25238891) Homepage

    Actually Vista with 4 Gigs of RAM boots pretty quickly. It's once it's up that it is slow.

    Microsoft seems to have performed a bit of trickery to make you perceive that Vista boots quickly. The desktop on my wife's Vista laptop appears fairly quickly but it is simply unusable for a couple more minutes. This is different from XP which is fairly usable as soon as (well, shortly after) the desktop appears. It's rather like the desktop is the bootsplash on Vista.

  • Re:Does it matter? (Score:1, Insightful)

    by Anonymous Coward on Thursday October 02, 2008 @05:37PM (#25239029)

    Yes, it matters. The iRex Iliad eBook reader, for example, is a linux box, and you boot it up quite a lot.

    Boot time is around 50 seconds. Thats a looooong time to open a book - one of the biggest complaints the users have.

    While this can be mitigated somewhat by getting suspend working, you're left with once-a-week or so, hiding from society while your embarassing techno-lump wakes up. In any case, this particular hardware does not support suspend (we're told, in part, due to a proprietary USB driver. grrr)

    5 second boot time would change how you use the device. I can see this being the case for all kinds of devices from netbooks down; maybe someone else has an itch to scratch to get this working with desktops and servers.

  • by es330td (964170) on Thursday October 02, 2008 @05:48PM (#25239197)
    What really needs to happen is for there to be an informative display of what is happening when the system is loading, something that is one of my favorite things about linux. Most people wouldn't gripe about how long it takes for their system to load if they knew what it was that was loading. Sadly, I have stopped being amazed by the people who complain that "Windows loads slow" and then go in and find that they are incapable of saying "No" to any application that wants to install itself on their system. If you want the iTunes Helper and 6 different IE toolbars to load then you accept that requires time. If your fancy all-in-one fax/printer/scanner/roaster has some special monitor that has to load, suck it up and accept a slow load but at least allow the user of any OS to see what exactly it is that is getting put in memory when their system starts up.
  • by chromatic (9471) on Thursday October 02, 2008 @06:31PM (#25239703) Homepage

    I've updated hundreds of Linux boxes without the need for a reboot.

    Linux runs many embedded devices; some of them may wish to boot quickly.

  • Re:Yeah but... (Score:3, Insightful)

    by DreadPiratePizz (803402) on Thursday October 02, 2008 @06:39PM (#25239829)

    It's still possible to create such fast boot times using ROM. Especially with re-flashable ROM. These sorts of boot times are seen in systems like Game Consoles.

    Uhh, if I turn on my Mac Pro and my Xbox 360 at the same time, I'm up and running with OS X a few seconds before the 360 starts to load the game. I for one hope my computer DOESN'T have boot times like a console.

  • by Geheimagent (679949) on Thursday October 02, 2008 @06:45PM (#25239907)
    I suspend or hibernate most of the time. I reboot my laptop only when the kernel gets a security fix. I don't care if that takes 40 seconds.
  • Re:Does it matter? (Score:3, Insightful)

    by jonbryce (703250) on Thursday October 02, 2008 @07:21PM (#25240349) Homepage

    If you ever end up with an uptime of more than 5 weeks in Vista, you should worry. It means you haven't installed the latest patches.

  • by RulerOf (975607) on Thursday October 02, 2008 @07:59PM (#25240695)
    This is done by every operating system... ok, it's done by Windows and OS X. Not sure about the linux flavors.

    What I'd be curious to know is if there's a way to prevent it from giving me a damn desktop if I can't use it yet... I wouldn't mind sitting at an hourglass or green spinning circle for 8 extra seconds if it means Windows won't taunt me with a GUI I cannot use :P
  • by SanityInAnarchy (655584) <ninja@slaphack.com> on Thursday October 02, 2008 @08:43PM (#25241075) Journal

    But "The 'done booting' time did not include bringing up the network"? Um, ok... no.

    Consider that "bringing up the network" generally involves communicating with at least one other device. You can't really call it a metric of OS boot time when merely plugging into a different network (or none at all) might change the result.

    Come to think of it, what people really need to do is take a good look at modern OSes and determine EXACTLY what still needs to be there and what's cruft.

    I would much prefer simply cutting them out of the boot process, or making a smarter boot process.

    For example: Maybe I do want a MySQL server running. But I certainly don't want you to delay my login screen while I wait for it to start. I probably don't want it eating up RAM on a desktop, either, until something needs it.

    A good implementation: X11 on OS X. Granted, there are many things not to like about it, but one thing to love is the fact that it only starts once you actually attempt to run an X app.

  • by RAMMS+EIN (578166) on Friday October 03, 2008 @03:08AM (#25242935) Homepage Journal

    A couple of things that have changed, from the top of my head:

      - Those old machines had an OS dedicated to support exactly the hardware that was shipped. OTOH, Linux distros are usually generic, and detect hardware on boot.

      - There's a huge difference between a BASIC interpreter and a full-fledged multi-user OS with networking, GUI, etc.

      - PC hardware spends a lot of time during boot before actually handing control to the software. Server hardware is often a lot worse.

      - The code involved in booting those old machines was probably written by Real Programmers, who knew the ins and outs of the hardware they were programming for. It's probably horrible to maintain, but ridiculously fast. By contrast, most of the code involved in booting your Linux distro is written in a variety of languages, by a whole lot of people, few of whom are Real Programmers, and it's probably optimized for genericity and maintainability, rather than efficiency.

    Having said all that, you _can_ boot Linux ridiculously fast. I used to have a 486 where the boot process basically consisted of (1) POST (2) Load GRUB (3) Load kernel (4) Run init (5) Run login. Pretty much a normal boot process. What was special about it is that the kernel had all required modules compiled in, and nothing else. init (IIRC) only spawned a single tty and ran login. And both init and login were BusyBox [busybox.net] statically linked against dietlibc [www.fefe.de]. From GRUB to login prompt took less than 5 seconds, IIRC. You could further improve on this by foregoing the BIOS in favor of something like coreboot [linuxbios.org].

  • by sofar (317980) on Friday October 03, 2008 @12:52PM (#25247867) Homepage

    we already boot in seconds. the totaly size of the data read from disk at boot is UNDER 100mb total on our 5-second boot systems.

    you don't provide a solution to speeding things up, only an alternative that works in limited cases. reinventing hibernate at best.

"The vast majority of successful major crimes against property are perpetrated by individuals abusing positions of trust." -- Lawrence Dalzell

Working...