[linux-mm-cc] Zram and SwapCached

DC-1 DC-1 at sirc.hu
Thu Jul 19 09:39:30 EDT 2012


Hi!

I have a question about zram + swapcached. I know that zram is a
compressed swap in memory, but linux use it's own internal SwapCached
area to store recent swap pages _also_ in memory. I have a 512mb laptop
with a ~128mb zram swap drive. 
So zram_stats says: 
	orig_data_size:     97419264 
	compr_data_size:    40315919 

and: grep SwapCache /proc/meminfo 
	SwapCached:        90200 kB

So does it mean i have these swap pages in ram twice? First
is compressed, and second is uncompressed by linux internal swapcache
feature?
If it is true, it's not very useful to save ~57MB while it's also in
ram with ~90MB. 

Anyway: can i disable linux's swapcache feature at all when i'm
swapping to zram? Or can I limit the maximum swapcached area?



More information about the linux-mm-cc mailing list