From: SJ Park <sj@kernel.org>
To: Anton Gavriliuk <antosha20xx@gmail.com>
Cc: SJ Park <sj@kernel.org>, damon@lists.linux.dev
Subject: Re: Memory tiering with DAMON/DAMOS auto-tuning
Date: Thu, 1 Oct 2026 03:26:08 -0700 [thread overview]
Message-ID: <20261001102608.46491-1-sj@kernel.org> (raw)
In-Reply-To: <CAAiJnjpkSvWFu1018-wmOn963u8kjrzTWgG=NERQ3RudG1di3w@mail.gmail.com>
On Thu, 1 Oct 2026 12:58:39 +0300 Anton Gavriliuk <antosha20xx@gmail.com> wrote:
> > So, your workload is using ~232 GiB of node 0 memory and no demotion of it is
> > occurred. According to your original mail [1], the node 0 has ~377 GiB memory.
> > If we make 25% of it free, it means it should have 75% of it (~282 GiB) be
> > utilized. If the node0 has only your workload, it means node 0 memory
> > utilization is still only ~61%. In other words, 25% free memory goal is
> > already achieved. Than DAMON wouldn't do any demotion.
>
> OMG.... what was pretty easy.
> I feel ashamed. My apologies.
No worry, I'm happy that I helped :)
>
> I increased Valkey memory allocation to 300 GB and it works.
Awesome, thank you for confirming.
>
> > No. Because you set '--access_rate 0% 0%' for the demotion scheme, it will do
> > no demotion in the scenario. You could try '--access_rate 0% max' if you want.
> > You may also need to remove '--damos_filter reject young' option from the
> > command if that is really what you want to do.
>
> '--access_rate 0% max' means range 0% - 100% ?
That's correct.
> If yes, then I need memory management decisions based on criteria
> other than access frequency.
> Age-based filters or something else.
Maybe not. Under the (auto-tuned) quota, DAMOS applies the action to hottest
or coldest quota amount of memory depend on the action. For example, in your
current setup, let's suppose DAMON found 10 GiB of hot memory (have >=5% access
rate) on node 2. And the quota is auto-tuned to 4 GiB. In the case, DAMOS
will find hottest 5 GiB hot memory and migrate those to node 0. For finding
the hottest memory, DAMOS calculates access temperature of each memory based on
the access frequency and the age.
If you set '--access_rate 0% max', DAMOS will show all memory in node 2 is
eligible to migrate to node 0. But, because you have the auto-tuned quota that
has 8 GiB/s upperlimit, it will migrate only up to 8 GiB hottest memory per
second.
Note that your goal also have '--damos_filter allow young' option for the
promotion. That asks DAMOS to double check if each migration candidate page is
marked as accessed since the last double check, by h/w. If it is not marked as
accessed by h/w, DAMOS will not migrate it. So to allow promoting short-time
unaccessed memory, you will need to turn off this double check, too.
>
> The idea is for achieving a defined goal - keep 25% free for new hot
> allocations in the fastest tier, if there are no un-accessed pages,
> then start demoting the most-rare access or add aga-based filters.
> Complicated but interesting, I need to think more about that.
That makes sense, and I believe removing '--access_rate' (absence of
'--access_rate' is same to '--access_rate 0% max') and '--damos_filter' is one
of the ways to achieve that.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-10-01 10:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 17:26 Memory tiering with DAMON/DAMOS auto-tuning Anton Gavriliuk
2026-09-28 8:15 ` SJ Park
2026-09-28 17:02 ` Anton Gavriliuk
2026-09-29 7:49 ` SJ Park
2026-09-29 8:41 ` Anton Gavriliuk
2026-09-29 9:25 ` SJ Park
2026-09-29 13:54 ` Anton Gavriliuk
2026-09-29 17:37 ` SJ Park
2026-09-30 4:03 ` Anton Gavriliuk
2026-09-30 8:35 ` SJ Park
2026-09-30 16:26 ` Anton Gavriliuk
2026-09-30 17:43 ` SJ Park
2026-10-01 9:58 ` Anton Gavriliuk
2026-10-01 10:26 ` SJ Park [this message]
2026-10-01 12:08 ` Anton Gavriliuk
2026-10-01 13:27 ` SJ Park
2026-10-01 16:54 ` Anton Gavriliuk
2026-10-02 8:34 ` SJ Park
2026-10-02 10:02 ` Anton Gavriliuk
2026-10-02 11:02 ` SJ Park
2026-10-02 13:06 ` Anton Gavriliuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261001102608.46491-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=antosha20xx@gmail.com \
--cc=damon@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox