rishabhdaim commented on PR #3174:
URL: https://github.com/apache/jackrabbit-oak/pull/3174#issuecomment-5886471110

   ## Final benchmark results
   
   Command (three full JVM runs; table uses medians):
   
   ```
   java -Xmx2g -Ddocument.cache.threads=8   -jar 
oak-benchmarks/target/oak-benchmarks-2.7-SNAPSHOT.jar   benchmark 
DocumentCacheBenchmark Oak-MemoryNS
   ```
   
   Configuration: 10,000-entry equivalent cache weight, 2,000,000 measured 
operations per scenario, fixed seed 42. Warmup and measurement now use the same 
cache; reported statistics are measurement deltas.
   
   | Scenario | Working set / cache | Caffeine throughput vs LIRS | Hit-rate 
delta | Backend-load ratio |
   |---|---:|---:|---:|---:|
   | Steady state | 0.5x | 0.88x | +0.00 pp | n/a (warm) |
   | Steady state | 1.0x | 1.41x | +0.35 pp | 0.01x |
   | Steady state | 2.0x | 1.13x | +0.16 pp | 0.99x |
   | Churn | 0.5x | 1.18x | +0.00 pp | n/a (warm) |
   | Churn | 1.0x | 1.28x | +2.18 pp | 0.00x |
   | Churn | 2.0x | 1.09x | -4.30 pp | 1.11x |
   | Invalidation | 0.5x | 0.62x | +0.00 pp | 1.00x |
   | Invalidation | 1.0x | 0.61x | +0.32 pp | 0.95x |
   | Invalidation | 2.0x | 0.99x | -1.64 pp | 1.09x |
   | Concurrent | 0.5x | 3.40x | +0.00 pp | n/a (warm) |
   | Concurrent | 1.0x | 3.92x | +0.34 pp | 0.01x |
   | Concurrent | 2.0x | 1.36x | +1.44 pp | 0.88x |
   
   ### Sizing result
   
   At the problematic 2.0x working set, giving Caffeine 10% more weight removes 
nearly all of the churn hit-rate/backend-load regression. At 25% more weight, 
Caffeine improves churn hit rate by about 8 percentage points and reduces 
backend loads by about 21% versus same-sized CacheLIRS. Extra capacity does not 
eliminate the single-thread explicit-invalidation CPU overhead.
   
   ### Recommendation
   
   Proceed with Caffeine behind the default-enabled 
`FT_CAFFEINE_CACHE_OAK-12425` rollback toggle. Its concurrent throughput and 
cache-sized admission behavior are materially better, which is more 
representative of a shared DocumentNodeStore cache. Start with a 10% higher 
total document-cache allocation when memory headroom permits, monitor hit 
rate/backend reads, and use 25% only if production working sets routinely 
exceed cache capacity. Keep the toggle until production telemetry confirms 
invalidation-heavy workloads are acceptable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to