PERFORMANCE_COUNTERS_RWLOCK Wait Type in SQL Server

PERFORMANCE_COUNTERS_RWLOCK is recorded when a thread waits on the reader-writer lock protecting the performance counter structures while a counter instance is added or removed. Many SQL Server counters are per-instance-of-something, per database, per Availability Group, per resource pool, so creating or dropping those objects touches the counter registry through this lock.

Counter bookkeeping, exercised by object lifecycle events.

Is It a Problem?

No; it has not been a contention point. Its occurrences track how often counter instances churn, which follows database creates/drops and similar events, all infrequent on steady-state systems.

Environments that mass-create databases (multi-tenant provisioning, test rigs spinning databases up and down) will see proportionally more, still without practical impact.

Common Causes

  • Databases and other counter-bearing objects being created or dropped.
  • Instance startup registering the counter tree.

What To Do

  1. Filter it out of wait analysis.
  2. Nothing else; the counter registry manages itself.

How To See It

Rank waits with Get-WaitStatistics; expect traces aligned with object lifecycle activity.


Part of the SQL Server Wait Types Library.
Related deep dive: SOS_SCHEDULER_YIELD Wait Type.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *