How FAST can Linux boot?

How FAST can Linux boot?

Post by Leif Bloomquis » Sun, 31 Dec 1899 09:00:00



What's the fastest Linux can be configured to boot?  This comes from a
competition of sorts on comp.os.qnx.

I guess by "boot" I mean, get the OS to a point where an application
I've written can run.

i.e. for Windows NT, this is around 2 minutes.
The best they could do for QNX was 15 seconds.

Obviously this depends a lot on the size of the kernel etc and what
services you start.  I expect Linux has much greater flexibility in
those things, so I'm wondering what people have been able to do.

Thanks
Leif

 
 
 

How FAST can Linux boot?

Post by The Ghost In The Machi » Sun, 31 Dec 1899 09:00:00




Quote:

>What's the fastest Linux can be configured to boot?  This comes from a
>competition of sorts on comp.os.qnx.

>I guess by "boot" I mean, get the OS to a point where an application
>I've written can run.

>i.e. for Windows NT, this is around 2 minutes.
>The best they could do for QNX was 15 seconds.

>Obviously this depends a lot on the size of the kernel etc and what
>services you start.  I expect Linux has much greater flexibility in
>those things, so I'm wondering what people have been able to do.

>Thanks
>Leif

As a point of pedantry:

The ext2fs file system (yes, that again), occasionally wants to
check itself; there is a count that is incremented every time
it is mounted.  The file system checker checks this count, and
a date expiry code; should it deem that the count is too high or
the expiry code too old, it forces a check.

Needless to say, this will affect boot time, if this check is done.
(In my case, for example, I have 19 volumes!  Some of these are
tiny check volumes just for the hell of it, but I have about
9 that are significantly sized -- i.e., 2 gigs or thereabouts each.)

So there is that caveat.

As another point of pedantry, though you've already addressed this:
Linux is booted whenever it starts 'init' (it tries to execute
'init' in several places: the 'init=' option in the startup line,
/sbin/init, /etc/init, /bin/init, and finally /bin/sh).  This is
usually fairly quick, :-) but it doesn't mean the system's ready.

And now to the meat.

As I peruse my /var/log/messages file from my last reboot,
It restarted at 16:51:02, and was ready for use by 16:51:20,
apparently.  18 seconds.

Unfortunately, there is some time confusion in the logfile.
Some messages are timestamped 23:50:07 (I'm in the PDT timezone).
I'm not sure if I trust this result.  This also does not
include the time the POST takes to go through Adaptec's BIOS,
which takes about 15 to 20 seconds as it scans the SCSI bus.

In short, I don't know...but I would guesstimate at most
about a minute, if that.  (Not bad; my HP-UX at work, by contrast,
is slow. :-) )

--


 
 
 

How FAST can Linux boot?

Post by Graffit » Sun, 31 Dec 1899 09:00:00




[snip]

Quote:>Needless to say, this will affect boot time, if this check is done.
>(In my case, for example, I have 19 volumes!  Some of these are
>tiny check volumes just for the hell of it, but I have about
>9 that are significantly sized -- i.e., 2 gigs or thereabouts each.)

Then change it.  You can set the mount time with /sbin/tune2fs.  The
most common way of doing this is to have each parition's check set
to a different prime number, so you only get all of them fsck'd when
your system goes down uncleanly (crash) or you reboot for the xth
boot, where x = prime1 * prime2 * ... prime19.

Of course, you can also mount some volumes read-only. :-)

Quote:>Unfortunately, there is some time confusion in the logfile.
>Some messages are timestamped 23:50:07 (I'm in the PDT timezone).
>I'm not sure if I trust this result.  This also does not
>include the time the POST takes to go through Adaptec's BIOS,
>which takes about 15 to 20 seconds as it scans the SCSI bus.

The BIOS stuff is out of Linux (or Windows', or OS/2's, or FreeBSD's,
or <insert OS name here>'s) hands.

Boot time got annoying for me, so I ran through my startup scripts and
tossed all the stuff I don't need, and on the Sparc IPC, I also changed
some stuff to speed up shutdown (i.e. to run a new kernel) by changing
the 'ps'-based pid grabbing stuff to fork a new shell, echo $$ > pidfile,
and kill `cat pidfile` instead.

-- DN

 
 
 

How FAST can Linux boot?

Post by Jens Beneck » Sun, 31 Dec 1899 09:00:00



Quote:> What's the fastest Linux can be configured to boot?  This comes from a
> competition of sorts on comp.os.qnx.  I guess by "boot" I mean, get the
> OS to a point where an application I've written can run.

My record is 36 seconds. Including BIOS time and harddisk spinup. Bare
server setup, just NFS/NIS/Apache/Sendmail/leafnode/squid and rc5des :).

I don't remember the exact times, but about 8 seconds were spent on BIOS
and hdd spinup, then 10 seconds for the kernel and the rest was init.d.

That machine  was a bare-bones P100 with 32MB of RAM. Still running here,
as a server for my personal experiments. 10GB EIDE harddisk. No GUI.
(whatever for?)

Quote:> i.e. for Windows NT, this is around 2 minutes.
> The best they could do for QNX was 15 seconds.

You can do better than the above if you add the 'suspend-to-swap' module to
the kernel. That one enables you to press a key (sysRQ, or SAK if you want)
sequence and then it writes the RAM contents to the swap partition. At next
boot, in the earlies possible kernel state it looks up the swap signature,
finds the image and restores itself.

Quote:> Obviously this depends a lot on the size of the kernel etc and what
> services you start.  I expect Linux has much greater flexibility in
> those things, so I'm wondering what people have been able to do.

Check out Corel Netwinder. One of the developers has written somewhere that
his custom version of the machine boots up so quickly, that he cannot power
it up and get across the room to open up an xterm before it is ready
running. of course, I don't know how big the room was he talked about :)

--
_ciao, Jens_______________________________ http://www.pinguin.conetix.de

                     ####~~~~~~~~~~~~~~~~~~~~~~~~~~~~~####
                     ####  .signature virus antibody  ####
                     ####_____________________________####

 
 
 

How FAST can Linux boot?

Post by Anthony O » Sun, 31 Dec 1899 09:00:00



>What's the fastest Linux can be configured to boot?  This comes from a
>competition of sorts on comp.os.qnx.

>I guess by "boot" I mean, get the OS to a point where an application
>I've written can run.

>i.e. for Windows NT, this is around 2 minutes.
>The best they could do for QNX was 15 seconds.

>Obviously this depends a lot on the size of the kernel etc and what
>services you start.  I expect Linux has much greater flexibility in
>those things, so I'm wondering what people have been able to do.

It's not something I've really tried, but these are a few tips.

Uses "COMPACT" in lilo.conf.

Have small "/" and "/usr" partitions and mount the rest asynchronously i.e.
"mount <blah> &". Stuff then starts up while your big file systems are being
mounted. Be wary of the stuff needing the filesystems before they are mounted
though. Best thing for that is having daemons handled by inetd.

Never autoprobe for anything include the hard disks - specify IRQs etc.

Have most things as modules with kerneld etc. handling them.

Use slackware.

Easy really.

Quote:>Thanks
>Leif

Regards

Anthony
--
-----------------------------------------
| And when our worlds                   |
| They fall apart                       |
| When the walls come tumbling in       |
| Though we may deserve it              |
| It will be worth it  - Depeche Mode   |
-----------------------------------------

 
 
 

1. redhat enterprise linux 4 boots up slow with 2 GB RAM , boots fast with 512MB

Machine Configuration:
I have assembled a new machine. Its Intel P4 3.0E Ghz HT enabled
processor on ASUS P4P800-MX motherboard. I am using onboard graphics
and sound. [Motherboard Spec]
----------------------------------------------------
Socket 478, Intel865GV, Hyperthreading ready, integrated intel
graphics, dualchannel DDR400, 10/100Mbps LAN, Serial ATA
----------------------------------------------------
I have put in two 1 GB dual-channel RAM chips (OCZ technologies) in it.

Problem
I installed "Redhat Enterprise Linux 4 WS" on it (installation went
super slow..took around 3 hours to complete). Now, it takes RHELv4 a
whopping 18 MINUTES to boot up. WindowsXP pro (the other OS on this
dual boot machine) boots up in less than 30 secs.

Solutions tried
1)
Since my ASUS motherboard is SMP-enabled and my processor is HT
enabled, RHELv4 installed an SML kernel and a normal kernel. But I get
the same (very poor) performance from RHELv4, no matter which one (of
the two kernels) I use to boot it up.
In SMP-kernel case, I confirmed that cat /proc/cpuinfo shows
2 processors being recognized by RHELv4 (even then the bootup takes
18-20 mins.)

2)
I read online about RHEL issues with 1GB+ memory.
So, just to narrow down the issue, I took out these two 1 GB
dual-channel RAM chips and put in a regular Kingston 512MB RAM chip
and RHELv4 started booting up in less than a minute. So now I know the
problem is with using 1 GB + RAM.

3)
I confirmed (2) by putting back only one 1GB RAM dual-channel RAM chip,
and it started super slow (took around 18-20 mins to bootup again). I
also tried passing in mem=1024M kernel parameter, but that did not help
either. Even though the cat /proc/meminfo shows 1024MB of RAM being
recogized by RHELv4.

I did some search online and found some mixed opinions (which I havent
tried yet..since I am not sure about them ,
just listing them here and asking for more suggestions..

a)
Should I recompile my kernel with highmem support -
Isn't highmem only suppposed to be used with 4 GB+ ram machines.?

b)Is this slow bootup being caused by the onboard Integrated Intel
graphics ?

Any ideas which one of the above two or (any other alternatives) should
i try... ? please help as I am running out of my options now.. Thanks
in advance for any helpful tips..

2. Epson Stylus C70

3. Fast PCI & VLB card for linux which is fast in windows too!

4. HELP: F*CKED UP BOOTSECTOR (AHHH)

5. Fast booting linux

6. USB devices have moved in FC2?

7. Making Linux Boot Really Fast

8. How to use a file with command-line FTP

9. Help: Id's respawning too fast...can't boot linux

10. It's not bad canned meat...

11. Canned Proxy URLs to Filter

12. CGI: apache canned response