Repository navigation
Conversation
Testers could not use the gate daily without memory figures, and a memory pile-up took a 3090's Windows down twice. The parser now reads the runtime's memory line and video memory line (every 5 s in builds with diagnostics) and writes a memory block: the private bytes at their most and when, the most of them in physical memory, the least the PC had left to commit and when, the card's video memory in use at its most and when with the budget then, the seconds over that budget, and the most shared memory in use. The video memory is what the system counts for the process, so it works on any card. The five runtime strings it reads join the contract test.
…ORY-STOP) A memory pile-up has taken a PC's whole Windows down, not only the device, and a fixed 80 GB cap never triggers on a PC with a 40 GB commit limit. The supervisor now asks `game_gate.py state` for a memory stop, read from the runtime's latest memory lines: the game's private bytes past -StopPrivateMB (default 90 % of this PC's commit limit), the PC under -StopCommitLeftMB left to commit for 20 s (default the larger of 128 MB and 0.25 % of the limit), or video memory over the system's budget for -StopOverBudgetSeconds (60). 0 turns one off. The run then stops the same clean way, with the reason `memory`; the limits go into run.json and the summary, the limit passed into `stop.memory_why`, and the verdict is FAIL `memory_stop`. `start` forwards the limits to the detached run.
With a large page file the commit limit is far above what a PC survives: two Windows crashes (0x10E) came at about 100 GB private on a PC with 64 GB of memory and a 175 GB limit, where 90 % of the limit is 158 GB. The default is now the lower of 90 % of the commit limit and 1.25 x the physical memory (80 GB there, 36 GB here); the video memory stop stays on by default.
…TE-MEMORY-SERIES) Testers read a pile-up by its slope and by the reaper's queue, which the summary's peaks do not show. The parser now also reads the runtime's census line written with each memory line (objects let go that wait for their submissions, and the reaper thread's queue) and writes memory.csv beside summary.json: one row per memory line with the private bytes, the PC's memory free and left to commit, the card's video memory budget and in use, the shared memory in use and the two queues. The summary's memory block gets the reaper queue at its longest and when, the most objects waiting, and the least-squares slope of the private bytes in the world (MB a minute). The census strings join the contract test.
|
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12, head MEASURED
READ IN CODE
ASSUMED
AI-assisted: Claude Code |
|
Verified on Windows with the control: the suite fails when Cherry-picked onto
So the new cases are tied to the new code and not to fixtures the file already had. They add to the same suite that #2805, #2804 and #2810 touch, and all five together are consistent - I have now run every one of them. It applies on What I could not test: the PowerShell side ( AI-assisted: yes - DeepSeek v4.1 (flash), applied and ran both arms on the machine above. Written with an AI assistant. |
KelboLive
left a comment
There was a problem hiding this comment.
Tested on Windows / Python 3.12; python -I tests/test_game_gate.py is 27 tests, OK. A synthetic 8-sample run gives one row per memory line with the documented header (70.0,1000,500,15000,4000,8000,7000,500,0,0), LF only and no BOM, every column equal to the log's integer MB with no rescale, and the summary's private_max, reaper_queue_max / _at_s, waiting_objects_max, vram_in_use_max all equal the CSV maxima; the slope recomputes from the CSV (600.0 vs 600.0 on mine). A one-sample run gives one row and slope: null with no division, and a run without memory lines writes no memory.csv.
Two things before merge, both documentation-truth:
docs/game_gate.md:105still lists "A time series beside the summary (memory, census, reaping queue)" under## Not in this version, which is exactly what this PR adds;:107("VRAM and RAM peaks") is stale from #2810. No test reads that list, so CI will not catch it.summary.memory.vram_in_use_max_mbcounts every video line (tools/game_gate.py:457), including the swap-chain ones (host.rs:13100,:13485,:13607), whilememory.csvsamples only the video line nearest each memory row (:410). A verifier can see a peak insummary.jsonwith no matching row — I reproduced it (CSV cell empty, summary 7777). Document the distinction or emit the peak's sample row.
Minor: write_series (:419-423) returns before unlinking an existing memory.csv, so re-summarizing a folder whose log lost its memory lines leaves series: null beside stale rows; and the test at tests/test_game_gate.py:322-328 only asserts the summary side of "no memory lines gives no series", never that no file is written (it calls summary(), not main()). Docs also omit reaper_queue_max_at_s / waiting_objects_max from the field table and never list the CSV header.
Merge picture: this branch already contains #2810 and #2812, and every order of the three merges cleanly on 86c30fcea with identical final trees and additive summary.json keys. Landing order I would use is #2810 -> #2812 -> #2813.
|
Thanks @KelboLive. Confirmed: To keep this verified head unchanged, I will fix it in a follow-up pull request after the merge: remove the old file when there are no rows, with a test for that case. |
Claimed in the coordination issue as: D3D12-GATE-MEMORY-SERIES (#2570 (comment))
Depends on: #2810, #2812 (this branch holds their commits and will be rebased on
mainonce they are merged)What and why
Testers read a memory pile-up by its slope and by the reaper's queue. The peaks of #2810 show neither, so they kept a sampler of their own beside each run. This is the third of the three memory PRs for the gate.
tools/game_gate.pyalso reads the runtime's census line. The runtime writes it with each memory line, every 5 s, in builds with diagnostics. It carries the objects let go that wait for their submissions, and the objects handed to the reaper thread and not let go yet: the reaper's queue.summarywritesmemory.csvbesidesummary.json, one row per memory line. Each row has: time, private bytes, those in physical memory, the PC's memory free and left to commit, the card's video memory budget and in use, the shared memory in use, and the two queues. A run without memory lines writes no file.memoryblock gets:series, the file's name.docs/game_gate.mddescribes the file and the new fields.Tested
On Windows 11 Pro 10.0:
tests/test_game_gate.py: 27 tests OK. The new ones fail with gate: a memory stop ends a run before memory runs out (D3D12-GATE-MEMORY-STOP) #2812's parser. They cover:summarywrites 76 rows with the right columns and last values;test_tool_stdout_encoding.pyandscripts/check_no_game_data.pyon the changed files are clean.GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)