Search code examples
c#windowsprofilingprocess-explorer

how to find out what is causing I/O in my application?


Good afternoon,

I inherited some C# code from years ago. I have refactored it a bit to be asynchronous. Evaluating the impact of my changes on the performance of the CPU, I used Process Explorer to watch, roughly, what my app was doing. To my surprise, it appears to be doing what Process Explorer reports as I/O. In general, this is related to Disk I/O or Network I/O. Based on what I can see of the code, I can't figure out an explicit call to either of those 2 I/O sources.

My question is: what is the best way to identify which section of code is causing I/O? We use dotTrace from JetBrains to profile our application, but, from what I can tell, it only handles CPU and Memory performance.

Thanks in advance for any pointers.

Regards,

Eric.


Solution

  • Process Monitor may be your answer. Refer to the following StackOverflow question for more information.

    How can I profile file I/O?

    Building on that answer, you may be able to search your solution for the filename of any commonly read or written files found with Process Monitor.