Skip to content

JVM Profiler

Since version 0.5.0, Celeborn supports JVM sampling profiler to capture CPU and memory profiles. This article provides a detailed guide of Celeborn Worker's code profiling.

Worker Code Profiling

The JVM profiler enables code profiling of workers based on the async profiler, a low overhead sampling profiler. This allows a Worker instance to capture CPU and memory profiles for Worker which is later analyzed for performance issues. The profiler captures Java Flight Recorder (jfr) files for each worker that can be read by tools like Java Mission Control and Intellij etc. The profiler writes the jfr files to the Worker's working directory in the Worker's local file system and the files can grow to be large, so it is advisable that the Worker machines have adequate storage.

Code profiling is currently only supported for

  • Linux (x64)
  • Linux (arm 64)
  • Linux (musl, x64)
  • MacOS

To get maximum profiling information set the following jvm options for the Worker :

-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -XX:+PreserveFramePointer

For more information on async_profiler see the Async Profiler Manual.

To enable code profiling, enable the code profiling in the configuration.

celeborn.worker.jvmProfiler.enabled true

For more configuration of code profiling refer to celeborn.worker.jvmProfiler.*.

Profiling Configuration Example

celeborn.worker.jvmProfiler.enabled true
celeborn.worker.jvmProfiler.options event=wall,interval=10ms,alloc=2m,lock=10ms,chunktime=300s