On 5/12/26 1:04 AM, Patrick Dupre via users wrote:
On 5/12/26 12:37 AM, Patrick Dupre via users wrote:

On 5/11/26 8:01 PM, Tim via users wrote:
Benny Lyne Amorsen wrote:

zswap on the other hand discovers that certain pages have not been in
use for a long time, and so it migrates them to disk without
decompressing them. It will also notice that some memory pages are
incompressible, and it will send those straight to disk.

The result is that with zswap, the recently used pages are in fast
compressed memory, and stuff which has not been used for hours is
on disk. As it should be.

https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html


Patrick O'Callaghan:
Fascinating article. I suggest people read the section on Fedora before
deciding to change.

So what's the current default setup for swapping with Fedora?  (i.e.
Fresh install on a blank drive, you haven't customised anything.)  I'm
still on Fedora 42 on the other PC.

zram with no swap partition.

My machine is still slow, typically jumping from winodw to wondow.
I have
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G 7.8G  100

You still only have 8GB of swap.  You didn't change the file I mentioned.
You mentioned
/etc/systemd/zram-generator.conf
I do not have this file.
I have
/usr/lib/systemd/zram-generator.conf

Yes, you need to create that other file with different parameters to override the defaults.

Something that I do not understand
top
Tasks: 513 total,   1 running, 507 sleeping,   4 stopped,   1 zombie
%Cpu(s):  4.1 us,  2.5 sy,  0.0 ni, 92.9 id,  0.0 wa,  0.3 hi,  0.2 si,  0.0 st
MiB Mem :  31955.0 total,    538.2 free,  27718.0 used,   7342.9 buff/cache
MiB Swap:   8192.0 total,    161.9 free,   8030.1 used.   4237.0 avail Mem


I do not understand the numbers, i.e. free + used + buff != total

"buff/cache" is part of "used" and likely also includes the zram space.
OK, but free + used != total
Where is the difference ?

Ignoring the 3 swap values which are obvious.
For Mem, used + avail = total
"free" is amount of RAM that is not being used by anything.
"buff/cache" is the amount of RAM used for buffers and cache and I believe that would include the RAM used by zram. "avail" is the amount of RAM that could be used. It includes the "free" RAM and the amount of buffers and cache RAM that could be freed up if necessary. The RAM used by zram of course can't be released.

If you want to get stats about zram, then run the "zramctl" command:
# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle      46.6G 23.9G    8G  8.5G         [SWAP]

My max zram is about 47GB. There's currently 24GB of swap being used and it's compressed to only 8GB. The total RAM being used by zram right now is 8.5GB.

--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to