Skip to content

B-Prod-P5: ForStRsBProdBenchmark — sync-phase + CfMode JMH harness#5

Open
jackylee-ch wants to merge 1 commit into
b-prod-p4-restorefrom
b-prod-p5-bench
Open

B-Prod-P5: ForStRsBProdBenchmark — sync-phase + CfMode JMH harness#5
jackylee-ch wants to merge 1 commit into
b-prod-p4-restorefrom
b-prod-p5-bench

Conversation

@jackylee-ch

Copy link
Copy Markdown
Owner

Summary

  • Adds ForStRsBProdBenchmark (Tasks 5.1 + 5.3) covering spec §16 acceptance bars: dbSnapshot() P99 < 100µs and sync-phase P95 < 1ms under 100 concurrent in-flight snapshots, plus single-CF vs per-state-CF point-lookup + sequential-put throughput.
  • Harness is JUnit @test methods (tagged @Tag(\"bench\")) so it inherits surefire's --enable-native-access plumbing without needing the JMH maven plugin. System-property knobs (bench.preload.entries, bench.preload.value.bytes, bench.inflight.snapshots, bench.measure.ops, bench.warmup.ops, bench.threads) cover preload-size scaling.
  • Companion writeup with full measurement tables + tuning playbook (Task 5.4) lives at docs/superpowers/specs/2026-05-10-bprod-bench-results.md on the ForSt repo (paired commit cd185591a).

Measured numbers (development host, Apple Silicon, JDK 25)

Bar Target 100 MiB state 1 GiB state Verdict
dbSnapshot() P99 < 100 µs 0.125 µs 0.458 µs PASS (200×+ headroom)
Sync-phase P95 < 1 ms 5.96 µs 12.71 µs PASS (78×+ headroom)
CfMode @ 1 GiB single-CF per-state-CF (4 CFs)
Sequential put 2.25 M ops/s 2.21 M ops/s
Point lookup 168.8 k ops/s 157.3 k ops/s

Recommendation: cf.mode = single default; use per-state-CF only when state classes have wildly uneven working sets that fit in cache (the 100-MiB cache-resident scenario in the writeup).

Test plan

  • mvn -B -pl flink-state-backends/flink-statebackend-forst-rs test -Dtest=ForStRsBProdBenchmark passes at default 100 MiB preload
  • -Dsurefire.module.config="... -Dbench.preload.entries=1048576" runs at 1 GiB preload (acceptance bars + CfMode workloads)
  • Checkstyle clean (mvn -B -pl flink-state-backends/flink-statebackend-forst-rs test-compile)
  • Re-run on disk-backed engine once dbOpenWithOptions lands in P7 (deferred per writeup §4.5)

🤖 Generated with Claude Code

…Mode JMH harness

Adds ForStRsBProdBenchmark covering spec §16 acceptance bars:

  * dbSnapshot P99 under 100 concurrent in-flight snapshots
    target <100µs; measured 0.125µs at 100 MiB / 0.458µs at 1 GiB (200×+ headroom)
  * Sync-phase P95 (snapshot + create_incremental_checkpoint_at + free) under
    same in-flight load; target <1ms; measured 5.96µs at 100 MiB / 12.71µs at 1 GiB
  * Single-CF vs per-state-CF (4 CFs) point-lookup + sequentialPut at 1 GiB
    state — within 7% on both ops; recommendation single-CF default

Harness pattern follows ForStRsFfmBenchmark (annotation-free + percentile
collection via long[] sort) but as JUnit @test methods so surefire's
--enable-native-access plumbing applies. Tagged @tag("bench") so a normal
mvn test run can exclude via -DexcludedGroups=bench.

System-property knobs:
  bench.preload.entries / bench.preload.value.bytes  — working-set size
  bench.inflight.snapshots                            — registry depth (default 100)
  bench.measure.ops / bench.warmup.ops                — iteration counts
  bench.threads                                       — concurrent-variant fan-out

Companion writeup with full measurement tables + tuning playbook lives at
ForSt-side docs/superpowers/specs/2026-05-10-bprod-bench-results.md
(paired commit on the ForSt repo).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant