tags:

views:

494

answers:

1

Hi all, While doing performance testing on windows, i usually use perfmon. But when i put load, the CPU % is varying too much if i set the interval in perfmon as 1 sec and its not varying too much if i set the interval in perfmon as 15 sec(default one). Which interval is best to measure CPU performance for an application in windows? If perfmon is bad, are there any other tools which can give better results?

Thanks a lot

--Ram

+1  A: 

The problem you have is that the process will be using 100% of a single-core CPU for a very short period of time, and then not using it at all whilst waiting for IO etc.

So (as you've identified) the view of CPU usage can vary drastically. How you decide to measure that depends on the usage, and the requirements of other processes on that machine. e.g. you may be using CPU at 100% for 5 minutes, but it doesn't matter since other processes don't need it at that particular time. Or perhaps you bill for CPU usage, in which case you'd measure it over 24 hours.

There isn't really a best/worst measurement mechanism, until/unless something else is adversely affected by your process. In this case you then have some hard data you can optimise against.

Brian Agnew
Thanks a lot Brian. That was much more infromative. I measure the performance by putting constant load on the process. So after the ramp-up time(max load reaches), the load on the process is the same till the test ends. Thats why i was wondering why it is like that. Also, the same load on linux for that process yields a straight line (well.. almost straight using ps). I could not get a good mechanism, which is reliable to measure the performance in windows due to this behavior.If the process is serving a constant load, i expected atleast it should use CPU nearly equally in all times.
Aviator
I don't know about Windows, but on a Unix system the load figure is a time-windowed CPU measurement (usually over 1min/5min/15min), hence the 'rise' time and subsequent fall.
Brian Agnew
Thanks brian.I will try to find a near optimal interval by testing. I hope i will get one. because the type of load is almost similar in my case. The behavior also will be similar then.
Aviator