Hardy LiveCD fast with 192MB RAM and compcache.

John McCabe-Dansted gmatht at gmail.com
Tue Feb 19 18:12:14 GMT 2008


Hi, I'd suggest a feature freeze exception for compcache. Compcache
allows the existing Hardy LiveCD and ubiquity to be run on machines
with 256MB (even 192MB) of ram. Thus compcache allows us to easily
depreciate the use of the alternate-cd by normal users to install
Ubuntu on low memory machines.

Compcache is similar to the ccache project, (and the 0.1 release is
misleadingly named ccache)

ccache was not included in Ubuntu because it required an invasive
kernel patch. However compcache is a kernel module, which compiles
without any complaints on the Hardy LiveCD. See:
  http://lists.laptop.org/pipermail/linux-mm-cc/2008-February/000195.html

Adding compcache to Ubuntu is as simple as adding
  insmod lzo1x_compress.ko && insmod lzox_decompress.ko && insmod tlsf.ko
  insmod ccache.ko ccache_size_kbytes=128000
  swapon /dev/ccache.ko
to the initscripts.

If we have to pull compcache before Hardy is released, it would be
just as easy to remove. By only supporting compcache on the LiveCD,
there are few issues with respect to ongoing maintenance; we can
simply choose not to include compcache on later LiveCDs.

compcache makes a dramatic difference to LiveCD memory requirements
and performance on low memory machines. Ubiquity runs fine with only
192MB of ram. Although my test machine may be over powered, this
suggests that we could easily run Ubiquity on 256MB machines without
worrying about out-of-memory errors or excessively poor performance.
Thus we would no longer need to publish higher memory requirements for
ubiquity than the alternate-cd, as we did with Gutsy. See e.g.
   http://www.ubuntu.com/getubuntu/releasenotes/710

--

Test machine is am i386 VirtualBox 1.5.4 VM with 192MB of ram running
on one core of a Core Duo, with the Hardy iso on the harddisk.
(This would be much faster than your typical low memory machine,
however both IO and CPU the performance increase is plausible)

I created the floppy image.
  http://www.ucc.asn.au/~mccabedj/ccache/Hardy-ccache.img.bz2
To enable compcache in the VM, I enter /floppy and type "sudo sh insmod.sh"

Without compcache:
  Just typing is sluggish.
  Starting gnome-terminal takes a minute.
  Killed ubiquity after waiting 15 minutes for it to start up.

With compcache:
  Applications are responsive, even large ones like Firefox.
  Ubiquity is a pleasure to run
     Only time seemed to freeze was at 82% (waiting for network, did
not seem to be memory related)
     Entire install took less than an hour, including waiting for user
input, waiting for network, and filing bugs. such as:
       https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/193267
       http://www.ucc.asn.au/~mccabedj/ccache/Screenshot-Hardy-fdccache.png

--

See Also:
https://wiki.ubuntu.com/CompressedMemory

-- 
John C. McCabe-Dansted
PhD Student
University of Western Australia



More information about the sounder mailing list