You are not logged in.

#1 2019-03-19 11:58:16

lavio
Member
Registered: 2019-03-01
Posts: 6

Slow boot because of kernel

Hi,

My system used to boot in around 4 seconds but now it takes more than 30seconds.
When the system boots it gets stuck for around 20 seconds(https://i.imgur.com/QUdxzkm.jpg) at one point and then boots everything else in 2 seconds.

The systemd-analyze does not show any information for the slowdown and I wasn't able to find anything on the net to fix it. I've tried adding

noauto,x-systemd.automount 

to extra drives, booting with different kernel  parameters etc.

systemd-analyze

Startup finished in 121us (firmware) + 20us (loader) + 32.910s (kernel) + 3.578s (userspace) = 36.488s 
graphical.target reached after 3.577s in userspace

systemd-analyze blame

          1.261s systemd-logind.service
          1.107s lvm2-monitor.service
           598ms dev-sdc2.device
           505ms mnt-disk5.mount
           455ms systemd-networkd.service
           435ms systemd-resolved.service
           428ms systemd-journald.service
           410ms systemd-udevd.service
           406ms systemd-timesyncd.service
           177ms systemd-journal-flush.service
           109ms polkit.service
           108ms ldconfig.service
            95ms mnt-disk2.mount
            74ms systemd-udev-trigger.service
            64ms systemd-tmpfiles-setup.service
            59ms user@1000.service
            58ms mnt-disk4.mount
            47ms mnt-disk1.mount
            41ms systemd-binfmt.service
            35ms lm_sensors.service
            32ms systemd-fsck@dev-disk-by\x2duuid-4893\x2d4EC0.service
            23ms mnt-storage.mount
            23ms kmod-static-nodes.service
            22ms sys-kernel-debug.mount
            20ms dev-mqueue.mount
            20ms systemd-remount-fs.service
            19ms mnt-disk1-swapfile-swapfc-1.swap
            19ms systemd-modules-load.service
            18ms efi.mount
            18ms systemd-journal-catalog-update.service
            17ms systemd-sysusers.service
            16ms mnt-disk3.mount
            14ms systemd-random-seed.service
            13ms dev-hugepages.mount
            12ms systemd-tmpfiles-setup-dev.service
            10ms systemd-user-sessions.service
            10ms tmp.mount
            10ms alsa-restore.service
            10ms user-runtime-dir@1000.service
             9ms systemd-update-utmp.service
             8ms systemd-sysctl.service
             6ms sys-kernel-config.mount
             6ms proc-sys-fs-binfmt_misc.mount
             6ms systemd-update-done.service
             3ms sys-fs-fuse-connections.mount

systemd-analyze critical-chain

The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @3.577s
└─multi-user.target @3.576s
  └─systemd-logind.service @2.313s +1.261s
    └─basic.target @2.306s
      └─sockets.target @2.306s
        └─dbus.socket @2.306s
          └─sysinit.target @2.305s
            └─systemd-timesyncd.service @1.899s +406ms
              └─systemd-tmpfiles-setup.service @1.832s +64ms
                └─local-fs.target @1.830s
                  └─mnt-storage.mount @1.806s +23ms
                    └─mnt-disk5.mount @1.299s +505ms
                      └─local-fs-pre.target @1.293s
                        └─lvm2-monitor.service @185ms +1.107s
                          └─lvm2-lvmetad.service @211ms
                            └─lvm2-lvmetad.socket @179ms
                              └─-.mount @168ms
                                └─system.slice @168ms
                                  └─-.slice @168ms

fstab

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb2
UUID=0e57ad10-7d0d-4eef-86dc-5a827db56b27       /               ext4            rw,relatime     0 1

# /dev/sdb1
UUID=4893-4EC0          /efi            vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 2

# /dev/sdd1 (WD HDD)
UUID=0f2bb2fd-9148-44cb-a52e-8c4e00e46f86       /mnt/disk1               ext4            rw,relatime,noauto,x-systemd.automount     0 0

# /dev/sde1 (Laptop HDD)
UUID=7462b331-dec7-44d1-8e8f-9500dacc9a57       /mnt/disk2              ext4            rw,relatime,noauto,x-systemd.automount     0 0

# /dev/sdc1 (SSHD, Used to be Win)
UUID=8a21d5fb-22d8-4254-af24-3c97a5f45bb9       /mnt/disk3              ext4            rw,relatime,noauto,x-systemd.automount     0 0

# /dev/sda1 (HDD, Hitachi)
UUID=bd8de161-a70c-4c2f-a0d4-78c862150fea       /mnt/disk4              ext4            rw,relatime,noauto,x-systemd.automount     0 0

# /dev/sdf1 (Seagated External HDD)
UUID=BC122F40122EFED0                           /mnt/disk5              ntfs-3g         defaults,uid=lavios,gid=lavios,noauto,x-systemd.automount       0 0

#mergerfs
#/mnt/disk*     /mnt/storage     fuse.mergerfs direct_io,defaults,allow_other,minfreespace=30G,func.getattr=newest,fsname=mergerfs 0 0

Offline

#2 2019-03-19 11:59:38

loqs
Member
Registered: 2014-03-06
Posts: 19,103

Re: Slow boot because of kernel

Offline

#3 2019-03-19 12:09:42

lavio
Member
Registered: 2019-03-01
Posts: 6

Re: Slow boot because of kernel

I just downgraded my kernel but the the problem still persists. The lvm2-monitor.service went to 700ms from 1s in the above post.

Offline

#4 2019-03-19 12:18:26

loqs
Member
Registered: 2014-03-06
Posts: 19,103

Re: Slow boot because of kernel

Have you tried setting use_lvmetad = 0 in /etc/lvm/lvm.conf ?

Offline

#5 2019-03-19 12:29:46

lavio
Member
Registered: 2019-03-01
Posts: 6

Re: Slow boot because of kernel

I just did and lvm2-monitor.service went to 82ms but the boot process is still stuck for more than 20 seconds at the udev. I don't really think LVM is the issue here because I'm not using it.

systemd-analyze blame

          1.399s systemd-udev-settle.service
          1.263s systemd-logind.service
           664ms dev-sdc2.device
           577ms systemd-timesyncd.service
           575ms systemd-resolved.service
           483ms mnt-disk5.mount
           453ms systemd-networkd.service
           418ms systemd-journald.service
           398ms systemd-udevd.service
           129ms systemd-journal-flush.service
           115ms polkit.service
           107ms ldconfig.service
            99ms lvm2-activation-early.service
            82ms lvm2-monitor.service
            76ms mnt-disk2.mount
            75ms lvm2-activation.service
            66ms systemd-udev-trigger.service
            64ms systemd-tmpfiles-setup.service
            58ms user@1000.service
            54ms mnt-disk4.mount
            51ms mnt-disk1.mount
            39ms lm_sensors.service
            31ms systemd-fsck@dev-disk-by\x2duuid-4893\x2d4EC0.service
            31ms alsa-restore.service
            24ms systemd-binfmt.service
            24ms mnt-storage.mount
            22ms systemd-user-sessions.service
            19ms mnt-disk1-swapfile-swapfc-1.swap
            19ms efi.mount
            18ms systemd-journal-catalog-update.service
            17ms systemd-sysusers.service
            16ms kmod-static-nodes.service
            16ms systemd-remount-fs.service
            16ms mnt-disk3.mount
            16ms systemd-modules-load.service
            15ms dev-hugepages.mount
            13ms systemd-tmpfiles-setup-dev.service
            11ms tmp.mount
            10ms sys-kernel-debug.mount
            10ms user-runtime-dir@1000.service
             9ms systemd-sysctl.service
             9ms systemd-random-seed.service
             9ms dev-mqueue.mount
             8ms sys-kernel-config.mount
             8ms proc-sys-fs-binfmt_misc.mount
             8ms systemd-update-utmp.service
             5ms systemd-update-done.service
             2ms sys-fs-fuse-connections.mount

Offline

#6 2019-03-19 12:37:15

loqs
Member
Registered: 2014-03-06
Posts: 19,103

Re: Slow boot because of kernel

Please post the journal from one boot that is affected and one that is not.

Offline

#7 2019-03-19 13:11:54

lavio
Member
Registered: 2019-03-01
Posts: 6

Re: Slow boot because of kernel

My system has  journal since the 12th.  I think it booted normally that day. Anyways, I've uploaded journal of 12th and the 19th. Thanks for you help!

Journal

Last edited by lavio (2019-03-19 13:14:57)

Offline

#8 2019-03-19 13:28:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,574

Re: Slow boot because of kernel

The earlier boot seems to have some network config issues, hostnamed never succeeds.
The newer one doesn't have this issue, but there seems a 20 second timout on hostnamed.

Also all messages use "Arch" instead of "Assassin" as hostname.

hostnamectl

Offline

Board footer

Powered by FluxBB