How we optimized our Akka application using Datadog’s Continuous Profiler | Datadog
Sep 30, 2021Vladimir Zhuk

Summary
This post details the use of Datadog's Continuous Profiler to identify a performance bottleneck in an Akka application. The issue was traced to the `ForkJoinPool` within the default Akka dispatcher, which was consuming significant CPU due to frequent thread parking and unparking caused by an irregular flow of tasks from the `LatencyReportActor`. The solution involved reconfiguring the `LatencyReportActor` to use a different dispatcher with a more stable task flow, resulting in a 30% drop in overall CPU usage and a reduction in the default Akka dispatcher's thread pool size.
More from the Java CPU Profiling trail
- How we built an async-aware Python profiler | Datadog
- Unbiased Java CPU profiling with JFR in JDK 25 | Datadog
- From hand-tuned Go to self-optimizing code: Building BitsEvolve | Datadog
- How we tracked down a Go 1.24 memory regression across hundreds of pods | Datadog
- .NET Continuous Profiler: Exception and lock contention | Datadog