Unix Technical Forum

Identical servers + kernel configs -> different initrds?

This is a discussion on Identical servers + kernel configs -> different initrds? within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hello, I've got 2 nearly identical servers with kernels compiled from the same config, yet their initrd files drastically ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 07:37 PM
OtisUsenet
 
Posts: n/a
Default Identical servers + kernel configs -> different initrds?

Hello,

I've got 2 nearly identical servers with kernels compiled from the same
config, yet their initrd files drastically differ in size:

ServerA:
1045276 Sep 9 21:30 initrd-2.6.15.4.img-HT
1053495 May 11 2005 initrd-2.6.9-1.667.img
1041351 May 11 2005 initrd-2.6.9-1.667smp.img

ServerB:
504485 Sep 9 21:29 initrd-2.6.15.4.img-HT
504107 Apr 11 2005 initrd-2.6.9-1.667.img
493803 Apr 11 2005 initrd-2.6.9-1.667smp.img


Would anyone have any ideas what could cause this?

More importantly, does this have any effect on kernel performance?
(I skimmed
http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html and
think that the answer is "no", but I'm like to double-check that.)

Thanks!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 07:37 PM
Allen Kistler
 
Posts: n/a
Default Re: Identical servers + kernel configs -> different initrds?

OtisUsenet wrote:
> I've got 2 nearly identical servers with kernels compiled from the same
> config, yet their initrd files drastically differ in size:
>
> ServerA:
> 1045276 Sep 9 21:30 initrd-2.6.15.4.img-HT
> 1053495 May 11 2005 initrd-2.6.9-1.667.img
> 1041351 May 11 2005 initrd-2.6.9-1.667smp.img
>
> ServerB:
> 504485 Sep 9 21:29 initrd-2.6.15.4.img-HT
> 504107 Apr 11 2005 initrd-2.6.9-1.667.img
> 493803 Apr 11 2005 initrd-2.6.9-1.667smp.img
>
>
> Would anyone have any ideas what could cause this?
>
> More importantly, does this have any effect on kernel performance?
> (I skimmed
> http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html and
> think that the answer is "no", but I'm like to double-check that.)


I can't think offhand of any reason why the sizes should be so
different, but you can check on your own what's in the initrds.

gzip -cd /path/initrdfile | cpio -idm

will extract the contents of the initrds, then you can compare them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 07:37 PM
OtisUsenet
 
Posts: n/a
Default Re: Identical servers + kernel configs -> different initrds?

Allen,

Thanks for this tip, I didn't realize I could do this, but it makes
sense.
After uncompressing the two initrd's, and doing a diff -r on them, I
got only this:

vis/ dir has the small initrd uncompressed.
hvar/ dir has the bit initrd uncompressed.

diff -r vis/init hvar/init
24,27c24,25
< echo "Loading libata.ko module"
< insmod /lib/libata.ko
< echo "Loading ata_piix.ko module"
< insmod /lib/ata_piix.ko
---
> echo "Loading dm-mod.ko module"
> insmod /lib/dm-mod.ko

31a30,35
> echo "Loading dm-mirror.ko module"
> insmod /lib/dm-mirror.ko
> echo "Loading dm-zero.ko module"
> insmod /lib/dm-zero.ko
> echo "Loading dm-snapshot.ko module"
> insmod /lib/dm-snapshot.ko

32a37,44
> echo Making device-mapper control node
> mkdmnod
> echo Scanning logical volumes
> lvm vgscan
> echo Activating logical volumes
> lvm vgchange -ay
> echo Making device nodes
> lvm vgmknodes

Only in vis/lib: ata_piix.ko
Only in hvar/lib: dm-mirror.ko
Only in hvar/lib: dm-mod.ko
Only in hvar/lib: dm-snapshot.ko
Only in hvar/lib: dm-zero.ko
Only in vis/lib: libata.ko
Only in hvar/sbin: lvm


Is it possible that the difference in this handful of modules is making
one initrd double the other one (500KB vs. 1MB)?

Perhaps it is:
-rw-r--r-- 1 root root 232961 Aug 14 02:07
/lib/modules/2.6.15.4/kernel/drivers/md/dm-mirror.ko
-rw-r--r-- 1 root root 744290 Aug 14 02:07
/lib/modules/2.6.15.4/kernel/drivers/md/dm-mod.ko
-rw-r--r-- 1 root root 217970 Aug 14 02:07
/lib/modules/2.6.15.4/kernel/drivers/md/dm-snapshot.ko
-rw-r--r-- 1 root root 102750 Aug 14 02:07
/lib/modules/2.6.15.4/kernel/drivers/md/dm-zero.ko

Does it make sense to look at the sizes of modules and relate those
sizes to the size of the initrd?

Thanks.


Allen Kistler wrote:
> OtisUsenet wrote:
> > I've got 2 nearly identical servers with kernels compiled from the same
> > config, yet their initrd files drastically differ in size:
> >
> > ServerA:
> > 1045276 Sep 9 21:30 initrd-2.6.15.4.img-HT
> > 1053495 May 11 2005 initrd-2.6.9-1.667.img
> > 1041351 May 11 2005 initrd-2.6.9-1.667smp.img
> >
> > ServerB:
> > 504485 Sep 9 21:29 initrd-2.6.15.4.img-HT
> > 504107 Apr 11 2005 initrd-2.6.9-1.667.img
> > 493803 Apr 11 2005 initrd-2.6.9-1.667smp.img
> >
> >
> > Would anyone have any ideas what could cause this?
> >
> > More importantly, does this have any effect on kernel performance?
> > (I skimmed
> > http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html and
> > think that the answer is "no", but I'm like to double-check that.)

>
> I can't think offhand of any reason why the sizes should be so
> different, but you can check on your own what's in the initrds.
>
> gzip -cd /path/initrdfile | cpio -idm
>
> will extract the contents of the initrds, then you can compare them.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 07:38 PM
Allen Kistler
 
Posts: n/a
Default Re: Identical servers + kernel configs -> different initrds?

OtisUsenet wrote:
> Allen Kistler wrote:
>> OtisUsenet wrote:
>>> I've got 2 nearly identical servers with kernels compiled from the same
>>> config, yet their initrd files drastically differ in size:
>>>
>>> ServerA:
>>> 1045276 Sep 9 21:30 initrd-2.6.15.4.img-HT
>>> 1053495 May 11 2005 initrd-2.6.9-1.667.img
>>> 1041351 May 11 2005 initrd-2.6.9-1.667smp.img
>>>
>>> ServerB:
>>> 504485 Sep 9 21:29 initrd-2.6.15.4.img-HT
>>> 504107 Apr 11 2005 initrd-2.6.9-1.667.img
>>> 493803 Apr 11 2005 initrd-2.6.9-1.667smp.img
>>>
>>>
>>> Would anyone have any ideas what could cause this?
>>>
>>> More importantly, does this have any effect on kernel performance?
>>> (I skimmed
>>> http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html and
>>> think that the answer is "no", but I'm like to double-check that.)

>> I can't think offhand of any reason why the sizes should be so
>> different, but you can check on your own what's in the initrds.
>>
>> gzip -cd /path/initrdfile | cpio -idm
>>
>> will extract the contents of the initrds, then you can compare them.

>
> Thanks for this tip, I didn't realize I could do this, but it makes
> sense.
> After uncompressing the two initrd's, and doing a diff -r on them, I
> got only this:
>
> [snip]
>
> Is it possible that the difference in this handful of modules is making
> one initrd double the other one (500KB vs. 1MB)?
>
> Perhaps it is:
> [snip]
>
> Does it make sense to look at the sizes of modules and relate those
> sizes to the size of the initrd?


The fact that the contents of your initrds are so very different is a
major indication that your "nearly identical servers" are hardly
anything close to identical. I don't think you really need to look much
beyond that for explanation.

Otherwise, the sizes of the things in the initrds is definitely going to
affect the the sizes of the initrds.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 07:39 PM
OtisUsenet
 
Posts: n/a
Default Re: Identical servers + kernel configs -> different initrds?


Allen Kistler wrote:
> OtisUsenet wrote:
> > Allen Kistler wrote:
> >> OtisUsenet wrote:
> >>> I've got 2 nearly identical servers with kernels compiled from the same
> >>> config, yet their initrd files drastically differ in size:
> >>>
> >>> ServerA:
> >>> 1045276 Sep 9 21:30 initrd-2.6.15.4.img-HT
> >>> 1053495 May 11 2005 initrd-2.6.9-1.667.img
> >>> 1041351 May 11 2005 initrd-2.6.9-1.667smp.img
> >>>
> >>> ServerB:
> >>> 504485 Sep 9 21:29 initrd-2.6.15.4.img-HT
> >>> 504107 Apr 11 2005 initrd-2.6.9-1.667.img
> >>> 493803 Apr 11 2005 initrd-2.6.9-1.667smp.img
> >>>
> >>>
> >>> Would anyone have any ideas what could cause this?
> >>>
> >>> More importantly, does this have any effect on kernel performance?
> >>> (I skimmed
> >>> http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html and
> >>> think that the answer is "no", but I'm like to double-check that.)
> >> I can't think offhand of any reason why the sizes should be so
> >> different, but you can check on your own what's in the initrds.
> >>
> >> gzip -cd /path/initrdfile | cpio -idm
> >>
> >> will extract the contents of the initrds, then you can compare them.

> >
> > Thanks for this tip, I didn't realize I could do this, but it makes
> > sense.
> > After uncompressing the two initrd's, and doing a diff -r on them, I
> > got only this:
> >
> > [snip]
> >
> > Is it possible that the difference in this handful of modules is making
> > one initrd double the other one (500KB vs. 1MB)?
> >
> > Perhaps it is:
> > [snip]
> >
> > Does it make sense to look at the sizes of modules and relate those
> > sizes to the size of the initrd?

>
> The fact that the contents of your initrds are so very different is a
> major indication that your "nearly identical servers" are hardly
> anything close to identical. I don't think you really need to look much
> beyond that for explanation.
>
> Otherwise, the sizes of the things in the initrds is definitely going to
> affect the the sizes of the initrds.


So, if I understand things correctly, even if 2 servers are 99%
identical, but one has an extra card of some kind and the driver for
that card gets built into the kernel, if that driver happens to be 1MB,
that could cause the whole initrd to be 1MB larger, even though the
only difference is this one card and its driver compiled into the
kernel.

Is this correct?
Thanks!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 07:39 PM
Allen Kistler
 
Posts: n/a
Default Re: Identical servers + kernel configs -> different initrds?

OtisUsenet wrote:
> Allen Kistler wrote:
>> OtisUsenet wrote:
>>> Allen Kistler wrote:
>>>> OtisUsenet wrote:
>>>>> I've got 2 nearly identical servers with kernels compiled from the same
>>>>> config, yet their initrd files drastically differ in size:
>>>>>
>>>>> ServerA:
>>>>> 1045276 Sep 9 21:30 initrd-2.6.15.4.img-HT
>>>>> 1053495 May 11 2005 initrd-2.6.9-1.667.img
>>>>> 1041351 May 11 2005 initrd-2.6.9-1.667smp.img
>>>>>
>>>>> ServerB:
>>>>> 504485 Sep 9 21:29 initrd-2.6.15.4.img-HT
>>>>> 504107 Apr 11 2005 initrd-2.6.9-1.667.img
>>>>> 493803 Apr 11 2005 initrd-2.6.9-1.667smp.img
>>>>>
>>>>>
>>>>> Would anyone have any ideas what could cause this?
>>>>>
>>>>> More importantly, does this have any effect on kernel performance?
>>>>> (I skimmed
>>>>> http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html and
>>>>> think that the answer is "no", but I'm like to double-check that.)
>>>> I can't think offhand of any reason why the sizes should be so
>>>> different, but you can check on your own what's in the initrds.
>>>>
>>>> gzip -cd /path/initrdfile | cpio -idm
>>>>
>>>> will extract the contents of the initrds, then you can compare them.
>>> Thanks for this tip, I didn't realize I could do this, but it makes
>>> sense.
>>> After uncompressing the two initrd's, and doing a diff -r on them, I
>>> got only this:
>>>
>>> [snip]
>>>
>>> Is it possible that the difference in this handful of modules is making
>>> one initrd double the other one (500KB vs. 1MB)?
>>>
>>> Perhaps it is:
>>> [snip]
>>>
>>> Does it make sense to look at the sizes of modules and relate those
>>> sizes to the size of the initrd?

>> The fact that the contents of your initrds are so very different is a
>> major indication that your "nearly identical servers" are hardly
>> anything close to identical. I don't think you really need to look much
>> beyond that for explanation.
>>
>> Otherwise, the sizes of the things in the initrds is definitely going to
>> affect the the sizes of the initrds.

>
> So, if I understand things correctly, even if 2 servers are 99%
> identical, but one has an extra card of some kind and the driver for
> that card gets built into the kernel, if that driver happens to be 1MB,
> that could cause the whole initrd to be 1MB larger, even though the
> only difference is this one card and its driver compiled into the
> kernel.


No.

But if the two servers have different hardware (especially hard drive
controllers) and the drivers to support that hardware are compiled as
modules (not into the kernel), then the contents of the initrds will be
different.

That's what you've got, plus lvm on one and not the other. lvm is a
software thing, but it's still an initrd difference.

FWIW if additional drivers are compiled into the kernel, then the kernel
gets bigger. Either way, additional binary content does compress
(initrd or vmlinuz), but not as much as something with a lot of entropy,
like text, for example.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:56 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com