VeltrixDB Docs
v1.1.0 GitHub FAQ Quickstart

Benchmarking Methodology

How VeltrixDB's benchmark numbers are produced: the harness, the hardware, the pass/fail gates, and the raw results — so you can reproduce them or run the same harness against your own workload shape.

The harness

scripts/bench.sh runs a 6-phase sequenced workload and reports go/no-go on two hard gates: packing density and GC emergency runs. The project re-runs it after any storage engine change.

# macOS / Linux dev (uses /tmp, 1M keys)
./scripts/bench.sh

# Linux production-class (n2-highmem-64, 8 NVMe disks)
DATA_DIRS=/mnt/nvme0,...,/mnt/nvme7 \
RAW_VLOGS=/dev/nvme0n1,...,/dev/nvme7n1 \
CACHE_MB=409600 NUM_KEYS=10000000 \
CONCURRENCY=512 BULK_DUR=120 STRESS_DUR=300 \
  ./scripts/bench.sh

Key environment variables

VarDefaultNotes
VALUE_SIZE128Match your real value distribution
NUM_KEYS1,000,000Use 10M for production-scale runs
BATCH_SIZE1024Higher = better packing density
CONCURRENCY64Use 512 on multi-core hosts
BULK_DUR30 s120–300 s for production verification
STRESS_DUR60 s600 s to detect GC pressure
WAL_WINDOW_MS510 for default, 2 for low latency
CACHE_MB1024409600 on n2-highmem-64
RAW_VLOGSRaw block-device VLog (Linux + CAP_SYS_RAWIO)

Pass criteria

The harness enforces two hard gates. A benchmark run that fails either gate is not representative of the storage engine operating correctly.

GateConditionWhat failure means
Densitybytes/record ≤ 1.2 × (24 + value_size)Packing not engaged — use --batch-size > 1
GC emergencyvlog_gc_emergency_runs delta == 0Write rate exceeds GC throughput

Reference numbers (BENCHMARKING.md)

macOS M-series (dev)

MetricValue
MPut throughput (1024 batch)~360K writes/s
Bytes/record at 128 B~160 B (25× density)
Single-Put P99 (5 ms window)~8 ms

Linux n2-highmem-64 (8 NVMe) — projected

Labeled as projected BENCHMARKING.md marks this table explicitly as "projected" figures for the 8-NVMe production configuration, distinct from the measured macOS dev numbers above and the measured cluster/AWS results below.
MetricValue
MPut throughput (1024 batch)~3M writes/s
Single-Put P99 (5 ms window)~5.2 ms
GET P99 cache-hit~52 µs
1B keys × 128B disk total~149 GB (vs 4 TB unpacked)

3-node GKE cluster benchmark

Reported in the README as the headline cluster numbers: 3-node GKE cluster · n2-highmem-64 · 8×375 GB NVMe per node · 1 billion keys · 80R/20W · 30 minutes sustained.

MetricValue
Reads/s (internal GKE run — unverified)7,200,000
Writes/s (internal GKE run — unverified)1,800,000
P50 (80R/20W blended)~220 ns
P99 (80R/20W blended)~510 µs
GC emergency events0
Errors0
Storage density~160 GB for 1B × 128 B values

Verified vs unverified: the measured, reproducible numbers are the YCSB single-node results (427,697 reads/s · 18,064 durable writes/s · AWS EC2, 4×NVMe, 100M keys). The 3-node GKE figures (7.2M reads/s / 1.8M writes/s) come from an internal run without a published harness — treat them as unverified until reproduced.

Single node (Linux NVMe)

OperationP50P99
GET — cache hit0.05 ms0.28 ms (~1.4M reads/s)
PUT — 10 ms flush window5 ms10.2 ms
PUT — 5 ms window, 512 workers2.6 ms5.2 ms (~102K writes/s)
MultiPut 1024 entries~9.5 ms (~426K entries/s)

YCSB benchmark results (100M keys)

Published in BENCHMARK_RESULTS.md, dated June 9, 2026. Test environment: AWS EC2 high-memory instance, 495 GB total RAM (488 GB available), 4× NVMe SSD at 873 GB each (3.5 TB total), raw block-device VLog (/dev/nvmeXn1p2), 400 GB LIRS cache, 200 client threads, 100,000,000 keys, ~100-byte values, benchmark tool YCSB 0.17.0.

Write benchmark (100M key load)

Configuration: 5 ms WAL flush window, 5 ms VLog flush window, 200 threads, 4× NVMe striped.

MetricValue
Total keys written100,000,000
Throughput18,064 ops/sec
Total runtime92.3 minutes
Avg write latency11.06 ms
Min latency413 µs
P95 latency30.8 ms
P99 latency47.3 ms
Failures0 (100% success)
DurabilityWAL + fdatasync on every write

Read benchmark (10M reads on 100M key dataset)

Configuration: 400 GB cache (entire dataset fits in RAM), 200 threads, 10,000,000 operations, 100% reads (YCSB workload_c).

MetricValue
Throughput427,697 ops/sec
Total runtime23.4 seconds for 10M reads
Avg read latency461 µs
Min latency10 µs
P95 latency2,069 µs
P99 latency2,771 µs
Max latency53.6 ms
Hit rate100% (0 NOT_FOUND)

Progression across runs

BENCHMARK_RESULTS.md tracks how throughput and hit rate changed as the dataset and tuning scaled up:

RunWrite speedRead speedRead hit rate
1M keys · 50 threads · 10ms WAL2,036 ops/sec4,000 ops/sec48.5%
10M keys · 50 threads · 10ms WAL3,164 ops/sec301,386 ops/sec79%
100M keys · 200 threads · 5ms WAL18,064 ops/sec427,697 ops/sec100%

VeltrixDB vs. Redis, head to head

From the same YCSB run, compared against publicly documented Redis behavior at equivalent durability settings.

ModeVeltrixDBRedis
Durable writes (fsync every write)18,064 ops/sec10,000–30,000 ops/sec
Non-durable writes (no fsync)N/A — always durable100,000–200,000 ops/sec

VeltrixDB always writes durably. Redis requires appendfsync always for an equivalent guarantee, which reduces Redis to 10K–30K ops/sec — comparable to or slower than VeltrixDB at that durability level.

ResourceVeltrixDB (100M keys)Redis (100M keys)
RAM required15 GB (400 GB provisioned as cache)30–45 GB (data lives in RAM)
Disk required~25 GB per NVMeSwap/RDB snapshots only
Max dataset size3.5 TB (NVMe)Limited by RAM
Dataset > RAMWorks (reads from NVMe)Evicts or crashes

Key takeaways

Reproduce it yourself All numbers on this page come from scripts/bench.sh and YCSB 0.17.0 runs against VeltrixDB v1.0, dated June 2026. Re-run the harness against your own key/value shape rather than assuming these numbers transfer directly — see VeltrixDB vs. Redis for how to interpret the results relative to your workload.