Does installing zRam have any advantages on a system without SWAP?

Running Ubuntu 12.10 here, on an 128Gb SSD and a 4GB RAM system. Ever since I installed the OS, I realised that I dont need the swap partition, as I never use the hibernate function and rarely run out of RAM. However, would installing zRam bring any real improvement when RAM is full, even if there is no swap partition?


I would presume whether or not you have swap space is more or less irrelevant to the usefulness of zRam. Regardless of whether or not you have zRam installed, if you run out of RAM with no swap space, bad things start to happen. :-)

If you do expect to run out of RAM, then zRAM could be helpful because it essentially expands the amount of data you can store in RAM (assuming it's not of unreasonably high entropy) so it will take longer to fill up. So it might buy you some more time, assuming you're not storing large arrays of random numbers.

If you're 99.9% sure you won't get close to running out of RAM (i.e. you have 16GB on your web-only netbook), than anything stored in zRAM is needlessly requiring extra CPU time to compress and decompress, so it's not really beneficial in this case.

If you're on the high end of the RAM usage spectrum (on average over 50-60%, for example) you might benefit from some additional peace of mind using zRAM. (Or you could buy more RAM.)

I suppose you have to evaluate your normal and heavily-loaded RAM utilization (average and max) and what kind of data you work with.


Yes enabling zRAM is certainly a best thing.why means zRAM will creates a RAM based block device which acts as a swap disk, but is compressed and stored in memory instead of swap disk allowing very fast I/O and increasing the amount of memory available before the system starts swapping to disk.

Actually compcache is the original name and its changed to zRAM these days.

you can install it with sudo apt-get install zram-config