8000 vivarium: the journal stream lags 0.3-0.5 s behind journald, and every settle waits for it · Issue #1500 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

vivarium: the journal stream lags 0.3-0.5 s behind journald, and every settle waits for it #1500

Closed as not planned

Description

@Lillecarl

Each passed phase waits about 0.5 s in Session.settle. Measured on checks.lan (UML, 2026-11-18), eight rounds:

  • succeed("true"): 0.02-0.03 s. systemd-cat of the token: 0.04-0.06 s.
  • The token from systemd-cat to the host's journal.jsonl: 0.32-0.41 s. Inside the guest, to /artifacts/journal.jsonl: 0.30-0.49 s.
  • settle: 0.51-0.54 s.

So the time is the guest's stream, not the channel or the host's 20 ms poll. vivarium-journal runs journalctl --follow, which wakes when journald posts a change. journald coalesces those for 250 ms (POST_CHANGE_TIMER_INTERVAL_USEC, journald-manager.c:80). journalctl --sync after the token does not shorten it (0.48-0.50 s).

Possible route: journald's ForwardToSocket= (systemd 256+, guests run 261) sends each entry when it arrives, in the export format. A reader in the guest writes the same JSON lines. Open points: entries from before the reader starts (now --no-tail --boot gives them), and guests whose journal stream is modules/foreign-units.nix.

Gain: about 0.45 s per passed phase, with the exact phase attribution kept.


Assisted-By: Claude Opus 5.5

Activity

  1. added
    source: vivarium
    on Nov 18, 2026
  2. Lillecarl commented on Nov 18, 2026

    @Lillecarl
    ContributorAuthor

    Not planned (maintainer, 2026-11-18): speed must not cost architecture or readability. Replacing the journal stream with ForwardToSocket= plus a reader adds a moving part to save ~0.45 s per phase. Speed comes from running guests in parallel instead: #1501. The measurement above stays as the record.


    Assisted-By: Claude Opus 5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source: vivarium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0