On Thu, 2023-06-01 at 15:41 +0000, Thorsten Kukuk wrote:
On Thu, Jun 01, Walddys Emmanuel Dorrejo Céspedes wrote:
This will create a zram of the same size of the ram of the user with compression improve the performance of the machine for those users with low ram, or with a lot of comsunption of ram.
Using ZRAM and disabling SWAP doesn't make any sense at all.
Right, I thought the same. And I haven't looked into zram enough to understand properly what it does and how it does it, so I may be talking nonsense. What I can report, though, is that I'm on a Desktop with a lot of RAM and no swap. I, apparently, often manage to eat all of it, and in fact I was experiencing quite a few OOM, with the consequence that the most RAM-hungry apps were being killed. I preferred this to the sluggishness of swap, so I didn't give up to adding it. Then, I decided to try zram. Well, no apps being killed any longer, under no load condition. It is the case that, when RAM pressure is really high, switching the focus to an app that has been in background for a while is a bit slow, as in, the app itself looks stuck for a few moments (but it's quick, and it's only that app, not the entire system, like it usually is with swap). But then everything starts working, with no OOMK involvement.
When is ZRAM usefull? In low-memory setup and with very slow harddisks.
Yeah, again, I thought the same. But it's actually working really
really great in my large-memory setup and decent hard-disk.
I'll try to collect more data and to understand better why it behaves
like that, but I figured I'd share my experience. :-)
Regards
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<