Userspace loading time takes a long time

Hi, I’ve recently come from Windows after a long period of doing everything I could to stay within WSL.

I’d like to improve my startup time and while looking around this forum I noticed that my userspace startup seems to be an order of magnitude slower than what I’ve seen posted in other threads.

Startup finished in 11.683s (firmware) + 5.510s (loader) + 2.536s (kernel) + 1min 30.676s (userspace) = 1min 50.406s

Here is the output of systemd-analyze blame

2.944s systemd-modules-load.service
 861ms dev-sda2.device
 443ms systemd-udev-trigger.service
 420ms systemd-remount-fs.service
 392ms tlp.service
 333ms apparmor.service
 330ms modprobe@fuse.service
 284ms udisks2.service
 249ms lvm2-monitor.service
 247ms modprobe@drm.service
 170ms user@1000.service
 163ms systemd-tmpfiles-setup.service
 162ms mnt-chonky.mount
 150ms systemd-tmpfiles-setup-dev.service
 131ms snapd.apparmor.service
 116ms lightdm.service
 115ms avahi-daemon.service
 108ms bluetooth.service
 108ms plymouth-quit.service
 105ms systemd-journal-flush.service
 102ms systemd-logind.service
  96ms systemd-vconsole-setup.service
  80ms accounts-daemon.service
  79ms cups.service
  75ms plymouth-quit-wait.service
  69ms upower.service
  66ms modprobe@configfs.service
  66ms kmod-static-nodes.service
  64ms alsa-restore.service
  62ms systemd-fsck@dev-disk-by\x2duuid-4A95\x2d7AB1.service
  57ms dbus.service
  55ms user-runtime-dir@1000.service
  51ms ufw.service
  49ms plymouth-start.service
  46ms systemd-update-utmp.service
  45ms systemd-journald.service
  44ms plymouth-read-write.service
  44ms systemd-random-seed.service
  41ms systemd-udevd.service
  39ms modprobe@loop.service
  33ms systemd-user-sessions.service
  29ms systemd-sysctl.service
  28ms NetworkManager.service
  25ms colord.service
  20ms boot-efi.mount
  12ms polkit.service
  10ms dev-hugepages.mount
  10ms dev-mqueue.mount
   9ms sys-kernel-debug.mount
   9ms sys-kernel-tracing.mount
   9ms wpa_supplicant.service
   5ms rtkit-daemon.service
   4ms sys-fs-fuse-connections.mount
   4ms sys-kernel-config.mount
   2ms tmp.mount
   1ms modprobe@dm_mod.service
   1ms proc-sys-fs-binfmt_misc.mount

I think the issue is potentially related to mounting my HDD as for the first minute or so when I try to run the analysis I get the following:

Bootup is not yet finished (org.freedesktop.systemd1.Manager.FinishTimestampMonotonic=0).
Please try again later.
Hint: Use 'systemctl list-jobs' to see active jobs

And then when I go to check which jobs are running as per the hint:

JOB UNIT            TYPE  STATE  
56  mnt-sdb1.mount  start waiting
57  dev-sdb1.device start running

lsblk output:

sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0   300M  0 part /boot/efi
└─sda2   8:2    0 232.6G  0 part /
sdb      8:16   0 931.5G  0 disk /mnt/chonky

This might be a red herring but any help with how I could reduce the user space start time would be appreciated.

I’ve figured it out!

Startup finished in 11.710s (firmware) + 5.513s (loader) + 2.514s (kernel) + 4.229s (userspace) = 23.968s reached after 4.229s in userspace.

I had mounted my HDD using the gnome-disk-utility, following a guide I found online. Doing it directly in /etc/fstab/ has done the trick. I must have configured it through the disk utility incorrectly as it was matching via label and not by UUID. I’m not sure exactly why that has an affect on user space start up. Ill have to look that up separately. :slight_smile:

1 Like

According to the lsblk output you supplied you don’t have any partitions on sdb. If it’s trying to mount a partition that doesn’t exist, then presumably the default timeout will apply which is 1m30s.

Interesting, it doesn’t have any partitions, do you have any ideas on how it can be mounted now? Because its not hitting the default timeout now but I havent added any partitions

I thought it was already mounted.

What filesystem is it?

Sorry, poor wording on my part.

It is mounted, but I haven’t added any partitions:

sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0   300M  0 part /boot/efi
└─sda2   8:2    0 232.6G  0 part /
sdb      8:16   0 931.5G  0 disk /mnt/chonky

The mount point is working as expected, I can add/remove/edit files.

My question now, based on your comment about it hitting a default time out because it doesn’t have any partitions, is: why isn’t it hitting that default time out now?

Presumably because you’re mounting the drive (sdb) instead of a non-existent partition (sdb1).

1 Like

Well that was staring me in the face :sweat_smile:. Thank you @dmt

1 Like

You’re welcome. :slight_smile:

You are looking in the wrong direction !

It is not recommended to use a disk without a partition table. Sooner or later you will get into deep trouble if you do things the windows-way in linux.

Some reading-material to read on.

Switch from Windows - how to use GNU/Linux:

Working with Drives

Filesystem, Permissions:

You also can find good information in the arch wiki and in the manjaro wiki



Thanks @andreas85 I’ll take a look at those guides. :+1:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.