LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-12-2007, 06:37 AM   #1
TL_CLD
Member
 
Registered: Sep 2006
Posts: 366

Rep: Reputation: 45
Slow loading of kernel image [Slack 12]


Hey all,

I've just installed a new Slackware 12 based server (Intel XEON X3220 quad core CPU, 2 GB RAM, Supermicro PDSME+ motherboard, 3 x 320 GB SATA II 7200 RPM drives).

I'm running software RAID1 with 1 spare.

I've compiled the latest kernel (2.6.23). Kernel config can be seen here: http://pastebin.ca/734059

Everything appears to be running fine, except harddrive performance immediately after having selected a kernel in LILO.

On the rest of my Slackware installs (both 11 and 12) the kernel image is loaded extremely fast, but on this computer it takes a good 22 seconds to load the kernel. Looking at those ....... being drawn ever so slowly on the screen is pure torture.

The kernel image is 2.7 MB in size.

Numbers from hdparm -tT /dev/md0:
/dev/md0:
Timing cached reads: 7128 MB in 2.00 seconds = 3564 MB/sec
Timing buffered disk reads: 183 MB in 3.00 seconds = 61 MB/sec

Similar numbers are reported from md1, md2 and md3.

Copying 630 MB (kernel source folder, so lots of small files) from one folder to another clocks in at 21 seconds.

Are these numbers low or normal? And if normal, what's then up with the painfully slow kernel load during boot?

Other than that: My God this thing is smoking! Compiling the new kernel was done quicker than I could eat some pie.. And I'm a pretty fast pie eater..

Hope someone can help.

Regards,
Thomas
 
Old 10-12-2007, 06:55 AM   #2
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 35
Hello,

I'm not to sure if this is the correct fix, or if it will speed things up for you.

I have a RAID 0 on a compaq smart array, which was having the same troubles. To fix it i put adjusted lilo.conf and put 'compact' (without quotes) in the global section, then reran lilo. Now it loads up alot quicker.

 
Old 10-12-2007, 07:05 AM   #3
ledow
Member
 
Registered: Apr 2005
Location: UK
Distribution: Slackware 13.0
Posts: 241

Rep: Reputation: 34
I, too, was going to suggest "compact". With compact, you don't ever see the ... loading. I put it on a 600MHz Thinkpad and that part of the boot process dropped from about 6 seconds to instantaneous. I imagine that if you have a large enough kernel, you could easily see such a difference on a modern PC too.

If not, then I imagine a LILO upgrade might be my next step, followed by booting up different kernels looking for the cause (smp vs non-smp etc.)
 
Old 10-12-2007, 08:25 AM   #4
TL_CLD
Member
 
Registered: Sep 2006
Posts: 366

Original Poster
Rep: Reputation: 45
compact fixed the issue, but now it's so fast I don't even see the .......'

So problem is gone now: What's missing is an explanation as to WHY this happened in the first place.

Any suggestions?


Thomas
 
Old 10-12-2007, 09:10 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
I dunno, but I had the same problem with an old laptop. I fixed it by installing grub. But, as you say, you can also fix it by using the 'compact' option for lilo.

I think someone said, the problem is that for some BIOSes the CPU is not fully throttled up at boot time, so it takes forever to do things until the kernel is loaded into RAM and then (I guess) proceeds to fully throttle up the CPU.

Right ? I'm not sure.
 
Old 10-12-2007, 09:27 AM   #6
hutyerah
Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware
Posts: 40

Rep: Reputation: 16
Nothing caused it, per se, it's just more that the optimisation wasn't turned on.

From the lilo.conf man page:
Quote:
compact
Tries to merge read requests for adjacent sectors into a single read request. This drastically reduces load time and keeps the map file smaller. Using `compact' is especially recommended when booting using a map file on a floppy disk.
The reason it wasn't turned on is (according to a comment, probably by Pat, in my lilo.conf) that it doesn't work with some systems. I'm assuming these are ancient systems or systems with hardware peculiarities (aka manufacturing/design defects). It's probably fine to turn it on now on these systems even, maybe bugs have been worked out.

I wonder why grub and other boot loaders don't ask the same question- maybe their way of loading is different, or they just assume the optimisation will work.

Anyway, I did a test on my (non-raid) machine with compact off, and it did noticeably slow down the boot, although not as significantly as it did with yours. Probably particular hardware, kernels, map files, raiding makes the effect of the option greater or lesser too.

Last edited by hutyerah; 10-12-2007 at 09:30 AM.
 
Old 10-12-2007, 12:38 PM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,902

Rep: Reputation: 589Reputation: 589Reputation: 589Reputation: 589Reputation: 589Reputation: 589
Using such a large kernel no doubt makes the problem worse -a 2.8MB kernel needs 6 sectors.
 
Old 10-12-2007, 02:08 PM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
2.8 MB * 1024 kB in each MB = 2857.2 / 512 kB per sector (standard) = 5.6 sectors which rounds to 6 sectors, because the smallest unit is 1 sector ... just for those who don't know how the calculation came about. The generic kernel takes about 4 sectors. That means a huge kernel would take only 1.5 times longer to boot than the generic. I don't think that would fully explain the issue here.
 
Old 10-12-2007, 03:04 PM   #9
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 35
I have a feeling it has something to do with having a RAID setup.

I'm only saying this because the machine I mentioned above has only recently had RAID put in. Before it ran one IDE disk off the built in controller. Which used to boot fine. But when in put RAID in and reinstalled on a striped array my kernel loading time increased alot. Occassionaly even failing to load the kernel.

However it could stem from the version of lilo that is used with Slackware 12.0.

I do have another identical RAID controller so I may do some experiments. But don't hold your breath waiting for results as i have other things going on right now.

 
Old 10-12-2007, 04:04 PM   #10
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 574

Rep: Reputation: 38
Quote:
Originally Posted by snowtigger View Post
I have a feeling it has something to do with having a RAID setup.
I'm not so sure about that. I used to run Slack 11 and the dots flew by. When booting from the CD, was also as quick. Once I started using the "generic" kernel from 2.6, snail's pace. And yep, compact solved it.

Cheers.
 
Old 11-07-2007, 05:08 AM   #11
ledow
Member
 
Registered: Apr 2005
Location: UK
Distribution: Slackware 13.0
Posts: 241

Rep: Reputation: 34
You might find that your disks boot up in a "compatibility" mode, rather than using full DMA and then wait for the OS to actually start the DMA modes off. Thus, reading a large file is slow if you do it at the wrong blocksizes etc. until Linux actually starts up the DMA modes. You'll probably find that LILO's compact reads less info off of the disk (by doing it in a different way) and thus boot times are faster.

I dunno about GRUB but maybe GRUB does some initialisation tricks of it's own to improve performance? It's possible that checking a BIOS option or two (there might be a BIOS on your RAID card too) might kick it off faster.

But even on an old, slow PC with an ancient harddrive that can't do fast DMA, having LILO compact set can make a big difference. I set it routinely on new Linux PC's (unless it causes boot problems, which is very rare).
 
Old 11-07-2007, 06:29 AM   #12
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Rep: Reputation: 35
I have a box with a kernel on software raid1. First I used huge-smp and that loaded in 1-2 seconds, then I switched to generic-smp + an initrd with only a single module in it.. it's half the data but it loads an order of magnitude slower.

I'll have to try this compact option!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redboot - Loading Kernel Image & File Jffs2 MKSrivastava Debian 1 04-21-2007 08:03 PM
slack install: after loading kernel, each keypress in double ekerhaus Slackware - Installation 9 03-08-2007 02:45 PM
Loading Kernel Image, how long does yours take? Stang_Man Slackware 11 04-12-2005 08:02 PM
kernel image for slack 9.1 install space13 Slackware 4 06-24-2004 10:52 PM
Setting X boot image, and loading image untwisted Linux - General 2 03-09-2004 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration