-
Notifications
You must be signed in to change notification settings - Fork 1k
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 LRU cache support to inbound Akka.Remote IActorRef resolution #5240
added LRU cache support to inbound Akka.Remote IActorRef resolution #5240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Described changes
@@ -65,7 +65,8 @@ protected override int Hash(string k) | |||
|
|||
protected override bool IsCacheable(IActorRef v) | |||
{ | |||
return !(v is EmptyLocalActorRef); | |||
// don't cache any FutureActorRefs, et al | |||
return !(v is MinimalActorRef && !(v is FunctionRef)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter out any temp actors from being added to the cache unless they're a FunctionRef
- which is a rare but necessary edge case to support some Akka.Streams scenarios.
Should resolve #5230
Sharding benchmark performance with these changes: BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19041.1165 (2004/May2020Update/20H1)
AMD Ryzen 7 1700, 1 CPU, 16 logical and 8 physical cores
.NET SDK=5.0.302
[Host] : .NET Core 3.1.17 (CoreCLR 4.700.21.31506, CoreFX 4.700.21.31502), X64 RyuJIT
Job-LWNJGO : .NET Core 3.1.17 (CoreCLR 4.700.21.31506, CoreFX 4.700.21.31502), X64 RyuJIT
InvocationCount=1 UnrollFactor=1
|
Numbers for those same benchmarks on dev: BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19041.1165 (2004/May2020Update/20H1)
AMD Ryzen 7 1700, 1 CPU, 16 logical and 8 physical cores
.NET SDK=5.0.302
[Host] : .NET Core 3.1.17 (CoreCLR 4.700.21.31506, CoreFX 4.700.21.31502), X64 RyuJIT
Job-CCOYAC : .NET Core 3.1.17 (CoreCLR 4.700.21.31506, CoreFX 4.700.21.31502), X64 RyuJIT
InvocationCount=1 UnrollFactor=1
|
Virtually zero benefit for the sharding benchmark - which tells me that the costs of cache misses are probably negligible. |
With the latest BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19041.1165 (2004/May2020Update/20H1)
AMD Ryzen 7 1700, 1 CPU, 16 logical and 8 physical cores
.NET SDK=5.0.302
[Host] : .NET Core 3.1.17 (CoreCLR 4.700.21.31506, CoreFX 4.700.21.31502), X64 RyuJIT
Job-WSNPID : .NET Core 3.1.17 (CoreCLR 4.700.21.31506, CoreFX 4.700.21.31502), X64 RyuJIT
InvocationCount=1 UnrollFactor=1
Benchmarks with issues: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Before (current `dev)
After
Combined totals when also factoring in #5228 were as high as 240k+