Hi Michal,

First off, thank you for sharing your opinion.
I'd like to monitor the peak memory usage recorded of overall system or at least cgroup accounted memory through memory.peak.
But it looks like this is not relevant to what I wanted.
It might be good to have some proper way for checking the system's peak memory usage recorded.

Thanks,
Matthew


From: Michal Koutný
Sent: Thursday, February 23, 2023 3:20 PM
To: Matthew Chae
Cc: Johannes Weiner; Michal Hocko; Roman Gushchin; Shakeel Butt; Andrew Morton; kernel; Christopher Wong; Muchun Song; cgroups@vger.kernel.org; linux-mm@kvack.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memcontrol: add memory.peak in cgroup root

Hello Matthew.

On Tue, Feb 21, 2023 at 03:34:20PM +0100, Matthew Chae <matthew.chae@axis.com> wrote:
> The kernel currently doesn't provide any method to show the overall
> system's peak memory usage recorded. Instead, only each slice's peak
> memory usage recorded except for cgroup root is shown through each
> memory.peak.

The memory.peak value is useful as a calibration insight when you want to
configure memcg limit.
But there is no global (memcg) limit on memory. So what would be this
(not clearly) defined value good for? Or better then userspace sampling
of chosen available metric?

Thanks,
Michal