Systemd-analyze tool diagnoses slow Linux boot times

The systemd-analyze utility, built into Linux distributions using the systemd init system, allows users to quickly identify causes of slow boot processes. By running simple commands, it breaks down boot times into kernel and userspace components and highlights delaying services. This tool helps administrators make targeted adjustments to improve startup speeds without guesswork.

Linux users experiencing sluggish boot times on systemd-based distributions, such as Ubuntu or Fedora, can turn to the built-in systemd-analyze tool for rapid diagnosis. As described in technical guides, the tool analyzes the initialization sequence managed by systemd, reporting durations for stages like firmware, bootloader, kernel, and userspace.

Running the basic command systemd-analyze provides a summary of total boot time. For instance, one example shows startup finishing in 6.669 seconds for the kernel plus 30.368 seconds for userspace, totaling 37.037 seconds, with the graphical target reached after 27.479 seconds in userspace. A compact version, systemd-analyze time, offers similar breakdowns, often revealing userspace as the main bottleneck on SSD systems.

The blame option lists systemd units by initialization time, from longest to shortest. Common delays come from services like apt-daily.service (57.158 seconds in one case), which handles daily update checks on Debian-based systems; snapd.service (17.609 seconds); and docker.service (10.647 seconds). Guides advise reviewing this list to identify disableable services, such as deferring container runtimes like Docker if not needed immediately, while cautioning against disabling essential tasks like auto-updates.

For deeper insight, systemd-analyze critical-chain traces the dependency path delaying the default target. An output might show graphical.target waiting on multi-user.target, which in turn depends on docker.service (starting at 16.830 seconds and taking 10.647 seconds). This reveals bottlenecks, such as network wait services or misconfigured mounts causing 30-90 second timeouts.

Finally, systemd-analyze plot > boot.svg generates a visual SVG timeline of the boot process, illustrating parallel and serial dependencies. Opening the file in a browser highlights late-starting units, like those around 18 seconds in sample visuals.

Administrators report significant gains, including 20-40% reductions in userspace time on SSD systems, by applying changes like rescheduling timers or removing unnecessary packages such as cloud-init on non-cloud setups. These modifications should be documented for reversibility, ensuring system reliability.

Mga Kaugnay na Artikulo

A recent guide highlights four essential systemd tools that help new Linux users diagnose and fix common system issues. Systemd, the widely used init system in major distributions, provides built-in utilities for managing services, viewing logs, analyzing boot times, and investigating crashes. These tools offer a structured approach to resolving problems without guesswork.

Iniulat ng AI

A new improvement in the Linux kernel can make hibernation several times faster, particularly when using slow SSDs. This development aims to enhance performance in Linux systems with slower storage devices. The update is highlighted in recent Phoronix coverage.

An article highlights how switching to Linux transformed a sluggish old PC into a fast machine. Unlike Windows 11, which bogged down the hardware, Linux operates more efficiently. The operating system uses rolling updates to maintain speed on aging devices for years.

Iniulat ng AI

The popular terminal-based system information tool Fastfetch has released version 2.58, focusing on better detection capabilities for Linux and macOS environments. This update addresses bugs and introduces features to support diverse distributions and hardware. It ensures more accurate information display for users across various setups.

 

 

 

Gumagamit ng cookies ang website na ito

Gumagamit kami ng cookies para sa analytics upang mapabuti ang aming site. Basahin ang aming patakaran sa privacy para sa higit pang impormasyon.
Tanggihan