Skip to content

image: logind's varlink socket early; login-lane's diagnostic rows - #281

Merged
aledbf merged 3 commits into
mainfrom
lane-diag
Nov 19, 2026
Merged

aledbf merged 3 commits into
mainfrom
lane-diag

Conversation

@aledbf

@aledbf aledbf commented Nov 19, 2026

Copy link
Copy Markdown
Member

boot:login-lane's diagnostic rows (SPIN_LANE_DIAG=1: sshd at DEBUG1, logind at debug, each boot's journal with offsets from accept) explain the first login's own ~130 ms:

  • Before authentication (~55 ms): PID 1 starting sshd@ takes ~11 ms, OpenSSH 10's three execs (sshd → sshd-session → sshd-auth) ~12, and loading PAM's modules cold 8.3, against 0.9 at the second login. ML-KEM is 3.5.
  • PAM's session → logind (~29 ms): logind was not running yet. Its Varlink socket kept its default dependencies, so logind waited behind sysinit.target and udevd, ready ~230 ms into the boot (boot:waits TARGET=systemd-logind.service). The second login's hop is 1 ms.

systemd-logind-varlink.socket.d/20-lane.conf drops the socket's default dependencies, as 10-lane.conf already does for the service. Bench fleet, v20261119.01, 20 boots of each, interleaved (labs 44558035927, 44558053261):

first login accept → login PAM → logind
as this branch 332/355 131/137 24.5/41.8
logind's socket early 328/337 120/128 15.8/22.7

The p95 gains most. The p50 moves little because logind starting sooner takes the CPU sshd was starting on. Masking modprobe@drm added nothing (327/345) and is in docs/log.md §4.

  • image/build.sh asserts the drop-in, as it does the lane's others.
  • boot:ssh-first puts it in the "as this branch" row.
  • boot:logind passes on the built image.

🤖 Generated with Claude Code

aledbf and others added 3 commits November 19, 2026 12:59
SPIN_LANE_DIAG=1 replaces the rows with sshd at LogLevel DEBUG1 and
logind at debug, and prints the first boots' journal lines with their
offsets from accept: which step the ~55 ms before authentication and
the ~29 ms before logind's new session are made of. Logging inflates
what it logs; these say what a hop is, not what it costs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lane's drop-in took logind's default dependencies away, not its
varlink socket's: logind was ready ~230 ms into the boot, behind
sysinit.target and udevd (lab 44557605832), and the first login's
pam_systemd waited ~32 ms for it (lab 44557162195). SPIN_LOGIND_EARLY=1
adds the socket without default dependencies, and that with
modprobe@drm masked, which logind is ordered after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lane took logind's default dependencies away, not its Varlink
socket's, and the service waits for its socket: logind was ready ~230 ms
into the boot behind udevd, and the first login's pam_systemd waited
~32 ms for it. Without them, 20 boots of each on the bench: that hop
24.5/41.8 -> 15.8/22.7 ms, the first login 332/355 -> 328/337. build.sh
asserts the drop-in like the lane's others; the experiment rows go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit ed90af7 into main Nov 19, 2026
3 checks passed
@aledbf
aledbf deleted the lane-diag branch November 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant