[systemd-devel] [RFE] distinguish reclaimable memory in `systemctl status` output

Vito Caputo vcaputo at pengaru.com
Tue Sep 29 22:29:07 UTC 2020


On Tue, Sep 29, 2020 at 06:05:00PM +0200, Michal Koutný wrote:
> On Mon, Sep 28, 2020 at 02:29:07PM -0700, Vito Caputo <vcaputo at pengaru.com> wrote:
> > Is it possible to either add a reclaimable field the total memory line
> > of `systemctl status` output?
> > 
> > Or perhaps a separate line like Memory-Reclaimable: ?
> What would be the use of such an output?
> 

Having some sense of how much memory is really free for application
use including what's reclaimable is particularly valuable WRT
understanding a service's proximity to OOM thresholds.

> > Is additional kernel memcg support required to make this possible?
> I think you can get a reasonable picture by checking memory.stat of
> the given memory cgroup, however, I'm not sure it can be losslessly
> translated into a single value like that.
> 

Something approximate could be sufficient, even if it is lossy/racy.

Cheers,
Vito Caputo


More information about the systemd-devel mailing list