You are not logged in.

#1 2013-09-20 19:38:41

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 356
Website

Ridiculously slow boot

After an upgrade to systemd-207, my boot time has increased tremendously. Boot takes between 1m45s, to 3m30s.

$ systemd-analyze time
Startup finished in 11.897s (kernel) + 1min 36.561s (userspace) = 1min 48.459s

However, the numbers for systemd-analyze don't add up:

$ systemd-analyze blame
          6.173s systemd-cryptsetup@home.service
          5.092s openntpd.service
          2.221s bluetooth.service
          1.923s systemd-logind.service
          1.921s avahi-daemon.service
          1.187s nginx.service
          1.167s systemd-vconsole-setup.service
          1.045s polkit.service
           947ms systemd-binfmt.service
           918ms user@1000.service
           838ms kmod-static-nodes.service
           802ms systemd-remount-fs.service
           717ms systemd-udev-trigger.service
           678ms sys-kernel-debug.mount
           678ms dev-hugepages.mount
           678ms dev-mqueue.mount
           579ms tmp.mount
           560ms systemd-sysctl.service
           532ms systemd-modules-load.service
           476ms rtkit-daemon.service
           449ms systemd-tmpfiles-setup-dev.service
           350ms systemd-fsck@dev-disk-by\x2duuid-d8f0b8b3\x2da13d\x2d407e\x2da7e
           304ms alsa-restore.service
           190ms network.service
           175ms systemd-update-utmp.service
           163ms systemd-user-sessions.service
           147ms systemd-tmpfiles-setup.service
           102ms sys-fs-fuse-connections.mount
            76ms sys-kernel-config.mount
            76ms proc-sys-fs-binfmt_misc.mount
            75ms systemd-fsck@dev-mapper-home.service
            69ms systemd-random-seed.service
            50ms home.mount
            37ms dev-mapper-swap.swap
            21ms systemd-journal-flush.service
            17ms boot.mount
            10ms systemd-udevd.service

A quick glance makes it obvious that you can't add up over 30 seconds with those numbers.

Any ideas? I've no idea where to look. :-/

Offline

#2 2013-09-20 19:48:25

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Ridiculously slow boot

I think you need to look in the journal to see what is going on here.  Either that or you can probably use dmesg to find information as well in this case.

I would venture to guess that it is probably waiting for a device that doesn't exist under the name it wants.  For example, if you were to enable netctl-auto@wlan0, but your actual device is renamed to wlp3s0, the unit would be bound to the existence of wlan0, and so systemd would wait for a while in the hopes that it would show up.

With the systemd that is in [core] there is a bug with swap that causes the activation of swap to fail.  I don't use swap myself, but if this is the case, then I wouldn't see it as totally outrageous to think that it might be waiting for a swap device that it never finds.  But that is just a guess.

You're going to have to trawl through your logs to see what is up here.  See if you can find a spot in your journal where things just get shitty and time might jump a whole bunch.

Offline

#3 2013-09-21 08:05:45

derhamster
Member
Registered: 2012-07-08
Posts: 86

Re: Ridiculously slow boot

You could also try

systemd-analyze plot

which gives you a better overview of all units, including the time they started and finished.

Offline

#4 2013-09-21 09:04:22

aaditya
Member
Registered: 2013-09-01
Posts: 174

Re: Ridiculously slow boot

also

systemd-analyze critical-chain

Offline

#5 2013-09-28 01:25:57

hobarrera
Member
From: The Netherlands
Registered: 2011-04-12
Posts: 356
Website

Re: Ridiculously slow boot

WonderWoofy wrote:

I think you need to look in the journal to see what is going on here.  Either that or you can probably use dmesg to find information as well in this case.

I would venture to guess that it is probably waiting for a device that doesn't exist under the name it wants.  For example, if you were to enable netctl-auto@wlan0, but your actual device is renamed to wlp3s0, the unit would be bound to the existence of wlan0, and so systemd would wait for a while in the hopes that it would show up.

With the systemd that is in [core] there is a bug with swap that causes the activation of swap to fail.  I don't use swap myself, but if this is the case, then I wouldn't see it as totally outrageous to think that it might be waiting for a swap device that it never finds.  But that is just a guess.

You're going to have to trawl through your logs to see what is up here.  See if you can find a spot in your journal where things just get shitty and time might jump a whole bunch.

I finally got the time to read through the ENTIRE journal (journalctl --this-boot). It turns out a volume in /etc/crypttab is no longer present, and systemd waits a pretty long while (~90seconds?) for it. I commented that out, obviously!

derhamster wrote:

You could also try

systemd-analyze plot

which gives you a better overview of all units, including the time they started and finished.

aaditya wrote:

also

systemd-analyze critical-chain

Both of these showed the same basic results; lots of units that didn't even add up a single second.

Offline

#6 2013-09-28 01:51:12

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Ridiculously slow boot

It used to wait 5 minutes for file systems which didn't show up. Obviously it is losing patience...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2013-09-28 02:14:45

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Ridiculously slow boot

hobarrera wrote:

I finally got the time to read through the ENTIRE journal (journalctl --this-boot). It turns out a volume in /etc/crypttab is no longer present, and systemd waits a pretty long while (~90seconds?) for it. I commented that out, obviously!

Solved then?

Also, instead of reading through the entire journalctl -b in a case like this, you can simply just start scrolling down until you hit the massive time jump.  Then at least you know the general area i which to look.  Cfr is right, it used to wait 5 whole freakin' minutes!  But it could be seen as advantageous since it becomes quite apparent in the logs where things go awry since there is typically a large jump in the logging time.

Offline

Board footer

Powered by FluxBB