Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
24
rated 0 times [  24] [ 0]  / answers: 1 / hits: 11369  / 2 Years ago, thu, june 30, 2022, 11:24:51

How can I check to verify that zswap is enabled and working on my system?


More From » kernel

 Answers
6
dmesg | grep zswap


That should be all you need to know if it's running. You should see a message along the lines of:



[    1.241302] zswap: loading zswap
[ 1.241306] zswap: using zbud pool
[ 1.241310] zswap: using lzo compressor


You can see what it's doing with the following:



$ sudo grep -R . /sys/kernel/debug/zswap
/sys/kernel/debug/zswap/stored_pages:0
/sys/kernel/debug/zswap/pool_total_size:0
/sys/kernel/debug/zswap/duplicate_entry:0
/sys/kernel/debug/zswap/written_back_pages:0
/sys/kernel/debug/zswap/reject_compress_poor:0
/sys/kernel/debug/zswap/reject_kmemcache_fail:0
/sys/kernel/debug/zswap/reject_alloc_fail:0
/sys/kernel/debug/zswap/reject_reclaim_fail:0
/sys/kernel/debug/zswap/pool_limit_hit:0


The key parameters to look out for are stored_pages which is the number of compressed pages and written_back_pages which is the number of pages which have been written out to the swap file.


[#23672] Friday, July 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
odenanno

Total Points: 207
Total Questions: 113
Total Answers: 94

Location: South Korea
Member since Sat, Oct 2, 2021
3 Years ago
;