FW: zram-config
p s
superduper3000 at outlook.com
Thu Nov 7 18:48:54 UTC 2013
Hmm, I tried this with real apps (gimp, chromium, pinta) in a real Lubuntu 13.10 32bit install and I could not reproduce it. The offending apps that could not allocate memory were killed.
I started with this:
$ free -h total used free shared buffers cachedMem: 2.0G 1.1G 920M 0B 178M 547M-/+ buffers/cache: 359M 1.6GSwap: 1.0G 0B 1.0G$ cat /proc/swapsFilename Type Size Used Priority/dev/zram0 partition 513736 0 5/dev/zram1 partition 513736 0 5
To reach this:
$ free -h total used free shared buffers cachedMem: 2.0G 1.8G 146M 0B 1.0M 48M-/+ buffers/cache: 1.8G 196MSwap: 1.0G 1.0G 0B
End managed even to get this :)
$ free -hbash: fork: Cannot allocate memory
But I could not reproduce it.
> Date: Thu, 7 Nov 2013 17:40:29 +0100
> From: leszek.lesner at web.de
> To: lubuntu-users at lists.ubuntu.com
> Subject: Re: zram-config
>
> Am 07.11.2013 17:28, schrieb sd:
> > Hi,
> >
> > Some details about zram-config:
> >
> > [ppp] 1. I have somehow the impression the system is not fully aware
> > about the memory assigned to zram.
> > [leszek] To 1. You are wrong. Its a normal swap and all apps which are
> > aware of swap are aware of zrams swap.
> >
> > @leszek - you are right, but that is not what I meant. I meant the
> > system is somehow not aware about the RAM amount being in use by zram
> > (the system sure knows about zram swap memory).
> >
> > Below are some tests I did (with a live Lubuntu 13.04 cd in virtual box):
> >
> > (fresh start)
> >
> > $sudo swapoff -a
> > $sudo service zram-config stop
> > $free -h
> > total used free
> > Mem: 994M 866M 127M
> > Swap:0B 0B 0B
> >
> > $sudo service zram-config start
> > $free -h
> > total used free
> > Mem: 994M 870M 123M
> > Swap:497M 0B 497M
> >
> > $cat /proc/swaps
> > ... Size
> > /dev/zram0 ... 254508
> > /dev/zram0 ... 254508
> >
> > So ~ 250M per each zram swap.
> >
> > Sure the system is aware of the zram swap, free command shows it -
> > this is obvious to me.
> > The system is, however, somehow not aware of the RAM amount zram is
> > using, atm it looks like it is using like 0B - may be zram allocates
> > the memory dynamically as needed (and the given amount is just a max
> > limit)?
> >
> > (install memtester)
>
> I am not sure what memtester does and how it works exactly.
>
> >
> > $sudo memtester 512M
> >
> > works ok
> >
> > free -h (on new terminal tab) shows 80M free, no swap used
> >
> > stop memterster (Ctrl+C)
> >
> > $sudo memtester 1024M
> >
> > want 1024, got 1024 trying mlock ...
> >
> > System freezes, no chance to recover. You have to power the machine down.
>
> Does this also happen when you start applications and got to 1024 MB RAM
> usage ?
>
> >
> > (Reset VM with live CD) and next test:
> >
> > $sudo swapoff -a
> > $sudo service zram-config stop
> > $free -h
> > total used free
> > Mem: 994M 734M 259M
> > Swap:0B 0B 0B
> >
> > $sudo memtester 1024M
> > want 1024M, got 604M trying mlock ...
> >
> > The live CD shows next the lightdm login prompt here, not perfect, but
> > much better than the freeze with zram active.
> > The system behaves better in this case on low memory. At least you
> > have a chance to do a propert shutdown, start a new desktop session, etc.
> >
> > After restart of VM with live CD next test:
> >
> > $sudo swapoff -a
> > $sudo service zram-config stop
> > $sudo service zram-config start
> > $free -h
> > total used free
> > Mem: 994M 864M 129M
> > Swap:497M 0B 497M
> >
> > $sudo memtester 512M
> > want 512, got 512 locked
> >
> > $free -h (new terninal tab, while memtester command above active)
> > total used free
> > Mem: 994M 929M 64M
> > Swap:497M 4K 497M
> >
> > $top
> > memtester RES 512m VIRT 516m %MEM 51.5%
> >
> > Now in a new terminal tab:
> >
> > $sudo memtester 128M
> > want 128MB got 128 MB locked
> >
> > $free -h
> > similar to above 4M swap used
> >
> > $sudo memtester 512M (new terminal tab)
> > Same system freeze as before.
> >
> > The behavior what happens in a Lubuntu box when there is no more free
> > memory seems to be deterministic:
> >
> > -With zram swap active - it just freezes - no warning, no chance, you
> > have to reset power of the system.
>
> This should not be the case (at least when there is no other bug in the
> kernel)
>
> > -Without zram active - it kills the desktop user session, shows lighdm
> > login - much better.
> >
>
> The interesting question would be if someone could verify this with
> normal applications instead of memtester.
>
> --
> Lubuntu-users mailing list
> Lubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/lubuntu-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20131107/d30128a9/attachment-0001.html>
More information about the Lubuntu-users
mailing list