C# – What’s the best tool to track a process’s memory usage over a long period of time in Windows


What is the best available tool to monitor the memory usage of my C#/.Net windows service over a long period of time. As far as I know, tools like perfmon can monitor the memory usage over a short period of time, but not graphically over a long period of time. I need trend data over days, not seconds.

To be clear, I want to monitor the memory usage at a fine level of detail over a long time, and have the graph show both the whole time frame and the level of detail. I need a small sampling interval, and a large graph.

Best Solution

Perfmon in my opinion is one of the best tools to do this but make sure you properly configure the sampling interval according to the time you wish to monitor.

For example if you want to monitor a process:

  • for 1 hour : I would use 1 second intervals (this will generate 60*60 samples)
  • for 1 day : I would use 30 second intervals (this will generate 2*60*24 samples)
  • for 1 week : I would use 1 minute intervals (this will generate 60*24*7 samples)

With these sampling intervals Perfmon should have no problem generating a nice graphical output of your counters.