Skip to main content

Benchmarks

Measured on a single persistent TCP connection, sequential operations, 10,000 operations per test. Server configured with --memory-limit 2097152 (2 MiB), restricted to 1 CPU and 2 GB memory.

Test environment
CPUIntel Core 7 150U — 6 cores / 12 threads
Memory7.6 GiB (WSL2 allocation)
OSUbuntu 24.04 LTS on WSL2
Kernel6.6.87.2-microsoft-standard-WSL2
Archx86_64
Imageghcr.io/ashokdudhade/blink-store:latest (v0.1.4)

Results will vary by hardware and network stack.


Throughput

OperationValue sizeops/sec
SET64 bytes~5,370
SET256 bytes~4,780
SET1 KiB~8,140
GET~7,200
DELETE~8,000

Latency

Operationavgp50p95p99max
SET158 us145 us264 us451 us10.64 ms
GET125 us111 us200 us312 us1.19 ms

Memory cap enforcement

Proves that --memory-limit is respected and sampled eviction works correctly.

Setup: 2 MiB memory limit, inserting 4,000 keys with 1 KiB values each (~4 MiB of data into a 2 MiB store).

MetricResult
Keys inserted4,000
Data attempted~4 MiB
Memory limit2,097,152 bytes (2 MiB)
Final usage2,097,046 bytes
Usage vs. limit~99.99% — right at the boundary, never exceeded

Sampled eviction verification

Blink Store uses sampled eviction (similar to Redis). Rather than maintaining a strict LRU list, it samples a fixed number of entries and evicts the least-recently-accessed one. This is probabilistic — older keys are statistically more likely to be evicted, but not guaranteed in exact LRU order.

KeyStatusNotes
memtest_1evicted or presentProbabilistic — depends on sampling
memtest_2evicted or present
memtest_3evicted or present
memtest_10evicted or present
memtest_50evicted or present
memtest_100evicted or present
memtest_3996memtest_4000all presentRecent keys always retained

The benchmark requires at least half of the early keys to be evicted and all five most recent keys to be present. The run passed with 4/6 early keys evicted.


Reproduce

podman run -d --name blink-bench \
--cpus 1 --memory 2g \
-p 8765:8765 \
-e BLINK_MEMORY_LIMIT=2097152 \
ghcr.io/ashokdudhade/blink-store:latest

python3 scripts/benchmark.py

podman stop blink-bench && podman rm blink-bench

Replace podman with docker if using Docker. The benchmark script lives at scripts/benchmark.py.