How much time does your Arch Takes to boot?
I used a stopwatch and found it took me 17.88 seconds to boot including logging into my user account.
Specs: No desktop environment, I have a SSD Drive.
Further, How shall I reduce the boot time?
Edit: Thanks for telling about systemd-analyze Time= 15.354 seconds in total
Edit 2: Thanks again, everyone.I brought the boot time down by 54 percent (8.364 second)
Edit 3: Using lz4 compression Total Time=8.081 s
Edit 4: I dont know what I did but its 7.349 seconds
Edited 25 Jul 2020. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 209 · 95% up
- Kind
- Text
- ID
- hwdbts
197 comments
systemd-analyze will tell you where time is spent during boot.
Oooohhhh!!! 3.585s for firmware 248ms for loader 1.077s for kernel 10.441s for user Total=15.354 second
Edit: I just found out using systemd-analyze blame. It further breakdown the boottime into each unit. Gonna uninstall some useless stuffs now and disable some service.
16.5% error, better work on those stop-watch skills
Deleted before we saved it.
Ich hab durchfallmann schon vergessen, danke für die Erinnerung
Gerne. Du weißt, ich helfe dir in deiner Not!
DAS IST EIN JOB FÜR
Find the culprit!
bruh
It actually doesn't matter as it doesn't slow down the graphical target.
wut?oh wait nvm, apparently it just counts up every timer timeoutFound the Culprit. Thank You
47.704s powertop.service now how do i fix that? Lol
1.560s lvm2-monitor.service
And disabled. I don't even have lvm drives on here... Looks like it's installed because of udisks2, probably in case I hotplug a lvm2 drive.
Having said that, my system starts fast enough that I end up waiting for the network anyway...
I should also saved another 120+515ms by making my UEFI /boot mount into an automount (assuming that doesn't cause issues).
EDIT: Looks like disabling lvm2 didn't stop it loading, udisks2 must be pulling it in.
Although my main culprit right now is mysql blocking the login for 24sec on my Ubuntu server.
EDIT2: Installing haveged speed up boot by about 200ms as systemd-random-seed.service was taking 2.692s now it's 1.283s. It wasn't on the critical path but was the most time in blame so I guess it freed up CPU for other tasks.
Excluding entering LUKS password, probably around 5-10 seconds. This is on a relatively beefy machine.
It's up to ~25 seconds for me now though as my automounting network storage blocks. I've accepted it as a lesser evil, how often do you boot up? Daily at most?
Try mounting on demand rather than on boot.
I think even better would be after booting into userspace, should be possible with a systems service/timer right ?
Deleted before we saved it.
Once a week or so, else I just leave my PC on
I do that with my laptop, but for my desktop I dual boot between Windows and Linux, so want faster boot times there.
atleast 5-10 times in a day.
Why don't you suspend instead?
12s firmware 50ms loader, 2ms kernel, 2.8ms userspace
i have a slow as fuck motherboard Edit: 12 seconds not 12ms
s?
Ikr. That would be fast af if it is in ms.
You're trying to tell me your computer boots in less than a tenth of a second?
Surprised the heat flash from his CPU exploding doesn't bother him as it attempts to run at 50GHz while maxing out his 1500W PSU.
My firmware takes 16 seconds. Msi gaming plus x470
same here. MSI b350 tomahawk plus
Isn’t that in seconds? What the fuck is your board?
Wait yea I mean seconds MSI b450-a pro
My motherboard is also slow as fuck: 13.240s
Does anyone know what can be done about this? (I have an Asus z170 pro gaming)
for me about 5 sec without DE (with POST) and 10-12 sec with KDE (boot + time for plasma fully load). Specs: wd ssd, cpu fx-8350
Same as that with my laptop... KDE itself seems to finish loading in around 7-10 seconds, though with the applications on autoload it takes 5 extra seconds
Deleted before we saved it.
I hope its not another rm -rf type prank.
Edit: Thank you so much, now its much faster, brought it down to 9.378 seconds
the wiki cover this
Funny you mention that.. did my first build and I have to run ip link set dev enxxxxx up and then dhcpcd for my internet to start up and I was digging through just about to add a startup unit to run those commands when I saw that guy and wondered why such an aptly named service wasn't doing jack....
Disabling enough, Network Manager has some kind of dependency on it which leads to it being auto-started on every boot even if you disable it.
I just masked it on all of my systems, and boot time improved tremendously.
I just saw you are also asking for tips to reduce your boot time. Arch wiki has a great article about it: https://wiki.archlinux.org/index.php/Improving_performance/Boot_process
Here are my options, which you could use as a guideline, but don't copy them without knowing what they do, so you don't make your system unbootable.
Here's my mkinitcpio:
I even removed the commnets, as I saw they are added to the final image. Shouldnt really make a difference, but I'm a perfectionist. I have the comments in a backup file, as they are usefull to look into sometimes.
Since I use systemd in initramfs, I removed root partition from fstab, systemd mounts it using the kernel options, and also I have a completely silent boot.
I dont have the keyboard modules, which means if something fails, I have to boot using a usb key.
I use efistub as my bootloader, since I dont dualboot on this laptop.
Be careful when copying those options, for example I believe if you set a wrong resume_offset, when hibernating, your data could be overwritten (though it's just a speculation)
I use the script like this:
linux-zen is my kernel. Idk if it improves the boot time. In the future I'll probably compile a custom kernel on my pc and push it to my laptop.
I use btrfs as my root filesystem with zstd compression. It should in theory allow for faster read speeds, so faster boot, although with my slow cpu I couldn't see any difference in boot time.
I dont use any display managers (or whatever they were called), just launch sway from my config.fish (it's like .bashrc in bash).
As far as I remember, that's most of the things I did to reduce my boot time.
Edit:With the 5.9 kernel I now use zstd initramfs compression with level -15, it seems higher levels hardly reduce the size, however they also quite hurt decompression speed (on my cpu level -15 is about 999 MiB/s, level -19 is about 777 MiB/s)
systemd-analyze is now under 4 s
This might be the most comprehensive guide. Thanks a ton. Off to mess with my system
Yeah, I was on a quest to reduce my boot time as far as possible and spent hours reading the wiki, searching on the internet and just tinkering, like benchmarking all the lz4 compression options, for best decompression speeds. The custom kernel is the final step I'll need to do one day. I'm glad I can help someone, so they don't have to figure it out on their own.
My system takes as long as it needs to get me to login ...job done. It's not a race!
Yes it is, how fast your system boots, decides your self-worth and status in society :D
On a more serious note, it's the how long we stare at it before we can get to doing part that's annoying.
lol yea, must have high status :)
PC is running GNOME with a couple extensions, some background services, SSD with F2FS, EFISTUB booting. It's an "old" AMD FX-8320E.
Deleted before we saved it.
Your firmware is ridiculously slow.
Deleted before we saved it.
Time with a stopwatch, mine doesn't feel like half a minute even though that's what SystemD says
Deleted before we saved it.
I never even thought about this because I reboot so little since it's Linux, interesting there is a process to check time.
Laptop 1
4.673s (firmware) + 35ms (loader) + 8.027s (kernel) + 3.954s (userspace) = 16.691sLaptop 2
6.892s (firmware) + 46ms (loader) + 1.694s (kernel) + 1.738s (userspace) = 10.371sAccording to systemd-analyze, 15.128 seconds, not including automatic login to desktop ofc. I haven't actually timed it from grub bootloader to desktop yet. (Edit: I timed it. From a cold start to GRUB is 13.26 seconds (takes around 7 seconds to POST), from GRUB to fully loaded XFCE desktop is 40.12 Seconds. So while Arch itself boots fully in 40 seconds, the total time from a cold start to desktop, is roughly 53.38 seconds. I need a better boot drive.)
I have set the timeout of grub to 0.
Mines counting from kernel start, doesn't include firmware or bootloader time as I'm using legacy boot although my system is UEFI compatible. My grub conf is set to 1 second bc I dual boot and 0 seconds is too fast to select another option.
You don't have to worry about your boot time if you never restart. *taps forehead*
You can get an idea of all the unused service affecting the boot time. Also, know how the hardware are performing on a relative scale.
and
I don't think I can shave any ms. I do have some questions about my
fstabI think the kernel time is including the time spent on the LUKS password prompt?
guys mine is
Startup finished in 9.529s (kernel) + 19.611s (userspace) = 29.140sgraphical.targetreached after 19.611s in userspace
15.170s systemd-journal-flush.service5.767s dev-sda7.device3.054s systemd-fsck@dev-disk-by\x2duuid-0B46\x2d3D53.service3.007s polkit.service2.434s ldconfig.service2.401s systemd-fsck@dev-disk-by\x2duuid-1f8d4874\x2d94b5\x2d4b26\x2d8c18\x2d2daf621e7d65.service1.393s systemd-udevd.service1.264s NetworkManager.service1.023s systemd-sysusers.service986ms systemd-logind.service966ms systemd-rfkill.service591ms systemd-random-seed.service503ms boot-efi.mount466ms systemd-tmpfiles-setup-dev.service463ms user@1000.service392ms systemd-backlight@backlight:intel_backlight.service376ms systemd-journald.service355ms modprobe@drm.service341ms dev-disk-by\x2duuid-aa79e215\x2d83e0\x2d480c\x2dac99\x2dd38d00f31f83.swap315ms systemd-sysctl.service287ms systemd-tmpfiles-setup.service286ms home.mount264ms systemd-modules-load.service219ms systemd-udev-trigger.service162ms systemd-journal-catalog-update.service160ms wpa_supplicant.service115ms alsa-restore.service90ms systemd-update-utmp.service77ms rtkit-daemon.service55ms systemd-remount-fs.service47ms systemd-user-sessions.service38ms dev-hugepages.mount36ms dev-mqueue.mount36ms sys-kernel-debug.mount35ms sys-kernel-tracing.mount35ms kmod-static-nodes.service23ms systemd-update-done.service18ms user-runtime-dir@1000.service4ms tmp.mount3ms sys-kernel-config.mount
can i disable flush and journal in systemd?
Do you have an SSD? When I first added dual boot to Linux, Windows had the SSD so I installed to HDD and journal flush took over 20 seconds. Moved the install to SSD and got it down to a second or so.
No i have hdd, guess i have to upgrade
17.92 seconds
Startup finished in 2.658s (kernel) + 4.461s graphical.target reached after 4.440s in user. I manually start X environment if that reduces the time? It boots to command line (tty) normally. Old 2010 Core 2 Duo CPU, SSD Lenovo laptop. Void with runit boots super fast compared to Arch systemd, just saying. Like big difference.4.5 to 5.5 seconds on an old i5 with 8 Gb
A very old computer with a celeron which is why I run bare bones arch. 32 seconds.
Ignoring entering the passphrase for my encrypted root partition's BTRFS, the majority of my boot time is spent at unlocking+mounting another encrypted BTRFS RAID1 (keyfile read from the root FS) on two HDDs, which takes about 7.5 seconds and is a bit annoying. I can always hear the reader heads of the disks jumping like crazy while it's mounting. Not sure if that's normal. These are two WD red (without SMR) @ 5400 rpm.
27.13 second with KDE Plasma. Damn mine is slow. Would reinstall and try Awesome after my semester ends in mid August!
Arch isn't Windows, no need to reinstall...
Oh really. So if I just use something less bloat compared to KDE, does that will decrease my boot time? I have so many useless KDE stuff. Games and all that. Need to uninstall that too lol.
Just do it know. It's a good excuse to procrastinate.
PS. I procrastinate at the moment.
I tried install Awesome while in KDE, then it fucks my system up lmao. Thanks God when I uninstalled all the stuff, reboot, it return to it's normal state. I want to wait until end of semester because I need my laptop while studying at home. Cannot afford any downtime.
Pretty quick if I may say so
I'm using a ThinkPad E495 with Ryzen 7 3700U, 16 GB RAM and 512 nvme SSD running Arch with i3.
I don’t understand why my systemd-random-seed.service is using an extra second and lvm2-monitor with an extra 0.6 seconds.
But Great Specs, guess must be the performance of Ryzen
Damnnn, thats really quick!!!!!!!
Can you share more info like what are the services on executing systemd-analyze blame and further your computer Specs?
Haha Artix go brrrr?!
Jk, I have no idea whether it is actually faster
It is actually faster if u r on Artix w/ runit. I'm using it with no problems encountered.
I am also using Artix with runit but I have no I idea how much faster it actually is. It would be really interesting to know though...