For AI agents: a documentation index is available at /llms.txt. Markdown versions of pages are available by appending .md to any documentation URL.
Skip to main content

Profile Besu with Java Flight Recorder

Java Flight Recorder (JFR) is a monitoring tool that collects information about the Java Virtual Machine (JVM) when Besu is running. Use the JFR as a tool to analyze Besu performance.

Besu records JFR data by default. Save the recording to a file and inspect it afterwards. To profile a node continuously instead, and view the results in Grafana, see Profile with Pyroscope.

Save the recording​

From version 24.7.0, the besu start script and the Besu Docker image start a JFR recording using the JFR default settings. The recording keeps the most recent data on disk, up to 250 MB.

To save the recording to a file:

  1. Find the process ID of Besu. Run jcmd with no arguments to list the running Java processes. Besu is listed as org.hyperledger.besu.Besu.

    jcmd
  2. Save the recording to a file, replacing <PID> with the process ID from the previous step:

    jcmd <PID> JFR.dump name=1 filename=/tmp/recording.jfr
note

The besu-untuned start script doesn't start a JFR recording.

Inspect the file written to /tmp/recording.jfr with tools such as Mission Control.

danger

If providing the output file to Besu support, be aware that while JFR files don't contain secrets such as private keys, some details about the user configuration can be inferred from the JFR output.