All of lore.kernel.org
 help / color / mirror / Atom feed
* What kind of memory is DAMON RECLAIM able to free?
@ 2023-04-28 14:15 Grzegorz Uriasz
  2023-05-02  1:27 ` SeongJae Park
  0 siblings, 1 reply; 4+ messages in thread
From: Grzegorz Uriasz @ 2023-04-28 14:15 UTC (permalink / raw)
  To: damon; +Cc: dutkahugo

Hi!

I'm running some experiments using DAMON RECLAIM on the 6.2 kernel. I've 
set up an VM with free page reporting enabled with 16 vcores and 16GB of 
ram with very aggressive memory reclamation settings, my kernel boot 
line includes:
- transparent_hugepage=never
- page_reporting.page_reporting_order=0
- damon_reclaim.enabled=Y
- damon_reclaim.min_age=10000000
- damon_reclaim.wmarks_low=0
- damon_reclaim.wmarks_mid=999
- damon_reclaim.wmarks_high=1000
- damon_reclaim.quota_sz=1073741824
- damon_reclaim.quota_reset_interval_ms=1000

The memory usage of the VM starts at 800 MB, after running some 
workloads and ballooning the VM to 16 GB DAMON RECLAIM was able to 
quickly bring the memory usage back down to 3GB, after which it just 
stopped doing anything. What concerns me is that 20%(3.2GB for that VM) 
is the default low watermark in the DAMON RECLAIM module. I've verified 
that the watermarks were properly set in sysfs to my custom values, but 
it doesn't seem to affect anything as free -mh shows 400Mb for apps but 
2.6GB for caches/buffers. The VM besides idling for a very long time 
isn't able to free the buffers. When dropping the caches manually using 
/proc/sys/vm/drop_caches the memory usage returns back to the starting 
one. The cache/buffers don't increase at all after dropping them 
indicating that this memory was indeed idling.

My questions:
1. Are there types of freeable memory which DAMON is not allowed to touch?
2. What prevents DAMON from getting back the memory?
2. /sys/kernel/debug/damon/* seems separate from DAMON RECLAIM, 
/sys/module/damon_reclaim/parameters/kdamond_pid shows DAMON RECLAIM is 
running but the DAMON debugfs doesn't show it nor exposes any registered 
reclamation schemes.

Best Regards,
Grzegorz Uriasz


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-04 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 14:15 What kind of memory is DAMON RECLAIM able to free? Grzegorz Uriasz
2023-05-02  1:27 ` SeongJae Park
2023-05-04 13:47   ` Grzegorz Uriasz
2023-05-04 17:17     ` SeongJae Park

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.