Commit Graph
4 Commits
Author SHA1 Message Date
Hasan BasbunarandClaude Opus 5.5 3fe1188a4d cpu-hogs: no separator a reader splits on, cgroups read as bytes, and bench.sh says why it failed
printable() let U+2028 and U+2029 through, which str.splitlines() in bench.sh takes for line ends: a busy process whose name held one vanished from the report, which then claimed a quiet box (code review, 2026-10-26). Anything not printable becomes a space now. cgroup() read /proc/<pid>/cgroup as strict text, the failure fixed for stat in df39e91: it reads bytes too. bench.sh threw away a failing cpu-hogs.py's output, so a window out of 0.5 to 60 s or a crash read only as "cpu-hogs failed (exit 2)": its last line is given now. And tests/test_bench_median.py runs bench.sh with the docker that lists no container, as the other two do. Three checks fail on the previous code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:14:43 +01:00
Hasan BasbunarandClaude Opus 5.5 d934f5c145 cpu-hogs: a name cut inside a character, a window of 0.5 to 60 s, tests that ask no docker
The kernel cuts a process name at 15 bytes, in the middle of a character if it must, and /proc/<pid>/stat was read as strict UTF-8: one such process anywhere on the box made every bench.sh run say cpu-hogs failed (code review, 2026-10-26). It is read as bytes now, and a stat file cut short is skipped. A window of 0 turned one clock tick into several cores, and nan or inf crashed: the window is 0.5 to 60 s, or the call fails, which bench.sh reports as not proven. The offline suite asks no docker (TESTING.md): the tests put a docker that lists no container first on PATH, and the floor of their spinning process is a tenth of a core, which a loaded runner gives it too. Two tests fail on the previous cpu-hogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:14:43 +01:00
Hasan BasbunarandClaude Opus 5.5 d86d8e0a69 bench.sh names a busy process, never prints its command line
bench.sh's report gets pasted in public, and another process's command line can hold a token (hf download --token, a URL with credentials, an agent's --api-key): it now prints a busy process's pid, name and share of a core, and points to cpu-hogs.py for the command lines, on the box. cpu-hogs.py prints one clean line per process: a tab in an argv split its line and the process vanished from bench's report, which keeps lines of four fields, and an escape sequence in an argv reached the terminal. Both tests fail on the previous code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:14:43 +01:00
Hasan BasbunarandClaude Opus 5.5 5d1968d885 bench.sh: it names what holds a CPU core before it measures (cpu-hogs.py)
On a GB10 the CPU and the GPU share one power budget, so a process that spins a core lowers what
the engine measures, and shows only as a load average: on another DGX Spark, in October 2026,
three command-line calls that old sessions had left behind each held a core for four to six days.
bench.sh now takes one window (3 s, HOGS_WINDOW) while the engine waits for its first request,
names every process outside the engine at half a core or more, with its share and its command
line, and its greedy median says how many there were. The lanes' containers (docker names
qwen38-*) are the engine and are left out. cpu-hogs.py does the reading, from /proc, and prints
one tab-separated line per process: the cockpit will read the same.

On the reference box on 2026-10-24, nothing outside the engine held half a core. Tests:
tests/test_cpu_hogs.py (two readings, the busiest first, a process seen once left out, a name with
spaces and parentheses, a spinning process named and a sleeping one not), and
tests/test_bench_lane.py, whose three new checks fail on the old bench.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:26:27 +02:00