Initialising Performance Counter Collection

Aug 14, 2008 at 10:50 AM


I have been using the performance toolkit for some time in different environments (since beta).  A common problem I have seen on many occasions is that performance counter sets for computers are not always displayed and quite often no data for that particular server is available at all. This is a real problem as I need to record results such as the database and application server CPU time.  The only resolution I have found that always works is to reboot all the servers (SUT servers and load generator).  On rare occasions just restarting the test resolves the problem.

Often the 'Initialising Performance Counter Collection' is displayed for a long time (sometimes for nearly 10 minutes) after which time not all counters are added or the entire counter set for a server is not added.

All the servers are very well specified and they are all dedicated for testing in an isolated environment (at the hardware level - including all network components).  I have seen this problem using VS 2005 and 2008 in different environments.

Has anyone else experienced this problem and/or any suggestions as to the cause/a resolution?



Aug 19, 2008 at 1:31 AM


Although this is a question that can be better answered by the Visual studio team, I will take a stab at it. We have seen this sometimes here when the client box runs out of memory. We usually run on a client box with 2GB memory so not to run out of memory. Give that a try. I am guessing that your reboot is freeing up memory and that helps.


Aug 19, 2008 at 7:31 PM
Just rebooting the client box (load genertor) does not always solve the problem - I have had to reboot the SUT also - this is a real problem in customer scenarios and still a real pain in our own benchmark environment - as you can imagine.

I think it is best to concentrate on our internal system that we are using regularly.

The Load Generator (where we are also runing the toolkit) is a server with 4GB RAM - currently it has 1.5GB available - so I don't think its unavailable free memory on this machine alone.  The database server we are using is heavily used (as we are stressing in some tests) - it has 24GB RAM which can become nearlly all consumed by SQL Server - however restarting SQL Server in this machine alone does not resolve the problem - a complete reboot is required.  I am wondering if it has something to do with WMI.

I think I will gather more information from the servers the next time I have the problem; around memory usage and what is free and then reboot in turn each server to see if I can narrow it down a little.  Is there anything specific you think I should capture on each box before the reboot?

I am actually suprised that more people have not had this problem - perhaps they are all on holiday right now!

I am hoping that the problem might go away with Windows 2008 - we did alot of testing earlier this year in MS labs - SUT was all Win2k8 - and we didn't have the problem there - and we were stressing a lot too...




Sep 2, 2008 at 6:57 PM
HI Adi,

I have still been experiancing the issue initialising performance counters.  However I have just come accross a problem where I had a failed test; interesting all the application servers needed reboot to get the test tools to collect performance data.  I had to close VS to end the test (this is not usual on this occasion I got an object reference not set to instance of an object error - I think caused by a intermittant issue with the SUT.  I also rebooted the load generator (also the server running VS test tools).  Following this each time I started the test I got an error with initialising performance counters on an application server - and interestingly all the application servers (I got an error for just one, then rebooted that app server and then tried test again, got an error on another, rebooted that then the next etc (I didn't just reboot all servers in one go)

So i'm thinking that the issue could be caused by the VS test tools not properly disconnecting from whatever service it get the performance data from (WMI I presume).  having this failure caused a problem connecting to all the servers - perhaps occasionally it does not disconnect or close a connection properly when the tests complete causing an issue with just individual servers?

hope the above makes sense! - Its late so did my best! - if it does not let me know I will post a better explaination