* How to calculate available memory when zram is used?
@ 2021-05-15 15:33 yong w
0 siblings, 0 replies; only message in thread
From: yong w @ 2021-05-15 15:33 UTC (permalink / raw)
To: linux-kernel, minchan, ngupta, sergey.senozhatsky.work
How to calculate available memory when zram is used?
Available+Swap free memeory is obviously bigger than I actually can
use, because zram can compress memory by compression algorithm and
zram compressed data will occupy memeory too.
Is there any way to calculate available memory accurately?
I think of a way is to count the compression rate of zram in the
kernel. The available memory is calculated as follows:
available + swapfree - swapfree * compress ratio
Is it reasonable?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-15 15:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 15:33 How to calculate available memory when zram is used? yong w
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).