On Fri, 24 Apr 2026 07:55:11 -0400 Peter Xu <[email protected]> wrote:

> On Thu, Apr 23, 2026 at 05:26:24PM -0700, SeongJae Park wrote:
> > On Thu, 23 Apr 2026 14:57:34 -0400 Peter Xu <[email protected]> wrote:
> > 
> > > On Thu, Apr 23, 2026 at 07:08:00PM +0100, Kiryl Shutsemau wrote:
> > > > On Thu, Apr 23, 2026 at 10:50:06AM -0400, Peter Xu wrote:
> > [...] 
> > > > > - Whether we have explored other approaches on page hotness tracking
> > [...]
> > > > DAMON is built around sampling. It is good for working set estimation,
> > > > but I don't think it is directly useful for eviction decision. It can
> > > > miss hot pages. LRU rotation will also loose info.
> > > 
> > > Exactly.  If we need to collect ACCESS bit (or anything similar) for
> > > eviction accuracy pusrpose, IIUC we need per-page info, we can't estimate
> > > by sampling.
> > 
> > That's a fair argument.
> > 
> > Nonetheless, there are some companies who use DAMON [1] for a similar 
> > eviction
> > purpose on their products.
> > 
> > Also, page level accuracy issue was indeed concerns from many people.  DAMON
> > therefore provides page level DAMOS filter [2].  The idea is finding a large
> > region of cold pages in low overhead first, then do page level access 
> > recheck
> > on page of the region using the filter, just before doing the eviction.
> > 
> > DAMON-based memory tiering also uses it [3], to avoid wrongly
> > promoting/demoting cold/hot pages in DAMON-claimed hot/cold regions.  The
> > evaluation result was not very bad, and a few more users reported positive 
> > test
> > results.
> > 
> > Also, DAMON can be used for page level monitoring [5] and open to changes 
> > for
> > users.  Actually a work [6] for making DAMON-based page level monitoring 
> > more
> > lightweight is ongoing.
> 
> Good to know that, thanks for the info, SJ.  I'll add a note and try to
> explore all these at some point.
> 
> I recall I read a paper describing damon tracking overheads when
> granularity is small and when the memory scope is large (in VM's case, it
> can be e.g. 1TB or more).  Would there be quick answer on whether this one
> still suffers (or maybe it was never a problem)?

I think that should still be same.  In case of fixed granularity monitoring,
the overhead is inherently proportional to the memory size.  And we didn't make
many effort on making the overhead lower.  We have two ongoing works [1,2] for
that, though.

Nonetheless, whether the overhead is too high or not would depend on the use
case, I'd say.  That is, if the system has hundreds of CPUs, letting DAMON
occupying one CPU might be no real problem.  Rather, there were users who
willing to give more than one CPUs to DAMON if DAMON can provide more accurate
monitoring results or work faster.  That kind of scaling is possible, by using
multiple kdamonds that monitors different partitions of the address ranges.

> 
> > 
> > I understand no one fits all and the decision is up to each user :)
> > Nevertheless, I will be happy to help if you have any question or request 
> > for
> > DAMON.
> 
> I'll definitely ask after digging more into that, thanks for the offer!

The pleasure is mine! :)

> 
> > 
> > [1] 
> > https://cdn.amazon.science/ee/a4/41ff11374f2f865e5e24de11bd17/resource-management-in-aurora-serverless.pdf
> > [2] https://origin.kernel.org/doc/html/latest/mm/damon/design.html#filters
> > [3] https://github.com/damonitor/damo/blob/next/scripts/mem_tier.sh#L40
> > [4] https://www.phoronix.com/news/DAMON-Self-Tuned-Memory-Tiering
> > [5] 
> > https://origin.kernel.org/doc/html/latest/mm/damon/faq.html#can-i-simply-monitor-page-granularity
> > [6] https://lore.kernel.org/[email protected]

[1] https://lore.kernel.org/[email protected]
[2] https://lore.kernel.org/[email protected]


Thanks,
SJ

[...]

Reply via email to