Akka.net vs Orleans performance
Asked Answered
T

2

22

Hi I'm in the early stage of choosing an actor framework for a project I'm about to start. As far as I know Orleans was meant to relief the developer of as much pain as possible, at cost of some performance. In Akka.net I know that the actor size is 400 bytes If I'm right and you have to go to low level to handle cluster connections and things that are managed by orleans, but will bring you great performance.

The only performance metrics I found around internet for Orleans are:

Using X-Large VMs (8 CPU Cores / 14 GB RAM) on Microsoft Azure, with one silo per VM:

A grain will handle a maximum of 1,000 requests per second. A silo will handle a maximum of 10,000 requests per second. A silo will hold 100,000 active grains.

And for Akka.net in the main page:

50 million msg/sec on a single machine. Small memory footprint; ~2.5 million actors per GB of heap.

I'd like to know what machines were used in the Akka.net scenario and how do they perform Grain vs Actor (in terms of requests per seconds and how many grains/actors can you fit in a GB of RAM more or less) and how much does a grain weight in memory.

With the quotes from Orleans and Akka.net looks like Akka.net performs much better but I'd like to get further comparison on both in terms of performance.

I found this Akka.Net VS MS Orleans Comparison and Orleans and Akka Actors: A Comparison but does not address the performance question.

Thanks!

Teletype answered 4/1, 2017 at 15:41 Comment(2)
I think you'll find that--as with all distributed computing--performance depends on a lot of factors, and your application logic is likely the primary one. I prefer the Orleans approach because I'm a developer and I don't want to manage every detail, but that's just my opinion. Build prototypes using both approaches and see what works best.Vlaminck
As @DanWilson already said, the benchmarks are based on a lot of factors so it is hard to really compare. While Akka .NET is probably faster, it's also much lower-level. In terms of distributed computing, ease of scalability and development is often a lot more important than raw processing power. I would by far prefer to save many developer-months of work at the cost of extra performance that I will never need anyway.Monotheism
Q
27

Akka.net reports local messages, which are basically function calls. Orleans reports remote messages, see RPC. That is a main difference. There are other differences as well of course.

Besides the above, the only real advise I can give you is to measure yourself, for your realistic benchmark, in a setup that will be as close as possible to production in terms of communication pattern and number of servers.

Quadroon answered 4/1, 2017 at 15:57 Comment(3)
Note that Akka has a default optimization, which is that messages are not serialized when the from and to actors are on the same node. In Orleans they are serialized even then. (You can configure this behavior though)Hulda
Hello @JohantHart, I made a research based on your comment and found this on Orleans documentation. If the called grain is on a different silo, then the copies are eventually serialized into a byte stream and sent over the network to the target silo, where they are deserialized back into objects. If the called grain is on the same silo, then the copies are handed directly to the called method. Is that information incorrect or not the default behavior?Cloninger
Yes turns out I was partly mistaken. Orleans doesn't serialize it when the target is on the same node but it does always make a deep copy of the objects to be passed. You can avoid this though by marking your types immutable.Hulda
M
10

Microsoft Orleans was used to develop the backend of Halo 4 and Halo 5 which were both aclaimed for their multiplayer performance in online matches.

I work with Akka.net and I hear and read a lot of comments with claims that Akka.net is better or faster because of this and that but with little evidence on what they are basing their claims.

I would advise you to ignore the bias and do your own research or study the uses cases for each one. Also keep in mind that performance comparison may be biased to the tool the developer is familiarized.

Personally I think Microsoft Orleans is faster to learn and the code has less boilerplate when compared to Akka.net. Also it is way more familiar to what C# developers are used to.

Your link about Akka vs Orleans isn't comparing Akka.net vs Orleans. Akka on the JVM is another story. Akka.net is just a port and the JVM is totally different from the dotnet runtime which is why the Orleans team say C# doesn't need something like Akka (sorry I could not find their post saying this).

Mitis answered 6/11, 2021 at 16:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.