Skip to main content

Howto track down IO bottlenecks

2 replies [Last post]
erikvanherck
Offline
Joined: 2004-07-21
Points: 0

Hi All,

While we have great tools with profilers for finding CPU and Memory bottlenecks and issues, it seems IO is far more difficult. Of course the best tool is still between our ears. Nonetheless last time I looked at an IO related performance issue it took me quite a while to figure out were a certain file was being read from.

Anyone any good tools they can recommend in this area ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
karunanidhis
Offline
Joined: 2007-10-22
Points: 0

Hi erikvanherck !
Which Operating System does your Application run on ?
Generally OS commands provide better visibilty to the I/O activity. For Solaris, try the following

1. [b]top[/b]
Look at the %iowait on the third line. This is the %if CPU spent on waiting for IO. If it's more than 5-10%, you might have an I/O issue

2. [b]iostat -xn 2[/b]
This command displays individual hard disks and their i/o statistics. Pay attention to %w (wait) and %b (busy). If the Hard disk is more than 25% busy, you may have I/O issue.

The first two commands provide I/O stats for the whole Server (physical box) and not just your App. Generally the highest CPU Utilizing process is also the top I/O intensive process.

3. If you want to know which files your JVM process has opened, try the command,
[b]pfiles
[/b]

The above commands display the Inode numbers and owners of the open files.

You can also try [b]lsof -p
[/b]

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

well most cpui-profilers can switch between "total time" and "cpu time".
If you choose "total time" you can easily see where code waits for data to arrive.

lg Clemens