I'd like to see which systemd
services consume the most amount of memory.
Is there a way to list all running (and/or enabled) systemd services by memory usage?
I'd like to see which systemd
services consume the most amount of memory.
Is there a way to list all running (and/or enabled) systemd services by memory usage?
Enable memory accounting by creating /etc/systemd/system.conf.d/accounting.conf
containing
[Manager]
#DefaultCPUAccounting=yes
#DefaultBlockIOAccounting=yes
DefaultMemoryAccounting=yes
#DefaultTasksAccounting=yes
Reload after config change.
systemctl daemon-reload
Watch units (cgroups) by memory size.
systemd-cgtop -m