initramfs-tools: ZRAM is not used in Live CD's if the machine has more than 512 MB RAM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The Ubuntu version used in Precise Pangolin;
The initramfs-tools version used is 0.99ubuntu13:
I am trying to make a customized Live CD with the ZRAM kernel module enabled in the Live. I found the files dedicated to configure it for the Live CD, but when I tried the resulting ISO in Virtualbox ZRAM was not activated. Then I discovered the file "$WORKDIR/
*******
# Do not use compcache on the liveCD if we have more than 512M
if [ "${BOOT}" = "casper" ]; then
if [ "${TOTAL_RAM}" -gt 524288 ]; then
exit 0
fi
fi
*******
therefore I restarted Virtualbox with an amount of RAM less than 512M to see if this time ZRAM would be enabled and YES it was!
I think it is a pity to limit the amount of available RAM for a given machine where the Live will be used, because it can always be useful, and also because the ZRAM swap device will be used only if needed.
I would like this limitation to be removed.
The present bug report could be tagged "wish-list" or "low".
Thanks for considering this request.
Regards,
Mélodie
summary: |
- initramfs-tools: ZRAM is not used in Live CD's if the machine has less + initramfs-tools: ZRAM is not used in Live CD's if the machine has more than 512 MB RAM |
Hi Mélodie,
It's not true that "the ZRAM swap device will be used only if needed." The zram swap device must be pre-allocated, and (of course) takes away from system memory. If the total memory needed by the live system is less than the amount of physical ram, but more than ($physical_ram - $zram_size), enabling zram will result in a performance penalty for memory access because of the added overhead of compression.
So it's by design that we only enable zram in cases where we know we need more RAM than we have available, and when we know we won't have swap.