.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Performance Counter questions

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :.NET Framework
Do .net perf counters have a concept of default / initial values? For custom perf counters of type NumberOfItems32, do I need to explicitly set RawValue to 0 or will the perf counter auto initialize to 0 upon creation?   Is manually setting RawValue a thread safe operation?   thanks  

View Complete Post

More Related Resource Links

SQL2008 Standard setup failed. The performance counter registry hive is corrupted.

OS: Windows7 Ultimate 64bit (Traditional Chinese HKSAR) SQL: SQL Sever2008 RC2 Standard English (either x86 or x64) I have searched for answers on the web, tried all of them and still cannot get pass. 1. manually rebuild Performance Counter Library values as suggested in http://support.microsoft.com/kb/300956/en-us 2. string test = string.Format ("{0,3}", CultureInfo.InstalledUICulture.Parent.LCID.ToString ("X")).Replace (" ", "0"); which shows "31748" for me, added it under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib (with values from 009) 3. C:\windows\systrem32\lodctr /r to rebuild counters.   The error just won't go. Actually, I just want to use the management studio to connect to SQL Server2008.. Is there a way to install only the management studio? I am willing to give up installing SQL Server2008 on my Windows7.   Thanks in advance.

wcf performance tuning questions

We have an IIS 7.5 WAS hosted (net.tcp) internal WCF Service.  It is running on a Win2008 X64 R2 server with 8 cores (16 with hyperthreading) and 16gb RAM. The App Pool is set to 16 max worker processes.  We are trying to tune the client / service so that we can run as many worker processes as possible and keep the server as close to 100% CPU utilization as possible.   The client is coded for for 17 concurrent threads / WCF service requests (using .NET 4.0 TPL library).   However, I believe there is some bottleneck going on as the server CPU's never get above 40% utilization and the number of worker processes stays fairly low.  What is the best way to determine where the bottleneck is?  How do you determine if the bottle neck is client side or server side?   What perf counters should I be looking at client side?  What perf counters should I be looking at server side?  Is there a more efficient binding than Net.Tcp?   thanks

The performance counter registry hive is corrupted on Windows 2008 R2 Foundation 64Bits

Hello, I know we have a few posts about this but not exactly about this windows version. I tried: http://support.microsoft.com/kb/300956 But nothing!... :( Could someone help me? Thanks, Renato

How to resolve "Performance counter registry hive consistency check" failed?

I want to install SQL Server 2008 November CTP Developer Enu. When "System Configuration Check" it shows: Rule "Performance counter registry hive consistency check" failed. The performance counter registry hive is corrupted.   And cannot continue installing. How to solve this problem?

The SQL Server performance counter 'Page Splits/sec' (instance 'N/A') of object 'SQLServer:Acce

I am getting these page split errors every 5 minutes I have tried everything reindexing rebuilding working with different fill factor values But nothing seems to effect this problem. The threshold is now set to 100 (what the max threshold number i can set the alert to ?) Also please let me know how to get rid of the pagesplit alerts. thanks

"Performance counter registry hive consistency check" failed


I'm trying to install SQL Server 2008 R2 Express, but there is just no way to make it work.

I have tried changing the values in the registry as said here.
But it does not help, nor can I find all the values that are mentioned.

I have tried most parts of the KB article here.
But what I could do, does not help, and I cant find the .dat files mentioned, anywhere.

I'm running a Windows 7 installation virutally with Parallels Desktop on a mac for the only intrerst of using VWD/VS C# expresses and the MS SQL Server. I have even tried to just delete the entire windows installation, reinstalling windows again and then opening IE downloading SQL Server the first thing I do and it still fails as default...

I can't se why it should not work. I mean the system is made by Microsoft just like the programs I'm trying to install, so with even them beeing a missfit, go figure why I'm on a mac. I obviously do not know enough about this stuff to fix the registry, I've tried lots of different cleaning programs and stuff, but nothing helps, so what do I do? just give up?

error on install: Performance counter registry hive consistency check - Status:Failed


Hi, I'm tryng to install sql server 2008 in win vista and in the System Configuration Check, item: Performance counter registry hive consistency check has the status FAILED  all the others items has PASSED and the setup stops here theonly option is CANCEL. Thus anyone knows the possible problem and resolution to this?


best regards

Disabled performance counter Error with Datasheet views



Background: WSS 3.0, IE 8.0 , Vista.

Problem: User tries to click on a Datasheet view. IE shuts down. This user seems to be the only one experiensing the problem. Event log has a set of Errors, referring to several services:

"Disabled performance counter data collection from the "WSSMatrixpi" service because the performance counter library for that service has generated one or more errors. The errors that forced this action have been written to the application event log. Correct the errors before enabling the performance counters for this service."

"Disabled performance counter data collection from the "WSSIndex" service because the performance counter library for that service has generated one or more errors. The errors that forced this action have been written to the application event log. Correct the errors before enabling the performance counters for this service."


  1. Performance Counter Transactions/Sec in SQL Server 2005



    Which factor impacts the Transactions/Sec in SQLServer 2005. What could be the reason to get less Transactions/Sec.

    After some code changes in the stored procedure, the Transactions/Sec rate has come down.



Performance Counter SQLServer:Cache Manager:Cache Pages (Execution Contexts) = 4294967295


Performance Counter


SQLServer:Cache Manager:Cache Pages (Execution Contexts) = 4294967295


What this might mean?


It overflows, but what it might mean …

Performance counter to show Selects per second

anyone know of a sql server performance counter to show the number of select statements being run per second?  I found the transaction writes per second counter, but a selects/sec would be great too!

Performance Counter Error

I get this in my Event Log when my service starts up:

vent Type:    Error
Event Source:    System.ServiceModel
Event Category:    Performance Counter
Event ID:    10
Date:        11/15/2007
Time:        10:29:06 AM
User:        xxxxxxxxxxx
Computer:    xxxxxxxxxxxx
A performance counter was not loaded.
 Category Name: ServiceModelService
 Counter Name: Calls
 ExceptionTongue Tiedystem.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.
   at System.Diagnostics.PerformanceCounter.Initialize()
   at System.Diagnostics.PerformanceCounter.get_RawValue()
   at System.ServiceModel.Diagnostics.PerformanceCounters.GetPerformanceCounterInternal(String categoryName, String perfCounterName, String instanceName, PerformanceCounterInstanceLifetime instanceLifetime)
 Process Name: xxxxxxxxxxxx.ConsoleHost.vshost
 Process ID: 1840

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

My config has nothing special in it:

<diagnostics performanceCounters="All" wmiProviderEnabled="true"> ... </diagnostics>

Connection pool does not match between master.dbo.sysprocesses and Performance counter - Numberofpoo

Recently i got the 'A transport-level error has occurred when sending the request to the server.' error,

I checked master.dbo.sysprocesses and found there were 4 connections, but when i checked Performance counter - .NET data provider for sqlserver NumberofpooledConnection

there were 7 connections, is it means the some of connection in connection pool is not avaiable any more?

How can I retrieve a performance counter instance value using SMO


How can i gather a performance data value of SQL server using SMO?

Eg: I want to retrieve the value of counter 'SQLServer: SQL Statistics: Batch Requests/Sec' using SQL SMO.

Please help


Thank you




ASP.NET Best Practices for High Performance Applications

This article lists the techniques that you can use to maximize the performance of your ASP.NET applications. It provides common issues, design guidelines, and coding tips to build optimal and robust solutions.

Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

High-Performance .NET Application Development & Architecture

It has always been a goal of project architects to plan an effective strategy from the ground up in regards to an new application. All relevant factors are taken into consideration with respect to the application, from its design and layout to a functional website infrastructure. Pre-.NET strategies and design guidelines still effective now were developed with Microsoft's DNA (Distributed interNet Application) platform. This model successfully served the purpose of architecting N(any number of)-Tier (levels) applications. In its basic sense, as in most robust, distributed applications, you'll architect 3 main layers or Tiers: presentation, business rules and data access.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend