[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: zram Usage as Default in Debian (?)



On 15/01/2012 19:52, Rainer Dorsch wrote:
On one system, that is exactly, that is what I observe.

Ok, i suspected that.
I've haven't yet found the time to test zram and surely will do. But i also admit that the more i think the more seems to me the wrong way to solve the responsiveness problem. I would expect a kernel setting that can tweak how it use the swap area. I just wanted to say to the kernel: cache is less important than processes; swapout processes only when the physical ram space is really ended or it's next to it. The vm.swappiness variabile seems to be the parameter nearest to that but in my experiments the perceived effect in day to day usage is null. In other words, setting it to zero, doesn't reduce the swap so much and after hours of use i still have 50-100 MB used swap space (belonging to processess that i will probably use and that will cause strange lags documented only by the hdd led).

The more detailed document i've found so far is that:
http://rudd-o.com/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that
But i admit that there are things that i've not fully understood yet and apart from swappiness i have to test the other options yet.

Zram looks like a suboptimal solution to me, even if it can work in some scenarios like mine and yours. I feel it more like a workaround that come at the price of lost ram space and computational power (could be not percepible).

Since i was not able to find a clear kernel parameter to tune swap usage like i want and since my ram is usually filled below 50%, i'm now using my laptop without swap space. And clearly, from the responsiveness POV, that works. ;-)
I've prepared a 1 GB file formatted with mkswap to use if needed.

The other system is a low end system with 512 MB RAM and it is running KDE4.
With zram the system is much more responsive than just with HDD swap space.

Mmmh, my feelings is that, actually, zram make sense only if you have plenty of free ram. In low ram PC like yours i expect every bit of ram should be precious and that you could easily end in what others have already said: more negative side effects than improvements. It would be useful only if the swapout data were highly compressible, which i don't know and that's why i will make some test when i'll have more spare time. ;-)

Ciao.

Cesare.


Reply to: