Zettuce

Benchmarks vs Lettuce 7.9

All measurements were run across two dedicated physical servers over a Mellanox ConnectX-3 RoCE fabric against Valkey 9.2.0 (valkey-rdma.so on port 6379, TCP on port 6380).

Test environment

Java 25 head-to-head

PING p50 latency (pipe=1)

microseconds; shorter is better

Clientp50 latency
Zettuce Java RDMA7.98 µs
Zettuce Java TCP (io_uring)23.55 µs
Zettuce Java TCP (epoll)25.84 µs
Lettuce 7.9 (Netty Epoll TCP)38.22 µs

Pipelined PING throughput (pipe=16)

operations/sec; longer is better

Clientops/sec
Zettuce Java RDMA1,070,601 ops/s (5.39×)
Zettuce Java TCP (io_uring)469,303 ops/s (2.36×)
Lettuce 7.9 (Netty Epoll TCP)198,541 ops/s

8-Thread GET 64B throughput

operations/sec; longer is better

Clientops/sec
Zettuce Java RDMA (8-conn)474,246 ops/s (15.88 µs p50)
Zettuce Java TCP (8-conn)168,596 ops/s (44.66 µs p50)
Lettuce 7.9 (8-conn)158,113 ops/s (48.03 µs p50)
Lettuce 7.9 (1 shared conn)113,843 ops/s (68.17 µs p50)

GET 64B throughput (pipe=1)

operations/sec; longer is better

Clientops/sec
Zettuce Java RDMA111,023 ops/s (9.22 µs · 4.94×)
Zettuce Java TCP (io_uring)37,562 ops/s (25.47 µs · 1.67×)
Lettuce 7.9 (Netty Epoll TCP)22,480 ops/s (41.72 µs)

SET 64B throughput (pipe=1)

operations/sec; longer is better

Clientops/sec
Zettuce Java RDMA101,567 ops/s (10.05 µs · 4.65×)
Zettuce Java TCP (epoll)*32,431 ops/s (30.02 µs · 1.49×)
Lettuce 7.9 (Netty Epoll TCP)21,833 ops/s (42.82 µs)

GET 1 KiB throughput (pipe=1)

operations/sec; longer is better

Clientops/sec
Zettuce Java RDMA101,221 ops/s (9.79 µs · 4.53×)
Zettuce Java TCP (epoll)*32,612 ops/s (30.15 µs · 1.46×)
Lettuce 7.9 (Netty Epoll TCP)22,334 ops/s (42.83 µs)

Pipelined GET 64B throughput (pipe=64)

operations/sec; longer is better

Clientops/sec
Zettuce Java RDMA1,171,494 ops/s (55.10 µs · 4.52×)
Zettuce Java TCP (io_uring)678,387 ops/s (84.84 µs · 2.62×)
Lettuce 7.9 (Netty Epoll TCP)259,024 ops/s (225.95 µs)

*Measured on Zettuce's epoll TCP path prior to the io_uring upgrade.

TCP engine: io_uring vs epoll

Collapsing synchronous TCP round-trips from 5 syscalls down to 1 io_uring_enter() syscall (linked SEND + RECV + fixed fd + IORING_ENTER_EXT_ARG timeout) yielded an 18.8% throughput jump on C TCP pipe=1 and cut Java TCP p99 from 42.40 µs down to 36.81 µs:

C TCP PING throughput (pipe=1)

operations/sec; longer is better

Backendops/sec
1-syscall io_uring41,600 ops/s (23.58 µs)
3-syscall epoll39,524 ops/s (25.04 µs)
5-syscall epoll (orig)35,018 ops/s (27.45 µs)

C TCP pipelined PING throughput (pipe=64)

operations/sec; longer is better

Backendops/sec
1-syscall io_uring1,224,387 ops/s (48.34 µs)
3-syscall epoll1,153,420 ops/s (49.81 µs)
5-syscall epoll (orig)1,077,121 ops/s (54.81 µs)

C, Java, Rust & Python comparison

Because every binding shares the same C11 engine, Rust, Python, Java, and C all achieve single-digit microsecond RDMA latencies (~8–10 µs p50) and 3× higher single-connection throughput over RDMA than over TCP:

RDMA PING p50 latency across languages (pipe=1)

microseconds; shorter is better (vs 38.22 µs Lettuce TCP)

Clientp50 latency
Java 25 FFM (zettuce-java)7.98 µs (121k ops/s)
C11 (zettuce-c)8.54 µs (108k ops/s)
Python C-Ext (py-zettuce)9.33 µs (97k ops/s)
Rust FFI (zettuce-rs)10.00 µs (96k ops/s)
Lettuce 7.9 (Epoll TCP)38.22 µs (24k ops/s)

RDMA pipelined throughput across languages

operations/sec (single connection); longer is better

Clientops/sec
C11 (zettuce-c, p=64)1,674,872 ops/s
Java 25 FFM (GET p=64)1,171,494 ops/s
Python C-Ext (p=16)860,728 ops/s
Rust FFI (p=16)780,881 ops/s

Native InfiniBand (56G FDR) vs. RoCE v1 (56 GbE)

Measured back-to-back on the exact same dual-port Mellanox ConnectX-3 HCA (mlx4_0 port 1 native 56 Gbps FDR InfiniBand via IPoIB vs. port 2 56 GbE RoCE v1) against Valkey 9.2.0. Native InfiniBand shaves another ~0.55–0.70 µs off small-command wire latency, pushing Java 25 PING down to 7.18 µs p50 (3.63 µs min, 129k ops/s) and C11 pipelined PING to 1.86M ops/s:

PING p50 latency: InfiniBand vs. RoCE v1 (pipe=1)

microseconds; shorter is better

Fabric & Clientp50 latency
Java 25 — InfiniBand 56G FDR7.18 µs (129,040 ops/s)
Java 25 — RoCE v1 56 GbE7.73 µs (121,636 ops/s)
C11 — InfiniBand 56G FDR7.91 µs (124,281 ops/s)
C11 — RoCE v1 56 GbE8.49 µs (117,272 ops/s)

Pipelined C11 PING throughput: InfiniBand vs. RoCE v1

operations/sec (single connection); longer is better

Fabric & Pipelineops/sec
InfiniBand 56G FDR (pipe=64)1,860,195 ops/s (32.53 µs)
RoCE v1 56 GbE (pipe=64)1,841,965 ops/s (33.03 µs)
InfiniBand 56G FDR (pipe=16)1,193,787 ops/s (12.59 µs)
RoCE v1 56 GbE (pipe=16)1,129,524 ops/s (13.28 µs)

On heavier server-CPU-bound commands (GET 64B, SET 64B, GET 1 KiB), Valkey 9.2.0 execution time dominates the ~0.55 µs link-layer delta, so InfiniBand (9.64 µs GET 1 KiB / 1.10M ops/s GET p=64) and RoCE v1 (9.79 µs / 1.13M ops/s) perform within ~1–3% of each other.

Reproduce these benchmarks

Start Valkey 9.2.0 with valkey-rdma.so on Server A:

valkey-server --loadmodule /path/to/valkey-rdma.so \
  --rdma-bind 10.99.99.41 --rdma-port 6379 \
  --bind 10.99.99.41 --port 6380 \
  --protected-mode no --save "" --appendonly no

Then run the benchmark from Server B:

./zettuce-c/build/rdma_c_bench 10.99.99.41 6379 100000 1
cargo run --release --manifest-path zettuce-rs/Cargo.toml --example bench -- 10.99.99.41 6379 100000 6380
PYTHONPATH=py-zettuce python3 py-zettuce/benchmarks/bench.py 10.99.99.41 6379 100000 6380