I want to currently profile my application which uses JCS for caching.I have used the default profiler which comes with netbeans IDE and it proves satisfactory for memory.But I want to profile my application for disk usage,because my app caches items in disk I want to verify its performance.Is there a way to do this using the profiler that comes with netbeans or using any commercial profiler such as JProfiler. Thanks in advance
2 Answers
JProfiler has a file probe that will show you:
- a time line of files and the I/O activities on them
- a list of all files with their I/O statistics
- "hot spots", i.e. files on which most read/write operations are performed together with cumulated back traces to your code
- telemetries for total read and write throughput
- an "events" view showing single I/O operations

Disclaimer: My company develops JProfiler
5 Comments
Madusudanan
Thanks for your input,but currently I am in my test environment,I have to show proven profiling results in order to move to the live environment where ill get lof of data.But using this tool in the test environment I am not able to see any data in the Read/Write througput,and also currently my cache sizes are of 10 mb or less.Does JProfiler show disk i/o in general or by using the java.io package,because I dont think JCS will be using java.io to write files to disk.
Ingo Kegel
The file probe supports both java.io and java.nio. You could first look at the call tree view to check what JCS is actually doing.
Madusudanan
The call tree shows the calling methods and called methods,but internally the JCS uses a queue to write to a disk,and it does it in an asynchronous manner.That is where the real problems lies for me,I need to visualize the manner in which files are being written from that queue.As far disk usage pattern is concerned JProfiler does a good job.But my case is a little different here
Ingo Kegel
OK, but if you don't see anything in the file probe, it means that JCS is not writing anything to disk in the same JVM.
Madusudanan
Ok thanks for your input.I'll keep this question open for sometime and see whether any other answers come up.
You can do this using one of the built-in probes in JProfiler.
3 Comments
Peter Lawrey
And YourKit, and possibly other.
Madusudanan
I have installed JProfiler and I went through the user guide.But is there a way by which it shows disk usage method by method.
Madusudanan
I am also open to options to use other tools whether commercial or open source.I just need the disk i/o analysis at the object level of byte level.
duor similar for windows. If you want to know the percentage of time spent accessing the disk, look for calls to read() and write() to the disk.