Taking a look at the memory footprint of a LiveCD and a disk (image)

A
memory{width=”500” height=”291”}

Minimization is a hot topic for oVirt Node

  • mainly to reduce the size of the resulting rootfs (and livecd) image.

This time the question was how large the memory footprint of Node actually is.

The method for measurement was rough:

  • Boot into the image and run free -m on the console to find out the memory usage
  • Use df -h to determine the rootfs size

LiveCD Looking at some recent ovirt-node-iso image, which has a LiveCD size of 205MB and a rootfs size of 565MB, had a memory footprint (usage) of 626MB right after booting into the installer.

plain rootfs For comparison I took an image used for imgbased. That image had a rootfs size of 1.2GB. That image actually had a memory footprint right after boot of 192MB.

The interesting bit with

  • the livecd is that mere 626MB are required to boot into the 565MB large rootfs.
  • the rootfs is that 192MB are required to boot into the 1.2GB large rootfs.

So where does the difference come from? Actually the squashfs containing the rootfs on the LiveCD needs to be extracted, before it can be booted. This is done by dracut using device-mapper. So all 565MB are pushed into RAM before the boot can continue.

So we learned that squashing the rootfs reduces the “deployment size”, but results in a larger memory overhead at runtime (at least if the squashfs is used).

The plain rootfs does not need to be uncompressed before it can be used, that is why much less memory is used at runtime. But the delivery size is much larger.

Dear Lazyweb, do you know how I can see the number of pages or size of memory claimed by the squashfs module and/or the device-mapper in memory vodoo?

::: {#footer} [ June 16th, 2014 2:29pm ]{#timestamp} [fedora]{.tag} [node]{.tag} [ovirt]{.tag} [memory]{.tag} [comaprison]{.tag} [footprint]{.tag} :::