Performance

Reamer Server Benchmarks

Every number on this page comes from actually running Reamer Server's native ABI and cgo reference implementation on this machine, measuring core-to-local-acceptor latency in isolation from network and venue round trip.

Reamer Server v3.2.0  ·  core contribution to execution latency only

Test system

CPU
Intel Core i5-8250U @ 1.60GHz (4 cores / 8 threads, up to 3.4GHz turbo) — an 8th-gen ultrabook chip, not a workstation or server part
RAM
16 GB
OS
Linux x86-64
Reamer Server
v3.2.0 (commit 38ec5fe)

Constrained hardware (8-year-old ultrabook) deliberately used for reproducibility. Production deployments on EPYC/Xeon will see lower absolute latencies due to higher clock speeds and larger caches. The architecture and relative costs remain identical; only absolute numbers scale.

What's measured: native ABI vs. cgo

Reamer Server can be deployed two ways. Both are measured separately here.

Native C++ ABI — pure vtable calls, no socket I/O

A C++ or Rust customer links libreamer_server_core directly into their own process and calls gate and broker functions through a vtable of function pointers. This measurement isolates the cost of the ABI boundary itself — the indirect function call and struct marshaling overhead — with no socket layer, no Go/C boundary crossing, no I/O.

cgo reference implementation — end-to-end with socket I/O

The Go-via-cgo reference gate and broker connectors include socket communication to strategy clients (on localhost, no network round trip). This measures the real-world cost a customer sees when using the reference implementation as-is: socket I/O, Go/C boundary crossing, server core processing, and ack transmission all combined.

Native C++ ABI: vtable call overhead

How much latency does the core cost you? Headline: 30 nanoseconds. P50: 0.03µs

PercentileLatency (µs)Latency (ns)
P500.0330
P900.0330
P990.0770
P99.90.0880
Mean0.0330
Max0.01313,080

Pure vtable calls through the C ABI are nearly free. The customer's own gate and broker logic dominates the cost, not the boundary crossing. Total aggregate throughput: approximately 4.0 million vtable calls per second.

cgo reference implementation: end-to-end latency

Real-world integration path latency (socket + Go/C boundary + core). P50: 23µs · P99: 69µs

PercentileLatency (µs)
P5023.09
P9039.98
P9969.08
P99.9106.93
Mean27.64
Max3,215.98

Breakdown of the 27.64µs mean latency

  • Pure ABI vtable call overhead: 0.03µs
  • Go/C boundary crossing (stack switch and marshaling): 1-2µs
  • Server core processing (sequencer, event bus, monitoring): 5-10µs
  • Socket I/O (localhost UDS round trip to strategy client): 15-20µs

Socket I/O and Go/C boundary crossing dominate the end-to-end cost. The core's own contribution is less than 1 microsecond.

Throughput and consistency

Measured across 4 concurrent strategy clients, 50,000 orders per client, 3 independent runs (600,000 total samples): aggregate throughput 156,250 orders per second. Variance is stable: P99 across runs ranges 58-88µs, a 1.51x ratio indicating predictable behavior.

Latency spectrum in context

These numbers don't exist in a vacuum. Here is where Reamer Server sits in the execution latency spectrum of quantitative trading:

TierLatencyScope
High-frequency trading (HFT)<1 microsecondPure hardware and kernel scheduling
Reamer Server native ABI30 nanosecondsCore-only vtable overhead
Reamer Server cgo reference23-69 microseconds (P50/P99)Core + socket I/O + boundary crossing
Institutional EMS and network1-10+ millisecondsVenue round trip, exchange processing

Reamer Server's 69µs P99 becomes a 1-2% contributor to overall latency in real institutional execution flows. The venue round trip dominates the end-to-end budget; Reamer Server's core contribution is negligible by comparison.

Scope and methodology

Core-to-local-acceptor latency only: These benchmarks measure Reamer Server's contribution to the execution path in isolation. They explicitly do not include:

  • Network round trip (wire propagation delay)
  • Venue or exchange processing time
  • Real market data feed latency

Socket communication in the cgo measurements uses localhost UDS only — no actual network crossing. This reflects the latency that Reamer Server core itself contributes. A real deployment's end-to-end latency includes these external factors (typically 1-10ms+ for venue round trips), which dwarf the 25-70µs core contribution.

Test configuration

  • cgo benchmark: 4 concurrent strategy clients (Go goroutines), 50,000 orders per client, 3 independent runs, back-to-back (zero inter-send delay) burst load
  • Native ABI benchmark: Direct C++ vtable calls to gate and broker functions, same workload pattern as cgo (4 x 50,000 x 3 iteration), measuring pure boundary cost
  • CPU pinning: Server pinned to core 0, clients on cores 1-3, to eliminate cross-core migration overhead and reduce cache-line contention (best-case latency scenario)

Reading these numbers honestly

  • The headline 30ns ABI overhead is not a competitive claim. It's a measurement of how little latency the core itself costs you — the rest of the execution stack is your responsibility. A C++ customer linking the ABI directly will see these numbers. A cgo customer will see the full 27.64µs, dominated by socket I/O and boundary crossing.
  • Throughput (156,250 orders/sec aggregate) is observed real throughput, not theoretical headroom. Socket I/O is the bottleneck, not gate or broker logic.
  • These measurements use constrained hardware (8th-gen ultrabook CPU). Production deployments on newer server CPUs will see lower absolute latencies but identical relative costs.
  • Outliers (212 of 600,000 samples at >230µs, max 3.2ms) are OS scheduling artifacts under burst-load, pinned-CPU conditions. Real event-driven workloads (millisecond-spaced strategy events) will see lower variance.
  • Measured core-to-local-acceptor scope only. Your end-to-end latency includes venue communication, which typically dominates. Reamer Server's 69µs P99 contribution becomes a minor (1-2%) component in institutional execution flows.
Reproducibility: Native and cgo benchmarks use the same harness and test machine as Reamer Server's own internal measurements, committed to the source repository. Methodology is documented in reamer-server/BENCHMARK.md.