Chapter 5. Optimizing systemd to shorten the boot time


You can optimize system performance by managing services associated with systemd. Review services that systemd starts during boot time and evaluate them according to your requirements. Disabling certain services that start at boot can shorten the boot time.

5.1. Examining system boot performance

You can tune the systemd service by using the systemd-analyze command to shorten boot time and examine boot performance.

Procedure

  • List all enabled services to determine systemd to tune the boot time:

    $ systemctl list-unit-files --state=enabled
    Copy to Clipboard Toggle word wrap
  • Analyze the information about the time that the last successful boot took:

    $ systemd-analyze
    Copy to Clipboard Toggle word wrap
  • Analyze the unit initialization time of each systemd unit:

    $ systemd-analyze blame
    Copy to Clipboard Toggle word wrap

    The output lists the units in descending order according to the time they took to initialize during the last successful boot.

  • Identify critical units that took the longest time to initialize at the last successful boot:

    $ systemd-analyze critical-chain
    Copy to Clipboard Toggle word wrap

Verification

  • The output with red color text indicates the units that can critically slow down the boot.

    Output of the systemd-analyze critical-chain command

    For details, see systemd(1), systemctl(1), and systemd-analyze (1) man pages on your system.

5.2. A guide to disable selective services

To reduce boot time of your system, you need to selectively disable only the non-essential services that start automatically at boot time.

  • List enabled services:

    $ systemctl list-unit-files --state=enabled
    Copy to Clipboard Toggle word wrap
  • Disable a service:

    # systemctl disable <service_name>
    Copy to Clipboard Toggle word wrap

Some services are not critical yet required for normal functioning of Red Hat Enterprise Linux (RHEL). Except these services, you can disable other services that are enabled by default with a minimal installation of RHEL.

Expand
Table 5.1. Services enabled by default on a minimal installation of RHEL
Service nameDetails

auditd.service

Disable auditd.service only if you do not need audit messages from the kernel. Be aware that if you disable auditd.service, the /var/log/audit/audit.log file is not produced. As a result, you cannot retroactively review some commonly-reviewed actions or events, such as user logins, service starts or password changes. Also note that auditd has two parts: a kernel part, and a service itself. By using the systemctl disable auditd command, you only disable the service, but not the kernel part. To disable system auditing in its entirety, set audit=0 on kernel command line.

crond.service

Be aware that no items from crontab will run if you disable crond.service.

dbus-org.fedoraproject.FirewallD1.service

A symlink to firewalld.service

dbus-org.freedesktop.NetworkManager.service

A symlink to NetworkManager.service

dbus-org.freedesktop.nm-dispatcher.service

A symlink to NetworkManager-dispatcher.service

firewalld.service

Disable firewalld.service only if you do not need a firewall.

import-state.service

Disable import-state.service only if you do not need to boot from a network storage.

irqbalance.service

Disable irqbalance.service only if you have just one CPU. Do not disable irqbalance.service on systems with multiple CPUs.

kdump.service

Disable kdump.service only if you do not need reports from kernel crashes.

loadmodules.service

This service is not started unless the /etc/rc.modules or /etc/sysconfig/modules directory exists, which means that it is not started on a minimal RHEL installation.

lvm2-monitor.service

Disable lvm2-monitor.service only if you do not use Logical Volume Manager (LVM).

NetworkManager-dispatcher.service

Disable NetworkManager-dispatcher.service only if you do not need notifications on network configuration changes (for example in static networks).

NetworkManager-wait-online.service

Disable NetworkManager-wait-online.service only if you do not need working network connection immediately after boot. When this service is enabled, the system will not complete the boot process until the network connection is established, which can significantly prolong boot time.

After enabling this service, the system does not finish the boot before the network connection is working. This setting prolongs the boot time significantly.

NetworkManager.service

Disable NetworkManager.service only if you do not need connection to a network.

nis-domainname.service

Disable nis-domainname.service only if you do not use Network Information Service (NIS).

rngd.service

Disable rngd.service only if you do not need much entropy on your system, or you do not have any sort of hardware generator. Note that the service is necessary in environments that require many good entropy, such as systems used for generation of X.509 certificates (for example the FreeIPA server).

rsyslog.service

Disable rsyslog.service only if you do not need persistent logs, or you set systemd-journald to persistent mode.

selinux-autorelabel-mark.service

Disable selinux-autorelabel-mark.service only if you do not use SELinux.

sshd.service

Disable sshd.service only if you do not need remote logins by OpenSSH server.

sssd.service

Disable sssd.service only if there are no users who log in the system over the network (for example by using LDAP or Kerberos). Disable all sssd-* units if you disable sssd.service.

syslog.service

An alias for rsyslog.service

tuned.service

Disable tuned.service only if you do not need to use performance tuning.

lvm2-lvmpolld.socket

Disable lvm2-lvmpolld.socket only if you do not use Logical Volume Manager (LVM).

dnf-makecache.timer

Disable dnf-makecache.timer only if you do not need your package metadata to be updated automatically.

unbound-anchor.timer

Disable unbound-anchor.timer only if you do not need daily updates of the root trust anchor for DNS Security Extensions (DNSSEC). The Unbound resolver and resolver library for DNSSEC validation uses this root trust anchor.

To find details about a service, use one of the following commands:

$ systemctl cat <service_name>
Copy to Clipboard Toggle word wrap
$ systemctl help <service_name>
Copy to Clipboard Toggle word wrap

The systemctl cat command displays the contents of a service’s main unit file, typically located at /usr/lib/systemd/system/<service>, along with any override files. Overrides include custom unit files in /etc/systemd/system/<service> or drop-in configuration files in corresponding unit.type.d directories. For details, see the systemd.unit(5) man page or use systemctl help <service> to view the manual for a specific service.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top