All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Down <chris@chrisdown.name>
To: yulei zhang <yulei.kernel@gmail.com>
Cc: Shakeel Butt <shakeelb@google.com>, Tejun Heo <tj@kernel.org>,
	Zefan Li <lizefan.x@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Christian Brauner <christian@brauner.io>,
	Cgroups <cgroups@vger.kernel.org>,
	benbjiang@tencent.com, Wanpeng Li <kernellwp@gmail.com>,
	Yulei Zhang <yuleixzhang@tencent.com>,
	Linux MM <linux-mm@kvack.org>, Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <guro@fb.com>
Subject: Re: [RFC 0/7] Introduce memory allocation speed throttle in memcg
Date: Thu, 3 Jun 2021 12:38:57 +0100	[thread overview]
Message-ID: <YLi/UeS71mk12VZ3@chrisdown.name> (raw)
In-Reply-To: <CACZOiM3g6GhJgXurMPeE3A7zO8eUhoUPyUvyT3p2Kw98WkX8+g@mail.gmail.com>

yulei zhang writes:
>Thanks. IMHO, there are differences between these two throttlings.
>memory.high is a per-memcg throttle which targets to limit the memory
>usage of the tasks in the cgroup. For the memory allocation speed throttle(MST),
>the purpose is to avoid the memory burst in cgroup which would trigger
>the global reclaim and affects the timing sensitive workloads in other cgroup.
>For example, we have two pods with memory overcommit enabled, one includes
>online tasks and the other has offline tasks, if we restrict the memory usage of
>the offline pod with memory.high, it will lose the benefit of memory overcommit
>when the other workloads are idle. On the other hand, if we don't
>limit the memory
>usage, it will easily break the system watermark when there suddenly has massive
>memory operations. If enable MST in this case, we will be able to
>avoid the direct
>reclaim and leverage the overcommit.

Having a speed throttle is a very primitive knob: it's hard to know what the 
correct values are for a user. That's one of the reasons why we've moved away 
from that kind of tunable for blkio.

Ultimately, if you want work-conserving behaviour, why not use memory.low?


WARNING: multiple messages have this Message-ID (diff)
From: Chris Down <chris-6Bi1550iOqEnzZ6mRAm98g@public.gmane.org>
To: yulei zhang <yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Zefan Li <lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Christian Brauner
	<christian-STijNZzMWpgWenYVfaLwtA@public.gmane.org>,
	Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	benbjiang-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org,
	Wanpeng Li <kernellwp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Yulei Zhang <yuleixzhang-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>,
	Linux MM <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
	Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Roman Gushchin <guro-b10kYP2dOMg@public.gmane.org>
Subject: Re: [RFC 0/7] Introduce memory allocation speed throttle in memcg
Date: Thu, 3 Jun 2021 12:38:57 +0100	[thread overview]
Message-ID: <YLi/UeS71mk12VZ3@chrisdown.name> (raw)
In-Reply-To: <CACZOiM3g6GhJgXurMPeE3A7zO8eUhoUPyUvyT3p2Kw98WkX8+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

yulei zhang writes:
>Thanks. IMHO, there are differences between these two throttlings.
>memory.high is a per-memcg throttle which targets to limit the memory
>usage of the tasks in the cgroup. For the memory allocation speed throttle(MST),
>the purpose is to avoid the memory burst in cgroup which would trigger
>the global reclaim and affects the timing sensitive workloads in other cgroup.
>For example, we have two pods with memory overcommit enabled, one includes
>online tasks and the other has offline tasks, if we restrict the memory usage of
>the offline pod with memory.high, it will lose the benefit of memory overcommit
>when the other workloads are idle. On the other hand, if we don't
>limit the memory
>usage, it will easily break the system watermark when there suddenly has massive
>memory operations. If enable MST in this case, we will be able to
>avoid the direct
>reclaim and leverage the overcommit.

Having a speed throttle is a very primitive knob: it's hard to know what the 
correct values are for a user. That's one of the reasons why we've moved away 
from that kind of tunable for blkio.

Ultimately, if you want work-conserving behaviour, why not use memory.low?

  reply	other threads:[~2021-06-03 11:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 16:17 [RFC 0/7] Introduce memory allocation speed throttle in memcg yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <cover.1622043596.git.yuleixzhang-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2021-05-26 16:17   ` [RFC 1/7] mm: record total charge and max speed counter " yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 16:17   ` [RFC 2/7] mm: introduce alloc_bps to memcg for memory allocation speed throttle yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 16:18   ` [RFC 3/7] mm: memory allocation speed throttle setup in hierarchy yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 16:18   ` [RFC 4/7] mm: introduce slice analysis into memory speed throttle mechanism yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 16:18   ` [RFC 5/7] mm: introduce memory allocation speed throttle yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 16:18   ` [RFC 6/7] mm: record the numbers of memory allocation throttle yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 19:57     ` kernel test robot
2021-05-26 21:34     ` kernel test robot
2021-05-26 16:18   ` [RFC 7/7] mm: introduce mst low and min watermark yulei.kernel-Re5JQEeQqe8AvxtiuMwx3w
2021-05-26 20:52 ` [RFC 0/7] Introduce memory allocation speed throttle in memcg Shakeel Butt
2021-05-26 20:52   ` Shakeel Butt
2021-05-31 12:11   ` yulei zhang
2021-05-31 12:11     ` yulei zhang
2021-05-31 18:20     ` Shakeel Butt
2021-05-31 18:20       ` Shakeel Butt
2021-06-01 14:45     ` Chris Down
2021-06-01 14:45       ` Chris Down
2021-06-02  9:11       ` yulei zhang
2021-06-02  9:11         ` yulei zhang
2021-06-02 15:39         ` Shakeel Butt
2021-06-02 15:39           ` Shakeel Butt
2021-06-03 10:19           ` yulei zhang
2021-06-03 10:19             ` yulei zhang
2021-06-03 11:38             ` Chris Down [this message]
2021-06-03 11:38               ` Chris Down
2021-06-04 10:15               ` yulei zhang
2021-06-04 10:15                 ` yulei zhang
2021-06-04 11:51                 ` Chris Down
2021-06-04 11:51                   ` Chris Down

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=YLi/UeS71mk12VZ3@chrisdown.name \
    --to=chris@chrisdown.name \
    --cc=benbjiang@tencent.com \
    --cc=cgroups@vger.kernel.org \
    --cc=christian@brauner.io \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=kernellwp@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mhocko@kernel.org \
    --cc=shakeelb@google.com \
    --cc=tj@kernel.org \
    --cc=yulei.kernel@gmail.com \
    --cc=yuleixzhang@tencent.com \
    /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 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.