8000 vivarium: report.json hides launch and teardown; guest launches run in series behind a per-guest host probe · Issue #1481 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

vivarium: report.json hides launch and teardown; guest launches run in series behind a per-guest host probe #1481

Closed

Description

@Lillecarl

Review findings S1, S2, S4 and S5 on #1444. Extends #1182 and A9.

  • S2: the boot clock starts after the process exists. All six boot steps of a six-guest run show at: 1.88. Teardown is not in the report.
  • S1: launches run one after another, about 0.3 s each. 140–175 ms of each is container.probe, tap_fails and scope, which repeat for every guest.
  • S4: teardown takes 18 s p50 for 5 or more guests. Of that, 7–9 s has no event.
  • S5: every phase pays 0.34–0.55 s to settle.

Fix, in this order:

  1. Record launch and teardown steps.
  2. Probe the host once per session.
  3. In a --no-control check, kill the guests after the final drain.
  4. Settle in parallel, and only when a reader needs it.

Assisted-By: Claude Opus 5.5

Activity

  1. added
    source: vivarium
    on Nov 17, 2026
  2. added theissue type on Nov 17, 2026
  3. Lillecarl commented on Nov 18, 2026

    @Lillecarl
    ContributorAuthor

    Landed (main "Lock the sources at nixidae b76c264"):

    1. Launch and teardown steps. The boot clock starts before the launch; launch and teardown steps; report.json is written again after the teardown. checks.report (new) fails on the old code: both guests' boots had at: 0.051.
    2. Probe once. container.Host keeps each probe's answer. checks.lan.container launches: 0.41/0.20 s → 0.22/0.012 s.
    3. Kill in a check. The new steps showed the reap was the teardown: 1.5-1.9 s per guest, and 20 s (the whole POWEROFF_GRACE) for both checks.k8s workers. A --no-control run now SIGKILLs its guests: reaps ≤ 0.3 s, checks.k8s 81 → 67 s. A run with a socket still powers off; checks.cleanup has a case for each, and the old code fails the new one.
    4. Settle in parallel. 0.03-0.08 s per settle, one run each. Most of the ~0.55 s is the journal path.

    Follow-ups: async launch #1495, fewer store mounts #1496.

    Needs a decision: settle only when a reader needs it. Each passed phase pays ~0.55 s to settle. Skipping that wait breaks the exact phase attribution drain promises: a line logged in a phase's last ~0.5 s is filed under the next phase, or none.

    • (a) Recommended: measure where the 0.55 s goes first. journald delays its change notification by 250 ms (POST_CHANGE_TIMER_INTERVAL_USEC, journald-manager.c:80), which is a candidate, not a measurement. Then shorten that path and keep exact attribution.
    • (b) Settle only on a failure, at a pause and at the end. Saves ~0.55 s per passed phase; loses exact attribution.
    • (c) Leave it.

    Assisted-By: Claude Opus 5.5

  4. added
    needs decision
    on Nov 18, 2026
  5. Lillecarl commented on Nov 18, 2026

    @Lillecarl
    ContributorAuthor

    Decided by measurement (2026-11-18): settle stays on every phase, and exact attribution stays.

    The ~0.5 s is the guest's journal stream: 0.30-0.49 s from systemd-cat to /artifacts/journal.jsonl inside the guest, against 0.05 s for the token's command. journald posts a change to journalctl --follow 250 ms after the first write. Skipping settle (b) would trade exact attribution for that time. A faster stream is the route that keeps both, and it is a redesign of the stream, so it has its own issue: #1500.

    Closing: the other four parts are landed.


    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

    needs decisionsource: vivarium

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0