Twitter’s quest for a Wholly Graal runtime
summary
Twitter replaces C2 with Graal in production for several Scala services, compiling in tiered: C1 then Graal. Benchmarks on an isolated cluster show concrete wins: 11% less user CPU on the tweet service and about 2.7% fewer scavenge cycles, with further gains (≈2% CPU) from manual inlining tuning. A handful of compiler bugs and support work (compact strings, snippets, intrinsics) are fixed; Graal runs stable under real traffic and saves measurable cost at scale.
AI-written summary · about
chapters (24)
- 0:00Introduction and motivation
- 1:08Twitter’s VM team and Graal
- 4:45Why replace C2 with Graal
- 8:00Bugs found and fixed in Graal
- 15:53Graal optimizations for Scala
- 17:38Benchmarking setup
- 20:56Performance results overview
- 22:04Garbage collection improvements
- 23:51Heap and metaspace usage
- 25:21CPU time savings
- 27:06Production adoption at Twitter
- 28:10Escape analysis impact
- 30:01Cost savings estimates
- 33:14Tuning inlining parameters
- 35:02Official support and future plans
- 37:10Project Metropolis and Graal
- 38:36Graal for Scala applications
- 40:48Need for new compiler foundation
- 42:12Recompilation recovery time
- 43:33Future with Project Valhalla
- 44:34Compact strings and intrinsics
- 46:00Q&A: Graal vs C2 compilation
- 47:14Q&A: Exception handling in Graal
- 48:37Q&A: Tuning C2 parameters
