Taking a look at the rootfs footprint of a LiveCD and a disk (image)
Besides the details about Node’s memory footprint, it was also intersting to see how much space we gain form the rootfs by our minimization efforts.
The idea is to take a recent oVirt Node image, and compare some stats of
it, to the stats of a regular image, build using the @core
group.
The two points I investigated are:
- How does the minimization affect the number of packages?
- How does the minimization affect the space requirements?
The
- first one was addressed by counting the number of installed packages
(
rpm
) - the second one was addressed by
- Summing up the reported size of the installed packages (
rpm
) - Determining the disk space in use (
df
)
- Summing up the reported size of the installed packages (
Because guestfish'ing into a LiveCD is tiresome, I created this script to gather the stats for me. Additionally it’s nice to have a tool by hand to create reproducable results.
The results are - once again - interesting.
$ bash img-stats.sh ovirt-node-iso-scratch.iso runtime-layout.img
Image: ovirt-node-iso-scratch.iso
ImageSize: 197.00 MB
in_node
NumPkgs: 449
SizePkgs: 867.50 MB
SizeRootfs: 564.97 MB
Image: runtime-layout.img
ImageSize: 1543.63 MB
in_imgbased
NumPkgs: 490
SizePkgs: 1071.67 MB
SizeRootfs: 1323.57 MB
DiffNum: -41
DiffSizePkgs: -204.17
DiffSizeRootfs: -758.60
What do we see here?
- We see that the plain rootfs has 41 additional packages installed. Or the other way round: 41 packages are blacklisted on the LiveCD.
- The sum of reported rpm sizes is ~200 MB higher on the plain rootfs than on the livecd
- The disk usage on the plain rootfs is ~760 MB higher than on the livecd
Especially the last two points indicate that the file based blacklisting is actually responsible for freeing up so much space.
This is just a rough estimate. More time needs to be spend on investigating the details of this differences.
::: {#footer} [ June 17th, 2014 1:56pm ]{#timestamp} [fedora]{.tag} [node]{.tag} [livecd]{.tag} [rootfs]{.tag} [minimization]{.tag} [libguestfs]{.tag} :::