• SQL Server
  • Log Shipping Tricks Demo
  • SQLCruise Alaska 2012 Pics
SQLSoldier News From the Frontlines

The Barking Dog Analogy

September 20, 2011 4:31 pm / 1 Comment / SQLSoldier

The Barking Dog Analogy

Maggie and Woody

Maggie and Woody


A discussion started today on Twitter about CXPacket waits. There had been a heated debate on the subject on Twitter the previous night (wow, does that sound geeky), so many of us got looped into today’s discussion. Someone had experienced a problem with a delete query on a large table causing all CPUs to nearly max out (96% average). In his investigations, he looked at the total waits on the server and saw that the second highest waits were CXPacket waits (parallelism). As many people do (and even recommend to others), he changed MAX DOP (maximum degree of paralellism) from 0 to 1. In his observation, total CPU utilization went from 96% to 28% (see image below).

Problem solved, investigation ended … right? Or do you see what I see? Two of the CPUs are still maxed out. The problem wasn’t solved, it was just restricted to fewer CPUs. Concurrency is improved, but the query will take much longer to complete now.

Task Manager

Image from http://rahmanagoro.wordpress.com

This is where we got involved. This is a very common mistake. CXPacket waits is a symptom, not the underlying problem. I’m not going to go into great detail here about how parallelism works or how to deal with CXPacket waits. That message has already been delivered in excellent detail. If you want that information, I suggest starting with Adam Machanic’s (blog|@AdamMachanic) series on parallelism that he did for SQL University: SQL University: Parallelism Week – Introduction. Then when you feel ready for more, move on to Paul White’s (blog|@SQL_Kiwi) post Understanding and Using Parallelism in SQL Server.

The Barking Dog Analogy

I’m not here for a heavy, in-depth discussion on parallelism. I shared my thoughts on disabling paralellism in the form of an analogy, and people seemed to like the analogy, so I’m posting it for everyone:

If my dog is barking at a burglar, and I tell her to be quiet and she does, then all I’ve done is stop the barking, not the burglar. CXPacket waits are like the barking dog. They’re warning you of a bigger problem. If you tell the dog to be quiet, the barking may stop, but the bigger problem is still there.

Posted in: SQL Server / Tagged: Internals, Performance & Optimization, Tips & Tricks, Troubleshooting

One Thought on “The Barking Dog Analogy”

  1. Pingback: Why We Follow Best Practices | SQLSoldier

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation

← Previous Post
Next Post →
<

Remote DBA Services
- serious SQL Server expertise for less than a full-time DBA
My Articles
 
My Book
Check out my interview on

Extreme Data Recovery (with Argenis Fernandez)
10 Things all BI System Administrators Should Know
Upcoming Events
    All events shown in Pacific Time

    No events to show

RSS My SQL Server Magazine Articles

  • Database Mirroring for Disaster Recovery September 16, 2011
  • Comparative Review: Database Schema Comparison Tools August 24, 2011
  • 3 Log Shipping Techniques June 22, 2011
  • Hardening SQL Server June 20, 2011
  • Review: ScriptLogic Security Explorer for SQL Server February 8, 2011

Tags

31 Days of Disaster Recovery Architecture Automation CDC & Change Tracking Data Architecture VC Database Mirroring DBCC Denali Disaster Recovery Dynamic Management Views Extended Events Gamers & Geeks General Discussion High Availability How do I ... ? Humor Idera ACE Program Internals MCM Meme Monday Performance & Optimization PowerShell Professional Development Replication Security SQLBits SQL PASS SQL PASS Summit SQLRally SQL Saturday SQL Server Magazine SQL University SSAS & BI SSIS SSMS SSRS T-SQL T-SQL Tuesday tempDB Tips & Tricks Travel Troubleshooting Undocumented Stuff Whitepapers XML in SQL

News

Download my Powershell Scripts

The following scripts can be downloaded as text files. You will need to change the file extension to .ps1 in order to execute them.

Backup a database
Restore a database
Scan a server to find a free port
Query DNS to get the FQDN of a server


To see some examples of my other forms of writing, please visit my page on WritersCafe.org. It is almost exclusively horror fiction, but I sometimes throw other things in there too from time to time. There's one science fiction story, a couple of poems, and quite a few humor pieces as well.


Look for me in the SQL Q&A section of the August, 2007 issue of TechNet Magazine.
August issue of TechNet Magazine's SQL Q&A column

Protect our Heroes

© Copyright 2012 - Robert L Davis
Infinity Theme by DesignCoral / WordPress

Twitter Twitter 
LinkedIn LinkedIn 
TLF TLF RSS RSS 
WritersCafe WritersCafe 
SQLPASS SQLPASS 
Facebook Facebook
grab this