Search code examples
javaioprofiling

How to profile the IO activities triggered by the java process?


Currently, I know there are some tools for profiling the CPU/memory for the java process.

When I wanted to track how the java process interacts with IO, I didn't find any tool for checking the details, especially for which threads/call-stacks, usages, and files.

The tools I can use are some OS-level commands like dstat.

Is there any tool for profiling DISK IO for java?


Solution

  • Is there any tool for profiling DISK IO for java?

    Some JVM profilers have probes that deal with file access. JProfiler for example has a file probe that measures read and write operations for both java.io and java.nio.

    enter image description here

    Measurements are resolved by file:

    enter image description here

    For performance considerations, the hot spots view of the file probe shows which files are responsible for most of the time spent in disk I/O and gives you expandable back traces for each file.

    enter image description here

    Disclaimer: My company develops JProfiler