Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.


Compcache provides a possibility of using parts of the memory as virtual compressed swapdevice. We want to include this functionality in Ubuntu Intrepid to lower memory requirements in various setups.

Release Note

Most notably the minimal system requirements will be affected by this, there should be no separate release note for this feature.


The RAM requirements for running an ubuntu desktop are currently very high. Especially on LiveCDs and Thin Clients this high demand is noticeable. Additionally there are more and more users with low specced subnotebooks within the ubuntu userbase that have a requirement for being able to run the system on a limited amount of memory. With the Google Summer of Code project compcache it is possible to extend the available physical ram with a virtual swapdevice, this technology will be included in ubuntu.

Use Cases

Fred has a laptop with only 256M of ram. He wants to install ubuntu on it and read the online documentation while the install runs from a live session in the background. Fred opens firefox and is able to read the pages of while the install is going on in the background.

Martha is a teacher and just got a bunch of old PCs donated for the class. All of them have 500MHz PII CPUs, 32MB memory, no HDD and PXE boot capable network cards. The principal of the school agreed that money for an LTSP server in in the budget. Marthas husband is Ubuntu enthusiast and just read that with Intrepid Ibex the requirements for LTSP clients dropped to 32MB. On the weekend marthas husband installs Ubuntu LTSP from the alternate CD, sets up the network in her classroom and everything works out of the box.


The compcache module will be loaded and configured as early in the initramfs as possible.

The following parameter will be used to enable compcache in initramfs:


Based on this initramfs.conf value an init-top script derived from the upstream shipped will be triggered to do the setup. If COMPCACHE_SIZE is empty, compcache won't get used in the initramfs.

Tools like casper, ltsp or the netbook/mobile image creating software can drop an override file into /usr/share/initramfs-tools/conf.d/ or /etc/initramfs-tools/conf.d/ and run a chrooted update-initramfs to switch the feature on.


modprobe -q lzo_compress
modprobe -q lzo_decompress
modprobe tlsf

if [ -n "$COMPCACHE_SIZE" ]; then

modprobe compcache

swapon /dev/ramzswap0 -p 100

KERNEL=="ramzswap0", ACTION=="add", \\
  RUN+="/sbin/swapon -p 100 /dev/ramzswap0 2>/dev/null"

Related Bugs

Add compcache modules, allowing ubiquity installs on 256MB machines:

Xubuntu requires more than 128mb of ram to install via LiveCD:

Outstanding Issues

Test/Demo Plan

BoF agenda and discussion


Compcache (last edited 2008-08-06 16:41:47 by localhost)