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: read current memory use from the operating system instead of the last garbage collection #7873
Adaptive parallelism (#7871, PR #7872) decides whether memory is under pressure from GC.GetGCMemoryInfo(). The runtime updates that reading only at a garbage collection, and it is zero before the first one. When tests start memory-heavy child processes or containers while the test process itself allocates little, the reading is out of date: the limit can be raised while the machine is short of memory, or keep being lowered after the pressure has gone.
Proposal
Read current memory use from the operating system at each sample, and keep the runtime's reading as the fallback:
Linux: MemAvailable from /proc/meminfo, and the cgroup memory limit and usage when the process runs in a container.
Windows: GlobalMemoryStatusEx.
macOS: the kern.memorystatus_vm_pressure_level sysctl.
When no reading is available, the policy should not treat that as headroom for raising the limit.
Where
AdaptiveParallelismController.ReadMemoryLoad in src/TUnit.Engine/Scheduling/AdaptiveParallelismController.cs. The limitation is described in docs/docs/execution/parallelism.md under Adaptive Parallelism; remove that paragraph when this is done.
Activity
fix(engine): address review of adaptive parallelism
feat(engine): make every adaptive limit change a throughput-verified …
feat(engine): opt-in adaptive parallelism driven by machine load and …