You are not logged in.

#1 2015-07-31 19:18:13

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

ZSwap reading.

Hello, I enabled Zswap according to the wiki article.

 cd /sys/kernel/debug/zswap
grep . *
duplicate_entry:0
pool_limit_hit:0
pool_total_size:71630848
reject_alloc_fail:0
reject_compress_poor:133
reject_kmemcache_fail:0
reject_reclaim_fail:0
stored_pages:33169
written_back_pages:0
 
free -b
              total        used        free      shared  buff/cache   available
Mem:     4146302976  3070373888   515444736    62828544   560484352   947318784
Swap:   12000677888   135868416 11864809472
 

Notice 135868416 = 2 * 71630848

Does anyone know what that means? Is it storing '135868416+71630848' as '135868416' or simply not working properly?

Thank you.

Offline

#2 2015-07-31 20:10:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: ZSwap reading.

It's storing 33169 4 KiB pages.

Offline

#3 2015-07-31 21:02:58

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Re: ZSwap reading.

lucke wrote:

It's storing 33169 4 KiB pages.

ok, that number is close to the ~132MB which makes sense.

Thank you. I'm still a bit confused though. Are they stored in both ram and swap?

In other words, is it actually working as expected?

Last edited by hussam (2015-07-31 21:13:11)

Offline

#4 2015-07-31 21:38:03

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: ZSwap reading.

"Physically" zswap takes up RAM - it's probably counted as used in the "Mem:" line. It's also counted as swap, because well, it is swapped out stuff (I wonder if it means it stops you from filling your swap partition or file "physically").

It is working as expected.

Offline

#5 2017-07-15 18:13:10

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Re: ZSwap reading.

Sorry for posting in an old thread. Just an update. I got a new machine a few months ago with 8GB ram and a 32GB swap partition (32GB swap is too large but it's good testing benchmark) and going to try zswap again for a week or so (or till I run into an issue).
zswap.max_pool_percent=50 so I guess it can use up to 4GB out of  the 8GB ram. Even if there is duplication, it's not going to eat more swap (theoretically) than 4GB so I should be safe.

Last edited by hussam (2017-07-15 18:15:18)

Offline

Board footer

Powered by FluxBB