Using zRAM On Ubuntu 13.04 Linux
Phoronix: Using zRAM On Ubuntu 13.04 Linux
The Linux kernel zRAM module allows for creating RAM-based compressed block devices and for common situations can reduce or eliminate paging on disk. The zRAM feature can be particularly beneficial for systems with limited amounts of system memory. It's quite easy to setup zRAM on Ubuntu Linux, so in this article are some before and after benchmarks...
No word about the amount of RAM saved for each test case, that is the main interest in zRAM. So the article is practically useless. (including a game that is not usually playable on this hardware is not relevant at all).
No before and after cpu usage on a timegraph either. That would seem to be important as well.
As a user of zram, I'll say that these benchmarks are useless. when is zram the most useful : memory constrained systems. I use it on my netbook that has 2GB of RAM. That's not a lot. what zram gives me is some headroom when I start running out. Nothing however replaces manual application management...
Compressing RAM by itself is a performance hit, no question there...
I tried using zram on a laptop with 2GB ram, and it did not seem to help the performance much. Got it 8gb ram sticks for $60 instead, and the upgrade did wonders for it and modernized it for modern workloads (browser with a ton of tabs and many other programs open, thanks to easy window management).
for your use-case uksm might be useful with all the tabs and/or similar programs running at the same time
Originally Posted by Vadi
Perhaps, but honestly upgrading the ram was much less hassle-free and fixed the problem well.
zram is much more usefull in live mode. 1 gb ram without zram is currently not enough anymore, the system will hang after a few mins webbrowsing. zram allows normal use with it, but on hd it is usually not needed as you can create a swap partition. i don't think that you will gain performance when you use it on a hd install - without aufs you have got more free ram anyway - you store new files basically in tmpfs in live mode, thats not the case later. I had that problem with my own netbook (1gb ram) and the cebit version which i used without hd - therefore i packaged zram, package name is zram on Kanotix.
I think, as desktop users, you'll see more interesting results with zcache since you're more likely to have a backing swap device and thus you should get all the benefits of zswap without allocating a fixed amount of ram that can only be used for a single purpose.
Originally Posted by phoronix
For a more constrained device, zswap might make more sense since it too uses dynamic transcendent memory like zcache, and otherwise should act quite similarly to zram.
You seem educated about this subject. Hence, I'm stating my questions towards you.
Originally Posted by liam
Please, could you explain the fundamental difference between zswap/zcache and zram? Whenever I try to google, I get references to all sorts of thinkgs like compcache, ramzswap, cleancache and frontswap. To me, they are all the same: You create a block device and put data on it which is then stored in RAM, but compressed.
Furthermore, why is not possible to just say: Compress all RAM with lzo. That would be useful for an old box we have here, and could be a sysctl perhaps?