dotTrace Web Help

File I/O

The File I/O event is used to indicate time intervals where file input/output operations took place. This includes reading from and writing to physical disk and system cache. Therefore, file I/O operations are not equal to disk I/O operations.

File operations are very important for performance analysis as accessing physical disk requires significant time. For example, if your application frequently reads a particular file, it will be more effective to cache the file data.

Select the File I/O event to analyze file operations in your app: evaluate how file operations affect performance, what methods do most of the job, and so on. For example, to determine methods in a thread that perform the majority of file I/O operations, select the thread in the Threads diagram and the File I/O event in Interval Filters. The methods will be shown on top of the Top Methods in the Call Stack window.

When the File I/O event is selected, the Filters window contains sub-filters that allow you to refine the resulting filter: File I/O: File Name and File I/O: Direction.

File I/O: File Name

What the Filter Shows

The File I/O: File Name sub-filter shows distribution of file I/O operations time between particular files. Use this sub-filter to determine files your application works with.

file_i_o_filename_1

pos_1 File name.

pos_2 Total time spent on file I/O operations with the file summed up for all selected threads.

pos_3 The percentage of time spent on file I/O operations with the file relative to the total selected time.

For example, your application has two threads you are interested in: Thread#1 and Thread#2. Profiling lasted 50 ms. Thread#1 worked with file1.txt for 10 ms and with file2.txt for 30 ms. Thread#2 worked with file1.txt for 5 ms. The Interval Filters will show the following:
File I/O 45 ms 45%

If you select the File I/O event, the File I/O: File Name sub-filter will show you the following:
file1.txt 15 ms 15%
file2.txt 30 ms 30%

How the Filter Is Applied

To apply the File I/O: File Name filter:

  • Check the desired file name in the filter.

After you select a file name in File I/O: File Name, other filters will show data only for the time intervals where threads performed file I/O operations with the selected file.

file_i_o_filename_2

File I/O: Direction

What the Filter Shows

The File I/O: Direction sub-filter shows distribution of file I/O between read and write operations. Use this sub-filter to determine what type of file I/O operations dominates.

file_i_o_direction_1

pos_1 I/O direction: Read, Write, or Not Selected which is equal to "the filter is not applied".

pos_2 Total time spent on read or write operation summed up for all selected threads.

pos_3 The percentage of time spent on read or write operation relative to the total selected time.

For example, your application has two threads you are interested in: Thread#1 and Thread#2. Profiling lasted 50 ms. Thread#1 worked read from file1.txt for 10 ms and wrote to it for 15 ms. Thread#2 only read from file1.txt for 20 ms. The Interval Filters will show the following:
File I/O 45 ms 45%

If you select the File I/O event, the File I/O: Direction sub-filter will show you the following:
Read 30 ms 30%
Write 15 ms 15%
Not Selected 45 ms

How the Filter Is Applied

To apply the File I/O: Direction filter:

  • Check the desired direction in the filter.

After you select a direction in File I/O: Direction, other filters will show data only for the time intervals where threads performed the selected type of file I/O operations.

file_i_o_direction_2
Last modified: 5 December 2014
comments powered by Disqus