[Yaird-devel] Bug#391446: yaird: Free memory by nuking rootfs
before switching root
Peter Colberg
peterco at gmx.net
Fri Oct 6 18:01:39 UTC 2006
Although it does not matter regarding the nuke_dir subject, the
"numbers" displayed above were not really suited to show the memory
usage of the initramfs.
Just to be nit-picky myself, here are the truly initramfs-relevant
/proc/meminfo cached memory numbers for ten successive boots with
init=/bin/dash, 5 without and 5 with the nuke_dir function enabled
in run_init.c.
without nuke_dir (two boots):
Cached: 7016 kB (Active: 5320 kB)
Cached: 7016 kB (Active: 5528 kB)
Cached: 7016 kB (Active: 5596 kB)
Cached: 7016 kB (Active: 5536 kB)
Cached: 7016 kB (Active: 5532 kB)
$ gzip -d < /boot/initrd_without_nuke | cpio -t >/dev/null
10224 blocks
with nuke_dir (two boots):
Cached: 1712 kB (Active: 1204 kB)
Cached: 1712 kB (Active: 1184 kB)
Cached: 1712 kB (Active: 1200 kB)
Cached: 1712 kB (Active: 1180 kB)
Cached: 1712 kB (Active: 1180 kB)
$ gzip -d < /boot/initrd_with_nuke | cpio -t >/dev/null
10227 blocks
=> Difference in memory (5304 kB) closely relates to initrd size.
Regards,
Peter
More information about the Yaird-devel
mailing list