Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a server with 2 quad xeon 5550 processors. The only application installed on the server is SQL server. CPU usage rarely goes above 40%, and the transaction rate is 2,000 transactions per second.

Processor queue length is also about 2. Everything seems normal, except context switches which has an average of 88,000 and max of 232,000 during work hours.

I've read in SQL server documents that a context switch number larger than 15,000 is indicative of a CPU problem. Is this actually a problem, even though the CPU counters seem normal?

share|improve this question
    
What do your instance's wait stats look like? sqlskills.com/BLOGS/PAUL/category/Wait-Stats.aspx –  Jon Seigel Feb 9 '11 at 2:13

2 Answers 2

I see that's a Nehalem processor with hyperthreading.

The last time we asked the general consensus was to disable hyperthreading by default on a SQL Server specific box (and we disabled it on ours, with good results). Browsing around a few other sites, I'm hearing that advice echoed by other reputable folks.

So, you might try turning off hyperthreading first, then re-measuring.

share|improve this answer
    
I think the testing both ways is the most important step. From what I recall of the discussion and from what we've seen ourselves it varies based on workload - some things do well with hyperthreading, others... not so much. –  RobM Feb 7 '11 at 9:19

I'm sure you guys have figured this out already, but I wanted to share the answer here because it's Server Fault.

SQL Server has a timer function all its own, and uses it by default rather than the OS/BIOS timer. You can disable this, but I do not know if this will jack with your ability to have SQL Server enter granular time data (down to 12ms, iirc) into time fields.

Disable the SQL Server timer by going into SQL Server Configuration Manager, go into SQL Server Services and right-click the SQL Server instance and go to Properties.

In the instance properties go to the Startup Parameters tab and add -t8038. This enables a trace flag which disables the timer for that instance. If you have multiple instances, you will have to do this for each instance, or you will still encounter high context switching.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.