Linux boots fast?
| From: |
| Sebastien Loisel <sloisel-AT-gmail.com> |
| To: |
| letters-AT-lwn.net |
| Subject: |
| Linux boots fast? |
| Date: |
| Thu, 10 Nov 2005 22:05:34 +0100 |
>
> ...one of the fastest Linux distributions available today. Can you imagine
> a complete Linux OS booting into text console in 22 seconds and into full
> KDE in 45 seconds?
You call that fast?
45 seconds on a 2GHz cpu is 90,000,000,000 clock cycles. In each clock
cycle, you can execute one meaningful instruction. In 5,000 clock cycles,
you can completely rewrite the text screen. In a 100 clock cycle, you can
set up a DMA transfer, read or write a short message on the PCI bus, change
the video mode, etc...
You could do a million such thing and still not have used 1 billion clock
cycles, half a second. Or, you could write your kernel in python, which is
200 times slower than C, and you could still do 10,000 such things in a
second.
Where is it all going? Can you imagine waiting 25 hours for a commodore 64
to boot? Because that's how long it takes a commodore 64 to run through 90
billion cycles. And yet the commodore 64 boots in about one second, one
million cycles. So by my count, modern computers should boot in half a
millisecond.
One could argue that reading off the disk takes a long time. However, I just
now copied a 238MB file from one directory to another on the same disk
(which is a lot harder than reading 238MB, which the kernel and windowing
environment should under no circumstance ever get close to reading) and that
took less than 15 seconds. 15 seconds of I/O, plus half a second of
computing is 15.5 seconds and 1 billion cycles. What else could you need?
Before someone argues that some real work is going on, I say bullocks. I
know you don't need 45 seconds to boot a computer because my Windows laptop
can wake up in about 10 seconds after I hibernate it, most of which is
probably I/O. In that time, I have my complete desktop, and Matlab, Lyx,
Maple, Word, Excel, Firefox, Thunderbird, Cygwin and Adobe Illustrator are
all up and running and ready to use. Another half second and the network is
up too (which is also an outrage: electrons don't need half a second to
travel to the ethernet.)
Hell, the linuxbios people boot so fast the hdd hasn't even spun up yet.
The time it takes to shut down is equally inexcusable. The people
responsible should be given a spreadsheet with 90 billion lines and required
to document in detail how each cycle is being used, one cycle per line.
Sébastien Loisel
Comments (32 posted)
Page editor: Jonathan Corbet