Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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


share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.