Understanding the cntr_type values from sys.dm_os_performance_counters – SQL server 2012

Before using the cntr_value from sys.dm_os_performance_counters , we need to know the cntr_type and what the cntr_type  value is indicating.

  1. 65792: This counter value shows the last observed value directly.
  2. 272696576 : This counter value represents a rate metric. The cntr_value is cumulative.
  3. 1073874176 :This counter value represents an average metric. The cntr_value is cumulative.  To calculate actual value you need to use base values.

EX: Average Latch Wait Time (ms) for the interval = (A2 – A1) / (B2 – B1)
= (14272 – 14257) / (360 – 359)
= 15.00 ms

A (A1, A2) : Average Latch Wait Time (ms)

B (B1,B2) :Average Latch Wait Time Base

4.   537003264 : This counter value represents a fractional value as a ratio to its        corresponding  counter value. This is not final value , we have to use base value    (1073939712 cntr_type) to calculate the actual value.

EX: Hit ratio %  = 100 * MSSQL$SQLSVR:Buffer Manager\Buffer cache hit ratio /                                             MSSQL$SQLSVR:Buffer Manager\Buffer cache hit ratio base
= 100 * 2911 / 3170
= 91.83%

5. 1073939712 : This counter value is raw data that is used as the denominator of a counter that presents a instantaneous arithmetic fraction.

For ex: Buffer cache hit ratio base value is the base for the MSSQL$SQLSVR:Buffer Manager\Buffer cache hit ratio calculation.