lkml.org 
[lkml]   [2021]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectHow to calculate available memory when zram is used?
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?

\
 
 \ /
  Last update: 2021-05-15 17:35    [W:0.023 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site