Repository navigation
OAK-12426 : benchmark document cache implementations - #3174
rishabhdaim wants to merge 1 commit into
Conversation
TL;DR
Benchmark resultsDocumentNodeStore — sustained operations256 MiB total memory cache (NODE 87.04 MiB; LOCAL_DIFF 38.4 MiB), 10k total data nodes, 100 children/group, one-second background work, persistence enabled, Java 17, 2 GiB heap. 10s warm-up + 20s measurement, two separate JVM repetitions per workload/mode; medians below. Setup/warm-up are untimed; measured stores are fresh. These completed all-Caffeine controls match the production selection after removal of the exception. MemoryDocumentStore + EmptyHook excludes remote database latency and application/index hooks. Throughput, ops/s. M = million; k = thousand.
16/24 MiB checks are memory-pressure diagnostics below the default budget; Caffeine writes lagged there. They are excluded from the main comparison. Direct NODE-cache microbenchmarkUnchanged three-run medians; median ratios across matched cases. Synthetic 10k-entry NODE budget, 512-byte values, 200k warm-up operations and 2M measured operations per case.
Ratios above 1 favour the numerator. ASYNC won 2/40 cases against SYNC and triggered maintenance-pool inline fallback in all three runs. |
|
Implementation based on these benchmark results is available in #3176. It enables Caffeine by default behind a rollback feature toggle and raises the default document-cache allocation by 25% to 320 MB. |
25aa31e to
2a61b6a
Compare
377cbe1 to
f25e877
Compare
75e7380 to
12f14df
Compare
12f14df to
164aa72
Compare
f342c8a to
de9bef9
Compare
de9bef9 to
b98be23
Compare
b98be23 to
750d84e
Compare
750d84e to
532aca0
Compare
c0f720f to
e0387ca
Compare
a5fd792 to
bd56aee
Compare
f38a471 to
bf19477
Compare
|
384 MiB (+50%), 10s warm-up + 20s measurement, two-run medians in LIRS/SYNC/ASYNC ops/s order: 10k nodes — reads 2.86M/3.70M/3.22M, saves 6.43k/9.08k/3.94k, saves+diff 6.11k/6.72k/4.10k; 120k nodes — reads 136.4k/163.6k/127.5k, saves 5.62k/7.86k/3.30k, saves+diff 5.35k/2.99k/2.41k (120k SYNC diff range: 2.49–3.50k ops/s). |
bf19477 to
944528e
Compare
bc21fca to
db79ecc
Compare
29a7357 to
de71edb
Compare
de71edb to
237b0f2
Compare
237b0f2 to
8b6cb1e
Compare
d6c2549 to
e91364c
Compare
|
@rishabhdaim do you have also benchmark results from a real-life environment, and not only by these synthetic tests? |
@joerghoh No, I don't have that. |
| } | ||
| maximum = (long) scaled; | ||
| } | ||
| File directory = config.persistent ? Files.createTempDirectory("oak-document-cache-benchmark-").toFile() : null; |
| StatisticsProvider statistics = new DefaultStatisticsProvider(statisticsExecutor); | ||
| IllegalStateException failure = null; | ||
| try { | ||
| directory = persistent ? Files.createTempDirectory("oak-document-repository-benchmark-").toFile() : null; |
Co-Authored-By: OpenAI Codex <noreply@openai.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|




Benchmark CacheLIRS, Caffeine SYNC and opt-in Caffeine ASYNC through production DocumentNodeStore caches, including LOCAL_DIFF. Keep direct-cache measurements separate from repository reads, traversal, saves, explicit diffs, concurrency and persistent-cache reopen.
Runs verify data and effective cache policy, and report completed operations, elapsed time, phase costs, cache statistics and backend reads. Warm-up, duration, cache size and folder width are configurable. Errors retain the workload context and preserve cleanup failures as suppressed exceptions. MemoryDocumentStore and EmptyHook exclude remote database latency and application/index hooks.
256 MiB results and direct-cache comparison · 384 MiB results at 10k/120k nodes.
Validation: the full 37-test module suite passed with Java 17 in isolated CacheLIRS, Caffeine SYNC and Caffeine ASYNC JVMs. Scenario methods and shared store cleanup have full line/branch coverage. Packaging and license checks passed.
OAK-12426. Depends on #3190.
Co-Authored-By: OpenAI Codex noreply@openai.com