Questions tagged [zswap]
The zswap tag has no summary.
9 questions
1 vote
0 answers
53 views
Why does zswap decompress memory pages before writing them on disk?
I was wondering why zswap decompresses memory pages before writing them to disk instead of keeping them compressed, since apparently doing that increases both CPU load and I/O.
1 vote
0 answers
409 views
Accurately monitoring RAM and swap usage while running zswap compression
I'm running zswap on 6.2.0-39-generic (Ubuntu 22.04, HWE). My understanding is that zswap intercepts pages marked for swap, compresses them (if possible) and stores them in a compressed section of the ...
0 votes
1 answer
1k views
CentOS 7 can Zswap be used? How to monitor Zswap? Is this a good idea?
Does CentOS 7 support Zswap? If so, how do I enable it and how to test to see if its working? Is this a good idea for a CentOS server? Enable attempt: chmod 777 /sys/module/zswap/parameters/...
1 vote
2 answers
2k views
Effect of enabling zswap on zram without any disk swap
I have set up a system that has 4 GB RAM with 1.5 GiB of zram. It also has zswap enabled. I don't have any swap partition on the secondary storage. As I have noticed, the performance is good on my ...
1 vote
1 answer
1k views
Which process (kernel thread) is doing the actual compression for zswap?
I can imagine actually two locations: In the kernel space belonging to the process whose ram is being swapped in/out From [kswapd0] However, digging into the kswapd source (mm/vmscan.c, init/main.c), ...
28 votes
2 answers
13k views
Get current zswap memory usage and statistics
The zswap documentation says: Zswap seeks to be simple in its policies. Sysfs attributes allow for one user controlled policy: * max_pool_percent - The maximum percentage of memory that the ...
5 votes
1 answer
2k views
Compress swap pages written to disk
This answer says that zswap decompresses pages before writing them to non-RAM swap. Is there any way to compress the pages written to disk, ideally with lz4? I hope to: Reduce SSD write wear Reduce ...
1 vote
1 answer
496 views
When is zswap used?
I would like to reduce the wear of my SSD. I'm trying to understand the mechanics of zswap: Is zswap only used after the uncompresed swap is full? If no, what is the allocation policy?
9 votes
1 answer
5k views
Prevent zram LRU inversion with zswap and max_pool_percent = 100
The major disadvantage of using zram is LRU inversion: older pages get into the higher-priority zram and quickly fill it, while newer pages are swapped in and out of the slower [...] swap The zswap ...