matrix: a run that wanted RAM sizes the next at twice its reservation

At b216007f0a the rt suite on ms01 was killed at 3 GiB and then at 5 GiB, and
on the UHD 630 at 4 GiB and then 6 GiB: each rt test device makes a 256 MiB
Private and a 256 MiB Shared block, at nextest's default parallelism (20 on
ms01, 12 on the mini), all in system memory on an integrated GPU. 1.5x per
step takes two lost legs to get there; 2x takes one, and the next measured run
brings the size back to 1.3x its peak.

Verified: the script parses; arithmetic read against jobs m3-max-41113,
41148 (ms01) and 41115, 41116 (UHD 630).
This commit is contained in:
Anees Iqbal committed 2026-11-17 08:02:10 -08:00
1 parent 064bc60f0c
commit 8a07d62b97
1 file changed
+2 -2
+2 -2
View File
@@ -324,13 +324,13 @@ class Run:
def size(self, kind, node):
"""RAM and timeout from this kind's last measured runs on NODE: 1.3x the peak (a run that
peaked at its reservation keeps it; one that ended for want of RAM gets 1.5x), and 1.5x the
peaked at its reservation keeps it; one that ended for want of RAM gets 2x), and 1.5x the
longest, never below the kind's default: an incremental run's minutes say nothing of a full
rebuild's."""
ram, minutes = DEFAULTS[kind]
runs = self.stats.get(f"{kind}@{node}", [])[-3:]
if runs:
ram = max(math.ceil(r["ram"] * 1.5) if r["killed"] else
ram = max(2 * r["ram"] if r["killed"] else
r["ram"] if r["peak"] >= 0.95 * r["ram"] else math.ceil(r["peak"] * 1.3 + 0.5)
for r in runs)
minutes = max(minutes, math.ceil(1.5 * max(r["minutes"] for r in runs)))