Repository navigation
Commit ed8e4cb
Limit the memory of a dockerized test job (#317)
test.py caps the address space of one test at a time, so nothing bounds
the sum of the tests it runs in parallel. That is worst for wasm-jit,
whose tests are allowed 16 GB of address space each because the JIT
reserves ~4 GB of it per wasm memory.
Cap the container the job runs in with `docker run --memory=N
--memory-swap=N`, N = 85% of the node's RAM, since these jobs are pinned
to the high-memory nodes. A cgroup limit charges memory in use rather
than address space, covers every process test.py spawns, and on a breach
the kernel kills the greediest omc - so a model can now fail because of
a model tested in parallel with it, which the log makes visible: the
limit is printed before the run and the peak plus the OOM kill count
after it.
Only the targets that build their own image (wasm-jit today) get this;
the jobs running directly on a node are unchanged.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent cb514ad commit ed8e4cb
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
601 | 613 | | |
602 | 614 | | |
603 | 615 | | |
| |||
713 | 725 | | |
714 | 726 | | |
715 | 727 | | |
| 728 | + | |
716 | 729 | | |
717 | 730 | | |
718 | 731 | | |
719 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
720 | 739 | | |
721 | 740 | | |
722 | 741 | | |
| |||
956 | 975 | | |
957 | 976 | | |
958 | 977 | | |
| 978 | + | |
959 | 979 | | |
960 | 980 | | |
961 | 981 | | |
| |||
0 commit comments