Akka actors running on m6i vs m7g instances

akka v2.6.19
scala 2.13.10

Hello,

So, I’m doing some instance type comparison against m6i vs m7g.
I noticed the performance on m7g performs worse than m6i, that is the throughput is much lower on m7g vs m6i. And the cpu usage is higher on m7g.
I created a basic latency metric on how long it takes an actor to process a message from mailbox and the latency on m7g is higher than m6i.

To me this overall performance tells me that graviton instances (m7g) doesn’t perform better as what AWS would claim. But before I can conclude that. I was wondering if there is something that I have missed that needed to be changed in order to run better on m7g. Specifically anything involved with akka framework. Or at least point out what to look for. Thoughts? Or anybody has similar experience?

It’s hard to comment specifically on this because we haven’t really done benchmarking or focused optimizations specifically at ARM architecture CPUs like Graviton. But we can share some general thoughts:

  • Processing a message from a mailbox is largely a function single-thread performance, and there is some evidence that Graviton CPUs have lower single-thread performance than Intel CPUs (though Graviton may have better performance relative to price). That would suggest that the approach to take when deploying to Graviton might be to deploy more vCPU than on Intel (e.g. instead of 9 16-core m6i.4xlarge instances, deploy 5 32-core m7g.8xlarge instances… from checking AWS pricing right now in us-east-2, the m7g actually costs less for more total vCPU). In many typical Akka applications, the gain from parallelism will make up (at least in throughput terms) for the increased latency of processing any given message.

  • It’s possible that the JVM on ARM isn’t as mature as the Intel-targeting JVMs when it comes to JIT compiling code or garbage collection.

1 Like

The first bullet is an interesting one. It sounds like it’s something we have to accept and compensate by giving it more cores to compensate the lower performance on Graviton (and since it’s relatively cheaper). I’m curious if any one moved to Graviton with akka based application. I wonder if there’s significant benefit or cost reduction for doing this transition.

The second bullet, we are using Amazon Corretto Java 11, which is the recommendation. Im hoping Amazon has optimized the JVM for Graviton.

ARM can save you many but not for high performance, xbox and ps5 is using x86 not Arm chips