Skip to content

Give both stores the same cache budget - #40

Merged
venkat1701 merged 3 commits into
mainfrom
feat/bench-cache-budget
Oct 4, 2026
Merged

venkat1701 merged 3 commits into
mainfrom
feat/bench-cache-budget

Conversation

@venkat1701

Copy link
Copy Markdown
Collaborator

Closes #32

Adds --cache-mb (CACHE_MB in run.sh):

  • HyperGraphDB: setCacheSize on the JE environment, exactly that many bytes
  • HStore: a node cache of budget / pageSize nodes

Without the option both keep their current defaults, so existing results stay comparable. Runs with a budget go to a -cache-<mb> results directory, and the report's Caches line says what each store was given.

Two things can't be matched exactly, and the docs say so:

  • A decoded node can take more or less heap than its page.
  • HyperGraphDB's own atom and incidence caches can't be capped in bytes; they shrink under memory pressure.

The retained-heap line from #39 shows what each store really kept.

Smoke run at scale 1, async, CACHE_MB=64, so the data (95 to 250 MiB on disk) doesn't fit:

  • Checksums agree on every workload.
  • Retained heap: HStore 45 MiB, HyperGraphDB 121 MiB.
  • HStore loses most on read.members (113k down to 57k ops/s). Incidence reads barely change.

The docs also note that the OS page cache will usually still serve these "misses" from memory, unless the data is bigger than the machine's free RAM.

--cache-mb sets JE's cache to exactly that many bytes and sizes HStore's
node cache as the budget divided by the page size. Without it both keep
their current defaults.
@venkat1701
venkat1701 merged commit 5314d0e into main Oct 4, 2026
@venkat1701
venkat1701 deleted the feat/bench-cache-budget branch October 6, 2026 00:54
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.

Benchmark caches are not the same size

1 participant