VOPR-simulation harness for posts — load profiles + adaptation + memory measurement #14

Open
opened 2026-06-23 08:08:15 +00:00 by sscoble · 0 comments
Owner

Why

Deployment shape (replica count, pod size, memory budget) is deferred to simulation (posts#1, Q13 + Q7). This is the harness that produces the data.

File

tests/vopr/harness.go (new — VOPR-style simulation)

Profiles to exercise

  • Cold start — empty store, ramp to 100 rps over 60s
  • Burst — 10k writes in 1s, then idle for 60s
  • Sustained high — 1k rps for 10 minutes
  • Sustained low — 10 rps for 1 hour
  • Mixed — bursts interspersed with steady traffic
  • Author-heavy — 1 author doing 80% of writes
  • Agent-heavy — N agents writing concurrently (the Marcus COS scenario)

What to measure

  • Memory: peak RSS, steady-state, growth rate, GC pressure
  • Throughput: ops/sec at each lock scope
  • Latency: p50, p99, p99.9 per operation
  • Lock scope: time spent at Coarse vs Medium vs Fine, transition frequency
  • Cold-flush: file count, file size, flush duration
  • Starvation: max wait time per author

What to assert

  • No deadlock under any profile
  • No author starved > 1s
  • Memory stays within K8s limits
  • Scope transitions follow hysteresis rules (recorded, not silent)
  • Cold-flush count matches D-cadence (timer + SIGTERM, not per-mutation)

Output

A docs/perf/vopr-results.md with tables and recommendations: K8s resources.limits.memory, replica count, POSTS_FLUSH_INTERVAL tuning.

Acceptance

  • Harness runs all 7 profiles
  • Results are reproducible (deterministic seed)
  • Output file generated with tables
  • Recommendations land back in posts#5 (deploy) and posts#11 (snapshot) for parameter tuning
## Why Deployment shape (replica count, pod size, memory budget) is deferred to simulation (posts#1, Q13 + Q7). This is the harness that produces the data. ## File `tests/vopr/harness.go` (new — VOPR-style simulation) ## Profiles to exercise - **Cold start** — empty store, ramp to 100 rps over 60s - **Burst** — 10k writes in 1s, then idle for 60s - **Sustained high** — 1k rps for 10 minutes - **Sustained low** — 10 rps for 1 hour - **Mixed** — bursts interspersed with steady traffic - **Author-heavy** — 1 author doing 80% of writes - **Agent-heavy** — N agents writing concurrently (the Marcus COS scenario) ## What to measure - Memory: peak RSS, steady-state, growth rate, GC pressure - Throughput: ops/sec at each lock scope - Latency: p50, p99, p99.9 per operation - Lock scope: time spent at Coarse vs Medium vs Fine, transition frequency - Cold-flush: file count, file size, flush duration - Starvation: max wait time per author ## What to assert - No deadlock under any profile - No author starved > 1s - Memory stays within K8s limits - Scope transitions follow hysteresis rules (recorded, not silent) - Cold-flush count matches D-cadence (timer + SIGTERM, not per-mutation) ## Output A `docs/perf/vopr-results.md` with tables and recommendations: K8s `resources.limits.memory`, replica count, `POSTS_FLUSH_INTERVAL` tuning. ## Acceptance - Harness runs all 7 profiles - Results are reproducible (deterministic seed) - Output file generated with tables - Recommendations land back in posts#5 (deploy) and posts#11 (snapshot) for parameter tuning
sscoble added the
area/api
kind/spike
prio/p1
labels 2026-06-23 08:08:15 +00:00
Sign in to join this conversation.
No description provided.