Slashdot Mirror


How Kernel Hackers Boosted the Speed of Desktop Linux

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."

16 of 380 comments (clear)

  1. Re:Does it matter? by Anonymous Coward · · Score: 4, Informative

    Yes.

  2. In case Oreilly goes down again... by pwnies · · Score: 4, Informative
    ...here's the text from the oreilly article:

    O'Reilly News recently interviewed Arjan van de Ven about his efforts to improve Linux performance and reduce power consumption. Arjan works for Intel in the Open Source Technology Center. This interview is approximately 30 minutes.

    One of the projects you're probably most known for in the past couple of years is the PowerTOP utility, which I found very fascinating. Looking at some of the gains you've made over the past 18 months, it seems like Linux-based devices are saving a lot more power than they used to. What do you consider the big successes in the past year and a half?

    To be honest we fixed effectively the entire Linux desktop space. It's not--PowerTOP is more--it's not just what we fixed with PowerTOP is not individual pieces. We fixed everything. For me that was a success.

    Is that everything in terms of not just desktop but servers as well?

    Yeah; we fixed not just Evolution. We fixed Firefox; the thing with Firefox was that it wasn't one thing that was broken. Everything had problems and we had to fix all of it. So for me the success was how quickly everything got fixed; it was just amazing.

    In this context you consider fixed--everything is no longer broken in the same way or--?

    Everything is no longer keeping the CPU out of idle basically.

    Do you have a reference machine? I guess I'm asking what's your benchmark for this, a particular software configuration stack or particular type of machine, or are you willing to say it's pretty much every Linux based machine out there?

    I'm looking at several machines--my own laptop but to be honest, what runs on my own laptop is what I care about most. At least that's where I got more battery life, this is where I see the changes. I tend to run a quite rich environment on my laptop but I also look at service. We look at all kinds of machines and we see the same trend everywhere in that all the various pieces of it--never polling or keeping the CPU up. They all got fixed.

    In fixing this, is there a component of education, for example, saying "Instead of doing a busy wait on a select loop or continually polling you should set a kernel timer and wait for that to call you"?

    That's part of it but the biggest thing is that you had no visibility. Just two days ago at IDF I spoke with a developer of the GNOME desktop and he said, yeah; when I saw it happen I fixed it in 10 minutes, but you don't know it's there until you see it from PowerTOP. Adding the visibility turns out to be enough for people to start fixing it. They know how to fix--how to not poll most of the time.

    You can't fix something you can't measure.

    If you don't see that it happens you don't know it happens and you can't fix it.

    Are you getting the same sort of results from other projects you run into?

    GNOME was there but it's almost everybody goes oh yeah; we should have not done that; either they fix it themselves or some--a lot of people give them the fix and in general it's like oh yeah; we shouldn't have done that. Unless you see what's happening you don't know what to fix, so the biggest thing that PowerTOP did was add visibility. We can see under the hood what's going on and then we can fix it. And quite often the fix is very simple.

    It sounds then, maybe I should be able to say that just about everybody is happy to see this. Is that the case?

    Yes; people--all the developers I've worked with--and that's quite a few--they all go oh yeah. Thank you for the fix; we should have no problems in the first place. We didn't know this; it's fixed now. In the beginning I did most of the fixing when PowerTOP was very new and now days the people do it themselves. The developers learn

  3. Re:Should lead to possibly great advertisements by not+already+in+use · · Score: 4, Informative

    but if this can be applied generically to most distributions then it should present an excellent opportunity for advertisement.

    Not going to happen. If you read the article, you'll see that they compiled all drivers directly into the kernel, so it is essentially an embedded device now. Also consider the fact that they are using a SSD, which is going to decrease boot times regardless of any boot-process improvements.

    So basically, you could never apply these speed increases to a generic distro.

    --
    Similes are like metaphors
  4. Re:Let's head some comments off by sofar · · Score: 4, Informative

    We've sent a patch to Greg KH making USB initialization go in parallel which reduces usb initialization from [N * 0.1] seconds (where N is the number of usb ports in your system to [0.1]. This patch is currently in linux-next afaik.

    I'm wondering why you would even have PCIe HP turned on on an asus 900 :)

  5. Re:Should lead to possibly great advertisements by sofar · · Score: 5, Informative

    actually we do bring up the network daemon (either connmand or network manager) as soon as we can, but we don't stop the entire startup process.

    on my test system here it runs dhclient about when X starts up and the network card receives a reply with a few seconds from that, long before I can start firefox :)

  6. Re:Boots in 5 seconds... by sofar · · Score: 4, Informative

    it's just a normal linux distro. for the demo we used an auto-login but you can have it start to a password screen as well, so it's just as secure as your base distro is....

  7. Re:Should lead to possibly great advertisements by sofar · · Score: 5, Informative

    we don't even need to recompile the kernel, we can just link the modules in as needed. Something most older UNIX systems actually did.

  8. Re:Does it matter? by elmartinos · · Score: 3, Informative

    Linux has always tried to be an excellent choice for a very broad range of uses. Just because you do not need fast boots does not nobody else does.

  9. Re:Important details I'm not seeing by sofar · · Score: 4, Informative

    The 5-second demo video is of an asus eee pc 901, however the same image boots on an acer aspire 1 also in exactly 5 seconds.

    These systems have 512mb of memory, a slow consumer-grade SSD (we used a 4gb partition) and a 1.6GHz atom processor (single core, HT enabled).

    this is a _slow_ system compared to any desktop-grade system currently on the shelves.

  10. Re:Important details I'm not seeing by sofar · · Score: 3, Informative

    and we used the 'stock' SSDs in these systems. from the bootcharts you can see that our SSDs top out at 25-30mb/sec throughput on read, far below what most regular hard discs or server-grade ssd's can do.

  11. Re:Should lead to possibly great advertisements by dfetter · · Score: 4, Informative

    Nope. Kudos is Greek and singular, just like pathos :)

    --
    What part of "A well regulated militia" do you not understand?
  12. Re:"Pretty Quick"? Drug of Choice? by DiegoBravo · · Score: 4, Informative

    There is no such thing as end-user-OS-boot-time. It depends a lot on device drivers and system background utilities. For example, some piece of hardware AND some release version of its driver maybe causing your trouble... especially if that hardware is removed and the driver probes a lot of time just to be sure. Same for the AV software doing weird things in order to "secure" the system *before* user interaction... At least in the hardware side, this apply for Linux too.

  13. Re:Should lead to possibly great advertisements by Not_Wiggins · · Score: 4, Informative

    An IBM developer figured out how to use "make" to start services in parallel (once you have determined the dependencies).

    A link to the article is here.

    Bear in mind, this is circa 2003. 8)

    --
    Diplomacy is the art of saying, "Nice doggie!" until you can find a rock.
  14. Kernel modesetting is slow arriving by Sits · · Score: 3, Informative

    Kernel modesetting is kinda here for Intel and ATI graphics cards (in Fedora) but it's still stabilizing.

    So the answer to your first question is: soon you will be able to set the final video mode in the kernel. As for your second question, doing it in X is not the best solution (as doing it in the kernel means less flickering when X starts, the ability to support graphical kernel panics and nicer virtual terminal switching).

  15. Re:Should lead to possibly great advertisements by Malekin · · Score: 4, Informative

    32-bit operating systems on x86 can get around this with PAE. Windows XP and Vista don't have support for it, though.

    http://www.appleinsider.com/articles/08/09/03/road_to_mac_os_x_snow_leopard_64_bits_santa_rosa_and_the_great_pc_swindle.html

    The half gig "lost" is because x86 is a memory-mapped architecture. The graphics card memory and all your peripherals are mapped over the top part of your memory address space.

  16. Re:Should lead to possibly great advertisements by networkBoy · · Score: 4, Informative

    You obviously fail it.

    The 32 bit limitation is 4 gigs of RAM (total).
    Your video card's memory is mapped into the same address space as your system ram, but from the top of the address space downward, rather than system ram (mapped from bottom of address space upward).
    The video ram has priority, thus if you have 3G of ram and a 1G video card you are using 100% of your address space. any more system memory installed will be masked by the video ram and thus is "lost".
    -nB

    --
    whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump