第 3 章 Optimizing systemd to shorten the boot time


As a system administrator, you can optimize performance of your system and shorten the boot time. You can review the services that systemd starts during boot and evaluate their necessity. Disabling certain services to start at boot can improve the boot time of your system.

3.1. Examining system boot performance

To examine system boot performance, you can use the systemd-analyze command. By using certain options, you can tune systemd to shorten the boot time.

Prerequisites

  • Optional: Before you examine systemd to tune the boot time, list all enabled services:

    $ systemctl list-unit-files --state=enabled

Procedure

Choose the information you want to analyze:

  • Analyze the information about the time that the last successful boot took:

    $ systemd-analyze
  • Analyze the unit initialization time of each systemd unit:

    $ systemd-analyze blame

    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

    The output highlights the units that critically slow down the boot with the red color.

    图 3.1. The output of the systemd-analyze critical-chain command

    systemd analyze critical
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部