[systemd-devel] Memory in systemctl status

Reindl Harald h.reindl at thelounge.net
Mon Sep 28 12:22:17 UTC 2020


honestly: do you realize that i know very well how the memory management
of Linux works and that it's pretty fine but not part of the topic at all?

Am 28.09.20 um 14:08 schrieb Greg KH:
> How do you know this?  And why wouldn't they be "charged" to the task
> that caused the cache to fill up?  What "should" they do?

it's memory the OS is using and not httpd

> If you don't like the current way that Linux manages memory resources
> like this, please discuss it with the kernel developers

the way Linux manages memory is perfect

> there's not
> much that systemd can do about it, right?

surely, display what is truly used by the processes in the cgroup wich
are currently 11 workers with around 40-80 MB and so we are at around
900 MB plus some shared memory for opcache

> Why shouldn't httpd use all the ram it was allowed to, if possible?
> What's wrong with that happening if the kernel is still caching those
> resources?

NOTHING IS WRONG by the kernel caching, but it's wrong to have only
*one* memory output in "systemctl status" pretending the service is
actively using 8 GB which it don't

> If you want to tell httpd to "flush the data from the kernel" after it
> is done downloading that ISO image, please modify httpd to do so,
> otherwise how is the kernel to know that it isn't to be asked for again
> within the next minute or so?

nobody is asking the kernel to flush caches
the kernel is pretty fine

systemctl is wrong by showing a pointless value

it maybe is a *nice additional* information but *not* the value one
cares for when it's the one and only memory output

> memory management is hard :)

the memory management is fine, the output of systemctl is wrong

>> the only interesting memory is RES of all the processes
> 
> Interesting to whom?

to the admin looking which service is using how much memory and when you
have a machine with 200 GB RAM running httpd on a large system for weeks
pretending it's using 190 GB RAM is pointless

this is *not* active memory used by the process and even if it's showing
100% memory usage in that output you can still start a process
allocating 20 GB RAM without any issue



More information about the systemd-devel mailing list