2
1
While running systemd-analyze critical-chain
I noticed that the Samba daemon is on the path to user login. Although I would like Samba to start automatically on boot, I don't care if it happens before or after I log in.
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 @13.587s
└─multi-user.target @13.587s
└─smbd.service @11.231s +2.355s
└─network.target @11.230s
└─netctl-auto@wlp4s0.service @10.302s +927ms
└─basic.target @9.496s
└─sockets.target @9.496s
└─pcscd.socket @9.496s
└─sysinit.target @9.461s
└─systemd-timesyncd.service @9.397s +63ms
└─systemd-tmpfiles-setup.service @9.201s +128ms
└─local-fs.target @9.199s
└─windows.mount @8.396s +802ms
└─dev-disk-by-uuid-E200B0E200B0BF3B.device @8.362s
Taking a look at the unit file, it declares WantedBy=multi-user.target
. I figured I could switch this target with some alternate target to get Samba off the critical path. However, I don't know which target to use.
systemctl cat smbd.service
# /usr/lib/systemd/system/smbd.service
[Unit]
Description=Samba SMB/CIFS server
After=network.target nmbd.service winbindd.service
[Service]
Type=forking
PIDFile=/var/run/smbd.pid
ExecStart=/usr/bin/smbd -D
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target