From 8a07d62b9794e00ec618c691fff743bf99402d00 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Tue, 17 Nov 2026 08:02:10 -0800 Subject: [PATCH] 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). --- scripts/matrix/matrix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/matrix/matrix b/scripts/matrix/matrix index e9db9f624..339aa6081 100755 --- a/scripts/matrix/matrix +++ b/scripts/matrix/matrix @@ -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)))