LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-23-2006, 10:30 AM   #1
alienmagic
Member
 
Registered: Feb 2006
Distribution: Slackware 10.2, (2.6.16.16), FC 5
Posts: 109

Rep: Reputation: 15
Question regarding kernel size difference between 2.4.x and 2.6.x


As I mentioned in another thread, I did my first kernel compile recently. I used the source for 2.6.16.16 and all went well b/c of the excellent documentation I had.

The 2.4 kernel in my 10.2 Slack install is about 1.4MB. When I upgraded to the generic 2.6.13 from disc 2, that one was about 1.6MB or so. Finally, my custom compiled kernel using the 2.6.16.16 source is right at about 1.95MB.

I googled the topic and found info that said the 2.6 kernel increased the size by 10 to 30%. The one I compiled seems to boot faster, and it seems to be just as fast during normal operation.

I'm just wondering if that kind of kernel size increase is what everyone here is typically seeing with 2.6.
 
Old 05-23-2006, 11:56 AM   #2
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
The kernel size is not so critical these days when an entry level pc has 256MB of ram.

Even generic could easily be cut down by dropping the unused ide controllers.

2.6 will be some 20% bigger than 2.4 as it has a much larger pool of supported hardware and a lot more complex code managing memory, processes and locking.
 
Old 05-28-2006, 06:31 PM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941

Rep: Reputation: 129Reputation: 129
I find that my custom kernels are sometimes smaller than the default Slackware kernels:

My workstation, where I have it trimmed to the bone:
Code:
mingdao@silas:~$ ls -lh /boot/
-rw-r--r-- 1 root root 1.2M 2006-03-24 08:07 vmlinuz-2.6.16
-rw-r--r-- 1 root root 1.2M 2006-05-08 07:29 vmlinuz-2.6.16.14
-rw-r--r-- 1 root root 1.2M 2006-05-22 19:32 vmlinuz-2.6.16.17
-rw-r--r-- 1 root root 1.2M 2006-05-24 08:35 vmlinuz-2.6.16.18
-rw-r--r-- 1 root root 1.2M 2006-04-10 15:02 vmlinuz-2.6.16.2-1
-rw-r--r-- 1 root root 1.3M 2006-03-13 09:49 vmlinuz-ide-2.4.32
My wife's PC, which is fully functional, but not so trimmed:
Code:
anna@peter:~$ ls -lh /boot
-rw-r--r-- 1 root root 1.4M 2006-05-22 18:51 vmlinuz-2.6.16.17
-rw-r--r-- 1 root root 1.4M 2006-04-23 21:04 vmlinuz-2.6.16.9
-rw-r--r-- 1 root root 1.3M 2006-03-13 09:49 vmlinuz-ide-2.4.32
My laptop, road-ready for many obstacles:
Code:
mingdao@titus:~$ ls -lh /boot/
-rw-r--r-- 1 root root 1.2M 2006-02-18 13:21 vmlinuz-2.6.15.4
-rw-r--r-- 1 root root 1.2M 2006-03-26 14:16 vmlinuz-2.6.16
-rw-r--r-- 1 root root 1.2M 2006-05-22 19:15 vmlinuz-2.6.16.17
-rw-r--r-- 1 root root 1.2M 2006-05-24 09:07 vmlinuz-2.6.16.18
-rw-r--r-- 1 root root 1.3M 2006-03-13 09:49 vmlinuz-ide-2.4.32
On a customer's PC, with hardware new to me:
Code:
dave@matthews:~$ ls -lh /boot/
-rw-r--r-- 1 root root 1.3M 2006-05-15 18:37 vmlinuz-2.6.16.16
-rw-r--r-- 1 root root 1.3M 2006-05-22 10:47 vmlinuz-2.6.16.17
-rw-r--r-- 1 root root 1.3M 2006-03-13 09:49 vmlinuz-ide-2.4.32
The 2.6 kernels compile faster, boot faster, and run faster.
 
Old 05-28-2006, 08:01 PM   #4
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,700
Blog Entries: 7

Rep: Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794
Quote:
Originally Posted by Chinaman
I find that my custom kernels are sometimes smaller than the default Slackware kernels
Mine always are.

I guess Pat tries to build kernels which will work on the widest possible selection of hardware.

In the 2.4 days, I could compile a custom kernel half the size of Pat's. The last 2.4 kernel I ran (2.4.21) was approximately 700Kb.

With 2.6 I can't get them smaller than 1.1M. I haven't done as much experimenting with 2.6 as I did with 2.4, so there may be something I'm missing.
Quote:
Originally Posted by Chinaman
The 2.6 kernels compile faster, boot faster, and run faster.
You're not wrong. In my experience to date, 2.6 is superior to 2.4 in everything except module handling. For example: To get module unloading with 2.6, you need to choose an option which makes the kernel larger and more complex. Also, there are certain modules which won't auto-load the way they did under 2.4. I don't know why. Other than that, 2.6 is stable, fast & feature packed.

Last edited by rkelsen; 05-28-2006 at 08:09 PM.
 
Old 05-28-2006, 08:33 PM   #5
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
Size doesn't matter. At all.

Any PC made after 1993 or so would be able to support any linux kernel, even with practically everything (within reason) built in with no performance hit.

You'll see probably no speed increase at all with a smaller kernel unless you are on very ancient hardware.


In other words, if your PC is fast enough to compile a kernel within 3 days of time, you won't notice anything from a smaller kernel, and if it does take you more than 3 days to compile a kernel, you probably wouldn't find it worth it to do it anyway.

(although changing the kernel options back to more 'sane' defaults, such as 1000hz, preemption, and optimizing for your processor make a HUGE performance difference, but the kernel will be bigger too, but it won't make any real difference.)
 
  


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
Difference in kernel samjkd Linux - General 2 08-15-2005 07:34 AM
Difference between kernel-headers kernel-source twinkers Debian 2 06-18-2005 12:20 PM
general question about the difference in kernel 2.4.x and 2.6.x salviadud Slackware 1 04-19-2005 01:06 AM
Kernel question: difference between Patch and "regular" kernel source kopikat Linux - Software 1 01-26-2005 06:24 PM
Kernel difference tookey Linux - Newbie 2 02-12-2004 01:16 PM

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

All times are GMT -5. The time now is 02:24 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