12.5× as many records, 61.1% higher throughput: Lavik at 1 billion vs. Redis at 80 million
On a single Azure L16aos_v4 VM, Lavik sustained 621,528 operations per second over 1.024 TB of Hash field values. On the same server, Redis sustained 385,755 ops/s over 80 million records. That puts Lavik’s billion-record run at 12.5× the record count and 61.1% higher throughput than the Redis run.
On a single Azure L16aos_v4 VM, Lavik sustained 621,528 operations per second over 1.024 TB of Hash field values. On the same server, Redis sustained 385,755 ops/s over 80 million records. That puts Lavik’s billion-record run at 12.5× the record count and 61.1% higher throughput than the Redis run.[1]
What happens when the data outgrows RAM?
We started with 80 million records as the common target on the same 128 GiB machine. Each record contained eight 128-byte fields. The values alone occupied 81.92 GB at this scale. Redis and Dragonfly held their datasets in memory. Lavik stored Hash values on local NVMe without an in-memory data cache.[1][7][9]
Then we grew only Lavik’s dataset to one billion records. We kept the server, client and 256 connections fixed. For every request, the client chose a key uniformly from the full dataset, including the newly loaded records. It read the whole Hash 95% of the time and updated all eight fields the other 5%. For full-Hash updates, Lavik used LAVIK.HREPLACE to replace all eight fields without reading the previous field values from NVMe.[1][8]
At one billion records, Lavik reported 55.7 GiB of memory in use after measurement. After loading and before measurement, the space available for foreground writes had fallen by 1.305 TB from the empty-database baseline, including storage overhead. At that point Lavik reported zero pending durability work and zero dirty staging bytes.[2]
At 80 million records, Lavik delivered 63.7% more throughput than Redis. Growing Lavik’s dataset by a factor of 12.5 reduced its throughput by 1.6%.[1]
Lavik’s read and update P99.9 stayed below 3 ms
Both metrics stayed below 3 ms in each of the three measured runs at each dataset size. At one billion records, read P99.9 averaged 2.610 ms and update P99.9 averaged 2.132 ms.[1]
| Database | Records | Ops/s | Read P99.9 | Update P99.9 |
|---|---|---|---|---|
| Redis | 80 million | 385,755 | 2.553 ms | 2.627 ms |
| Dragonfly | 73 million | 566,630 | 2.964 ms | 3.010 ms |
| Lavik | 80 million | 631,666 | 2.565 ms | 2.063 ms |
| Lavik | 1 billion | 621,528 | 2.610 ms | 2.132 ms |
Dragonfly used its default Hash encoding thresholds in the 73-million-record run above. During a separate capacity check, Dragonfly returned an out-of-memory error at 73.56 million records. With --listpack_max_field_len=256 --listpack_max_bytes=2048, it held 80 million records under the same 112 GiB memory limit and served 537,054 ops/s, with read and update P99.9 of 12.655 and 13.076 ms.[1][5]
With the default Hash thresholds, Redis averaged 351,594 ops/s at 65 million records. Raising hash-max-listpack-value from 64 to 256 bytes let Redis use compact encoding for the 128-byte field values. At 80 million records, that configuration delivered 9.7% higher throughput (385,755 ops/s). The default run had lower read and update P99.9: 2.396 and 2.418 ms, versus 2.553 and 2.627 ms in the 80-million-record run.[6]
Benchmark setup
Hardware. Both VMs ran in Azure Central India, zone 3, with accelerated networking. The database server (L16aos_v4) had 16 vCPUs, 128 GiB RAM and six 1.92 TB local NVMe drives in RAID 0 with a 512 KiB chunk. Lavik used a 6 TiB raw partition. The independent YCSB client (F16als_v6) had 16 vCPUs and 32 GiB RAM. Both hosts reported AMD EPYC 9V74 processors.[1]
Software. Lavik v0.3.2, Redis 8.10.3 and Dragonfly v2.1. The server ran Ubuntu 24.04.5 LTS with Linux 7.0.0-1020-azure. The client ran OpenJDK 17.0.21.1 and the EloqData YCSB fork at 247a2d448ebc.[1]
Network and storage. Across 100 ICMP packets from client to server, round-trip time averaged 0.733 ms (0.406–3.873 ms), with zero loss. Using one persistent TCP connection, 5,000 idle Redis-protocol PINGs to Lavik before the 80-million-record load had a median of 0.078 ms and P99 of 0.087 ms. A separate read-only fio check on the server after the YCSB runs delivered 270,395 random 1 KiB reads/s.[1]
Each database ran alone. After a 30-second warmup, we measured three 60-second windows with 256 unpipelined connections. We report the mean throughput and mean of the per-window latency percentiles. All measured reads and updates succeeded. Before and after testing each configuration, we checked the record count and verified the field names and value lengths in 1,003 sampled records.[1][2]
Database launch parameters
Each service had CPU affinity 0–13 and a 65,535 file-descriptor limit. CPUs 14–15 handled the OS and NIC interrupts. Redis and Dragonfly ran in memory. The commands below omit redundant default flags. The archived launch scripts contain the full invocations.[1]
lavik \
--storage=uring \
--bind "10.87.0.21" \
--metrics-port 9100 \
--threads 14 \
--pin-workers \
--max-memory 96gb \
--shutdown-checkpoint \
--data-file "/dev/md/lavikbench3" \
--log-dir "/var/lib/lavik-bench/india-single-lavik"[1]redis-server \
--bind "10.87.0.21" \
--protected-mode no \
--save "" \
--maxmemory "112gb" \
--hash-max-listpack-value 256 \
--io-threads 14[1]dragonfly \
"--bind=10.87.0.21" \
"--maxmemory=112gb" \
--proactor_threads=14[1]YCSB workload and driver parameters
Example measured window for Lavik at 80 million records. The billion-record run used recordcount=1000000000. Redis and Dragonfly used the redis binding with the corresponding redis.host, redis.port and redis.timeout properties, plus redis.scanindex=none. All three read with HGETALL. Lavik used LAVIK.HREPLACE to replace the entire Hash without reading its previous field values from NVMe. Redis and Dragonfly used HMSET to write the same eight fields. Loading used 64 connections and a pipeline depth of 32.[1][8]
bin/ycsb.sh run lavik \
-s \
-P workloads/workloadb \
-threads 256 \
-p recordcount=80000000 \
-p fieldcount=8 \
-p fieldlength=128 \
-p readallfields=true \
-p writeallfields=true \
-p fieldlengthdistribution=constant \
-p requestdistribution=uniform \
-p readproportion=0.95 \
-p updateproportion=0.05 \
-p scanproportion=0 \
-p insertproportion=0 \
-p readmodifywriteproportion=0 \
-p lavik.host=10.87.0.21 \
-p lavik.port=6379 \
-p lavik.timeout=2000 \
-p operationcount=2000000000 \
-p maxexecutiontime=60 \
-p status.interval=5 \
-p hdrhistogram.percentiles=50,95,99,99.9 \
-p hdrhistogram.fileoutput=true \
-p hdrhistogram.output.path=/opt/lavik-bench/results-standalone/lavik/80000000/sweep/256-confirm-1/[1]fio and ping parameters
fio \
--readonly \
--name=read \
--filename=/dev/md/lavikbench3 \
--ioengine=io_uring \
--direct=1 \
--rw=randread \
--bs=1k \
--iodepth=32 \
--numjobs=4 \
--offset=1G \
--size=8G \
--time_based=1 \
--ramp_time=5 \
--runtime=30 \
--group_reporting=1[3]fio 3.36 read an 8 GiB region on the database partition while YCSB was idle. Each of four jobs used queue depth 32. The protocol PING probe discarded 200 warmup replies before timing 5,000 serial requests.[3][1]
ping \
-n \
-c 100 \
-i 0.05 \
-W 1 10.87.0.21[1]