← Back to team overview

lubuntu-qa team mailing list archive

Re: zRAM broken on Raring?

 

On Sat, 28 Sep 2013 13:11:36 +0200
Leszek Lesner <leszek.lesner@xxxxxx> wrote:

(...)
> > disk? Here is a configuration file:
> > http://meets.free.fr/Downloads/BentoVillageProject/Configurations/System/etc/sysctl.d/50-local.conf

> This is no real solution it is more of a workaround if you only have
> workloads that don't go higher than the actual physical memory on your
> computer. But if it goes higher than that all hell breaks loose &  the
> system becomes unusable as it starts swapping out like crazy.

I had to control the kernel swappiness this way in a machine where 192 MB RAM only was
available (and no way to upgrade, the machine would not see it when more ram was
installed). 

I had noticed the swap started to be used when an amount of RAM of 30% or a little more
was still available.

> We tested such scenario in neptune with sysctl tweaks and especially a
> config like you suggest.

Some such as or the same? It is only lately that I tried 0 as a value and I can only say
it is really better so far.

> It only works fine as long it does not start
> swapping. We messured that it is necessary to have around 250 mb to keep
> the desktop (in our case KDE Plasma) and applications alive(keeping the
> mouspointer responsive and clicking on apps does not cause a long halt
> until the system reacts).

I would not dare using any KDE application with so little RAM, unless only Openbox is used
as main environment. :)

> This might vary for LXDE as it tends to use a
> lot less for the desktop but I can't say it for sure as I never tested
> this.


> > Else, I configure 20% or 25% max in the initramfs.conf file
> > (under /etc/initramfs-tools) ie: COMPCACHE_SIZE="20%"
> >
> > (I have explained in another thread that 50%, which is the default in Ubuntu for a
> > reason which is unknown to me, might take too much from the CPU... and the above
> > configuration is what I have been using in several distributions since several years
> > with success, as well as a few dozens of users whom I provided with remixes having
> > this setup).
> Compcache is deprecated as far as I know so this config should not have
> any effect.

When has it been deprecated? I thought as long as the files where there it was meant to
be used? I'll check and change method if necessary.

> To reduce the zram swap space you need edit it in
> /etc/init.d/zram-config . Be carefull there as it does not list it up as
> percentage or so but it uses a shell script approach to calculate
> physical ram available / 2 . Its not that trivial to change that as
> shell script calculation does not support floats.

So what will happen if I change '/ 2' and use '/ 4' ?

> > Let me also add a word about the swap to disk : it is highly desirable to avoid
> > swapping to disk, because it is very slow compared to swap to ram and therefore
> > likely to trigger freezes.

> A combination of zram and disk swapping with the priority to zram might
> be better as only using zram when facing very low ram and very low zram
> availability.

If you don't forget to forbid the swapping tendency of the kernel. I have kept an eye on
the processes in htop many many times when I could see apps starting to slow down and
would also open a session in a tty for this purpose if it was all slowing down too much
to be even able to follow the evolution of the processes from within a X session.

I don't consider the sysctl config part as a workaround so far, but as a must, even in
the machines where I am happy to have 3 or 4 GB RAM.

Regards,
Mélodie


References