This is more of a note to myself, but others may find it useful.
When you want to see what bottlenecks are being hit by some java process that you're running you can do the following:
- Repeatedly obtain the backtrace using jstack PID. If you're repeatedly seeing something blocking in a read/write related call then you're IO bound
- Check what files are open by the process using lsof PID. Its likely that one of these will look suspect
- Watch reads to those open files using strace -f -p PID -e trace=none -e write=FD1,FD2,... -e read=FD1,FD2,...