I’m so glad that Richard Hughes took the lead on getting the system activation code in place and is trying to get it upstream into D-Bus. I think that David Zeuthen was starting to avoid me in the office. Every time I would see him I would just look at him and say “dbus activation patch?” No “hello.” No “how are you doing?” I was pretty focused. I’m sorry, David. So very sorry. But it sounds like you were busy. In any case I’m happy we’re going down the right path.
This is really going to help our story around OLPC. Right now the OLPC XO, like many machines, takes a long time to start up. Far too long. Part of this is the machine’s performance and the fact that we’re still loading a lot of legacy stuff. (RAID? Do we need to check for RAID partitions in the OLPC startup scripts? I’m guessing no!) But when both David and I started looking at it a year ago I think that we both came to the conclusion that the way that we start the desktop it was fundamentally broken, especially on that little machine. That’s why we (and when I mean we I really mean David with me looking over his shoulder) pursued things like mayflower and looking at what architectural improvements we could make to startup. That service activation patch is part of the eventual solution.
The last piece of the puzzle from where I sit is udev. The current set of Fedora startup scripts along with the way that udev is set up takes a whopping 20 seconds or so to start up on the OLPC XO. Why? Well it’s not udev, exactly. Mayflower embeds udev and it starts up in under a second. The problem appears to be the rules, the programs that are run as a result of the rules, and the way that kernel events are handled.
Right now kernel events are handled by udev. Those events are matched against rules in udev’s config files. Those config files specify certain actions. Some of those actions have terrible performance-destroying side effects. Sometimes the rules specify creating device nodes. The device nodes that we create we have to set the console permissions on those nodes. That’s done by running a program after the device is created. In addition there is a global rule that runs modprobe for every event that comes in no matter if it creates a device node. That also requires running a program. On startup, the kernel sends out anywhere from several dozen to several hundred events that result in device creation. Imagine running a program for each of those items. No do that on a machine that runs at about 466mhz. 20 seconds, indeed.
I honestly believe that we can achieve a 20 second startup time for a desktop machine in Fedora if we take an agressive notion to what startup means and continues down this path to a sane architecture. I also believe that we can get the OLPC XO machine started up in that same amount of time, if for no other reason than the number of things we need to load on startup is so much lower. I think that David has a good sense of the architectural things that need to change in udev to make it scale better. He and Kay had a roadmap at one point but I don’t know what happened to it. But it’s a key to getting to that 20 second number. I think we can do it.
-
Why not use upstart?
-
Actually, didn’t we go through this with the 5.2 or 6.0 startup times. I remember that a lot of new solutions were found and tried out when someone over in development made Raster, Johnson, and the rest at the Red Hat Labs use the machines like the ones that Support had to use for a couple of days instead of the developer nuclear powered ones.
Enforce a 500Mhz limit on some of the developer groups, and you might be able to get them to deal with a lot of things that are ‘non-interesting/hard’ [memory usage, startup speeds, disk-size, etc.] Actually just having a group of developers do that for a couple of weeks could be the whole F8 goal :P.
Smoogen
-
Pingback from Fedora, ‘gnaa famo in 20 secondi? « pollycoke :) on June 21, 2007 at 4:40 pm
-
Yes, please sort out startup… using HAL seems like a great idea… of course, what would be cool, would be shutting down services when their not being used too…
That way, if I use apache for some dev work it would start when I go to localhost, but if I start doing something else it could shut itself down after not being used for a while. (at the moment, computers seem to be able to start up services automatically, but not shut them down, freeing up the memory and cpu)
-
I might be wrong to tell this because I’m not a developper but from a user point of view, having a device to boot in 20s. is possible. My Nokia n800 running Maemo Linux boots in 20s. Nokia n800 and OLPC XO are both devices with specific components not subject to change from one user to another (unlike PCs) so it seems possible to clear things that will never be used in any case with these devices (RAID like you mentionned or anything else).
Maybe you should have a look at Maemo’s way of starting the OS ?
By the way, focusing on how to improve startup time for XO may result in better startup time for PCs also and that is great. -
To be honest, I was quite optimistic when I said that Maemo boots in 20s. In fact it’s more like 40s. but I installed many apps that slow the startup process. When the OS is clean it’s quite impressive to see it boot so fast. It’s not as fast as my wife’s Palm but compared to a computer, it’s way faster.
-
Pingback from tecosystems » links for 2007-06-27 on June 26, 2007 at 11:23 pm
-
Pingback from Swfblag » Blog Archive » new macbook on June 27, 2007 at 2:21 am
-
> It just doesn’t resume anymore. And hibernate doesn’t
> work either. It just shows a blinking cursor forever.Do you think your phone needs to “hibernate” and “resume”?
With properly designed software and hardware you wouldn’t need to hibernate. When software is not used, it doesn’t do anything (use/wakeup HW). When hardware (CPU, display, WLAN etc), isn’t used, it’s shut off and each component can do this independently. If the HW components don’t take power while shut down, there’s no need to put the whole machine down (and then resume).


13 comments
Comments feed for this article
Trackback link: http://www.0xdeadbeef.com/weblog/2007/06/system-desktop-startup-on-fedora-lets-do-it-in-20-seconds/trackback/