-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable JFR continuous profiling with default setting #7006
Enable JFR continuous profiling with default setting #7006
Conversation
Signed-off-by: Ameziane H <[email protected]>
Signed-off-by: Ameziane H <[email protected]>
Signed-off-by: Ameziane H <[email protected]>
…d when we want to dump the file. Signed-off-by: Ameziane H <[email protected]>
Signed-off-by: Ameziane H <[email protected]>
Sharing some tests here :
|
There is still one small issue that happens with java 17, but not with java 21. The JVM displays in the output dumponexit=true,settings=default.jfc which is not great in terms of user experience, when for example we want to display Besu version :
This is actually what is making some of the acceptance tests fail, ex. besu --help command test |
It is simple to reproduce even with only Java --version Java 17
Java 21
|
As Java 21 is now needed to build and run Besu : #7177, we can move on on this PR and enable continuous profiling. |
Java 21 has JFR included by default, but the main benefit from this PR is to have the profiling enabled from the last restart. This will help to troubleshoot an issue that happened that we can not reproduce. |
PR description
Enable JFR continuous profiling with default setting.
Java Flight Recorder (JFR) serves as an integrated mechanism within the Java Virtual Machine (JVM) for gathering, analyzing, and profiling information regarding the performance and memory usage of Java applications. Its design ensures minimal impact on performance, making it suitable for deployment in high-demand production settings.
With default setting, the impact on performance is less than 1 %.
Once the recording in place, we can either dump the recording from the last restart knowing that the recording is limited to 250 MiB, or start a second recording to have a recording you small set of data and in a controlled period.
Configure the recording with default setting profile
BESU_OPTS=-XX:StartFlightRecording,dumponexit=true,settings=default.jfc
Check the recording
sudo jcmd PID JFR.check
Start a parallel recording
sudo jcmd PID JFR.start
Dump the profiling to a file
Dump the default recording : sudo jcmd PID JFR.dump name=1 filename=FILEPATH
Dump the parallel recording : sudo jcmd PID JFR.dump name=2 filename=FILEPATH
Fixed Issue(s)
#6957
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests