我有一个 Debian 10 服务器,我认为它可以/应该启动得更快,但我不知道问题是什么。
我A start job is running for Raise network interfaces在启动时看到,看起来systemd-analyze blame花费了很多时间networking.service (我忽略了 50 毫秒以下的服务)。
50.846s networking.service
1.872s smb.mount
717ms nftables.service
560ms ifupdown-pre.service
544ms systemd-logind.service
205ms systemd-journald.service
194ms dev-nvme0n1p2.device
88ms systemd-udev-trigger.service
83ms smbd.service
66ms libvirtd.service
61ms lvm2-monitor.service
60ms chrony.service
57ms user@0.service
50ms nmbd.service
Run Code Online (Sandbox Code Playgroud)
不过,执行 asystemctl stop networking.service和 只systemctl start networking.service需要不到 2 秒的时间。
这是我的 /etc/network/interfaces 供参考(br0 用于虚拟机):
# This file describes the network interfaces available on your system
# and …Run Code Online (Sandbox Code Playgroud)