boot:speed_up_boot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
boot:speed_up_boot [2019/11/24 20:29] – peter | boot:speed_up_boot [2019/11/25 22:48] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Boot - Speed up boot ====== | ||
- | |||
- | ===== Check which services takes most time ===== | ||
- | |||
- | Use the following command to check which service takes most of time | ||
- | |||
- | <code bash> | ||
- | systemd-analyze blame | ||
- | </ | ||
- | |||
- | returns | ||
- | |||
- | <code bash> | ||
- | | ||
- | | ||
- | | ||
- | 5.774s systemd-networkd-wait-online.service | ||
- | 3.654s docker.service | ||
- | 1.841s apt-daily-upgrade.service | ||
- | 1.820s snapd.service | ||
- | 1.487s plymouth-quit-wait.service | ||
- | 993ms dev-mapper-ubuntu\x2d\x2dvg\x2droot.device | ||
- | 855ms NetworkManager.service | ||
- | 768ms fwupd.service | ||
- | 752ms udisks2.service | ||
- | 745ms apparmor.service | ||
- | 736ms networkd-dispatcher.service | ||
- | 725ms snap-gnome\x2dcalculator-544.mount | ||
- | 710ms networking.service | ||
- | 697ms thermald.service | ||
- | 680ms snap-netbeans-10.mount | ||
- | 674ms snap-gnome\x2dlogs-81.mount | ||
- | 661ms systemd-resolved.service | ||
- | 643ms systemd-timesyncd.service | ||
- | 642ms systemd-logind.service | ||
- | 558ms ModemManager.service | ||
- | 550ms apport.service | ||
- | 544ms gpu-manager.service | ||
- | 528ms motd-news.service | ||
- | 502ms grub-common.service | ||
- | ... | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Disabling auto-start of services during boot ===== | ||
- | |||
- | If you want to disable auto-starting of services during boot you can use the following command: | ||
- | |||
- | <code bash> | ||
- | sudo systemctl disable some-time-eater-service.service --now | ||
- | </ | ||
- | |||
- | However, you might want to see which other services needs the service in question. To check use the following command | ||
- | |||
- | <code bash> | ||
- | systemctl list-dependencies some-time-eater-service.service --reverse | ||
- | </ | ||
- | |||
- | Note: Replace some-time-eater-service.service with actual service name like postgresql@9.5-main.service. | ||
- | |||
- | Note that, disabling auto-start doesn' | ||
- | |||
- | ---- | ||
- | |||
- | ===== Disabling services completely. ===== | ||
- | |||
- | If you want to completely disable a service so that it can't be started, you should use mask instead of disable. Like this | ||
- | |||
- | <code bash> | ||
- | sudo systemctl mask < | ||
- | </ | ||
- | |||
- | Replace the < | ||
- | |||
- | The difference between mask and disable is mask make a service completely disable, you can't start it. You must unmask to start it with systemd (you can still start with service). But disable simply disable auto-start of a service, you can start it later. | ||
- | |||
- | For example, After masking my postgresql@9.5-main.service service, when I wanted to start it with systemctl the following message is shown | ||
- | |||
- | Failed to start postgresql@9.5-main.service: | ||
- | |||
- | |||
boot/speed_up_boot.1574627373.txt.gz · Last modified: 2020/07/15 09:30 (external edit)