AWS Lambda battle: x86 vs ARM(Graviton2)


Test scenario

We are going to compare performance for ARM and x86 for cold and warm states for all supported runtimes + Rust and Graalvm:

  • NodeJs (14.x)
  • Python (3.9)
  • Go(1.x)
  • Ruby(2.7)
  • .Net(3.1)
  • Java (11)
  • Rust(1.54.0)
  • GraalVM(21.3)
The main flow

Cold start

Cold start
Cold start per runtime

Warm state

For the warm state, I sent 15k requests for each lambda one by one(lambda concurrency is 1, all request go to the same lambda instance).

DotNet ARM vs x86
Go comparison
GraalVM ARM vs x86
NodeJS ARM vs x86
Python ARM vs x86
Ruby ARM vs x86
Rust ARM vs x86
Java ARM vs x86

All Runtime together

all runtimes ~12k iterations
128 MB (15k iteration for single lambda instance)
256MB (15k iteration for single lambda instance)

Migration effort

To move your Lambda to ARM runtime you just need to add a new field in CF/SAM script.


For this particular test for all runtimes (except GraalVM) we see that ARM/Graviton2 processor is faster and 20% cheaper than x86.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store