内核启动时间缓慢

内核启动时间缓慢

我今天安装了 kubuntu 22.04,与 Windows 10 相比,我的启动时间更长。

$ systemd-analyze
Startup finished in 9.167s (kernel) + 4.729s (userspace) = 13.897s 
graphical.target reached after 4.367s in userspace

对于 SATA 3 SSD 来说,这正常吗?

另外,我发布这些内容希望它们有帮助:

$ systemd-analyze critical-chain 
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @4.367s
└─multi-user.target @4.366s
  └─smartmontools.service @1.641s +2.724s
    └─basic.target @1.403s
      └─sockets.target @1.403s
        └─uuidd.socket @1.403s
          └─sysinit.target @1.395s
            └─systemd-timesyncd.service @1.297s +97ms
              └─systemd-tmpfiles-setup.service @1.187s +58ms
                └─local-fs.target @1.176s
                  └─tmp.mount @1.173s +2ms
                    └─swap.target @1.158s
                      └─swap-swapfile.swap @1.126s +26ms
                        └─swap.mount @1.073s +34ms
                          └─dev-sda6.device @167ms +895ms

禁用就可以了吗smartmontools.service

$ cat /etc/initramfs-tools/initramfs.conf 
#
# initramfs.conf
# Configuration file for mkinitramfs(8). See initramfs.conf(5).
#
# Note that configuration options from this file can be overridden
# by config files in the /etc/initramfs-tools/conf.d directory.

#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add most filesystem and all harddrive drivers.
#
# dep - Try and guess which modules to load.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# list - Only include modules from the 'additional modules' list
#

MODULES=dep

#
# BUSYBOX: [ y | n | auto ]
#
# Use busybox shell and utilities.  If set to n, klibc utilities will be used.
# If set to auto (or unset), busybox will be used if installed and klibc will
# be used otherwise.
#

BUSYBOX=auto

#
# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ]
#

COMPRESS=lz4

#
# DEVICE: ...
#
# Specify a specific network interface, like eth0
# Overridden by optional ip= or BOOTIF= bootarg
#

DEVICE=

#
# NFSROOT: [ auto | HOST:MOUNT ]
#

NFSROOT=auto

#
# RUNSIZE: ...
#
# The size of the /run tmpfs mount point, like 256M or 10%
# Overridden by optional initramfs.runsize= bootarg
#

RUNSIZE=10%

#
# FSTYPE: ...
#
# The filesystem type(s) to support, or "auto" to use the current root
# filesystem type
#

FSTYPE=auto

切换到 lz4 并使用 MODULES=dep压缩,但没有帮助

dmesg以下是启动后的输出:https://paste.debian.net/1241082/

相关内容