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.

Articoli correlati

Illustration depicting the Linux From Scratch 13.0 release as the first systemd-only version, with Tux assembling a PC amid upgraded packages and kernel.
Immagine generata dall'IA

Linux From Scratch 13.0 released as first systemd-only version

Riportato dall'IA Immagine generata dall'IA

The Linux From Scratch project has unveiled version 13.0, marking the first release exclusively using systemd as its init system. This update includes the Linux kernel 6.18.10 and upgrades to 36 packages. The change discontinues the longstanding SysVinit variant after version 12.4.

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.

Riportato dall'IA

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.

Jeffrey Seathrún Sardina, a machine learning researcher, has created a fork of systemd called Liberated systemd to excise its recently added birthDate field. The field was introduced last week in response to age verification laws in California, Colorado, and Brazil. The fork aims to eliminate what its creator views as surveillance-enabling code while staying in sync with the mainline project.

Riportato dall'IA

The Linux kernel version 7.0 has incorporated updates to its scheduler. These changes feature a time slice extension along with efforts focused on performance and scalability. The updates were reported by Phoronix.

Researchers at LevelBlue have identified a new variant of the SysUpdate malware aimed at Linux systems during a digital forensics and incident response engagement. The malware disguises itself as a legitimate system service and employs advanced encryption for command-and-control communications. By reverse-engineering it, the team created tools to decrypt its traffic more quickly.

Riportato dall'IA

A tech enthusiast expresses satisfaction with Linux's rapid evolution in update excitement compared to Windows. The author highlights a stark contrast in development timelines for engaging software updates.

 

 

 

Questo sito web utilizza i cookie

Utilizziamo i cookie per l'analisi per migliorare il nostro sito. Leggi la nostra politica sulla privacy per ulteriori informazioni.
Rifiuta