Home » Article » Add RAM to Ubuntu 13.10+ for free: zRAM

Add RAM to Ubuntu 13.10+ for free: zRAM

Pages

October 2013
M T W T F S S
« Sep   Jan »
 123456
78910111213
14151617181920
21222324252627
28293031  

RSS Link

  • An error has occurred; the feed is probably down. Try again later.

Twitter Updates

Blog Stats

  • 346,176 hits

Archives

Pengunjung


In the mainline generic kernel of Ubuntu, there’s a module called zram. This is a pretty good trick to add additional “free” RAM to your machine without any change: it creates in-memory compressed block for swap, meaning it eats a bit of your CPU but gives you literally more RAM.

If you’re on a VPS for example, having 512 MB RAM, this would actually give you access to 750 MB RAM and would eat just a little CPU from you – I don’t even notice it on the Munin graphs.

To install:

apt-get install zram-config

Make sure it’s started and running:

cat /proc/swaps

If you see something like this

# cat /proc/swaps 
Filename                                Type            Size    Used    Priority
/dev/zram0                              partition       62712   6804    5
/dev/zram1                              partition       62712   6768    5
/dev/zram2                              partition       62712   6744    5
/dev/zram3                              partition       62712   6768    5

then it’s already running.

Reboot your machine, and voilá. You might even turn your regulat disk-swap off.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: