|
For the latest stable version, please use Korvet 0.12.5! |
Benchmarks
This page documents performance benchmarks for Korvet with Redis Enterprise as the storage backend.
Optimal Configuration Benchmark
This benchmark demonstrates the best throughput configuration for Korvet with Redis Enterprise.
Test Environment
-
Redis Enterprise: 16 shards, running locally
-
Korvet: Single instance (macOS, Apple Silicon)
-
Kafka Tools:
kafka-producer-perf-testfrom Apache Kafka -
Topic Configuration: 16 partitions (1× the number of shards)
-
Record Size: 1 KB (1024 bytes)
-
Total Messages: 8,000,000 (1,000,000 per producer)
Configuration
| Parameter | Value |
|---|---|
Producers |
8 |
Batch Size |
1000 messages (1.07 MB) |
Redis Connection Pool Size |
8 |
Acks |
1 |
Compression |
none |
Linger |
0ms |
Performance Results
| Metric | Value |
|---|---|
Aggregate Throughput |
380,952 records/sec |
Throughput (MB/sec) |
372.02 MB/sec |
Total Messages |
8,000,000 |
Duration |
21 seconds |
Average Latency (range) |
249-411 ms |
95th Percentile Latency (range) |
657-2136 ms |
Redis Enterprise Metrics
| Metric | Value |
|---|---|
Total CPU (all 16 shards) |
79% |
Per-Shard CPU |
2-8% |
Data per Shard |
112-172 MB |
Data Distribution |
Even across all shards |
Key Findings
-
High throughput with low CPU usage: Achieved 372 MB/sec with only 2.35% Korvet CPU usage
-
Excellent scalability headroom: Both Korvet and Redis Enterprise operating well below capacity
-
Even load distribution: Data and CPU load distributed evenly across all 16 Redis shards
-
Optimal batch size: 1000 messages per batch provided the best balance of throughput and latency
Running This Benchmark
To reproduce this benchmark, use the provided benchmark script from the korvet-dist repository:
git clone https://github.com/redis-field-engineering/korvet-dist.git
cd korvet-dist/samples/benchmark/scripts
./run-comprehensive-benchmark.sh
The script will:
-
Start Korvet with the specified Redis pool size
-
Create a topic with 16 partitions
-
Run 8 concurrent producers, each sending 1,000,000 messages
-
Collect metrics from Korvet (via actuator) and Redis Enterprise (via API)
-
Generate a detailed report with throughput, latency, and resource usage
Results are saved to /tmp/korvet-benchmark-<timestamp>/.
Configuration Recommendations
For optimal throughput:
-
Batch size: Use 1000 messages per batch for best balance of throughput and latency
-
Producers: 8 concurrent producers provides excellent throughput with manageable latency
-
Redis pool size: Match pool size to number of producers (8) for optimal connection utilization
-
Partitions: Use 1-2× the number of Redis shards (16 partitions for 16 shards)
-
Redis shards: Match the number of shards to available CPU cores
-
Rebalance delay: Configure
korvet.server.rebalance-delayappropriately (default 10s) to allow all consumers to join before rebalancing -
Replication: Disable replication for write-heavy workloads (if durability requirements allow)
Running Your Own Benchmarks
Using the Benchmark Script
The korvet-dist repository contains a script to run benchmarks with various configurations.
git clone https://github.com/redis-field-engineering/korvet-dist.git
cd korvet-dist/samples/benchmark/scripts
./run-comprehensive-benchmark.sh
Configuration Options
Edit the script to customize benchmark parameters:
# Test parameters
TOPIC="benchmark-test"
PARTITIONS=16
RECORD_SIZE=1024
NUM_RECORDS=1000000
# Parameter arrays
PRODUCERS=(8) # Number of concurrent producers
BATCH_SIZES=(1000) # Messages per batch
POOL_SIZES=(8) # Redis connection pool size
What the Script Does
-
Starts Korvet with the specified Redis pool size
-
Flushes Redis to ensure clean state
-
Creates topic with specified number of partitions
-
Runs producers using
kafka-producer-perf-test -
Collects metrics:
-
Korvet CPU and memory (via Spring Boot Actuator at port 8080)
-
Redis Enterprise CPU and memory (via REST API at port 9443)
-
Producer throughput and latency
-
-
Generates report with detailed results
Output
Results are saved to /tmp/korvet-benchmark-<timestamp>/:
-
SUMMARY.txt: Summary table of all test results -
producers-<N>_batch-<B>msg_pool-<P>.txt: Detailed results for each test
Example summary output:
Producers Batch(msg) Pool Total Msgs Duration(s) Throughput(rec/s) Throughput(MB/s) 8 1000 8 8000000 21 380952 372.02