Quantcast
Channel: Erik Darling – Brent Ozar Unlimited®
Viewing all articles
Browse latest Browse all 370

Max Worker Threads: Don’t Touch That

$
0
0

More isn’t faster

I’ve had people give me all sorts of janky reasons for changing Max Worker Threads. I’ve even had people tell me that someone from Microsoft told them to do it.

The thing is, all changing that setting does is help you not run out of worker threads. It doesn’t make queries run any better or faster. In fact, under load, performance will most likely be downgraded to Absolute Rubbish© either way.

What’s worse? Running out of worker threads and queries having to wait for them to free up, or having way more queries trying to run on the same CPUs? Six of one, half dozen of punching yourself squarely in the nose.

In the classroom

Brent is fond of teaching people about CXPACKET by putting you in a classroom, and having the teacher hand out work to students. I’m going to stick with that basic concept.

Your CPU is the teacher, the threads are students. With 10 kids in a classroom, a teacher may have a pretty easy time answering questions, grading tests and homework, planning lessons, etc. You know, teacher stuff.

If you add 10 kids, the teacher will still have to do all that stuff, but now poor ol’ teach is bringing work home nights and weekends, and classes are going off-schedule because more kids have more questions, three of them wrote disruptive reports, one of them keeps asking the same question 1000 times a second, five of them started blocking the chalkboard from each other, and another peed their pants waiting for the teacher to call on them.

Add 10 more kids, and, well… Ever see that movie The Principal?

The lesson

Adding more kids to your classrooms doesn’t make your school any faster. At some point, you need more teachers, too.

Thanks for reading!


Viewing all articles
Browse latest Browse all 370

Trending Articles