I noticed that my computer seems to boot slower than it used to, what steps can i take to mitigate this?
I noticed this behavior when i made a fresh leap install on a slower/older machine with a chipset 2 versions prior to my main computer but this older machine seems to boot quicker and use less CPU resources, is this just a tumbleweed vs leap thing?
If you’ve added services that need to start at boot time, that can increase the boot time, depending on what those services are.
As we can’t look at your system, we need additional information. “Slower” is a non-quantitative measure, so it’s hard to judge how serious the issue (if there is one) may be. If you can provide information about what “slower” means to you (for example, did it used to boot in 30 seconds, but now it takes 5 minutes?), that can help.
More specifically, there is a tool that can provide boot time data - systemd-analyze - specifically with the blame and critical chain parameters (run separately, you can’t use them both at the same time).
That’ll give you some idea as to what’s taking time during startup. blame gives you info about each unit that starts. critical-chain tells you the times and execution order of things that are necessary to get the system running (other tasks may start in the background and may not actually be holding up the startup).
would putting the system in UEFI mode help boot times? I was feeling lazy at the time of installation on my tumbleweed machine and skipped that, should that be a step i take?
Just systemd-analyze blame or systemd-analyze critical-chain
man systemd-analyze will give you more information.
FYI, 8 seconds isn’t terrible. Mine takes ~25 seconds to boot (I have several services that take 4-7 seconds to start up, but they start in parallel - the critical path shows this for my system:
[jhenderson@TheEarth ~]$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @25.871s
└─multi-user.target @25.871s
└─getty.target @25.871s
└─getty@tty1.service @25.870s
└─plymouth-quit-wait.service @4.848s +20.921s
└─systemd-user-sessions.service @4.757s +43ms
└─network.target @4.719s
└─NetworkManager.service @3.974s +744ms
└─network-pre.target @3.953s
└─wpa_supplicant.service @10.068s +30ms
└─dbus.service @2.909s +26ms
└─basic.target @2.851s
└─sockets.target @2.851s
└─pcscd.socket @2.851s
└─sysinit.target @2.848s
└─auditd.service @2.791s +56ms
└─systemd-tmpfiles-setup.service @2.697s +89ms
└─systemd-journal-flush.service @1.832s +804ms
└─var.mount @1.813s +16ms
└─dev-nvme0n1p4.device @584542y 2w 2d 20h 1min 46.593s +4.749s
In this output, you can se that the plymouth-quit-wait.service takes 20 seconds to run, so if I was going to troubleshoot this, I’d start by looking at that service because it’s in the critical path.
The other service that systemd-analyze blame shows on my system is the backup-rpmdb.service - that’s not in the critical path, but it’s taking 16 seconds to run:
(There’s multiple pages of info, so this is just the start).
These are what my system shows - your system will likely show something different, but again, 8 seconds is pretty good, and not something I’d be terribly concerned about.
My concern sprouted from the older/inferior chipset machine being quicker to boot up and having lower idle usage, in case you were wondering, anyway here is the command output you asked for
usr_40476@localhost:~> systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @8.858s
└─multi-user.target @8.857s
└─cron.service @8.857s
└─postfix.service @7.472s +1.361s
└─network.target @7.405s
└─NetworkManager.service @6.529s +872ms
└─network-pre.target @6.505s
└─wpa_supplicant.service @7.517s +222ms
└─dbus.service @4.795s +156ms
└─basic.target @4.767s
└─sockets.target @4.766s
└─snapd.socket @4.740s +24ms
└─sysinit.target @4.722s
└─systemd-backlight@leds:g15::kbd_backlight.service @5.805s +54ms
└─system-systemd\x2dbacklight.slice @2.668s
└─system.slice
└─-.slice
@40476 system maintenance tasks that occur man db rebuild, rpm db rebuild, disk checks etc all happen at different times, after X number of boots, after updating packages etc. Hence the difference in boot times.
I think i have one more question, will enabling UEFI help boot times at all? I neglected to set it up since I was feeling lazy at the time of installation.
The systems likely run different services. The older system probably runs fewer services.
I don’t really see anything to be concerned by here. You’re running postfix, which you may not need (depends on what you’re using the system for), and that’s adding ~1.3 seconds to the boot time.
But again, 8 seconds isn’t bad at all, and I don’t really see anything to be concerned by. In normal use, rebooting a system is not a frequent occurrence. I reboot my system maybe a couple of times a week when I do updates, if it’s needed.
Unlikely. That’s just what’s used to get the system started. You might also reduce the grub timer if that 8 second wait before the boot process starts is bothering you.
But IMO, focusing on optimizing an 8 second startup is probably not a good use of time, apart from learning how to diagnose actual issues with system startup.
Thank you all for this information, this has helped greatly, and, I have also learned some “cool” new commands , also (seperate thing) I am trying to impress somebody and I want to know some cool programs to put on their new computer, what programs would you reccomend?
@Fraser_Bell It’s all very subjective, some systems only show initrd, userspace, some kernel, initrd and userspace and some firmware, loader, kernel, initrd and userspace.
It’s hard to compare using only systemd-analyze, because it is obviously outputting differently now from how it was with the version from 13.1 in 2016, when the 3.12.67 kernel was installed here. Systemd has had a lot of time meanwhile to become more efficient at initialization. Measuring visually from stopwatch, 13.1 brought up the login screen in 70 seconds. 15.5 took 43 to do what’s ostensibly the same thing. All / filesystems on the PC’s SSD are 6,400MB EXT3.
12.1 here has no working systemd-analyze. Boot time to greeter on stopwatch was 55 seconds. TW20240310 booted 14M 6.6.21 kernel to greeter in 46 seconds, and:
> systemd-analyze
Startup finished in 3.488s (kernel) + 11.561s (initrd) + 16.431s (userspace) = 31.481s
graphical.target reached after 16.428s in userspace.>
This is the file indexer on kde, it’s only useful if you search for files or want to sort a folder by image width for example, it can take some ressources to run since it need to read your disk frequently.
You can set which folder is indexed or disable baloo entirely on system settings->Search->File Search