Performance
This page presents benchmark results from convergence-loadgen against convergence-server. Numbers are updated as new scenarios are tested.
Test environment
Section titled “Test environment”| Component | Detail |
|---|---|
| Machine | Apple M1 Pro, 16 GB unified memory |
| OS | macOS (ARM64) |
| Setup | Server and loadgen collocated on the same machine |
All benchmarks use release builds (--release).
Write throughput (no subscribers)
Section titled “Write throughput (no subscribers)”Pure write workload with no active subscribers. Measures the server’s ingress and convergence engine throughput in isolation from fanout costs.
Configuration:
| Parameter | Value |
|---|---|
| Workers | 9 (each a separate source) |
| Entity pool | 10,000 (Player schema) |
| Operation mix | 70% ASSERT / 20% PATCH / 10% RETRACT |
| Rate limit | None (unlimited) |
| Subscribers | 0 |
Results:
| Metric | Value |
|---|---|
| Aggregate throughput | 3.7M ops/sec |
| Per-worker average | ~411K ops/sec |
| Per-worker range | 364K — 477K ops/sec |
| Total operations | 70.7M |
| Errors | 0 |
The design target is 200,000 ASSERT operations per second per partition on a single core. This benchmark exceeds that target per-worker, with a mixed operation workload rather than pure ASSERTs.
Caveats: Server and loadgen share CPU and memory. No subscribers means no fanout overhead. No concurrent read workload.
cargo run --release -p convergence-loadgen -- \ --server 127.0.0.1:3727 \ --workers 9 \ --entities 10000 \ --schema playerWrite throughput with subscribers
Section titled “Write throughput with subscribers”Not yet measured.
Adds active subscribers to measure the impact of fanout on write throughput and to capture notification latency.
| Parameter | Planned |
|---|---|
| Write workload | Same as above |
| Subscribers | 1, 10, 100 |
| Metrics | Write throughput degradation, notification rate |
Design target: notification latency within one coalescing window of the last ASSERT.
# 9 writers + 10 subscriberscargo run --release -p convergence-loadgen -- \ --server 127.0.0.1:3727 \ --workers 9 \ --subscribers 10 \ --entities 10000 \ --schema player
# 9 writers + 100 subscriberscargo run --release -p convergence-loadgen -- \ --server 127.0.0.1:3727 \ --workers 9 \ --subscribers 100 \ --entities 10000 \ --schema playerPoint read latency
Section titled “Point read latency”Not yet measured.
Measures QUERY response time under varying write load.
| Parameter | Planned |
|---|---|
| Background write rate | 0, 100K, 200K ops/sec |
| Reader | Dedicated client issuing point QUERYs |
| Metrics | p50, p99, p999 latency |
Design target: 5 microseconds at p50, 20 microseconds at p99.
Subscriber bootstrap
Section titled “Subscriber bootstrap”Measures time for a new subscriber to receive the full initial state via bootstrap.
Configuration:
| Parameter | Value |
|---|---|
| Entity count | 1,000 / 5,000 / 10,000 pre-populated |
| Schema | 2x F32 fields (8 bytes field data per entity) |
| Partitions | 2 |
| Benchmark | subscription_benchmarks (criterion) |
Results:
| Entity count | Time (p50) | Throughput |
|---|---|---|
| 1,000 | 1.02 ms | 980K entities/s |
| 5,000 | 2.39 ms | 2.1M entities/s |
| 10,000 | 4.76 ms | 2.1M entities/s |
Throughput is consistent at ~2.1M entities/sec for entity counts above the internal buffer size (4,096). The server applies backpressure during bootstrap so no entities are dropped regardless of count.
Design target: under 2 seconds for 100,000 entities. At 2.1M entities/sec, 100,000 entities would complete in approximately 48ms, well within the target.
cargo bench -p convergence-server --bench subscription_benchmarks -- bootstrap_throughputCoalescing efficiency
Section titled “Coalescing efficiency”Not yet measured.
Measures the ratio of incoming writes to WAL flush writes under hot-entity workloads.
| Parameter | Planned |
|---|---|
| Write pattern | Small hot set (10% of entities receiving 90% of writes) |
| Metrics | Incoming ASSERTs per WAL flush write |
Design target: 10:1 or better for entities updating more than 10 times per coalescing window.
Reproducing these benchmarks
Section titled “Reproducing these benchmarks”# Start the servercargo run --release -p convergence-server
# Run the write throughput benchmark (scenario 1)cargo run --release -p convergence-loadgen -- \ --server 127.0.0.1:3727 \ --workers 9 \ --entities 10000 \ --schema player
# Run with subscribers (scenario 2)cargo run --release -p convergence-loadgen -- \ --server 127.0.0.1:3727 \ --workers 9 \ --subscribers 10 \ --entities 10000 \ --schema playerRun cargo run -p convergence-loadgen -- --help for all options including --rate, --mix, --hot-pct, --duration, --quiet, --subscribers, --bootstrap, and --include-prev.