Benchmarks
Swytch is designed for production workloads where performance and durability both matter. This page presents benchmark results comparing Swytch to Redis under various conditions.
All benchmarks were run on:
- CPU: AMD Ryzen 5 3600 (6 cores / 12 threads)
- RAM: 64GB DDR4
- Storage: Samsung NVMe in RAID0
- OS: Ubuntu 24.04
- Connection: Unix socket (lowest latency)
Swytch’s performance advantage comes from a lock-free architecture designed from the ground up for multi-core systems:
Lock-free transactional index: Concurrent reads and writes proceed without blocking each other. No thread waits for another to release a lock.
Novel eviction algorithm: A self-tuning, lock-free eviction system that adapts to your workload in real-time. This is an area of active research—expect further improvements as we refine the algorithm.
FASTER-inspired storage: The persistent storage layer uses techniques from Microsoft’s FASTER research project, enabling lock-free append-only writes with indexed lookups that don’t block the hot path.
Redis processes commands single-threaded. Swytch processes commands in parallel across all available cores while maintaining the same consistency guarantees. The result: linear scaling with core count instead of a single-threaded bottleneck.
Using redis-benchmark with default settings, four threads, Unix socket:
| Command | Swytch | Redis | Ratio |
|---|---|---|---|
| SET | 166,334 ops/s | 68,937 ops/s | 2.4x |
| GET | 166,444 ops/s | 74,041 ops/s | 2.2x |
| INCR | 166,389 ops/s | 68,259 ops/s | 2.4x |
| LPUSH | 166,500 ops/s | 68,927 ops/s | 2.4x |
| LPOP | 166,334 ops/s | 69,541 ops/s | 2.4x |
| LRANGE_100 | 110,987 ops/s | 54,024 ops/s | 2.1x |
| LRANGE_600 | 41,569 ops/s | 24,654 ops/s | 1.7x |
| MSET (10 keys) | 99,920 ops/s | 55,500 ops/s | 1.8x |
Swytch achieves 2x+ throughput while providing full per-operation durability. Redis was configured with
appendfsync everysec (1 second of potential data loss).
Using memtier_benchmark with 4 threads, 50 clients, 256-byte values:
| Workload | Swytch | Redis | Ratio |
|---|---|---|---|
| Mixed R/W (1:10) | 150,312 ops/s | 71,044 ops/s | 2.1x |
| Zipf 0.99 | 165,403 ops/s | 74,150 ops/s | 2.2x |
| Zipf 1.1 + pipeline | 901,698 ops/s | 495,585 ops/s | 1.8x |
Latency comparison (Zipf 0.99 workload):
| Percentile | Swytch | Redis |
|---|---|---|
| p50 | 0.52ms | 0.65ms |
| p99 | 3.36ms | 5.15ms |
| p99.9 | 6.50ms | 12.8ms |
Using redis-benchmark -c 200 -P 32 (aggressive pipelining):
| System | SET ops/s | SET p50 | GET ops/s | GET p50 |
|---|---|---|---|---|
| Swytch (persistent) | 282,207 | 9.78ms | 1,368,925 | 2.37ms |
| Swytch (in-memory) | 1,308,901 | 2.49ms | 1,375,516 | 2.35ms |
| Redis | 920,810 | 6.30ms | 1,213,592 | 4.58ms |
| Dragonfly | 828,500 | 6.43ms | 1,047,669 | 3.99ms |
Swytch’s in-memory mode achieves 42% higher write throughput than Redis and 58% higher than Dragonfly. Even in persistent mode with full durability, Swytch GETs remain fastest.
Production workloads often involve values larger than the 64–256 byte defaults used in most benchmarks. Here’s what happens with 400KB values—closer to real-world JSON documents, serialized objects, or cached API responses:
Test: memtier_benchmark with 4 threads, 50 clients, 400KB values, Zipf 0.99, 10:1 read:write ratio
| Metric | Swytch | Redis |
|---|---|---|
| GET p50 | 2.5ms | 12.9ms |
| GET p99 | 50.7ms | 97.8ms |
| SET p50 | 29.4ms | 37.9ms |
| Overall throughput | 7,346 ops/s | 8,339 ops/s |
Key finding: Swytch read latency is 5x better than Redis with large values.
Redis’s single-threaded architecture blocks reads during large value eviction. Every 400KB eviction stalls the entire server. Swytch’s multithreaded design isolates eviction from the read path—reads stay fast while eviction happens in the background.
For read-heavy workloads (typical for caches), this translates to dramatically better user-facing latency.
We replayed production cache traces from published academic datasets to measure real-world hit rates and throughput.
256MB cache, realistic value sizes:
| Metric | Swytch | Redis |
|---|---|---|
| Hit Rate | 98.96% | 75.94% |
| Misses | 9,192 | 213,226 |
| Throughput | 1,194 ops/s | 596 ops/s |
| Avg Latency | 83.7ms | 167.7ms |
23 percentage points higher hit rate means 95.7% fewer backend database requests.
20GB cache, value sizes scaled to production dimensions:
| Metric | Swytch | Redis |
|---|---|---|
| Hit Rate | 96.51% | 96.49% |
| Throughput | 70,568 ops/s | 39,671 ops/s |
| Avg Latency | 1.4ms | 2.5ms |
With realistic value sizes, hit rates are tied while Swytch delivers 1.8x throughput.
Note: Earlier benchmarks with artificially small (<1 kb) values showed Redis with a slight hit rate advantage. This disappeared when value sizes matched production conditions.
8GB cache:
| Metric | Swytch | Redis |
|---|---|---|
| Hit Rate | ~99% | ~99% |
| Throughput | 3x Redis | baseline |
Under normal memory pressure, both systems achieve similar hit rates, but Swytch maintains 3x throughput.
Swytch’s tiered storage provides full durability (10 ms max data loss) with minimal performance impact.
Test: memtier_benchmark, 4 threads, 50 clients, 256-byte values, Unix socket
| Workload | Write-Through | Ghost Mode |
|---|---|---|
| 100% writes | 247,000 ops/s | 397,000 ops/s |
| 100% reads | 418,000 ops/s | — |
| 50/50 mixed | 336,000 ops/s | — |
| Workload | Mode | p50 | p99 | p99.9 |
|---|---|---|---|---|
| 100% writes | Write-through | 0.52ms | 3.36ms | 6.50ms |
| 100% writes | Ghost | 0.43ms | 2.19ms | 5.41ms |
| 100% reads | Write-through | 0.42ms | 1.77ms | 4.51ms |
| 50/50 mixed | Write-through | 0.44ms | 2.98ms | 5.44ms |
Write-through mode (full durability) adds minimal latency overhead. Ghost mode (write-back) offers higher write throughput when eventual persistence is acceptable.
| Scenario | Swytch Advantage |
|---|---|
| Single-op throughput | 2-2.4x faster |
| Pipeline throughput | 1.4-1.8x faster |
| Large value reads | 5x lower latency |
| Production traces | Same or better hit rate, 2-3x throughput |
| Durability | 10ms vs 1000ms max data loss |
Swytch delivers higher throughput, lower latency, and better durability than Redis across all tested workloads.
# Single operations
redis-benchmark -s /path/to/socket -t set,get,incr,lpush,lpop,lrange -q --threads 4
# Pipeline stress test
redis-benchmark -s /path/to/socket -n 2000000 -c 200 -P 32 -t set,get -q
# Realistic mixed workload
memtier_benchmark -S /path/to/socket \
--protocol=redis \
--threads=4 --clients=50 \
--requests=100000 \
--ratio=1:10 \
--data-size=256
# Zipf distribution (hot keys)
memtier_benchmark -S /path/to/socket \
--protocol=redis \
--threads=4 --clients=50 \
--requests=1000000 \
--ratio=1:10 \
--key-pattern=G:G \
--key-zipf-const=0.99 \
--key-maximum=100000 \
--data-size=256
# Large values
memtier_benchmark -S /path/to/socket \
--protocol=redis \
--threads=4 --clients=50 \
--requests=5000 \
--ratio=1:10 \
--key-pattern=G:G \
--key-zipf-const=0.99 \
--key-maximum=10000 \
--data-size=409600