Skip to content

Commit cbf575f

Browse files
committed
perf(os-image): start cocoon-agent without ordering dependencies
systemd-analyze critical-chain showed the agent blocked ~140ms on local-fs.target — pure ordering delay: sandbox-init hands over a fully assembled rootfs before PID 1 runs and /dev/vsock is devtmpfs.
1 parent 7b5f250 commit cbf575f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

os-image/base/install-agent.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ cat > /etc/systemd/system/cocoon-agent.service <<'EOF'
3737
Description=Cocoon agent (vsock command exec)
3838
Documentation=https://github.com/cocoonstack/cocoon-agent
3939
# Readiness signal for the whole sandbox: start as early as systemd allows.
40-
# vsock is compiled into the sandbox kernel; /dev/vsock exists via devtmpfs.
40+
# No After= at all: sandbox-init hands over a fully-assembled rootfs before
41+
# PID 1 runs and /dev/vsock is devtmpfs — measured, waiting for
42+
# local-fs.target cost ~140ms of pure ordering delay on the critical chain.
4143
DefaultDependencies=no
42-
After=local-fs.target
4344
Before=basic.target
4445
4546
[Service]

0 commit comments

Comments
 (0)