Reducing Boot Time On a General Linux Distro
Linzer writes "In this blog entry, Fred Crozat (head of Mandriva's engineering team in France) explains in great detail how his team has been detecting and getting rid of bottlenecks in the boot process, from the early stages to loading the desktop environment, thus decreasing overall boot time. An informative tour of the nuts and bolts of the boot process and how they can be tinkered with: initrd, initscripts, udev, modprobe calls. The basic tool they use for performance analysis is bootchart, which produces a map of process information and resource utilization during boot. The final trick: preloading desktop environment files while waiting for the user to type her password."
I can see optimizing this for the sake of the geeky goodness of it and all that but, really, how often does someone reboot a Linux box, that this even enters into it? Maybe I'm unusual but mine usually stay up until there's a new version of my distro of choice to upgrade to. Time to boot just doesn't impact me very much.
The final trick: preloading desktop environment files while waiting for the user to type her password.
A female Linux user?!? You can compile and install Gentoo while waiting for that to happen. : p
This guy's the limit!
I see what they're getting at but not how to achieve similar gains. Anybody out there feel like putting together a slightly more practical guide?
I am sure both Mandriva users will be very happy.
Well, it helps if it's installed on a laptop or on old hardware.
Also it goes to quicker recovery time in case of outages. Coming from the Solaris world before they had journaling UFS filesystem it could take hours to FSCK a large partition before the OS would come up. On a production system that is a big deal.
The use of "they" as a singular pronoun is by no means universally accepted.
On my systems, it's the BIOS that takes a very large chunk of the overall boot time. As far as it goes, I think the Core2 machine takes about the same amount of time to start loading the OS as the old 486 used to.
Having an x86_64 architecture is nice, but why oh why are we still lumbered with that legacy piece of you-know-what? I think I want a Mac Mini now, just because of that...!
-- Steve
My problem is not the linux distro coming up to a login prompt, but the server getting past all the cards prompts to get to the normal boot. What with scsi controller cards having their own bios, the system bios, and miscellaneous others, it can take longer to get past the post then to boot linux. The HP DL360 G5's we have can take almost 30 seconds just to starting booting the linux kernel.
My password is just the letter 'a'. Like in 'apple'. No luck for me then.
Just be sure not to use crappy software/hardware that doesn't support [sleep].
And pay multiple times over for return shipping when I find that one or more components of my computer don't come out of sleep properly. Or do you know of a good whitelist of makes and models of commodity PC hardware that have the fewest defects in their ACPI implementation?
NICE try "Steve" or is it "Mr. Jobs"? Attempting to infiltrate our "Linux discussion" with your MAC hype!!
Why not just get hibernate to work well and do that?
There is a lot of CPU chewed in the booting process and you can only do so much to speed it up.
Comment removed based on user account deletion
I would invoke the "Humpty Dumpty Principle" (from Carrol's "Through the Looking Glass"). Quoting: 'When I use a word,' Humpty Dumpty said, in a rather scornful tone,' it means just what I choose it to mean, neither more nor less.'
"Their" is in common usage to indicate his/her. It has the advantage of being less awkward to say and looks less strange on the page. It also has the benefit of annoying grammarians, who seem to believe that they subscribe to the One True Way.
Their has been in common usage for a possessive of indeterminate gender since before grammarians decided to declare rules for the English language based on their (sexist) biases and preferences. Wikipedia provides a mind-numbingly detailed description of this history and grammatical rules surrounding it, but this usage dates to the 1300's.
Here are some fun quotes that Wikipedia gathered showing usage of they and their as singular by famous authors:
-- Arise; one knocks. / ... / Hark, how they knock! - Shakespeare, Romeo and Juliet
-- 'Tis meet that some more audience than a mother, since nature makes them partial, should o'erhear the speech. - Shakespeare, Hamlet
-- I would have everybody marry if they can do it properly. - Austen, Mansfield Park (1814)
-- That's always your way, Maimâ"always sailing in to help somebody before they're hurt. - Mark Twain, Adventures of Huckleberry Finn (1884)
So this is not some modern invention of feminists or the ignorant, but simply usage that is not favored by self-appointed grammar police. (At least in France the grammar police are official and given the duty of writing the rules on behalf of that nation. It seems that there, too, people go on speaking without regard to the official rules.)
-Jon
On Linux usb ports can be powered down to save power. However it turns out that many USB devices are broken and can't cope with being powered down. Now the question comes up what version of Linux are you using? If it's something older than 6 months then there's a good chance this has been fixed (the list of things allowed to be powered down has gone from a blacklist to a whitelist of large categories). See this commit talking about the kernel no longer powering anything down bar USB hubs for some more details.
A very short term band aid might be to disable usb autosuspend on that device via /sys/.
While servers still seem to take hours to get past their BIOSes, modern laptops often have options for skipping the POST and generally taking shortcuts enumerating devices. The EeePC has a "BootBooster" option where it caches BIOSes results to solid state disk so the BIOS finishes in less than a second (rather than 4 or 5). It is so fast it can be a pain when you actually DO want to change a BIOS option!
Using the pronoun 'her' instead of 'his' is as sexually discriminatory as using simply 'his' has been judged to be in the past.
My grammar is terrible, but I do know that 'his' was used as the neutral/unspecified gender pronoun as well as the masculine pronoun (but we tend to use their now, it's what I would use) and that it has nothing to do with negative sexual discrimination.
Those that think women are denigrated by the use of "his" (eg "If a soldier lays down his arms ...") should really wonder why they think so little of women that they might need the rules of grammar to be changed to promote them.
OK, er, you fail. Epically.
These are completely different types of work. What Arjan is doing is tailoring boot to a specific set of software running on a specific set of hardware, using an entirely legacy-free init system.
This is nothing at all like what Fred is doing, which is optimizing a legacy boot system for completely generic hardware and software - it has to run on any system, with any set of software available from the Mandriva repositories installed.
The two types of work are utterly and entirely different.
For the record, another of our engineers - Claudio Matsuoka - has been working on the *other* type of boot system for several months now. It began as a re-implementation of the 'fastinit' system found in the Xandros distribution on the Eee. This system is called 'finit', and you can find it at http://helllabs.org/finit/ . It is used in Mandriva Mini, our custom edition for netbook OEMs. It pre-dates Arjan's work substantially, or at least the public announcement of it.
Here's a poweropint presentation about this work. If you're an LWN subscriber you can you read an article and comments about the 5 second boot presentation at the Linux Plumbers Conference (it will become viewable by all on from the 2nd October 2008). Finally you might be able to test drive some of this work if you are willing to sacrifice a USB key and destroy your existing EeePC install by because Moblin may include this work.