Skip to content

feat: report R8's open and first read apart, and the memory at rest - #51

Open
psiha wants to merge 1 commit into
feat/resource-recordingfrom
feat/open-import-series
Open

psiha wants to merge 1 commit into
feat/resource-recordingfrom
feat/open-import-series

Conversation

@psiha

@psiha psiha commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Refs #25. Stacked on #50 (this PR's base is that branch, so the diff shows only this change; GitHub retargets it to main when #50 merges).

What

Opening a database gets its own numbers, and the memory at rest is recorded. All additive, and time is untouched.

  • R8 split. R8 keeps its total time (open, then the first read). It also reports openTime, firstReadTime and openRuns, measured at the boundary inside the same run. No timer is added around anything new.
  • Memory at rest. After R8's timed runs, one more untimed open gives resources.rssMB.afterOpen: the memory once the model is open.
  • --cached-open N (optional, R8 only). After the timed runs, opens the same files N more times, in the page cache, and reports cachedOpenTime, cachedFirstReadTime, cachedOpenRuns. Marked "not scored". These extra opens always stop the system, even when one fails.
  • --drop-caches (optional, R8 only). Empties the page cache after each R8 setup, before the open, and records pageCache as "dropped before each open" or "not emptied". It needs root or passwordless sudo. If it cannot, it says so at the start and R8 runs as before. The page cache belongs to the whole host, so the flag also empties it for every other process and for the tests after R8. The result records it as env.dropCaches, and the README says results with and without it are not comparable for those tests.

rssMB.afterOpen is taken before any read. The extra opens come after the test's readings (from #50), so its CPU, IO and peak memory do not include them.

Importing needs no new test: L1 is the import (and L2 and L3 are loads), time is its time, and #50 adds its memory, CPU, disk and IO. The runner README says so.

Blind spots it removes

R8 mixed the start of the system with the first read, and the page cache state was not recorded. The setup copies the snapshot and syncs just before the open, so the files are normally still in the page cache: R8 is cold for the process, not for the cache, unless --drop-caches is used. The README says so; it does not change how R8 is scored.

Schema

Additive, in R8's summary: openTime, firstReadTime, openRuns, pageCache, and with the flag cachedOpenTime, cachedFirstReadTime, cachedOpenRuns, cachedNote; plus resources.rssMB.afterOpen and env.dropCaches. The website, the scores and the other R8 work (R8 counted in the cold read score only) read time, which does not change.

How it was checked

On a Linux box, 10m, --quick, in a container, after the rebase onto #50:

  • RAMA (in the runner): --tests R8 --cached-open 2 --drop-caches: openTime + firstReadTime equals time, 2 cached opens are reported, afterOpen is present, the check is ok. The container could not empty the cache, so the warning was printed, pageCache said "not emptied" and env.dropCaches was false.
  • Earlier, on the previous revision: ClickHouse (a server) with 2 extra opens, and no server process left behind.

Not checked: --drop-caches where it is allowed (it would empty the cache of a shared machine), the new finally after a failed extra open, DuckDB and PostgreSQL, 100m and 1b, full-size R8 runs (3 repeats).

🤖 Generated with Claude Code

@psiha
psiha force-pushed the feat/resource-recording branch from 1450e3c to 2c741aa Compare November 3, 2026 23:34
@psiha
psiha force-pushed the feat/open-import-series branch 2 times, most recently from 01d8146 to ff0d92b Compare November 3, 2026 23:50
@psiha
psiha requested a max review from Copilot November 4, 2026 15:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request due to rate limiting. Please try again later. See Usage limits for GitHub Copilot for details.

R8 keeps its total time and also reports openTime and firstReadTime. After its timed runs, one untimed open gives rssMB.afterOpen, taken before any read. Optional --cached-open N reopens the same files, in the page cache, and reports them unscored. --drop-caches empties the page cache after each R8 setup (root or passwordless sudo, else it says so); it is machine-wide, so the result records it as env.dropCaches. The extra opens come after the test's readings and always stop the system. Additive: no existing field changes.

Refs #25

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@psiha
psiha force-pushed the feat/resource-recording branch from 2c741aa to f5af631 Compare November 5, 2026 10:10
@psiha
psiha force-pushed the feat/open-import-series branch from ff0d92b to 00af6df Compare November 5, 2026 10:10

This branch has not been deployed

No deployments
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.

2 participants