Skip to main content

Analyzing FE Performance with Arthas

Introduction

In Apache Doris 3.1.0 and later, the FE deployment directory ${DORIS_FE_HOME}/arthas ships with the Arthas tool (version 4.0.5). With Arthas, you can print flame graphs online, trace function call paths, measure function latency, and observe function inputs and return values, which makes it easier to locate runtime issues in the FE.

For more detailed command descriptions, refer to the Arthas official documentation.

System Support

SystemSupported
LinuxYes
macOSYes
WindowsNot yet supported

Manual Installation for Older FE Versions

For Doris versions earlier than 3.1.0, download Arthas manually:

wget https://github.com/alibaba/arthas/releases/download/arthas-all-4.0.5/arthas-bin.zip
unzip arthas-bin.zip -o ${DORIS_FE_HOME}/arthas

Generating a Flame Graph

  1. Run the ${DORIS_FE_HOME}/arthas/as.sh script and select the serial number of the DorisFE process from the process list:

    bash ./as.sh
    Arthas script version: 4.0.5
    Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
    * [1]: 75123 com.intellij.idea.Main
    [2]: 77285 org.apache.doris.DorisFE
    [3]: 76901 DorisBE
    [4]: 6776 org.jetbrains.jps.cmdline.Launcher
    [5]: 76265 DorisBE
    [6]: 80527 org.jetbrains.jps.cmdline.Launcher
    2
  2. Start profiling on the Arthas command line:

    [arthas@77285]$ profiler start
    Profiling started
  3. Stop profiling and generate a flame graph in HTML format:

    [arthas@77285]$ profiler stop --format html
    OK
    profiler output file: <DORIS_FE_HOME>/arthas-output/20250627-115104.html

    The output file is placed under ${DORIS_FE_HOME}/arthas-output/. Open it in a browser to analyze hot functions.

Common Arthas Command Cheatsheet

CommandPurpose
profiler start / profiler stop --format htmlCollect a CPU flame graph
trace <class> <method>Trace function call paths and latency
watch <class> <method>Observe function inputs and return values
threadView JVM thread state
dashboardView overall JVM runtime metrics in real time

FAQ

Q: The DorisFE process is not found when running as.sh.

Make sure the FE process has started and that as.sh runs on the same machine as the FE. The process list comes from JVMs visible to the current user.

Q: The generated flame graph is empty or has too few samples.

Make sure the FE has a continuous query or request load during profiling. You can extend the interval between profiler start and profiler stop.