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

Why do the Akka benchmarks use context.system.actorOf? #13

Open
dplyukhin opened this issue Jul 27, 2023 · 0 comments
Open

Why do the Akka benchmarks use context.system.actorOf? #13

dplyukhin opened this issue Jul 27, 2023 · 0 comments

Comments

@dplyukhin
Copy link

Hi, I've been using the Savina benchmarks to evaluate an Akka feature I'm developing.

I noticed that the Akka benchmarks do not use the most efficient API for spawning actors. Namely, in FibonacciAkkaActorBenchmark, actors are spawned using context.system.actorOf instead of context.actorOf. The former API spawns actors at the top level of the supervision hierarchy, whereas the latter means that the parent supervises the child. I found that switching from the former to the latter led to a 2x performance improvement in Akka 2.6.3!

My theory is that you used the former API to simplify manual actor termination. In Akka, stopping the supervisor causes all its descendants to stop, which can sometimes mean that actors stop earlier than expected.

Is my theory correct? I'd love to hear your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant