How can I install zRam on my Ubuntu 11.10 acer inspire netbook? Seems like it would be advantageous to use zRam. And would it work?
zram is built into the Linux kernel. I've been experimenting with zram and have a brief script to set it up for swapping, like this:
modprobe zram num_devices=2 echo "268435456" > /sys/block/zram0/disksize echo "268435456" > /sys/block/zram1/disksize mkswap /dev/zram0 mkswap /dev/zram1 swapon -p 1000 /dev/zram0 swapon -p 1000 /dev/zram1
The machine I was testing on had 1GB of RAM, so I decided to use 256MB*2 for zram swapping. You can also use a similar technique to set up zram as an ext3 filesystem.
You can check zram usage by cat'ing /sys/block/zram0/orig_data_size and mem_used_total
To install Zram for Ubuntu 11.04 and 11.10:
Open terminal and type in:
sudo add-apt-repository ppa:shnatsel/zram
sudo apt-get update
sudo apt-get install zramswap-enabler