26 October 2013

measuring CPU utilization during load test

While running load and performance(LnP) for a web application, WEB API or for windows service, it's crucial to measure CPU utilization to make decisions like application code change or adding more horsepower. Using perfmon tool, CPU utilization can be measured accurately over a period of time. By default when you open the perfmon, % Processor Time counter is added by default.

Measuring CPU utilization over test run duration

Steps to measure the CPU Utilization

  • You can open the Performance Monitor by typing perfmon in Run window.
  • In the left navigation tree click "Performance Monitor" under "Monitoring Tools".
  • By default, "%Processor Time" performance counter added. This "%Processor Time" performance counter is from "Processor Information" group.
  • You can set the Duration, etc in the Performance Monitor Properties dialog.

Setting the Performance Monitor Properties

  • In the perfmon graphical display, right click and choose "Properties" menu item. It opens up the Performance Monitor Properties dialog.
  • Setting duration using Performance Monitor Properties in perfmon
  • You can configure various settings using the respective tab in the Performance Monitor Properties window.
  • For example, if you want to measure CPU utilization over 10 minutes duration, you can set this up using "Duration" setting under "Graph Elements" present in "General" tab.