THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

Kevin Kline

NASTY RUMORS ABOUT MAXDOP

You'd think an article called "NASTY RUMORS ABOUT MAXDOP" would have something to do with Britney Spears or maybe Robert Downy Jr, but in that case it'd be total fiction (at least, it would be coming from my pen).

 

So, I was en route to the 2008 Microsoft MVP Summit yesterday and I had a chance to catch up on my reading.  You may have heard some rumors that you should only ever set MAXDOP (maximum degrees of parallelism) to an even number.  I can neither confirm nor deny these rumors since I haven’t had time to test this yet myself.  But I’m curious if any readers out there have definitive information one way or the other.

 

Evidently, there are two roles involved in parallel processing, a writer and a consumer.  Naturally, when two roles are at work, the MAXDOP setting doesn’t have to share resources when it is set in increments of two.

 

Hope this helps,

 

-Kevin


Published Tuesday, April 15, 2008 1:48 PM by KKline

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Denis Gobo said:

I have seen plenty examples where they have set it to 1

Is 1 an even number  :-)

April 15, 2008 1:58 PM
 

KKline said:

The setting 1 turns off parallelization.  The BOL says "Suppresses parallel plan generation. The operation will be executed serially."

Even so, you can certainly set MAXDOP to an odd number like 3 or 5.  However, the rumor is that it does not perform as well when set to an odd number.

I'm hoping that someone can do a test and tell us all if this bogus, true, or part-true.

April 15, 2008 3:06 PM
 

jchang said:

this is a 2 x Xeon E5430 (quad core 2.66GHz)

24GB memory,

Windows Server 2008, SQL 2008 Feb 08 CTP 32-bit

CPU and time to run the 22 TPC-H queries in milli-sec

for the second run, ie, all data in memory, some tempdb activity

CPU Dur

DOP 1 506,519 521,837

DOP 2 429,826 233,002

DOP 3 447,162 164,048

DOP 4 443,498 126,309

DOP 5 461,700 106,154

DOP 6 474,525 93,883

DOP 7 487,316 81,246

DOP 8 482,945 71,141

on big systems, I have always tested 1, 2, 4, 8, 16, 32 & 64 CPUs because I don't have time to do the off numbers before the big box is put into production, or the customer is tired of paying my hourly rate for such infor

April 16, 2008 6:22 PM
 

jchang said:

same for SQL 2005 sp2

CPU Dur

DOP 1 470,562 488,147

DOP 2 397,489 214,126

DOP 3 418,737 154,524

DOP 4 404,916 122,397

DOP 5 417,864 103,803

DOP 6 429,469 92,684

DOP 7 438,160 84,302

DOP 8 442,155 73,631

same for SQL 2000 sp4 + hf 2187

CPU Dur

DOP 1 511,948 544,520

DOP 2 547,157 285,508

DOP 3 570,946 220,855

DOP 4 612,977 191,639

DOP 5 618,670 184,473

DOP 6 661,789 178,591

DOP 7 688,495 170,236

DOP 8 727,634 166,110

interpreting parallel execution performance characteristics is not a simple matter, and it is very easy for a less experienced person to draw completely wrong conclusions

April 17, 2008 8:37 AM
 

KKline said:

Awesome stuff, Joe.

It looks like in both test runs that the even numbered DOP settings generally outperformed the odd number ones.  That is, 2 was better than 3, 4 was better than 5, 6 was better than 7, and so on.

Did I misinterprete your results?

Thanks for doing the test.

-Kevin

April 21, 2008 1:29 PM
 

Jimmy May, Aspiring Geek: SQL Server Performance, Best Practices, Productivity, etc. said:

This is the first of a four-part series: Introduction to Query Parallelism (this post) Flipping the Bit

November 28, 2008 1:29 PM
 

Michael B said:

Here's something I'm running into when trying a query using MAXDOP, on SQL Server 2005 SP2: I get different results if I use "OPTION (MAXDOP 1)" and "OPTION (maxdop 1)", and that's on a case-insensitive server.

Also, it appears that BCP ignores it, since I'll have all processors hit 100%, even when using "OPTION (MAXDOP 1)" within a query (using queryout)

February 18, 2009 5:59 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About KKline

Kevin Kline is Technical Strategy Manager for the SQL Server business unit at Quest Software. Kevin was the original architect and dev manager for many of Quest's SQL Server tools. Prior to Quest, Kevin worked as an enterprise DBA for a variety of large corporations and government agencies.
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement