Skip to content

Record each model's peak memory in the database - #352

Merged
sjoelund merged 1 commit into
masterfrom
maxrss
Sep 7, 2026
Merged

Record each model's peak memory in the database#352
sjoelund merged 1 commit into
masterfrom
maxrss

Conversation

@sjoelund

@sjoelund sjoelund commented Sep 7, 2026

Copy link
Copy Markdown
Member

A new maxrss column per branch table holds the most resident memory the model's process tree held at one instant: omc, the compilers make runs beside it and the simulation executable added together, in bytes.

testmodel.py samples the tree through /proc//task/*/children and /proc//statm five times a second, about 0.6% of one core per running model, and floors the result with the kernel's exact peak of the largest single process (VmHWM before quit or kill, and RUSAGE_CHILDREN for what was reaped) so a spike between two samples is not lost.

sqlite migrates to user_version 5 and PostgreSQL gets the column with ADD COLUMN IF NOT EXISTS; older rows read 0.

Assisted-by: Claude Fable 5.1

A new maxrss column per branch table holds the most resident memory
the model's process tree held at one instant: omc, the compilers make
runs beside it and the simulation executable added together, in bytes.

testmodel.py samples the tree through /proc/<pid>/task/*/children and
/proc/<pid>/statm five times a second, about 0.6% of one core per
running model, and floors the result with the kernel's exact peak of
the largest single process (VmHWM before quit or kill, and
RUSAGE_CHILDREN for what was reaped) so a spike between two samples
is not lost.

sqlite migrates to user_version 5 and PostgreSQL gets the column with
ADD COLUMN IF NOT EXISTS; older rows read 0.

Assisted-by: Claude Fable 5.1
@sjoelund
sjoelund merged commit f0c8470 into master Sep 7, 2026
7 checks passed
@sjoelund
sjoelund deleted the maxrss branch September 7, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant