You are not logged in.

#1 2024-07-14 05:09:38

pxndx
Member
Registered: 2024-07-14
Posts: 2

Slow boot times: ~10s loader and ~20s initrd

Hi. First time poster. I looked around for similar posts before deciding to post.

I've installed arch before using both the script and the wiki installation guide on this machine before with minuscule boot times with systemd-boot(+encryption) and grub. Decided to go for a more customized approach before committing and am having boot times over 3 times as long.

I currently use systemd-boot + UKI + LUKS on an LVM with btrfs and no compression.

Boot takes around 30 seconds average. systemd-analyze:

 Startup finished in 1.861s (firmware) + 8.540s (loader) + 795ms (kernel) + 19.247s (initrd) + 4.631s (userspace) = 35.076s
graphical.target reached after 4.360s in userspace. 

From my research and own experience, the loader should take way way less time as the vendor logo lasts way longer than it used to. Additionally, maybe 5 seconds (max) of that is typing in a password, so the initrd time is much longer as well. I'd like to fix my boot process before moving on to any more configuration, but I'm not quite sure what to make of systemd-analyze blame/plot, in addition to them not revealing much about why the loader is taking so long:

 20.110s sys-devices-platform-serial8250-serial8250:0-serial8250:0.1-tty-ttyS1.device
20.110s dev-ttyS1.device
20.109s dev-ttyS0.device
20.109s sys-devices-platform-serial8250-serial8250:0-serial8250:0.0-tty-ttyS0.device
20.107s dev-ttyS3.device
20.107s sys-devices-platform-serial8250-serial8250:0-serial8250:0.3-tty-ttyS3.device
20.107s dev-ttyS2.device
20.107s sys-devices-platform-serial8250-serial8250:0-serial8250:0.2-tty-ttyS2.device
20.105s sys-devices-LNXSYSTM:00-LNXSYBUS:00-MSFT0101:00-tpmrm-tpmrm0.device
20.105s dev-tpmrm0.device
20.080s sys-module-fuse.device
20.078s sys-module-configfs.device
20.025s sys-devices-pci0000:00-0000:00:1c.4-0000:02:00.0-nvme-nvme0-nvme0n1.device
20.025s dev-nvme0n1.device
20.025s dev-disk-by\x2did-nvme\x2dKXG50ZNV512G_TOSHIBA_X8DB83W5K5SS.device
20.025s dev-disk-by\x2did-nvme\x2dKXG50ZNV512G_TOSHIBA_X8DB83W5K5SS_1.device
20.025s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1.device
20.025s dev-disk-by\x2did-nvme\x2deui.000000000000001000080d030046a771.device
20.025s dev-disk-by\x2ddiskseq-1.device
20.011s dev-disk-by\x2ddiskseq-1\x2dpart2.device
20.011s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart2.device
20.011s sys-devices-pci0000:00-0000:00:1c.4-0000:02:00.0-nvme-nvme0-nvme0n1-nvme0n1p2.device
20.011s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-c835f737\x2d2955\x2d44c2\x2d86c7\x2daafc1378eeb9.device
20.011s dev-disk-by\x2did-nvme\x2dKXG50ZNV512G_TOSHIBA_X8DB83W5K5SS\x2dpart2.device
20.011s dev-disk-by\x2did-nvme\x2deui.000000000000001000080d030046a771\x2dpart2.device
20.011s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-2.device
20.011s dev-disk-by\x2dpartuuid-775f88d0\x2ddff4\x2d4eeb\x2dbc49\x2d33d506e7b48d.device
20.011s dev-disk-by\x2did-nvme\x2dKXG50ZNV512G_TOSHIBA_X8DB83W5K5SS_1\x2dpart2.device
20.011s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-775f88d0\x2ddff4\x2d4eeb\x2dbc49\x2d33d506e7b48d.device
20.011s dev-disk-by\x2duuid-c835f737\x2d2955\x2d44c2\x2d86c7\x2daafc1378eeb9.device
20.011s dev-nvme0n1p2.device
19.997s dev-nvme0n1p1.device
19.997s dev-disk-by\x2dpartuuid-24c31ea3\x2d8191\x2d422e\x2d8fbe\x2d822a19c6ad6c.device
19.997s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart1.device
19.997s dev-disk-by\x2duuid-4BB1\x2d91C5.device
19.997s dev-disk-by\x2did-nvme\x2dKXG50ZNV512G_TOSHIBA_X8DB83W5K5SS_1\x2dpart1.device
19.997s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart-by\x2duuid-4BB1\x2d91C5.device
19.997s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartnum-1.device
19.997s sys-devices-pci0000:00-0000:00:1c.4-0000:02:00.0-nvme-nvme0-nvme0n1-nvme0n1p1.device
19.997s dev-disk-by\x2dpath-pci\x2d0000:02:00.0\x2dnvme\x2d1\x2dpart-by\x2dpartuuid-24c31ea3\x2d8191\x2d422e\x2d8fbe\x2d822a19c6ad6c.device
19.997s dev-disk-by\x2did-nvme\x2deui.000000000000001000080d030046a771\x2dpart1.device
19.997s dev-disk-by\x2did-nvme\x2dKXG50ZNV512G_TOSHIBA_X8DB83W5K5SS\x2dpart1.device
19.997s dev-disk-by\x2ddiskseq-1\x2dpart1.device
18.689s sys-devices-pci0000:00-0000:00:02.0-drm-card1-card1\x2deDP\x2d1-intel_backlight.device
 1.966s thermald.service
 1.075s initrd-switch-root.service
  774ms NetworkManager.service
  269ms tlp.service
  253ms user@1000.service
  224ms iio-sensor-proxy.service
  197ms ufw.service
  185ms systemd-tmpfiles-setup.service
  182ms systemd-udev-trigger.service
  146ms systemd-tmpfiles-clean.service
  125ms systemd-journald.service
... (some more ms process) ... 

systemd-analyze critical-chain:

 graphical.target @4.360s
└─multi-user.target @4.360s
  └─thermald.service @2.393s +1.966s
    └─basic.target @2.339s
      └─systemd-pcrphase-sysinit.service @2.229s +109ms
        └─sysinit.target @2.225s
          └─systemd-timesyncd.service @2.104s +120ms
            └─systemd-tmpfiles-setup.service @1.915s +185ms
              └─run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount @1.957s

As far as I can tell, something is up with the pci device.

I load both i915 & nvidia modules and am using systemd based intramfs (after having about the same speeds with base + udev).

Last edited by pxndx (2024-07-15 01:17:59)

Offline

#2 2024-07-15 01:16:55

pxndx
Member
Registered: 2024-07-14
Posts: 2

Re: Slow boot times: ~10s loader and ~20s initrd

I've done a bit more searching and experimenting. It seems the long loader times can be shrunk by ~5 seconds by disabling secure boot (which ideally is enabled). Disabling most everything but essentials has allowed me to shave ~10 seconds shrinking the total time to ~20 which is still slower than I desire for an nvme drive but better.

I tried switching to EFISTUB, but not sure I did it right.

Offline

Board footer

Powered by FluxBB