You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vivarium: start phases and pytest cases on separate guests in parallel, gated by host pressure and memory #1501
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.
Activity