On some servers (running ubuntu 18.04) I have a process "systemd --user" that uses ~10% of the CPU in average. Only the root user needs to start services.
Is this process really needed and how can I disable it?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityOn some servers (running ubuntu 18.04) I have a process "systemd --user" that uses ~10% of the CPU in average. Only the root user needs to start services.
Is this process really needed and how can I disable it?
You can revert to good 'ol init and remove systemd, a new(ish) replacement which has replaced many of the traditional Linux does one thing and does it well
apps.
Wikipedia gives a good overview of init and systemd as well as many relevant resources, which is good, for the subject can become controversial to some folks.
The (partisan) blog Without Systemd outlines how to do it if you run Xubuntu 16.04, but I would encourage much study and thought before doing so.
You can disable it by disabling the pam_systemd
PAM.
However, you also thereby lose the automatic setting of the XDG_RUNTIME_DIR
environment variable, creation of a per-user runtime directory, and creation of certain control groups, as well, note.
You'll have to gauge how much of a loss this is.
pam_systemd
. systemd manual pages. Freedesktop.org.I have used this commands to disable it:
systemctl mask systemd-logind.service
pam-auth-update