TailCache 05: add persisted mode and mixed workload matrix - #4
Open
Enixes wants to merge 8 commits into
Open
Conversation
Enixes
force-pushed
the
tailcache-05-workloads-persistence-concurrency
branch
from
September 12, 2026 18:35
19b8ab0 to
d98be0f
Compare
Enixes
marked this pull request as ready for review
September 13, 2026 18:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
TailCache 05 expands the validated operation-level harness into a controlled mixed-workload matrix while carrying forward the post-merge TailCache 04 peer-review hardening.
TailCache 04 peer-review follow-up
-Dchronicle.analytics.disable=trueallowSegmentTiering=truemaxBloatFactor(1.0)as a guarantee that segments never tierThe hardened Chronicle adapter/operation-level harness was revalidated successfully on revision
d98be0f34202d7bb3421d6d2c692741db6fc6501.Primary backend/storage modes
CAFFEINECHRONICLE_IN_MEMORYCHRONICLE_PERSISTEDPersisted Chronicle uses
createPersistedTo(...)with a unique trial-local temporary file. The workload prepopulates outside measurement; teardown closes the map and explicitly deletes the file/directory. The adapter itself does not delete persisted data, and a unit test verifies that data survives close/reopen.Chronicle's normal checksum semantics are frozen explicitly: in-memory maps use
entryChecksums=false, persisted maps useentryChecksums=true. Persisted-vs-in-memory is therefore treated as a deployment-mode comparison, not a pure mmap-only cost comparison.Workload matrix
UNIFORM,ZIPFIAN0.99(same numeric constant as YCSB's default Zipfian generators; TailCache does not claim trace equivalence)READ_95_WRITE_5,READ_70_WRITE_300x5EEDKey selection and operation selection use separate deterministic random streams, so changing the read/write ratio does not silently change the logical key sequence. Read counts are exact over each complete generated trace; a time-limited JMH measurement window can stop part-way through a trace cycle.
Every mixed read is a hit against the prepopulated resident working set and every mixed write is an existing-key
put. Uniform vs Zipfian therefore studies locality/hot-key contention, not admission/eviction/hit-rate behavior.Replacement values are preallocated per logical key to remove value allocation from the measured put path. Repeated puts to the same key may therefore become logically idempotent. The replacement bank is also a live heap shadow set for Chronicle, so this matrix is for latency/contention and must not be used to claim Chronicle heap/GC savings.
Shared-cache concurrency
The mixed workload deliberately uses:
CacheWorkloadState->@State(Scope.Benchmark)for one cache shared by all workersWorkloadCursorState->@State(Scope.Thread)for one cursor per workerPeer review moved thread-index lookup, trace-size lookup, and initial-offset calculation into
@Setup(Level.Iteration). The measured path now only advances/wraps the initialized cursor before trace/key lookup and the selected cache operation.This makes the 16-thread smoke a same-JVM shared-cache contention experiment under a staggered shared deterministic trace model. It is not 16 independently generated client streams. The older
CacheSmokeBenchmarkremainsScope.Threadand must not be reinterpreted as shared-cache contention by merely raising its thread count.Two-JVM persisted sharing remains a separate secondary experiment.
Diagnostic tasks / config export
Adds:
Both are deliberately short 1/1/1, 300 ms diagnostics. Each expands 3 storage modes x 2 payload sizes x 2 distributions x 2 mixes = 24 parameter combinations.
JMH JSON is retained at:
Validation status — COMPLETE
A complete validation bundle passed on executable revision
d98be0f34202d7bb3421d6d2c692741db6fc6501:./gradlew test --rerun-tasks ./gradlew jmhSmoke ./gradlew jmhChronicleAllocSmoke ./gradlew jmhChronicleJfrSmoke ./gradlew jmhWorkloadSmoke ./gradlew jmhWorkloadShared16SmokeConfirmed there:
allowSegmentTiering=truewas loggedentryChecksums=false; persisted loggedentryChecksums=truestateScope=Benchmark(shared-cache)After that run, peer review removed thread-index/trace-size initialization from the measured mixed-workload path. The required narrow rerun then passed on revision
a547f5d1bc735c6d47afff171c96feec10ea025a:./gradlew test --rerun-tasks ./gradlew jmhWorkloadSmoke ./gradlew jmhWorkloadShared16SmokeConfirmed again:
stateScope=Benchmark(shared-cache)and wrote 24 JSON benchmark recordsNo additional Chronicle allocation/JFR rerun was required because the final hardening touched only mixed-workload cursor plumbing, not the Chronicle adapter or
CacheSmokeBenchmark.Methodology guardrails
/tmpis acceptable for smoke only; reportable persisted runs need a configurable benchmark root plus filesystem/mount/device metadatamaximumSizeand Chronicleentriesoccupancy semantics still need to be frozen before reportable runsTailCache 05 is validated and merge-ready. Reportable benchmarking remains blocked on the trustworthy-harness controls in Milestone 1.