Kernel Sizes

Permabanned
Joined
18 Oct 2002
Posts
2,010
Location
Huddersfield / Antartica
Just out of curiosity how big is your current kernel in size?

My server's is:

Code:
root@lemming init.d # du -sch /boot/bzImage 
1.2M    /boot/bzImage
1.2M    total

This uses no modules at all.

My main machine's is:

Code:
bash-2.05a# du -sch /boot/bzImage 
1.5M    /boot/bzImage
1.5M    total

Uses these modules:

Code:
Module                  Size  Used by    Tainted: PF 
vmnet                  20000   6 
parport_pc             17032   0  (unused)
parport                17728   0  [parport_pc]
vmmon                  20500   0 
emu10k1                76544   1 
ac97_codec              9824   0  [emu10k1]
w83781d                19232   0 
eeprom                  3616   0 
i2c-proc                6368   0  [w83781d eeprom]
i2c-isa                 1284   0  (unused)
i2c-amd756              3812   0  (unused)
i2c-core               13376   0  [w83781d eeprom i2c-proc i2c-isa i2c-amd756]

My backup kernel is:

Code:
bash-2.05a# du -sch /boot/mjc.kernel 
1.2M    /boot/mjc.kernel
1.2M    total

Again, no modules!

Shak
 
Code:
[root@flash incoming]# du -sch /boot/vmlinuz-2.4.19-smp 
867k    /boot/vmlinuz-2.4.19-smp
867k    total

[root@flash incoming]# lsmod
Module                  Size  Used by    Not tainted
sr_mod                 13976   0  (autoclean)
cdrom                  32352   0  (autoclean) [sr_mod]
sg                     30436   0  (autoclean)
eepro100               19696   2 
ide-scsi                9344   0 
ext3                   64352   9  (autoclean)
jbd                    49592   9  (autoclean) [ext3]

Code:
[root@pc1-hem11-3-cust*** /root]# du -sch /boot/vmlinuz-2.4.14 
766k    /boot/vmlinuz-2.4.14
766k    total
 
Code:
bash-2.05a# du -sch /boot/vmlinuz-ide-2.4.18
1.1M    /boot/vmlinuz-ide-2.4.18
1.1M    total

But...

Code:
bash-2.05a# lsmod
Module                  Size  Used by    Tainted: P
ppp_deflate            38912   0  (autoclean)
bsd_comp                3936   0  (autoclean)
ppp_async               6464   1  (autoclean)
ppp_generic            14664   3  (autoclean) [ppp_deflate bsd_comp ppp_async]
slhc                    4416   0  (autoclean) [ppp_generic]
agpgart                29824   3  (autoclean)
NVdriver              945152  10  (autoclean)
pcmcia_core            40896   0
ide-scsi                7456   0
emu10k1                55680   3
sound                  52876   0  [emu10k1]
ac97_codec              9568   0  [emu10k1]
soundcore               3236   7  [emu10k1 sound]
:o
 
Originally posted by Sp00n
Care to explain what all that means to a newb? :)

The kernel is the bit that includes the drivers for all the devices etc. If the kernel has no modules then all the drivers are included in the kernel. I just wanted to see how compact everyones kernel was.

Shak
 
Originally posted by Shak
The kernel is the bit that includes the drivers for all the devices etc. If the kernel has no modules then all the drivers are included in the kernel. I just wanted to see how compact everyones kernel was.

Shak

Not sure yet! installing tonight (hopefully) got disc3 of redhat so far, the download at work last night completed disc1 but opera has hidden the file somewhere :rolleyes:

all discs should be down by the end of work today!
 
Pixie: Ill be online tonight (*hopefully*) to give an assistance.

Altered Corpse: What the heck have you got compiled into that thing? Its not a PPC kernel is it? I heard the PPC kernels were huge.

Shak
 
Originally posted by Shak
Pixie: Ill be online tonight (*hopefully*) to give an assistance.

Altered Corpse: What the heck have you got compiled into that thing? Its not a PPC kernel is it? I heard the PPC kernels were huge.

Shak

Why thankyou kind sir, lets hope I can get these last two discs downloaded by 4:00oclock!
 
This is on my main gentoo machine :)
Code:
$ ll
total 1134
lrwxrwxrwx    1 root     root            1 Oct  8 12:27 boot -> .
-rw-r--r--    1 root     root      1141557 Oct 14 08:18 bzImage
drwxr-xr-x    2 root     root         1024 Oct  8 16:33 grub
drwx------    2 root     root        12288 Oct  8 12:23 lost+found
Code:
$ lsmod
Module                  Size  Used by    Tainted: P  
NVdriver             1067008  10 (autoclean)
On my server (lol which doesn't server much apart from samba and printing atm) it's:
Code:
% ll
total 1065
lrwxrwxrwx    1 root     root            1 Oct 15 12:57 boot -> .
-rw-r--r--    1 root     root      1070244 Oct 15 18:06 bzImage
drwxr-xr-x    2 root     root         1024 Oct 15 18:13 grub
drwx------    2 root     root        12288 Oct 15 12:54 lost+found
Code:
% lsmod
Module                  Size  Used by    Not tainted
lsmod: QM_MODULES: Function not implemented
:p
 
Last edited:
Mpemba: do us a favourt and use

Code:
du -sch <file name>

Then it tells you in MB!

Shak
 
On my main machine:
Code:
$ ll -h
total 1.2M
lrwxrwxrwx    1 root     root            1 Oct  8 12:27 boot -> .
-rw-r--r--    1 root     root         1.1M Oct 14 08:18 bzImage
drwxr-xr-x    2 root     root         1.0K Oct  8 16:33 grub
drwx------    2 root     root          12K Oct  8 12:23 lost+found
$ du -sch
du: cannot change to directory `./lost+found': Permission denied
1.4M    .
1.4M    total
$ sd du -sch
1.4M    .
1.4M    total
$
On the Server
Code:
% ll -h
total 1.1M
lrwxrwxrwx    1 root     root            1 Oct 15 12:57 boot -> .
-rw-r--r--    1 root     root         1.0M Oct 15 18:06 bzImage
drwxr-xr-x    2 root     root         1.0K Oct 15 18:13 grub
drwx------    2 root     root          12K Oct 15 12:54 lost+found
% du -sch
1.3M    .
1.3M    total
%
 
Originally posted by Shak


Altered Corpse: What the heck have you got compiled into that thing? Its not a PPC kernel is it? I heard the PPC kernels were huge.

It's the standard Red Hat 8 x86 kernel.

I'll probably compile 2.4.19 of the kernel when i'm not feeling so tired.
 
Originally posted by Altered Corpse
It's the standard Red Hat 8 x86 kernel.

I'll probably compile 2.4.19 of the kernel when i'm not feeling so tired.

Ah, that explains it, the Redhat ones have all sorts of rubbish compiled in, but thats what they need, to allow the support of the different hardware.

Shak
 
Sizes

Code:
lemur boot # du -sch bzImage.*
872K    bzImage.12102002
872K    bzImage.13102002
872K    bzImage.13102002b
872K    bzImage.21102002

With Modules

Code:
ip_nat_ftp              3760   0  (unused)
ip_conntrack_irc        2656   0  (unused)
ip_conntrack_ftp        3808   0  [ip_nat_ftp]
ipt_MASQUERADE          1720   1  (autoclean)
ipt_LOG                 3320   1  (autoclean)
ipt_state                536   1  (autoclean)
iptable_nat            20248   2  (autoclean) [ip_nat_ftp ipt_MASQUERADE]
ip_conntrack           22012   4  (autoclean) [ip_nat_ftp ip_conntrack_irc ip_conntrack_ftp ipt_MASQUERADE ipt_state iptable_nat]
iptable_filter          1644   1  (autoclean)
ip_tables              14136   7  [ipt_MASQUERADE ipt_LOG ipt_state iptable_nat iptable_filter]
8139too                13768   2
sundance               11808   1
 
Originally posted by Shak
Ah, that explains it, the Redhat ones have all sorts of rubbish compiled in, but thats what they need, to allow the support of the different hardware.

Shak

That'll be why mine's 2.9M :o I did try unticking a whole load of 'junk' when I did th install, but the dependency checker put a whole load back :( Noob alert :D
 
I think a smaller kernel does make Linux kernel operations a little faster, Im not sure though, can anyone confirm this?

Shak
 
Theres a difference there though, because of the optomisations applied by Gentoo.

Optomisations that are used are things like this:

Code:
# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries
# will run on any x86 system)
#CHOST="i686-pc-linux-gnu"
#CFLAGS="-mcpu=i686 -O3 -pipe"
#CXXFLAGS="-mcpu=i686 -O3 -pipe"

# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon exclusive (binaries
# will use the P6 instruction set and only run on P6+ systems)
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O3 -pipe"
CXXFLAGS="-march=i686 -O3 -pipe"

This would account for some of the speed difference.

Shak
 
I have not really optimized my kernel that much because I couldnt find any publicised compile time optimizations for the Via C3 processor, so I just used the standard pentium+mmx opts. Which I assume are also used by RedHat?
 
Back
Top Bottom