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.