8000 vivarium: start phases and pytest cases on separate guests in parallel, gated by host pressure and memory · Issue #1501 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

vivarium: start phases and pytest cases on separate guests in parallel, gated by host pressure and memory #1501

Open

Description

@Lillecarl

Direction from the maintainer (2026-11-18): speed comes from running more at once, not from shaving milliseconds off one path. Architecture, readability and maintainability come first.

Tests that run in separate guests do not share state, so they can run in parallel. What limits them is the host: memory and CPU. If the pytest plugin, and the phase scheduler, read the host's pressure (PSI: /proc/pressure/{memory,cpu,io}) and free memory, they can start more guests and cases while the host has room, and hold back when it does not. A fixed --serial or a fixed worker count then goes away.

Prior art in this repository: #776 (pynixd: an AIMD limit fed by PSI). The PSI trap from memory: a trigger fd is always readable; only POLLPRI means it fired.

Open points:

  • One limiter for both levels: phases on disjoint guests (phases.launchable), and pytest cases that each want their own guests.
  • How a test says which guests it needs, so cases on separate guests can overlap.
  • A guest's memory is a ceiling, not a cost (vm.host_memory_kib()), so the gate reads the host, not the sum of vivarium.memory.

Assisted-By: Claude Opus 5.5

Activity

  1. added
    source: vivarium
    on Nov 18, 2026
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