Leap 15.0 slow boot

Leap 15 KDE, single boot UEFI
i5-2430M
HDD500GB
8GB RAM
2GB swap

I tried everything that I found in the web and still took me about 40 seconds to boot into my machine. I notice it took quite some time at the cursor with black background before it get into desktop. My solution so far:

Network manager

Kernel parameter:

resume=/dev/disk/by-id/ata-Hitachi_HTS545050B9A300_110328PBG408172AX1HV-part4 plymouth.enable=0
plymouth.enable=0" manage to reduce boot time from 50 ish seconds to 30 ish seconds

systemd-analyze blame

          9.702s ca-certificates.service
          9.070s lvm2-monitor.service
          7.681s firewalld.service
          7.521s ModemManager.service
          6.278s rsyslog.service
          6.245s btrfsmaintenance-refresh.service
          5.985s vboxdrv.service
          5.932s backup-rpmdb.service
          4.406s initrd-switch-root.service
          4.051s logrotate.service
          4.024s kbdsettings.service
          4.010s nscd.service
          4.009s mcelog.service
          3.841s bluetooth.service
          3.127s systemd-udevd.service                                                                                                                                                           
          2.740s apparmor.service                                                                                                                                                                
          2.633s polkit.service
          2.596s display-manager.service
          1.831s systemd-fsck@dev-disk-by\x2duuid-27011b25\x2dcc84\x2d4a61\x2da0c6\x2d148017009f27.service
          1.149s boot-efi.mount
          1.051s backup-sysconfig.service
          1.027s systemd-logind.service
           720ms opt.mount
           654ms vboxautostart-service.service
           646ms vboxweb-service.service
           640ms vboxballoonctrl-service.service
           595ms systemd-tmpfiles-setup.service
           540ms systemd-remount-fs.service
           533ms klog.service
           533ms sys-kernel-debug.mount
           531ms var.mount
           527ms dev-mqueue.mount
           525ms dev-hugepages.mount
           499ms usr-local.mount
           486ms check-battery.service
           480ms boot-grub2-x86_64\x2defi.mount
           477ms dev-disk-by\x2duuid-313ff967\x2db2bb\x2d433f\x2db909\x2df245fcd887a2.swap
           426ms upower.service
           389ms tmp.mount
           378ms NetworkManager.service
           375ms root.mount


systemd-analyze critical-chain

└─**display-manager.service @27.985s +2.596s**
  └─**systemd-user-sessions.service @27.851s +131ms**
    └─remote-fs.target @27.850s
      └─**iscsi.service @27.718s +131ms**
        └─network.target @27.710s
          └─**wpa_supplicant.service @29.082s +151ms**
            └─dbus.service @15.643s
              └─basic.target @15.616s
                └─sockets.target @15.615s
                  └─pcscd.socket @15.614s
                    └─sysinit.target @15.554s
                      └─**apparmor.service @12.811s +2.740s**
                        └─**var.mount @12.091s +531ms**
                          └─local-fs-pre.target @12.079s
                            └─**lvm2-monitor.service @3.007s +9.070s**
                              └─lvm2-lvmetad.service @3.501s
                                └─lvm2-lvmetad.socket @3.004s
                                  └─-.mount
                                    └─system.slice
                                      └─-.slice


Is it possible to upload the systemd-analyze plot image in this forum or I need to upload at other image hosting website first? Is this considered standard boot time for HDD or I have some room for improvement.

Upload to http://paste.opensuse.org/ and post the link here.

By way of comparison with your times, this is from an eleven year old AMD Dual Core Processor 5600+ and a rotational HDD, albeit running TW not leap.

paul@Orion-15:~$ systemd-analyze
Startup finished in 4.114s (kernel) + 11.980s (initrd) + 19.957s (userspace) = 36.051s 
graphical.target reached after 19.906s in userspace
paul@Orion-15:~$

paul@Orion-15:~$ systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @19.906s
└─display-manager.service @17.242s +2.662s
  └─systemd-logind.service @16.309s +926ms
    └─nss-user-lookup.target @16.307s
      └─nscd.service @14.362s +1.928s
        └─basic.target @14.329s
          └─paths.target @14.328s
            └─cups.path @14.326s
              └─sysinit.target @14.302s
                └─apparmor.service @2.247s +12.055s
                  └─systemd-journald.socket
                    └─system.slice
                      └─-.slice
paul@Orion-15:~$

Hi, welcome to the openSUSE Forums !!!

Am I right in assuming this is a laptop? If so, and the HDD is one of the energy efficient 5400 rpm types, IME this boottime is not that bad. If you do not have a btrfs filesystem, you could disble the btrfs related services.

+1
And if you ARE on btrfs, in the past I saw that with slower laptop HDDs dumping the system journal to disk took considerable time due to highly fragmented files and slow seek times. If you don’t need a persistent journal (or only a short version of that) there might be workarounds available.

You can use either <SUSE Paste; or <SUSE Paste.

@john_r:

Given that, you seem to have at least a Btrfs system partition and, therefore, possibly an XFS user partition, I’m a little bit suspicious of the “systemd-fsck@dev-disk-by\x2duuid-27011b25\x2dcc84\x2d4a61\x2da0c6\x2d148017009f27.service” entry in your systemd analysis.

  • If XFS then, systemd fsck usually needs only a few 100 milliseconds – XFS checks itself at mount time.
  • If Btrfs then, systemd fsck usually needs only a few 100 milliseconds – the Btrfs maintenance procedures take care of the file system checks.

If there’re no ext4 partitions anywhere, then the fsck systemd service shouldn’t be doing anything time-consuming.
Please either, post the contents of “/etc/fstab” or, post the output (with the user root) of “lsblk --fs”.
[HR][/HR]Just as a reference – the case of a system with ext4 system partitions – “/” plus tmp plus var – and XFS user partitions and, Oracle’s VirtualBox also – AMD FX™-4100 Quad-Core CPU:


 # systemd-analyze blame | grep -Ei 'vbox|fsck'
          1.011s vboxdrv.service
           333ms systemd-fsck@dev-disk-by\x2did-ata\x2dST3500418AS_Z2AENPNG\x2dpart1.service
           119ms systemd-fsck@dev-disk-by\x2did-ata\x2dWDC_WD10EZEX\x2d60M2NA0_WD\x2dWCC3F5AYCJL7\x2dpart1.service
           105ms systemd-fsck@dev-disk-by\x2did-ata\x2dST3500418AS_Z2AENPNG\x2dpart3.service
           102ms systemd-fsck@dev-disk-by\x2did-ata\x2dWDC_WD10EZEX\x2d60M2NA0_WD\x2dWCC3F5AYCJL7\x2dpart2.service
            98ms systemd-fsck@dev-disk-by\x2did-ata\x2dST3500418AS_Z2AENPNG\x2dpart2.service
            43ms systemd-fsck-root.service
 # 

I installed Tumbleweed before my current Leap and I noted the boot speed is more or less. The reason I posted this because I notice some old machine boot faster than mine with HDD. But to think of it, maybe this is caused by 5400rpm.

http://paste.opensuse.org/30232248
http://paste.opensuse.org/4992802

Filesystem: Btfrs
Home: Ext4

Yeah, laptop with a 5400 rpm HDD I think so.

que@a43s-opensuse:~> sudo lsblk --fs
[sudo] password for root:
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat 996C-5E20 /boot/efi
├─sda2 btrfs a6236ee8-431b-4eea-8499-bac99d3f3d37 /
├─sda3 ext4 27011b25-cc84-4a61-a0c6-148017009f27 /home
└─sda4 swap 313ff967-b2bb-433f-b909-f245fcd887a2 [SWAP]
sr0

My user partition is ext4. Is this the culprit?

According to your opening post fsck of the /home partition took 1.8 seconds:

1.831s systemd-fsck@dev-disk-by\x2duuid-27011b25\x2dcc84\x2d4a61\x2da0c6\x2d148017009f27.service

If you really need to shave those off your boot time you can disable filesystem checking, but I don’t think this is a good idea.
IIRC fsck on ext4 should run only once every few boots, so maybe not a major problem anyway.

Any service that I can safely disable to increase the speed?

Tuning a system for performance is tricky business and I’ll leave any specific suggestion (if any) to experienced system managers possibly reading this thread.
In general terms, it seems from your OP that considerable time is spent in setting up a WiFi network connection and possibly a remote filesystem:

└─display-manager.service @27.985s +2.596s
  └─systemd-user-sessions.service @27.851s +131ms
   ** └─remote-fs.target @27.850s
      └─iscsi.service @27.718s +131ms
        └─network.target @27.710s
          └─wpa_supplicant.service @29.082s +151ms**
            └─dbus.service @15.643s
              └─basic.target @15.616s
                └─sockets.target @15.615s
                  └─pcscd.socket @15.614s
                    └─sysinit.target @15.554s
                      └─apparmor.service @12.811s +2.740s
                        └─var.mount @12.091s +531ms
                          └─local-fs-pre.target @12.079s
                          **  └─lvm2-monitor.service @3.007s +9.070s
                              └─lvm2-lvmetad.service @3.501s
                                └─lvm2-lvmetad.socket @3.004s**
                                  └─-.mount
                                    └─system.slice
                                      └─-.slice


Do you really need those for booting, or is it just a NAS for backup purposes, for instance, that may be activated only when needed or anyway after login of users?
A smaller contributor seems logical volume management: is it needed on your boot disk(s)?
Please be aware that the above is just food for thought, not a suggestion to disable (or even blindly trying to experiment with) those services, since they might have serious side effects if improperly managed.

Thank you very much. I’ll take a look at the bolded services. But to answer your question, I don’t use NAS backup or remote service and I can’t recall that I require LVM related service.

Hi, this is from a Leap 15.1 RC test install:

beta_bruno@localhost:~> systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @5.664s
└─multi-user.target @5.664s
  └─getty.target @5.664s
    └─getty@tty1.service @5.664s
      └─systemd-user-sessions.service @1.354s +11ms
        └─remote-fs.target @1.353s
          └─iscsi.service @1.330s +21ms
            └─network.target @1.329s
              └─NetworkManager.service @1.257s +71ms
                └─network-pre.target @1.256s
                  └─firewalld.service @888ms +368ms
                    └─polkit.service @1.108s +64ms
                      └─basic.target @807ms
                        └─paths.target @807ms
                          └─ca-certificates.path @807ms
                            └─sysinit.target @806ms
                              └─systemd-update-utmp.service @796ms +9ms
                                └─auditd.service @780ms +14ms
                                  └─systemd-tmpfiles-setup.service @765ms +14ms
                                    └─local-fs.target @765ms
                                      └─run-user-462.mount @2.941s
                                        └─local-fs-pre.target @718ms
                                          └─lvm2-monitor.service @141ms +577ms
                                            └─lvm2-lvmetad.service @153ms
                                              └─lvm2-lvmetad.socket @137ms
                                                └─-.slice
beta_bruno@localhost:~>

I’m not using any remote fs or lvm too, so this seems to be an openSUSE default.
Maybe some of those services can be disabled but didn’t try to (yet).
Please be aware that this is from a fast SSD and i74720HQ and that apparently 15.1 boots apparently faster hat 15.0, so this is no direct benchmark for your system.

I played around with YaST2-Services manager and tried to switch to “manual” the following services:
btrfsmaintenance-refresh (no btrfs here)
iscsi
lvm2-monitor

but I got no noticeable effect on boot time:

beta_bruno@localhost:~> systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @5.677s
└─multi-user.target @5.677s
  └─getty.target @5.677s
    └─getty@tty1.service @5.677s
      └─systemd-user-sessions.service @1.173s +11ms
        └─network.target @1.172s
          └─wpa_supplicant.service @1.305s +37ms
            └─dbus.service @681ms
              └─basic.target @679ms
                └─sockets.target @679ms
                  └─dbus.socket @679ms
                    └─sysinit.target @678ms
                      └─systemd-update-utmp.service @667ms +10ms
                        └─auditd.service @652ms +13ms
                          └─systemd-tmpfiles-setup.service @637ms +14ms
                            └─local-fs.target @631ms
                              └─run-user-462.mount @2.953s
                                └─swap.target @596ms
                                  └─dev-disk-by\x2duuid-efe439ee\x2d6b27\x2d4295\x2dad39\x2d2d9e5da8b405.swap @526ms +69ms
                                    └─dev-disk-by\x2duuid-efe439ee\x2d6b27\x2d4295\x2dad39\x2d2d9e5da8b405.device @525ms
beta_bruno@localhost:~>

but at least that means that you can safely play with those settings and see what happens.
I also tried to switch off WiFi (in the desktop) and switch to “manual” NetworkManager and related services including wpa_supplicant but the result was nil on boot time and prevented me from (easily) switching on WiFi from the desktop when I needed it.

There is of course the possibility of a deeper tuning of the systemd boot configuration, but that is no playground for casual tinkering IMHO.

Thank you for the update. I’ll try that workaround later for who knows it will work in my case. Maybe all I need is to upgrade to SSD since it quite affordable nowadays. And it does makes everything faster.

Again, thank you very much all.

The ArchWiki suggests that for BTRFS, the fsck on bootup is unnecessary… I suppose due to its automatic self-healing features.

For this and possibly other settings and strategies which can be tried,
https://wiki.archlinux.org/index.php/Improving_performance/Boot_process

Although your ca certificate service doesn’t show up in your systemd-analyze critical-chain, I’m curious why it’s running on your machine (and waiting over 9 seconds, although might be due to dependencies)… Is your machine in an LDAP or similar network?

TSU


If, Btrfs and XFS
  then, no “fsck” – both Btrfs and XFS have their own file system checks – XFS checks at mount time …
else-if, not Btrfs – but “ext1/2/3/4” – and, XFS
  then, “fsck” – the XFS partition(s) will be ignored …
else
  “fsck” as needed …
fi