Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor read-side RabbitMQ perf optimization #1905

Merged

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Mar 27, 2024

Changes

The BIG improvements will come from making ByteString less bad inside Akka.NET, as there is a TON of memory copying that is unecessary right now.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Latest dev Benchmarks

BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3296/23H2/2023Update/SunValley3)
12th Gen Intel Core i7-1260P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 8.0.101
  [Host]     : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2
  Job-WOEZAU : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2

InvocationCount=1  IterationCount=10  RunStrategy=ColdStart  
UnrollFactor=1  WarmupCount=0  

Method Mean Error StdDev Gen0 Allocated
RabbitMqReadFlow 87.19 μs 5.047 μs 3.338 μs 0.1700 1.56 KB

This PR's Benchmarks


BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3296/23H2/2023Update/SunValley3)
12th Gen Intel Core i7-1260P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 8.0.101
  [Host]     : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2
  Job-NDZWOM : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2

InvocationCount=1  IterationCount=10  RunStrategy=ColdStart  
UnrollFactor=1  WarmupCount=0  

Method Mean Error StdDev Gen0 Allocated
RabbitMqReadFlow 104.7 μs 28.80 μs 19.05 μs 0.1600 1.53 KB

Ignore the mean perf number - I was focused solely on memory allocs here and was doing a ton of other work in the background. Those numbers are not reliable.

The BIG improvements will come from making `ByteString` less bad inside Akka.NET, as there is a TON of memory copying that is unecessary right now.
@Aaronontheweb Aaronontheweb merged commit aabd5a7 into akkadotnet:dev Mar 27, 2024
1 of 4 checks passed
@Aaronontheweb Aaronontheweb deleted the rabbitmq-perf-optimization branch March 27, 2024 19:06
@Aaronontheweb Aaronontheweb added the rabbitmq Issues affecting RabbitMQ / AMQP connectors label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rabbitmq Issues affecting RabbitMQ / AMQP connectors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant