Skip to main content

Performance Benchmarks

Reference performance measurements for HDDS components.

Test Environment

ComponentSpecification
CPUAMD EPYC 7763 (64 cores)
Memory256 GB DDR4-3200
Network25 Gbps Ethernet
OSLinux 6.1 (Debian 12)
Rust1.75+ (release build)

Latency Benchmarks

End-to-End Latency (Same Host)

Payload Sizep50p95p99
64 bytes8 us15 us25 us
256 bytes10 us18 us30 us
1 KB15 us25 us45 us
4 KB25 us45 us80 us
64 KB120 us200 us350 us

Shared Memory Transport

Payload Sizep50p95p99
64 bytes1.2 us2.5 us4 us
256 bytes1.5 us3 us5 us
1 KB2 us4 us7 us
4 KB4 us8 us15 us

UDP Unicast (Same LAN)

Payload Sizep50p95p99
64 bytes45 us80 us150 us
256 bytes50 us90 us180 us
1 KB60 us110 us220 us
4 KB90 us160 us300 us

Throughput Benchmarks

Message Rate (BestEffort)

Payload SizeThroughput (msg/s)Bandwidth
64 bytes2.5 M160 MB/s
256 bytes1.8 M460 MB/s
1 KB850 K850 MB/s
4 KB280 K1.1 GB/s
64 KB35 K2.2 GB/s

Message Rate (Reliable)

Payload SizeThroughput (msg/s)Bandwidth
64 bytes1.2 M77 MB/s
256 bytes900 K230 MB/s
1 KB450 K450 MB/s
4 KB150 K600 MB/s

Sustained Throughput

RingBuffer ingestion: 10.4 M msg/s (256 bytes)
Capture file write: 481 MB/s (sequential)
Capture file read: 5.3 M frames/s

Component Benchmarks

Serialization (CDR2)

Operation64 B256 B1 KB4 KB
Serialize50 ns120 ns400 ns1.5 us
Deserialize40 ns100 ns350 ns1.3 us

History Cache

OperationTime
Insert sample150 ns
Lookup by key80 ns
Remove sample120 ns
Match ACK200 ns

Discovery

OperationTime
SPDP parse5 us
SEDP parse8 us
Endpoint match2 us
Cold start (2 participants)150-300 ms

Memory Usage

Per-Entity Overhead

EntityMemory
DomainParticipant~2 MB
Publisher~64 KB
Subscriber~64 KB
DataWriter~128 KB + history
DataReader~128 KB + history
Topic~16 KB

History Cache Memory

Memory = instances x history_depth x sample_size + overhead

Example (100 sensors, 10-deep history, 1KB samples):
= 100 x 10 x 1024 + 100 x 256
= 1.02 MB + 25 KB = ~1.05 MB

Running Benchmarks

Built-in Benchmarks

# Run all benchmarks
cargo bench --package hdds

# Latency benchmark
cargo bench --package hdds -- latency

# Throughput benchmark
cargo bench --package hdds -- throughput

# Serialization benchmark
cargo bench --package hdds -- serialize

Performance Testing Tool

# Publisher side
hdds-perf pub --topic Benchmark --rate 10000 --size 256

# Subscriber side
hdds-perf sub --topic Benchmark --stats

Output:

Received 100000 samples in 10.02s
Throughput: 9980 msg/s (2.55 MB/s)
Latency p50: 45 us, p95: 82 us, p99: 156 us
Jitter: 12 us (std dev)

Profiling

CPU Profiling

# Using perf
perf record -g cargo run --release --example benchmark
perf report

# Using flamegraph
cargo flamegraph --example benchmark

Memory Profiling

# Using heaptrack
heaptrack cargo run --release --example benchmark
heaptrack_gui heaptrack.benchmark.*.gz

Performance Targets

Real-Time Targets

MetricTargetNotes
Latency p99< 100 usSame host, < 1 KB
Jitter< 20 usStandard deviation
Message rate> 100 K/sPer writer

High-Throughput Targets

MetricTargetNotes
Bandwidth> 1 GB/sLarge payloads
Message rate> 1 M/sSmall payloads
CPU efficiency< 5% per 100K msg/s

Comparison with Other Implementations

MetricHDDSFastDDSCycloneDDS
Latency (64B)8 us12 us10 us
Throughput2.5 M/s1.8 M/s2.2 M/s
Memory (idle)2 MB4 MB3 MB

Measurements on equivalent hardware and configuration.

Optimization Impact

QoS Impact on Performance

ConfigurationLatencyThroughput
BestEffort + KeepLast(1)BaselineBaseline
Reliable + KeepLast(10)+20%-30%
Reliable + KeepAll+50%-50%
+ TransientLocal+10%-10%

Transport Impact

TransportLatencyThroughput
Shared Memory1x1x
UDP Loopback4x0.7x
UDP Network10x0.5x

Next Steps