Re: [PATCH] mm/memcontrol: add memory.peak in cgroup root

From: Roman Gushchin
Date: Thu Feb 23 2023 - 17:00:18 EST


On Thu, Feb 23, 2023 at 07:00:57PM +0000, Matthew Chae wrote:
> 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.

I'm not necessarily saying to do this in userspace, you can try add a new system-wide counter
(new /proc/vmstat entry). Obviously, it might be easier to do this in userspace.
My point is to do it on system level rather than cgroup level and record a bottom of free
memory rather than the peak of used memory.

> If I understand correctly, recording the bottom of available free memory might not be helpful for this.
> Am I missing something?

Why?