5. How does it work in SQL Server
Thread Pool
(Workers) Tasks Batch
CPU Core
SELECT …
Task Read…
…..
Read… …..
Write…
UPDATE …
….
Calculate… ….
Write…
Pending Tasks
Scheduler
Max Workers !!
17. Cost Threshold for Parallelism
• Default (5)
• Other Recommendations:
5 is too low, Get it higher to 50
Jonathan Kehayias Recommendation
18. My Recommendation
It really depends on your workload, you need
to first test:
For OLTP have
• Higher Cost Threshold (50)
• Start with low MAXDOP (8-12)
For OLAP have
• Higher Cost Threshold (50)
• Start with high MAXDOP (Cores / 2)
19. My Recommendations
Run Jonathan Kehayias Script to tune Cost
Threshold for Parallelism.
Run a trace, change MAXDOP, rerun a trace
on the same workload and run Qure
Analyzer (Free !) until you find the perfect
MAXDOP.
Override MAXDOP if necessary (Use Plan
Guides):
• In OLTP override with a higher MAXDOP.
• In OLAP override with a lower MAXDOP.
20. Become a true Pro !
Join one of our courses:
SQL Server 2012 – Guy Glantser
Storage for DBAs – Tzahi Hakikat
Advanced Programming in SQL Server – Noam Brezis
Contact Us:
www.madeira.co.il
21. Thank you
To:
• Guy Glantser (Madeira)
• Haim Fishner (Madeira)
• Adam Machanic
• R Meyyappan (http://www.sqlworkshops.com/)
Contact Us:
www.madeira.co.il