Splitting Flight Recorder Files

Flight recorder is most commonly used to dump the last few minutes of data. Either by doing a profiling recording for a minute or so, or by having a continuous recording which is later dumped when some anomaly was discovered using a monitoring tool, for example the JMC JMX console.

Sometimes though, people bring me enormous recordings. Now, enormous recordings are not handled well in JMC. Most of the time, JMC will discover that you are trying to open something that is too large, and prompt you for what subset of the recording you want to open. 

rl5di

Sometimes it is easier to simply split the recording into smaller recordings instead.

Here is a small tool that can be used for splitting flight recordings:

split.jar

Usage:

java -jar split.jar filename [targetSizePerFile in MiB (default 50)]

Note that the jfr file will be split along chunk boundaries using a best effort algorithm. The individual files will be as close to the specified target size as the chunk boundaries allow.

Let me know if you run into trouble! 🙂

3 Responses to "Splitting Flight Recorder Files"

  1. […] the Splitting Flight Recorder Files blog entry for more information on how to use the […]

  2. Pedro says:

    We actually use JFR for long-term performance analysis, let’s say record the events on the server while our 2-hour load run test is being executed. That gives us a whole lot of awesome metrics on our EJB, database, servlet, transactions, etc. It is quite impressive. And yes I need to open these 200MB JFR files in a machine with around 24 GB of RAM but it is ok because it gives us so much info to work with!

  3. Marcus says:

    Great to hear about your success! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *