Comment 0 for bug 200765

Revision history for this message
John McCabe-Dansted (gmatht) wrote :

The attached debdiff adds the compcache module. This module creates a swap device that stores swapped out pages in memory compressed using lzo. This greatly reduces the amount of memory required by the LiveCD before the physical swap file is created.

 I have tested ubiquity+gnome installs with 180MB and 120MB of ram on 7.10 [k]ubuntu and xubuntu respectively. By comparison 7.10 Ubuntu boots but is unusable with 192MB of ram.

 It appears that with compcache the ubiquity-only install in hardy will still function with only 256 MB of ram.

Overview of testing: I have tested this with
 - [kx]ubuntu-7.10 and ubuntu-hardy alpha 4 and Mar 08 daily build.
 - VirtualBox, Qemu [smp,nosmp], native DualCore, native P4
 - 120MB through 1GB of ram.
 - token testing with ia64 (but have not enabled ia64 in this patch)
 - have tested that Ubuntu does not try to hibernate onto compcache partition (by default, you could probably edit text files to do this if you really wanted to shoot yourself in the foot.).

The only negative I found with compcache-0.2 is that the mouse appears more jerky under heavy load than when physical swap is used. I have provided demo patchs against gusty liveCDs at:
  http://www.ucc.asn.au/~mccabedj/ccache/

I have build the arch using
  fakeroot debian/rules binary-arch arch=i386 flavours="generic"
as suggested in debian/rules. It generates the deb fine.
I installed the deb without any problems, and am using it now. No packages currently depend on compcache, so they cannot be broken.

Two problems that are easily worked around
1) that ubiquity tries to install onto the compcache device (on the demo cd I rename the device), and
2) compcache uses kernel memory, which is limited to 1GB on i386. To ensure we don't run out, I limit the compcache size to under 200MB so less than 100MB of kernel memory is used. (The compression ratio for the liveCD seems to be robustly 2:1).

See also
  bug 193552 "Support 256MB machines in Ubiquity"
  bug 200418 "Memory usage increase in LiveCD"
https://lists.ubuntu.com/archives/sounder/2008-February/011089.html
https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-March/003493.html
https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-March/003516.html

These currently allow.

This replaces

 debian/changelog | 9
 debian/config/i386 | 3
 ubuntu/Makefile | 2
 ubuntu/misc/compat.h | 35 ++
 ubuntu/misc/compcache.c | 428 ++++++++++++++++++++++++++++++
 ubuntu/misc/compcache.h | 148 ++++++++++
 ubuntu/misc/config | 2
 ubuntu/misc/tlsf.c | 669 ++++++++++++++++++++++++++++++++++++++++++++++++
 ubuntu/misc/tlsf.h | 93 ++++++
 ubuntu/misc/tlsf_int.h | 179 ++++++++++++
 10 files changed, 1568 insertions(+)

ProblemType: Bug
Architecture: i386
Date: Mon Mar 10 16:49:01 2008
DistroRelease: Ubuntu 8.04
Package: linux-ubuntu-modules-2.6.24-12-generic 2.6.24-12.16
PackageArchitecture: i386
SourcePackage: linux-ubuntu-modules-2.6.24
Uname: Linux 2.6.24-12-generic i686