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
Adaptive parallelism: limit parallel tests by projected memory use, before memory pressure appears #7896
With --adaptive-parallelism, the parallel test limit comes down for memory only after the machine is already nearly out of memory (95% in use). Tests that each start a large process, such as a headed browser at about 4 GiB per test, can exhaust memory before the limit reacts. Such suites still need a fixed --maximum-parallel-tests, which is what adaptive parallelism is meant to make unnecessary.
Proposal
Estimate the memory one running test uses (the change in memory in use divided by the change in running tests, measured as the limit moves or as tests start), and do not admit more tests than the available memory can hold at that estimate. The limit would then stop rising before pressure appears, instead of halving after it.
Open point
Whether --adaptive-min-parallel-tests 1, added in 1.88.2, already reacts fast enough for these suites has not been tested. A run of a memory-heavy suite with that setting would show whether this is needed.
Activity