Skip to content

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.

209 points186 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
209 · 95% up
Kind
Text
ID
hwdbts

Author

23
posts
127
comments
1
media
View profile

197 comments

systemd-analyze will tell you where time is spent during boot.

99 points

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.

68 points
systemd-analyze blame

systemd-analyze critical-chain

systemd-analyze plot > /tmp/plot.svg

Find the culprit!

95 points
14.031s man-db.service

wut? oh wait nvm, apparently it just counts up every timer timeout

17 points

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.

1 points

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?

28 points

12s firmware 50ms loader, 2ms kernel, 2.8ms userspace

i have a slow as fuck motherboard Edit: 12 seconds not 12ms

19 points

You're trying to tell me your computer boots in less than a tenth of a second?

12 points

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.

13 points

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)

2 points

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

16 points

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

5 points
unknown author6 hidden

Deleted before we saved it.

11 points

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....

3 points

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.

1 points

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:

~ $ cat /etc/mkinitcpio.conf
MODULES=(ahci sd_mod i915 btrfs)
BINARIES=(fsck fsck.btrfs)
HOOKS=(systemd)
COMPRESSION="lz4"
COMPRESSION_OPTIONS="-12 --favor-decSpeed"

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.

~ $ cat /boot/createBoot.sh 
#!/bin/sh
sudo efibootmgr -b 0000 -B
sudo efibootmgr -v -p 1 -c -L 'Arch Linux' -l \\$1 -u 'root=/dev/sda2 rootflags=rw,relatime,compress=zstd,discard=async,autodefrag initrd=\intel-ucode.img initrd=\'$(echo $1 | sed s/vmlinuz/initramfs/)'.img quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3 btusb.enable_autosuspend=0 i915.enable_fbc=1 i915.fastboot=1 resume=UUID=38d43fb3-c121-4568-994a-fc2ac19df441 resume_offset=3315554'

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:

/boot $ ./createBoot.sh vmlinuz-linux-zen 

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

8 points

This might be the most comprehensive guide. Thanks a ton. Off to mess with my system

2 points

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.

2 points

My system takes as long as it needs to get me to login ...job done. It's not a race!

8 points

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.

4 points
root@makizushi ~ # systemd-analyze 
Startup finished in 4.932s (firmware) + 36ms (loader) + 1.273s (kernel) + 1.697s (initrd) + 2.166s (userspace) = 10.106s 
graphical.target reached after 2.031s in userspace

PC is running GNOME with a couple extensions, some background services, SSD with F2FS, EFISTUB booting. It's an "old" AMD FX-8320E.

8 points
unknown author5 hidden

Deleted before we saved it.

6 points

Time with a stopwatch, mine doesn't feel like half a minute even though that's what SystemD says

3 points
unknown author

Deleted before we saved it.

3 points

I never even thought about this because I reboot so little since it's Linux, interesting there is a process to check time.

6 points

Laptop 1
4.673s (firmware) + 35ms (loader) + 8.027s (kernel) + 3.954s (userspace) = 16.691s

Laptop 2
6.892s (firmware) + 46ms (loader) + 1.694s (kernel) + 1.738s (userspace) = 10.371s

6 points

According 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.)

5 points

I have set the timeout of grub to 0.

1 points

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.

3 points

You don't have to worry about your boot time if you never restart. *taps forehead*

5 points

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.

1 points
~ ᐅ systemd-analyze
Startup finished in 1.162s (kernel) + 1.525s (userspace) = 2.687s 
graphical.target reached after 1.514s in userspace

and

~ ᐅ systemd-analyze blame
622ms dev-sda2.device                                      
474ms systemd-logind.service                               
323ms systemd-udevd.service                                
268ms systemd-journald.service                             
145ms systemd-remount-fs.service                           
 99ms user@1000.service                                    
 89ms polkit.service                                       
 73ms systemd-udev-trigger.service                         
 50ms modprobe@drm.service                                 
 47ms systemd-journal-flush.service                        
 42ms systemd-tmpfiles-setup.service                       
 40ms systemd-fsck@dev-disk-by\x2duuid-AE22\x2d43F4.service
 30ms boot.mount                                           
 27ms systemd-tmpfiles-setup-dev.service                   
 23ms systemd-update-utmp.service                          
 21ms systemd-backlight@leds:dell::kbd_backlight.service   
 18ms systemd-backlight@backlight:intel_backlight.service  
 13ms dev-hugepages.mount                                  
 13ms user-runtime-dir@1000.service                        
 12ms dev-mqueue.mount                                     
 11ms sys-kernel-debug.mount                               
 11ms systemd-user-sessions.service                        
 10ms systemd-sysctl.service                               
  9ms sys-kernel-tracing.mount                             
  9ms systemd-modules-load.service                         
  8ms kmod-static-nodes.service                            
  5ms rtkit-daemon.service                                 
  3ms sys-fs-fuse-connections.mount                        
  3ms sys-kernel-config.mount  

I don't think I can shave any ms. I do have some questions about my fstab

5 points

Startup finished in 22.322s (firmware) + 4.846s (loader) + 1min 15.349s (kernel) + 2.603s (userspace) = 1min 45.122s

I think the kernel time is including the time spent on the LUKS password prompt?

4 points

guys mine is

Startup finished in 9.529s (kernel) + 19.611s (userspace) = 29.140s

graphical.target reached after 19.611s in userspace

​

15.170s systemd-journal-flush.service

5.767s dev-sda7.device

3.054s systemd-fsck@dev-disk-by\x2duuid-0B46\x2d3D53.service

3.007s polkit.service

2.434s ldconfig.service

2.401s systemd-fsck@dev-disk-by\x2duuid-1f8d4874\x2d94b5\x2d4b26\x2d8c18\x2d2daf621e7d65.service

1.393s systemd-udevd.service

1.264s NetworkManager.service

1.023s systemd-sysusers.service

986ms systemd-logind.service

966ms systemd-rfkill.service

591ms systemd-random-seed.service

503ms boot-efi.mount

466ms systemd-tmpfiles-setup-dev.service

463ms user@1000.service

392ms systemd-backlight@backlight:intel_backlight.service

376ms systemd-journald.service

355ms modprobe@drm.service

341ms dev-disk-by\x2duuid-aa79e215\x2d83e0\x2d480c\x2dac99\x2dd38d00f31f83.swap

315ms systemd-sysctl.service

287ms systemd-tmpfiles-setup.service

286ms home.mount

264ms systemd-modules-load.service

219ms systemd-udev-trigger.service

162ms systemd-journal-catalog-update.service

160ms wpa_supplicant.service

115ms alsa-restore.service

90ms systemd-update-utmp.service

77ms rtkit-daemon.service

55ms systemd-remount-fs.service

47ms systemd-user-sessions.service

38ms dev-hugepages.mount

36ms dev-mqueue.mount

36ms sys-kernel-debug.mount

35ms sys-kernel-tracing.mount

35ms kmod-static-nodes.service

23ms systemd-update-done.service

18ms user-runtime-dir@1000.service

4ms tmp.mount

3ms sys-kernel-config.mount

​

​

can i disable flush and journal in systemd?

3 points

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.

3 points

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.

3 points

A very old computer with a celeron which is why I run bare bones arch. 32 seconds.

3 points

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.

3 points

27.13 second with KDE Plasma. Damn mine is slow. Would reinstall and try Awesome after my semester ends in mid August!

2 points

Arch isn't Windows, no need to reinstall...

5 points

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.

2 points

Just do it know. It's a good excuse to procrastinate.

PS. I procrastinate at the moment.

2 points

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.

2 points
Startup finished in 849ms (kernel) + 2.937s (userspace) = 3.786s 
graphical.target reached after 2.251s in userspace

Pretty quick if I may say so

2 points
1.126s lightdm.service                               
1.124s systemd-logind.service                        
1.068s systemd-networkd.service                      
 700ms tlp.service                                   
 624ms lvm2-monitor.service                          
 601ms systemd-resolved.service                      
 554ms upower.service                                
 532ms systemd-random-seed.service                   
 484ms dev-nvme0n1p3.device                          
 335ms systemd-journald.service                      
 311ms systemd-udevd.service                         
 149ms dhcpcd.service                                
 146ms systemd-fsck@dev-nvme0n1p4.service            
 124ms accounts-daemon.service                       
 121ms systemd-journal-flush.service                 
 109ms iwd.service                                   
  95ms user@1000.service                             
  92ms polkit.service                                
  83ms udisks2.service                               
  63ms systemd-udev-trigger.service                  
  52ms systemd-tmpfiles-setup.service                
  42ms modprobe@drm.service                          
  40ms systemd-tmpfiles-clean.service                
  18ms bluetooth.service                             
  16ms home.mount                                    
  16ms systemd-user-sessions.service                 
  16ms systemd-modules-load.service                  
  15ms systemd-backlight@backlight:amdgpu_bl0.service
  15ms systemd-tmpfiles-setup-dev.service            
  15ms user-runtime-dir@1000.service                 
  15ms systemd-sysctl.service                        
  13ms systemd-update-utmp.service                   
  12ms dev-hugepages.mount                           
  12ms dev-mqueue.mount                              
  11ms systemd-remount-fs.service                    
  11ms sys-kernel-debug.mount                        
  10ms sys-kernel-tracing.mount                      
  10ms systemd-rfkill.service                        
   9ms tmp.mount                                     
   9ms kmod-static-nodes.service                     
   7ms sys-kernel-config.mount                       
   5ms sys-fs-fuse-connections.mount                 
   5ms rtkit-daemon.service

I'm using a ThinkPad E495 with Ryzen 7 3700U, 16 GB RAM and 512 nvme SSD running Arch with i3.

2 points

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

1 points

Damnnn, thats really quick!!!!!!!

Can you share more info like what are the services on executing systemd-analyze blame and further your computer Specs?

1 points

Haha Artix go brrrr?!

Jk, I have no idea whether it is actually faster

2 points

It is actually faster if u r on Artix w/ runit. I'm using it with no problems encountered.

1 points

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...

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.