aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/admin-guide/mm
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2025-06-04 11:31:26 -0700
committerAndrew Morton <akpm@linux-foundation.org>2025-07-09 22:41:55 -0700
commite5d2585d9e859df712e5c9308bf19f83927e0021 (patch)
tree982ef2cadb55c0ed40c5776f7c47742726e07c0c /Documentation/admin-guide/mm
parentmm/damon/stat: calculate and expose estimated memory bandwidth (diff)
downloadwireguard-linux-e5d2585d9e859df712e5c9308bf19f83927e0021.tar.xz
wireguard-linux-e5d2585d9e859df712e5c9308bf19f83927e0021.zip
mm/damon/stat: calculate and expose idle time percentiles
Knowing how much memory is how cold can be useful for understanding coldness and utilization efficiency of memory. The raw form of DAMON's monitoring results has the information. Convert the raw results into the per-byte idle time distributions and expose it as percentiles metric to users, as a read-only DAMON_STAT parameter. In detail, the metrics are calculated as follows. First, DAMON's per-region access frequency and age information is converted into per-byte idle time. If access frequency of a region is higher than zero, every byte of the region has zero idle time. If the access frequency of a region is zero, every byte of the region has idle time as the age of the region. Then the logic sorts the per-byte idle times and provides the value at 0/100, 1/100, ..., 99/100 and 100/100 location of the sorted array. The metric can be easily aggregated and compared on large scale production systems. For example, if an average of 75-th percentile idle time of machines that collected on similar time is two minutes, it means the system's 25 percent memory is not accessed at all for two minutes or more on average. If a workload considers two minutes as unit work time, we can conclude its working set size is only 75 percent of the memory. If the system utilizes proactive reclamation and it supports coldness-based thresholds like DAMON_RECLAIM, the idle time percentiles can be used to find a more safe or aggressive coldness threshold for aimed memory saving. Link: https://lkml.kernel.org/r/20250604183127.13968-4-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Documentation/admin-guide/mm')
0 files changed, 0 insertions, 0 deletions