Skip to content

Add Akka.Streams throughput benchmarks#8172

Merged
Aaronontheweb merged 2 commits into
akkadotnet:devfrom
Aaronontheweb:claude-wt-akka-streams-throughput-benchmarks
Apr 22, 2026
Merged

Add Akka.Streams throughput benchmarks#8172
Aaronontheweb merged 2 commits into
akkadotnet:devfrom
Aaronontheweb:claude-wt-akka-streams-throughput-benchmarks

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

Summary

  • Add StreamThroughputBenchmarks with 4 benchmarks measuring element throughput for different stream topologies
  • Add ThroughputBenchmarkConfig that includes Req/sec column for easier comparison

Benchmarks Added

Benchmark Topology Purpose
Linear_Pipeline_Throughput Source → 2 Selects → Sink Most common topology baseline
Deep_Pipeline_5_Stages_Throughput Source → 5 Selects → Sink Amplifies per-stage overhead
Merge_Fan_In_Throughput 2 Sources → Merge → Sink Fan-in topology baseline
Batch_Fan_In_Throughput Source → Batch → SelectMany → Sink Batching topology baseline

Sample Results (VM, expect better on bare metal)

Method Mean Req/sec Allocated
Linear_Pipeline_Throughput 98 ns 10.2M 73 B
Deep_Pipeline_5_Stages_Throughput 213 ns 4.7M 145 B
Merge_Fan_In_Throughput 82 ns 12.2M 49 B
Batch_Fan_In_Throughput 183 ns 5.5M 201 B

Test plan

  • Benchmark project builds
  • Benchmarks execute successfully (dry run verified)
  • Run on bare metal for canonical baseline numbers

Adds StreamThroughputBenchmarks with 4 benchmarks measuring element
throughput for different stream topologies:

- Linear_Pipeline_Throughput: Source → 2 Selects → Sink
- Deep_Pipeline_5_Stages_Throughput: Source → 5 Selects → Sink
- Merge_Fan_In_Throughput: 2 Sources → Merge → Sink
- Batch_Fan_In_Throughput: Source → Batch → SelectMany → Sink

These establish baseline throughput numbers before trace-context
propagation is added in PR akkadotnet#8160. Uses OperationsPerInvoke to report
per-element throughput.
Reports elements per second for easier throughput comparison
between baseline and trace-context branches.
@Aaronontheweb

Copy link
Copy Markdown
Member Author

Akka.Streams Throughput Benchmark Results — old-gpu Baseline

Machine: Intel Core i7-6700K CPU 4.00GHz (Skylake), 1 CPU, 8 logical / 4 physical cores
OS: Linux Ubuntu 24.04.2 LTS (Noble Numbat)
Runtime: .NET 10.0.5 (10.0.5, 10.0.526.15411), X64 RyuJIT x86-64-v3
SDK: 10.0.201
BenchmarkDotNet: v0.15.4
GC: Concurrent Workstation

Method Mean Error StdDev Req/sec Gen0 Gen1 Allocated
Linear_Pipeline_Throughput 106.33 ns 2.030 ns 2.172 ns 9,404,712.54 0.0173 - 73 B
Deep_Pipeline_5_Stages_Throughput 227.15 ns 4.528 ns 7.050 ns 4,402,393.09 0.0344 - 145 B
Merge_Fan_In_Throughput 89.43 ns 1.731 ns 2.370 ns 11,181,861.31 0.0117 0.0002 49 B
Batch_Fan_In_Throughput 190.96 ns 3.747 ns 5.833 ns 5,236,621.08 0.0478 - 201 B

Note: Benchmarks ran without elevated priority (Permission denied for high priority). Results should still be representative for baseline comparison purposes.

@Aaronontheweb Aaronontheweb marked this pull request as ready for review April 22, 2026 19:01
@Aaronontheweb Aaronontheweb merged commit 2e3708e into akkadotnet:dev Apr 22, 2026
12 checks passed
@Aaronontheweb Aaronontheweb deleted the claude-wt-akka-streams-throughput-benchmarks branch April 22, 2026 19:01
Aaronontheweb added a commit that referenced this pull request Apr 24, 2026
* Add Akka.Streams throughput benchmarks for trace-context baseline

Adds StreamThroughputBenchmarks with 4 benchmarks measuring element
throughput for different stream topologies:

- Linear_Pipeline_Throughput: Source → 2 Selects → Sink
- Deep_Pipeline_5_Stages_Throughput: Source → 5 Selects → Sink
- Merge_Fan_In_Throughput: 2 Sources → Merge → Sink
- Batch_Fan_In_Throughput: Source → Batch → SelectMany → Sink

These establish baseline throughput numbers before trace-context
propagation is added in PR #8160. Uses OperationsPerInvoke to report
per-element throughput.

* Add ThroughputBenchmarkConfig with Req/sec column

Reports elements per second for easier throughput comparison
between baseline and trace-context branches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant