FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 01-08-2012, 08:30 PM
Daniel Baumann
 
Default zram Usage as Default in Debian (?)

On 01/08/2012 10:11 AM, Thomas Goirand wrote:
>> I don't think it's a good idea to make this default.
>>
> I and my ex-employee had similar experience. I also wouldn't recommend it.

yet another aol from me; i've tested it quite a bit with the idea of
enabling it automatically on debian-live systems if the machine as not a
certain amount of physical ram available. had only bad experiences with
it, so far (worse than without it).

--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: daniel.baumann@progress-technologies.net
Internet: http://people.progress-technologies.net/~daniel.baumann/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F0A0AF9.5050802@progress-technologies.net">http://lists.debian.org/4F0A0AF9.5050802@progress-technologies.net
 
Old 01-08-2012, 10:08 PM
Cesare Leonardi
 
Default zram Usage as Default in Debian (?)

On 07/01/2012 18:48, Rainer Dorsch wrote:

I recently setup zram (for compressed swap space in RAM) on an older low RAM
machine. I was quite happy with the result and started now to do the same
setup also on my other machines. I am wondering if anybody is investigating,
if debian should do that by default when installing a new machine or even
better also when machines get upgraded.


Hi Rainer.

What do you mean saying that you are happy with the result? In what aspects?

I ask you because while i'm skeptical too in wasting ram for swap, i
think i'll give zram a try to see the effects on responsiveness of
dormant application.


Let me explain.
There is something that i find annoying in the default kernel setup and
is its tendency to swap out to disk even when there are plenty free ram.
So if you have an open application that you leave dormant while doing
other things (that app could be also the Gnome menu, for example), when
you'll need that you'll find a strange lag and unusual disk work. The
system is swapping even if the ram is about 50% free!


So, in the past, i've modified the kernel setting with vm.swappiness=0
(from the default=60).
Now it's better but not sufficient to avoid swap: for example today,
with an uptime of about 8 hours without suspend to ram or to disk, i
have 47 MB of used swap. And i see its effect as lag when i want to
restore from the screen saver or when i use the applet to change display
brightness, and so on.


I'm almost sure that there is some other parameter that i could change
to avoid that preventive swap. In the past i've done some searches but i
found that was not so easy, as some other related parameters had to be
used with care. So i gave up.
And i also know it's a debated area, where different points of view
apply: IIRC Andrew Morton is one that is for vm.swappiness=100, to
minimize wasting ram from least used applications, that are moved to the
swap quite fastly. Probably if you have a super fast SSD the swap is not
so perceptible.


So, returning to zram, maybe have you seen good result from a
responsiveness point of view?


In fact the point that i find interesting with zram is that, if you have
plenty of free ram, you can use it as a swap area for the data that, on
average on your desktop pc, the kernel will usually swap out (in my case
always < 100 MB). I guess that could have a positive impact on
responsiveness of the least used processes.


Now, the best solution would be to tweak the right kernel parameters to
make it swap in a way i like more, rather than this hack. And the bad
opinion expressed so far make me more pessimist.


By the way, i'll give it a try. ;-)
Thank you for your idea, Rainer.

Cesare.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F0A21DA.8050302@gmail.com">http://lists.debian.org/4F0A21DA.8050302@gmail.com
 
Old 01-15-2012, 05:52 PM
Rainer Dorsch
 
Default zram Usage as Default in Debian (?)

Hi Cesare,

sorry for the slow response, comments embedded.

Am Monday 09 January 2012 schrieb Cesare Leonardi:
> On 07/01/2012 18:48, Rainer Dorsch wrote:
> > I recently setup zram (for compressed swap space in RAM) on an older low
> > RAM machine. I was quite happy with the result and started now to do the
> > same setup also on my other machines. I am wondering if anybody is
> > investigating, if debian should do that by default when installing a new
> > machine or even better also when machines get upgraded.
>
> Hi Rainer.
>
> What do you mean saying that you are happy with the result? In what
> aspects?

see below...

> I ask you because while i'm skeptical too in wasting ram for swap, i
> think i'll give zram a try to see the effects on responsiveness of
> dormant application.
>
> Let me explain.
> There is something that i find annoying in the default kernel setup and
> is its tendency to swap out to disk even when there are plenty free ram.
> So if you have an open application that you leave dormant while doing
> other things (that app could be also the Gnome menu, for example), when
> you'll need that you'll find a strange lag and unusual disk work. The
> system is swapping even if the ram is about 50% free!
>
> So, in the past, i've modified the kernel setting with vm.swappiness=0
> (from the default=60).
> Now it's better but not sufficient to avoid swap: for example today,
> with an uptime of about 8 hours without suspend to ram or to disk, i
> have 47 MB of used swap. And i see its effect as lag when i want to
> restore from the screen saver or when i use the applet to change display
> brightness, and so on.
>
> I'm almost sure that there is some other parameter that i could change
> to avoid that preventive swap. In the past i've done some searches but i
> found that was not so easy, as some other related parameters had to be
> used with care. So i gave up.
> And i also know it's a debated area, where different points of view
> apply: IIRC Andrew Morton is one that is for vm.swappiness=100, to
> minimize wasting ram from least used applications, that are moved to the
> swap quite fastly. Probably if you have a super fast SSD the swap is not
> so perceptible.
>
> So, returning to zram, maybe have you seen good result from a
> responsiveness point of view?

On one system, that is exactly, that is what I observe. Before disk swap was
always used, now I have never seen that disk swap is ever used in this system:

I posted this before:

blackbox:~# swapon -s
Filename Type Size Used
Priority
/dev/sdd partition 3910652 0 -1
/dev/zram0 partition 2070080 6360 100
/dev/zram1 partition 2070080 6388 100
blackbox:~#

And certainly accessing zram is faster than accessing swap hdd. I do not see
delays due to swap access anymore on my desktop.....this was in particular
visible, since I migrated to an SSD on that system (and left swap on a
frequently spin down hdd).

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.

> In fact the point that i find interesting with zram is that, if you have
> plenty of free ram, you can use it as a swap area for the data that, on
> average on your desktop pc, the kernel will usually swap out (in my case
> always < 100 MB). I guess that could have a positive impact on
> responsiveness of the least used processes.
>
> Now, the best solution would be to tweak the right kernel parameters to
> make it swap in a way i like more, rather than this hack. And the bad
> opinion expressed so far make me more pessimist.
>
> By the way, i'll give it a try. ;-)

Let us know what is the outcome. I think it would be good if we would have
quantitative benchmarks....next time, when I have access to the low end system
myself, I could try to measure boot time + KDE login time + Iceweasel start
time + digikam start time + libreoffice start time + shutdown time or something
like that with and without zram.... It certainly does not measure
responsiveness, but I hope that avoiding hdd swap space gives a total
speedup....

Thanks,
Rainer


--
Rainer Dorsch
Lärchenstr. 6
D-72135 Dettenhausen
07157-734133
email: rdorsch@web.de
jabber: rdorsch@jabber.org
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/
 
Old 01-21-2012, 12:22 PM
Cesare Leonardi
 
Default 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.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F1ABC0E.20102@gmail.com">http://lists.debian.org/4F1ABC0E.20102@gmail.com
 

Thread Tools




All times are GMT. The time now is 09:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org