8000 vivarium: stage 1 costs QEMU and krun guests about 3.8 s, with an idle 1.00 s inside · Issue #1482 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

vivarium: stage 1 costs QEMU and krun guests about 3.8 s, with an idle 1.00 s inside #1482

Closed

Description

@Lillecarl

Review findings S3 and the S6 root-image note on #1444.

  • From the initrd banner to "Welcome": p50 3.89 s on QEMU (n=1,066) and 3.75 s on krun (n=77).
  • The gap from "Mounting /sysroot" to "Mounting /sysroot/nix" is 1.00 s, with a p90 of 1.02 s. The cause is unmeasured.
  • fsck checks a disk that every run creates fresh.
  • The root image holds about 17 MiB of content in a 512 MiB NAR. That costs 0.55 s to hash and a rebuild on every closure change.

Fix:

  • fileSystems."/".noCheck = true.
  • Boot once with initrd debug logging to find the 1.00 s.
  • Build the image at its content size and grow it at launch.

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

    The 1.00 s is systemd's mount rate limit. With debug logging in the initrd, the mount monitor enters its rate limit at 2.79 s and leaves it at 3.68 s. sysroot.mount is held back until it leaves (mount_subsystem_ratelimited, src/core/mount.c). The initrd changes the mount table 22 times, and the default burst is 5 per second.

    From the initrd banner to "Welcome" on lan.qemu, 3 runs of 2 guests each:

    • before: 3.78-4.47 s;
    • noCheck alone: 3.80 s (the rate-limit hold also covered fsck);
    • noCheck plus SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=50: 2.35-2.77 s.

    The image at its content size is #1497.


    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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0