Thursday 3 September 2009

Tracking Memory Usage in Windows XP

Another personal reminder.

I've been asked to track the memory usage of a colleague's application. It crashes without a trace after two days. So a series of virtual machines are set up to run the software and I'm using windows xp's perfmon to monitor the memory usage - as that's the suspect here.

In Task Manager we have a column called Mem Usage but if we enter the various counter options in perfmon you'll see no such counter. MS provide a breakdown on what memory counters are available for a process and here's the list;

Process : Page Faults/sec. Excessive page faults from a particular process are an indication usually of bad coding practices. Either the functions and DLLs are not organized correctly, or the data set that the application is using is being called in a less than efficient manner.

Process : Pool Paged Bytes.

Process : Pool NonPaged Bytes.

Process : Working Set. This is the current size of the memory area that the process is utilizing for code, threads, and data. - And this is the equivalent to the Mem Usage column you see in Task Manager.

Now I know next to nothing about memory management so I'm not going to pretend I do but one should remember that applications' working sets are allows to grow if free memory is available in abundance.