![]() Previous |
![]() Next |
Buffers are critical to the efficacy of the JFR. The size of the buffer determines when and how data is removed from the disk buffers. Data can be discarded either after evaluating its age, or the size of the buffer, or a combination of both. This topic describes these features:
You can configure the buffer sizing mode at the command line when you start the JFR. You can select from one of two modes:
In the Time-bound sizing mode, the JFR will aim at keeping data for at least a certain period of time. Data that has expired will be removed from the disk.
In the Space-bound sizing mode, the JFR will always keep the size of the buffers bounded, so the maximum age of the events in the buffer may vary from time to time.
For more information on setting the buffer mode, see the JRockit Flight Recorder Runtime User Guide on the Oracle Technology Network.
The Flight Recorder moves or discards data from the buffers when the any of the following conditions exist:
When using the space-bound buffer sizing, required buffer size exceeds current buffer size.
When using the time-bound buffer sizing, data is older than the current time window.
When the in-memory buffer runs out of memory.
For more information on setting the buffer size, see the JRockit Flight Recorder Runtime User Guide on the Oracle Technology Network.
Information overlap between the various buffers will not occur. A particular chunk of data is available either in memory or on disk, but never both. This has the following implications:
Data not yet flushed to a disk buffer will not be available in the event of a power failure.
A JVM crash can result in some data being available in the core file (that is, the in-memory buffer) and some in the disk buffer. The Flight Recorder provides no capability to merge such buffers (an advanced client program or tool might, but that's outside of the scope of this version.
There may be a small delay before data inserted into the Flight Recorder is available to consumers (e.g. because it has to be moved to a different buffer before it can be made visible).
The data in the JFR file may not be in time sequential order as the data is collected in chunks from several thread buffers.
In some extreme cases, Oracle JRockit will drop events order to not block the JVM from running. Any data that can not be written fast enough to disk will be discarded. When this happens, the recording file will include information on which time period was affected. This information will also be logged to JRockit's logging facility.