Using zram (was compcache)

I've tried compcache but dont get good result:
http://superbiji.blogspot.com/2010/12/enable-compcache-in-ubuntu.html

But zram seem working fine. Compcache will be included in 2.6.37 kernel, named: zram. But if you want to try it follow this step:

Download and install 2.6.36 kernel from here:



Get compcache source (not tar.gz), if you get compile error see reference below:

hg clone https://compcache.googlecode.com/hg/ compcache
make
cp zram.ko /lib/modules/2.6.36-02063602-generic/updates/
depmod -a

Add this to /etc/rc.local:

# if you have 2 core
modprobe zram num_devices=2
# 500mb each, usually compressed to 80%
echo 524288000 > /sys/block/zram0/disksize
echo 524288000 > /sys/block/zram1/disksize
mkswap /dev/zram0
mkswap /dev/zram1
swapon /dev/zram0 -p 100
swapon /dev/zram1 -p 100

Next, reboot and run big apps like eclipse, 3 virtual machines

Reference:

Comments

Popular posts from this blog

Optimize SSD on Linux

Manually clean up zimbra zmcat/zmcpustat exploit

Ports to allow for whatsapp call