I'm running a small headless server (debian stable, 2.6.32-042stab129.1) and noticed that the process that uses by far the most memory is systemd with around 20% overall memory usage. I think that's pretty weird.
systemd-cgtop shows:
Code: Select all
Control Group Procs %CPU Memory Input/s Output/s
/ 26 - 746.8M - -
/init.scope 1 - - - -
/system.slice 25 - - - -
/system.slice/console-getty.service 1 - - - -
/system.slice/cron.service 1 - - - -
/system.slice/dbus.service 1 - - - -
/system.slice/exim4.service 1 - - - -
/system.slice/fail2ban.service 1 - - - -
/system.slice/lighttpd.service 1 - - - -
/system.slice/php7.0-fpm.service 3 - - - -
/system.slice/prosody.service 1 - - - -
/system.slice/rsyslog.service 1 - - - -
/system.slice/ssh.service 8 - - - -
/system.slice/system-getty.slice 1 - - - -
/system.slice/system-getty.slice/getty@tty2.service 1 - - - -
/system.slice/systemd-journald.service 1 - - - -
/system.slice/systemd-logind.service 1 - - - -
/system.slice/systemd-networkd.service 1 - - - -
/system.slice/systemd-resolved.service 1 - - - -
/system.slice/systemd-udevd.service 1 - - - -
Code: Select all
# dpkg -l | grep systemd
ii libpam-systemd:amd64 232-25+deb9u3 amd64 system and service manager - PAM module
ii libsystemd0:amd64 232-25+deb9u3 amd64 systemd utility library
ii python3-systemd 233-1 amd64 Python 3 bindings for systemd
ii systemd 232-25+deb9u3 amd64 system and service manager
ii systemd-sysv 232-25+deb9u3 amd64 system and service manager - SysV links
Code: Select all
Jul 12 17:23:07 servername dbus[15418]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 12 17:23:07 servername systemd-logind[15447]: Failed to enable subscription: Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 12 17:23:07 servername systemd-logind[15447]: Failed to fully start up daemon: Connection timed out
Jul 12 17:23:07 servername systemd[1]: systemd-logind.service: Main process exited, code=exited, status=1/FAILURE
Jul 12 17:23:07 servername systemd[1]: Failed to start Login Service.
Jul 12 17:23:07 servername systemd[1]: systemd-logind.service: Unit entered failed state.
Jul 12 17:23:07 servername systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
Jul 12 17:23:07 servername systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
Jul 12 17:23:07 servername systemd[1]: Stopped Login Service.
Jul 12 17:23:07 servername systemd[1]: systemd-logind.service: Failed to set invocation ID on control group /system.slice/systemd-logind.service, ignoring: Operation not permitted
Jul 12 17:23:07 servername systemd[1]: Starting Login Service...
Code: Select all
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has failed.
--
-- The result is failed.
Jul 12 17:27:17 servername systemd[1]: systemd-logind.service: Unit entered failed state.
Jul 12 17:27:17 servername systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
Jul 12 17:27:17 servername systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
Jul 12 17:27:17 servername systemd[1]: Stopped Login Service.
-- Subject: Unit systemd-logind.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has finished shutting down.
Jul 12 17:27:17 servername systemd[1]: systemd-logind.service: Failed to set invocation ID on control group /system.slice/systemd-logind.service, ignoring: Operation not permitted
Jul 12 17:27:17 servername systemd[1]: Starting Login Service...
-- Subject: Unit systemd-logind.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has begun starting up.
Jul 12 17:27:36 servername systemd[1]: Stopped Login Service.
-- Subject: Unit systemd-logind.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has finished shutting down.
Jul 12 17:27:36 servername systemd[1]: systemd-logind.service: Failed to set invocation ID on control group /system.slice/systemd-logind.service, ignoring: Operation not permitted
Jul 12 17:27:36 servername systemd[1]: Starting Login Service...
-- Subject: Unit systemd-logind.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has begun starting up.
Jul 12 17:27:42 servername dbus[15418]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 12 17:27:42 servername systemd-logind[15480]: Failed to enable subscription: Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 12 17:27:42 servername systemd-logind[15480]: Failed to fully start up daemon: Connection timed out
Jul 12 17:27:42 servername systemd[1]: systemd-logind.service: Main process exited, code=exited, status=1/FAILURE
Jul 12 17:27:42 servername systemd[1]: Failed to start Login Service.
-- Subject: Unit systemd-logind.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has failed.
--
-- The result is failed.
Jul 12 17:27:42 servername systemd[1]: systemd-logind.service: Unit entered failed state.
Jul 12 17:27:42 servername systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
Jul 12 17:27:42 servername systemd[1]: systemd-logind.service: Service has no hold-off time, scheduling restart.
Jul 12 17:27:42 servername systemd[1]: Stopped Login Service.
-- Subject: Unit systemd-logind.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has finished shutting down.
Jul 12 17:27:42 servername systemd[1]: systemd-logind.service: Failed to set invocation ID on control group /system.slice/systemd-logind.service, ignoring: Operation not permitted
Jul 12 17:27:42 servername systemd[1]: Starting Login Service...
-- Subject: Unit systemd-logind.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit systemd-logind.service has begun starting up.
Anyone any idea how to fix this and find the cause of systmd's possible memory leak?