Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents    Previous    Next

4.1 JFR Overhead

When measuring performance, it is important to consider any performance overhead added by the flight recorder itself. The overhead differs depending on the application. In case you have any performance tests set up, you can measure if there is any noticeable overhead on your specific application. That said, the overhead for recording a standard profiling recording using the default settings is less than 2 percent for most applications. Running with a standard continuous recording generally has no measurable performance impact.

One major contributor to the overhead is the Heap Statistics events, which is disabled by default. Enabling Heap Statistics triggers an old garbage collection at the beginning and the end of the test run. These old GCs give some extra pause times to the application, so if you are measuring latency or if your environment is sensitive to pause times, don't run with Heap Statistics enabled. Heap Statistics are great when debugging memory leaks or when investigating the live set of the application. For more details see Debug a Memory Leak Using Java Flight Recorder.

Note: For performance profiling use cases, this information may not be necessary.

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
Contact Us