Thursday, July 11, 2013

Get Your PC's MoJo Going with zRAM

by Dietrich Schmitz

Using a Netbook has both advantages and disadvantages.  Mine, an Acer Aspire One D260 (Intel Atom N450) came with 1GB DDR2 ram.  I added another 1GB to bring it up to 2GB ram total. (Image credit:

Overall, using the Netbook has been a great value proposition.  Because Linux does so well with limited ram, some Distros better than others, I've managed to get along just fine.

Very recently, I made a switch from Fedora 19 to Netrunner 13.06 Enigma and have been doing various tweaks of the Desktop to configure it to my liking.

Very little in fact, needed to be changed from the start, which speaks well for KDE and Blue Systems.  Blue Systems, in particular, have done a superb job in putting together Enigma.

By chance today, I came upon a feature which landed in the Linux kernel 3.2, called zRAM.

If your PC has 2GB ram or less, then zRAM is for you.  In Linux kernel 3.8, a new LZO compression library update is present that in testing shows roughly double speed improvements for compression/decompression.

zRAM uses LZO to create compressed swap space in RAM.

Beyond the install step, there's no special configuration required -- zRAM loads on boot and sets itself up in RAM with a higher priority than your default swap partition.  The result is that zRAM is engaged first, if full, then your SDD/HDD partition will do the more I/O-intensive swapping which, of course, is vastly slower.

I've been using zRAM all day and must say it was well worth the trouble of installing.  The speed improvement is pronounced.  And it just so happens Enigma, released this past Friday (July 5) uses a 3.8 kernel.  So the newest LZO compression library is installed also.

Using Chrome typically is memory-instensive and if I open 6 or more tabs, I notice swapping begins to slow things down.  I usually am careful about closing unneeded tabs just as soon as I am done with them to avoid hitting that memory maxed-out wall where swapping starts to kick in.

Now, I have not hit the 'wall' once since installing zRAM and everything snaps to screen as though this machine was equipped with 4GB of ram.  I kid you not.

So, if you have a machine with 2GB ram or less, I strongly recommend you give zRAM a try, and especially if you are using Linux kernel 3.8 or greater.

There you have it!

-- Dietrich
Enhanced by Zemanta


Post a Comment