[systemd-devel] Memory in systemctl status
Reindl Harald
h.reindl at thelounge.net
Sun Sep 27 15:45:04 UTC 2020
Am 27.09.20 um 14:08 schrieb Greg KH:
> On Sun, Sep 27, 2020 at 01:41:33PM +0200, Reindl Harald wrote:
>> Memory: 8.6G
>>
>> looks like there is a large part of os-caching included where i wonmder
>> how that's done because a file can be read by muliple processes /
>> services and is hopfefully only once cached
>>
>> however, that value makes little to no sense and if that's the same
>> value as accounted for "MemoryMax" it's plain wrong
>>
>> [root at arrakis:~]$ free
>> total used free shared buff/cache
>> available
>> Mem: 15Gi 2.2Gi 585Mi 309Mi 12Gi
>> 12Gi
>> Swap: 0B 0B 0B
>
> The kernel does this, it's nothing to do with systemd or anything else.
>
> You can get "back" that memory for a short while if you really want it
> by doing:
> echo 3 > /proc/sys/vm/drop_caches
>
> For more details, see https://www.linuxatemyram.com/
you completly miss the point and should not cut in the middle of a post!
Memory: 8.6G
*no* httpd don't consume 8.6GB RAM
the question is *why* systemd takes the os-cache into account of the
memory a service is using
[root at arrakis:~]$ systemctl status httpd.service
● httpd.service - Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled;
vendor preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─lockdown.conf
Active: active (running) since Sun 2020-09-20 07:53:39 CEST; 1 weeks
0 days ago
Process: 1935633 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
(code=exited, status=0/SUCCESS)
Main PID: 713 (httpd)
Tasks: 17 (limit: 1024)
Memory: 8.6G
CPU: 2h 8min 5.442s
CGroup: /system.slice/httpd.service
├─ 713 /usr/sbin/httpd -D FOREGROUND
├─2151772 /usr/sbin/httpd -D FOREGROUND
├─2151803 /usr/sbin/httpd -D FOREGROUND
├─2151805 /usr/sbin/httpd -D FOREGROUND
├─2152130 /usr/sbin/httpd -D FOREGROUND
├─2152132 /usr/sbin/httpd -D FOREGROUND
├─2152188 /usr/sbin/httpd -D FOREGROUND
├─2152189 /usr/sbin/httpd -D FOREGROUND
├─2152199 /usr/sbin/httpd -D FOREGROUND
├─2152211 /usr/sbin/httpd -D FOREGROUND
├─2152213 /usr/sbin/httpd -D FOREGROUND
├─2152214 /usr/sbin/httpd -D FOREGROUND
├─2152215 /usr/sbin/httpd -D FOREGROUND
├─2152217 /usr/sbin/httpd -D FOREGROUND
├─2152220 /usr/sbin/httpd -D FOREGROUND
├─2152756 /usr/sbin/httpd -D FOREGROUND
└─2152886 /usr/sbin/httpd -D FOREGROUND
More information about the systemd-devel
mailing list