www.Linux-Support.com

  • Increase font size
  • Default font size
  • Decrease font size
Home

Increase Performance In Linux With zRam

Print
Article Index
1. Linux and zram
1.1. Installing Scripts
1.2. Start and Stop zram

linuxIf you have memory hungry applications, you are required to provide more RAM or swap space to run them. If there is no chance to install additional RAM modules, you should take a look at 'zram'.

1. Linux and zram

Up-to-date Linux kernels contain build-in support for on-the-fly compression of swap spaces. This will result in Linux systems, that will...

  • be more responsive when running applications with large requirements in RAM space.
  • benefit from massively reduced swapping.
  • not freeze your system, when running out of RAM.
  • behave as if additional RAM would have been installed.

When testing 'zram' on Ubuntu 11.04, we were able to run multiple Java development entvironments and dozens of memory hungry applications, while the whole system and each and every application were still responsive. (When trying to start the same number of applications without the module 'zram' enabled, the whole system did freeze while occupied with loading applications and swapping data to harddisks).

After testing the module with older hardware we did recognize an performance boost. So you are not required to  utilize up-to-date hardware to get an performance improvement.

To enable the module 'zram' you are not required to reboot your system. You just have to install some scripts that are able to turn on/off the module at any time.

1.1. Installing Scripts

The following instllation process has been tested on Ubuntu 11.04 and 11.10. 

# add a new repository for packages
$ sudo add-apt-repository ppa:shnatsel/zram
 
# update your local database of available packages
$ sudo apt-get update
 
# install sctipts to automatically enable/diable zram
$ sudo apt-get install zramswap-enabler
 

The last one of the previous command line statements will start the module and reconfigure your system. Instantly you will gain from the enabled kernel module.

1.2. Start and Stop zram

To start or stop the module and associated swap spaces.

# start zram caching
sudo start zramswap
 
# stop zram caching
sudo stop zramswap
 

Related resources:

Last Updated on Saturday, 08 October 2011 21:07