CPU Drift and SQL Server timing values


We recently had an issue on a 2 node SQL cluster that led us to take profile traces. Soon we realized that some timing values from the traces didn't make sense. After some research we turned to this: 

SQL Server timing values may be incorrect when you use utilities or technologies that change CPU frequencies

A Windows Server 2003-based server may experience time-stamp counter drift if the server uses dual-core AMD Opteron processors or multiprocessor AMD Opteron processors

For what I've heard it is not that uncommon, specially the CPU drift. Drift is a divergence in CPU clock values. Systems that have multiple CPUs can produce different CPU clock values for the same point in time. Although it is not common, CPUs may experience clock separation over time.

The machine configuration was something like this:

OS Name Microsoft(R) Windows(R) Server 2003, Enterprise Edition 
Version 5.2.3790 Service Pack 2 Build 3790 
System Type X86-based PC : 4 processors + hyperthreading (8 core)
Core : Processor x86 Family 15 Model 33 Stepping 2 AuthenticAMD ~2396 Mhz

Ater installation of SQL Server 2005 SP2, some errors started to get logged in the SQL Server logs. Check for the following error:

(...) 2008-10-14 01:32:25.810 Server       The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.

We applied a patch, that it's main goal is to improve some PC gaming video performance. It worked very good because the patch works with RDTSC (Read Time Stamp Counter). Now the timing values are ok!

Dual-Core Optimizer 

Just wanted to share the experience!  

Skip to main content