{"id":559,"date":"2011-06-23T03:50:00","date_gmt":"2011-06-23T03:50:00","guid":{"rendered":"\/blogs\/paul\/post\/MAXDOP-configuration-survey-results.aspx"},"modified":"2013-01-01T19:15:11","modified_gmt":"2013-01-02T03:15:11","slug":"maxdop-configuration-survey-results","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/","title":{"rendered":"MAXDOP configuration survey results"},"content":{"rendered":"<p>\n<font face=\"verdana,geneva\" size=\"2\">A month ago I kicked off a survey about MAXDOP setting &#8211; see <\/font><a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/survey-cores-vs-maxdop\/\"><font face=\"verdana,geneva\" size=\"2\">here<\/font><\/a><font face=\"verdana,geneva\" size=\"2\"> for the survey. I received results for 700 servers around the world! Here they are: <\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">&nbsp;<img decoding=\"async\" src=\"\/blogs\/paul\/wp-content\/uploads\/2011\/6\/maxdop.jpg\" alt=\"\" \/><\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">The X-axis format is X-Y-Z, where X = number of cores, Y = number of NUMA nodes, Z = MAXDOP setting. I didn&#39;t differentiate between hyper-threading or not, or soft vs. hard NUMA.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">The results are striking &#8211; 75% of all systems out there use a server MAXDOP of zero. Now, this doesn&#39;t show whether individual queries are using MAXDOP to override that, or resource governor in 2008+ to override that either and I don&#39;t have info on the workload for all these servers &#8211; so it&#39;s not a result we can draw any concrete conclusions from. However, I do find it interesting that such a high proportion are running fine with MAXDOP 0 &#8211; my expectation was that there would be a higher proportion of servers with a non-zero MAXDOP setting.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">There are quite a few &#39;black and white&#39; configuration rules out there &#8211; for instance:<\/font>\n<\/p>\n<ol>\n<li>\n<div>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">Set MAXDOP to 1 if you&#39;re seeing CXPACKET waits as the prevalent wait type.<\/font>\n\t<\/div>\n<\/p><\/div>\n<\/li>\n<li>\n<div>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">Set MAXDOP to 1 for OLTP systems, and don&#39;t do anything else.<\/font>\n\t<\/div>\n<\/p><\/div>\n<\/li>\n<li>\n<div>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">Old Microsoft guidance to set MAXDOP to half the number of physical processors.<\/font>\n\t<\/div>\n<\/p><\/div>\n<\/li>\n<li>\n<div>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">Set MAXDOP to the number of cores in the NUMA node.<\/font>\n\t<\/div>\n<\/p><\/div>\n<\/li>\n<\/ol>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">These are all incorrect as *rules*. There is no one-size-fits-all rule for MAXDOP &#8211; there are only general guidelines. For instance:<\/font>\n<\/p>\n<ul>\n<li>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">For OLTP systems, it can often be beneficial to set MAXDOP to 1 and then use the MAXDOP query hint to override the server-wide setting for queries that can benefit from parallelism.<\/font>\n\t<\/div>\n<\/li>\n<li>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">For mixed-workload systems, you need to be careful how you set MAXDOP so you don&#39;t inadvertently penalize one of the workloads. Judicious use of the MAXDOP query hint can help here. A more powerful solution for mixed workloads is to use resource governor and have a workload group for each portion of the workload, with a different MAXDOP for each workload group.<\/font>\n\t<\/div>\n<\/li>\n<li>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">For systems with high CXPACKET waits, investigate why this is the case before reducing MAXDOP. It&#39;s easy to come up with a demo where there are lots of CXPACKET waits, and while reducing MAXDOP (for the server or the query) reduces the CXPACKET waits, it also makes the query take a lot longer. CXPACKET waits can be because the statistics are incorrect and the query execution system divides up the work by the out-of-date statistics<\/font>\n\t<\/div>\n<\/li>\n<li>\n<div>\n\t<font face=\"verdana,geneva\" size=\"2\">Consider using the cost threshold for parallelism setting &#8211; see Jonathan&#39;s recent post <\/font><a href=\"http:\/\/sqlblog.com\/blogs\/jonathan_kehayias\/archive\/2010\/01\/19\/tuning-cost-threshold-of-parallelism-from-the-plan-cache.aspx\"><font face=\"verdana,geneva\" size=\"2\">here<\/font><\/a><font face=\"verdana,geneva\" size=\"2\">.<\/font>\n\t<\/div>\n<\/li>\n<\/ul>\n<p>\n<font size=\"2\">Using the resource governor as I described above can be a very easy way to mess around with the MAXDOP setting &#8211; especially for applications with legacy code that you cannot change, and you don&#39;t want to set a server-wide MAXDOP setting. This even works if the legacy code uses MAXDOP query hints, because the resource governor workload group MAXDOP setting *cannot* be overridden.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">The key point when making any change for performance tuning is to test the change before putting it into production and work out which setting works best for your workload on your system &#8211; rather than blindly following &#39;this is the best way&#39; rules for settings that people publish.<\/font>\n<\/p>\n<p>\n<font size=\"2\">In other words, what should your MAXDOP be set to? It depends! :-)<\/font>\n<\/p>\n<p>\n<font size=\"2\"><strong>One thing to be aware of<\/strong>: if you change the MAXDOP setting for the server, it will flush the plan cache when you do. It shouldn&#39;t, but it does. Be careful when doing this on a production server&#8230;<\/font>\n<\/p>\n<p>\n<font size=\"2\">Thanks to all those who replied to the original survey!<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A month ago I kicked off a survey about MAXDOP setting &#8211; see here for the survey. I received results for 700 servers around the world! Here they are: &nbsp; The X-axis format is X-Y-Z, where X = number of cores, Y = number of NUMA nodes, Z = MAXDOP setting. I didn&#39;t differentiate between [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66,76,91,101],"tags":[],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-performance-tuning","category-resource-governor","category-surveys","category-wait-stats"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MAXDOP configuration survey results - Paul S. Randal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MAXDOP configuration survey results - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"A month ago I kicked off a survey about MAXDOP setting &#8211; see here for the survey. I received results for 700 servers around the world! Here they are: &nbsp; The X-axis format is X-Y-Z, where X = number of cores, Y = number of NUMA nodes, Z = MAXDOP setting. I didn&#039;t differentiate between [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-23T03:50:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-02T03:15:11+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/\",\"name\":\"MAXDOP configuration survey results - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2011-06-23T03:50:00+00:00\",\"dateModified\":\"2013-01-02T03:15:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MAXDOP configuration survey results\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MAXDOP configuration survey results - Paul S. Randal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/","og_locale":"en_US","og_type":"article","og_title":"MAXDOP configuration survey results - Paul S. Randal","og_description":"A month ago I kicked off a survey about MAXDOP setting &#8211; see here for the survey. I received results for 700 servers around the world! Here they are: &nbsp; The X-axis format is X-Y-Z, where X = number of cores, Y = number of NUMA nodes, Z = MAXDOP setting. I didn&#39;t differentiate between [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/","og_site_name":"Paul S. Randal","article_published_time":"2011-06-23T03:50:00+00:00","article_modified_time":"2013-01-02T03:15:11+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/","name":"MAXDOP configuration survey results - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2011-06-23T03:50:00+00:00","dateModified":"2013-01-02T03:15:11+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/maxdop-configuration-survey-results\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"MAXDOP configuration survey results"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=559"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/559\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}