hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.52k stars 840 forks source link

JFR always running? #7579

Open rcketscientist opened 2 months ago

rcketscientist commented 2 months ago

Description

I've noticed that my besu container is accruing a fairly large tmp due to jfr files. I do not have jfr configured, should I still expect to see the jfr files being dumped?

Expected behavior: No jfr until configured.

Actual behavior: jfr dumps regardless

Versions (Add all that apply)

ahamlat commented 2 months ago

Hi @rcketscientist, This is happening because of this configuration : -XX:StartFlightRecording,dumponexit=true,settings=default.jfc when using besu.sh tostart Besu process. There is currently no limit on the number of dumped JFR files, as each time besu restarts or crashes, a new file is dumped to disk with the timestamp in the name of the file. I agree that this is not ideal and we should review it. One mitigation is to use besu-untuned.sh instead of besu.sh, but in this case, you will not benefit from the GC flags that reduce memory usage, and only available with besu.sh Another option, is to modify -XX:StartFlightRecording,dumponexit=true,settings=default.jfc in build.gradle to delete dumponexit=true, and generate Besu binaries from the sources.