Hi Roman,

I'd like to get the peak memory usage recorded overall time, rather than at a certain time.
Plus, I expect that the systematical way might have better performance compared to userspace sampling.
If I understand correctly, recording the bottom of available free memory might not be helpful for this.
Am I missing something?

Thanks,
Matthew

From: Roman Gushchin <roman.gushchin@linux.dev>
Sent: Thursday, February 23, 2023 6:30 PM
To: Matthew Chae <Matthew.Chae@axis.com>
Cc: Michal Koutný <mkoutny@suse.com>; Johannes Weiner <hannes@cmpxchg.org>; Michal Hocko <mhocko@kernel.org>; Shakeel Butt <shakeelb@google.com>; Andrew Morton <akpm@linux-foundation.org>; kernel <kernel@axis.com>; Christopher Wong <Christopher.Wong@axis.com>; Muchun Song <muchun.song@linux.dev>; cgroups@vger.kernel.org <cgroups@vger.kernel.org>; linux-mm@kvack.org <linux-mm@kvack.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/memcontrol: add memory.peak in cgroup root
 
On Thu, Feb 23, 2023 at 04:22:33PM +0000, Matthew Chae wrote:
> 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.

I guess you might want to do the opposite: instead of tracking the peak usage,
you can record the bottom of available free memory.

Thanks!