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

added actor messaging pressure benchmark #6147

Merged

Conversation

Aaronontheweb
Copy link
Member

Changes

purpose of this benchmark is not to measure processing time - it's meant to measure allocation pressure created by Akka.NET infrastructure:

  • Envelopes
  • Mailbox and MessageDispatcher overhead
  • ActorCell and ActorBase invocation overhead

Ideally the memory pressure, given a const string as messaging input, should be close to zero - but between mailbox queue segment allocations, delegate + closure allocations, and probably some boxing we know that's not the case. Purpose of this benchmark is to measure that impact across threads.

N.B. - this benchmark makes no attempt to measure processing time nor does it wait for actors to process all messages. That is by design.

Checklist

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

Latest v1.4 Benchmarks

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.2006 (21H2)
AMD Ryzen 7 1700, 1 CPU, 16 logical and 8 physical cores
.NET SDK=6.0.201
  [Host]     : .NET 6.0.3 (6.0.322.12309), X64 RyuJIT
  Job-WGPBOC : .NET 6.0.3 (6.0.322.12309), X64 RyuJIT

InvocationCount=1  UnrollFactor=1  
Method MsgCount ActorCount Mean Error StdDev Gen 0 Gen 1 Allocated
PushMsgs 100000 10 1.287 s 0.0067 s 0.0063 s 18000.0000 1000.0000 71 MB
PushMsgs 100000 100 12.818 s 0.1166 s 0.1091 s 176000.0000 1000.0000 689 MB

purpose of this benchmark is not to measure processing time - it's meant to measure allocation pressure created by Akka.NET infrastructure:

* `Envelope`s
* `Mailbox` and `MessageDispatcher` overhead
* `ActorCell` and `ActorBase` invocation overhead

Ideally the memory pressure, given a `const string` as messaging input, should be close to zero - but between mailbox queue segment allocations, delegate + closure allocations, and probably some boxing we know that's not the case. Purpose of this benchmark is to measure that impact across threads.
@Aaronontheweb Aaronontheweb added this to the 1.4.44 milestone Oct 6, 2022
@Aaronontheweb Aaronontheweb merged commit bf273d9 into akkadotnet:v1.4 Oct 6, 2022
@Aaronontheweb Aaronontheweb deleted the memory-pressure-benchmark branch October 6, 2022 15:49
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this pull request Oct 8, 2022
purpose of this benchmark is not to measure processing time - it's meant to measure allocation pressure created by Akka.NET infrastructure:

* `Envelope`s
* `Mailbox` and `MessageDispatcher` overhead
* `ActorCell` and `ActorBase` invocation overhead

Ideally the memory pressure, given a `const string` as messaging input, should be close to zero - but between mailbox queue segment allocations, delegate + closure allocations, and probably some boxing we know that's not the case. Purpose of this benchmark is to measure that impact across threads.
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