Starting with SQL Server 2005 SP3 and SQL Server 2008 the RDTSC counter is not used for timing in SQL Server but you may still have occasion to use RDTSCTest. 

From: Robert Dorr
Sent: Thursday, June 04, 2009 4:14 PM
Subject: RE: SQL Troubleshooting - RDTSC
 

In the registry the speed is stored but we have found machines where the registry values are not correct.  In order to check the current speed you have to do some timing on the CPU and if speed step or such technology is involved it is possible the CPU is running at a level below max and until it gets resource pressure it does not need to run at the max level.  

CPU Speed: 1595Mhz  (1595000 ticks per ms)     <============ From registry  

CPU 00 Current Speed: 399Mhz *Speed Variance   <============ Base on actual RDTSC movement  

       What we do here is set the thread affinity to the CPU.

       Grab the current RDTSC

       Sleep(500)

       Grab the RDTSC now

       Calculate the difference.

       So this system is likely throttling down to 399Mhz during the sleep period.   We would have to spin the CPU to get it to wake up and increase to the max.  

-----Original Message-----

Sent: Thursday, June 04, 2009 2:11 PM

To: Robert Dorr

Subject: SQL Troubleshooting - RDTSC  

I used the RDTSC utility on a customer's 4 dual core Itamium 2 system recently.  Is the utility accurate on IA64 systems?  

Actual CPU speed was being reported at 399MHz across all 8 CPU's, which are 1.6GHz Itanium 2 procs.  I had run across this in pssdiag data I collected, and asked them to verify their power settings were set to not throttle down the CPU.  They sent back the report below which still indicates the CPU's at 399MHz.

I asked them to verify with their hardware vendor CPU's are set to operate at full speed, but thought I would also double check this is a valid utility for Itanium 2 procs. 

======================= Processor =======================

       Processor Architecture: IA64

                    Page Size: 8192

               Processor Type: Intel IA64

               Processor Type: Family 32, Model 1, Stepping 1

                    CPU Speed: 1595Mhz  (1595000 ticks per ms)

        Active Processor Mask: 255 (0x00000000000000FF)

Warning: CPUID Leaf 4 is not supported or disabled in BIOS. May be unable to determine core/processor mapping.  

              Hyper-Threading: Not capable

                   Multi-core: No

Physical Package/Socket Count: 1

         Processor Core Count: 1 (1 per package)

      Logical Processor Count: 8 (1 per core)

 

Logical Processor/Core/Socket Mapping

CPU    APIC ID     Physical ID Core ID     HT/SMT ID 

------ ----------- ----------- ----------- -----------

     0           0           0           0           0

     1           0           0           0           0

     2           0           0           0           0

     3           0           0           0           0

     4           0           0           0           0

     5           0           0           0           0

     6           0           0           0           0

     7           0           0           0           0

 

======================= NUMA ============================

                Max NUMA Node: 0 (no NUMA)

        Node 0 Processor Mask: 255 (0x00000000000000FF)  

======================= Memory ==========================

        Total Physical Memory: 16352 MB

        Avail Physical Memory: 13776 MB

              % Memory In Use: 15

              Total Page File: 32498 MB

              Avail Page File: 29697 MB

     NUMA Node 0 Avail Memory: 13776 MB

======================= Actual CPU Speed ================

         CPU 00 Current Speed: 399Mhz *Speed Variance

         CPU 01 Current Speed: 399Mhz *Speed Variance

         CPU 02 Current Speed: 399Mhz *Speed Variance

         CPU 03 Current Speed: 399Mhz *Speed Variance

         CPU 04 Current Speed: 399Mhz *Speed Variance

         CPU 05 Current Speed: 399Mhz *Speed Variance

         CPU 06 Current Speed: 399Mhz *Speed Variance

         CPU 07 Current Speed: 399Mhz *Speed Variance  

======================= RDTSC Deltas ====================

CPU 00 Ticks: 0x00006817EAADE77B, Drift: 0.0ms (0x00000000 ticks)

CPU 01 Ticks: 0x00006817EAAE128A, Drift: 0.0ms (0x00002B0F ticks)

CPU 02 Ticks: 0x00006817EAAE39A6, Drift: 0.0ms (0x0000522B ticks)

CPU 03 Ticks: 0x00006817EAAE63A4, Drift: 0.0ms (0x00007C29 ticks)

CPU 04 Ticks: 0x00006817EAAE8D6E, Drift: 0.0ms (0x0000A5F3 ticks)

CPU 05 Ticks: 0x00006817EAAEB639, Drift: 0.0ms (0x0000CEBE ticks)

CPU 06 Ticks: 0x00006817EAAEDEC2, Drift: 0.0ms (0x0000F747 ticks)

CPU 07 Ticks: 0x00006817EAAF0B75, Drift: 0.0ms (0x000123FA ticks)

 

Bob Dorr – Principle SQL Server Escalation Engineer