June 12, 2013 at 11:53 am
Hi,
I am experiencing instances where not all the cores are being utilize for certain queries in SQL Server 2012.
When this happens one of the cores becomes max to 100% CPU usage. This causes everything on the server to slow down and no one else can use the sql server until the offending query is kill from the server. My guess is that it is related to parallelism.
Any suggestions on how to go about debugging this? I can't see the actual execution plan because we always end up killing the offending query. It is a production machine so I can't really play around with it.
Thanks,
June 13, 2013 at 12:07 pm
Which edition are you using? Are you aware of the new core licensing model in SQL Server 2012?
http://www.microsoft.com/en-us/sqlserver/get-sql-server/how-to-buy.aspx
Tommy
Follow @sqlscribeJune 14, 2013 at 2:39 am
You don't need to see the actual plan to see if it's doing a parallel execution. You can pull the plan out of cache for the query, while it's running. That will show you everything you need to know if it's a parallelism problem or not. Use sys.dm_exec_requests and join that to sys.dm_exec_query_plan.
But, if it's one CPU and not the others, it sounds like it's more likely to be something other than a parallel execution. Maybe you do need it. I would check the Max Degree of Parallelism setting on the server first. See if it's set to anything other than 0 (the default), especially if it's set to 1. I would also check the affinity masking on the CPUs and how many CPUs SQL Server can see. I'd also check the cost threshold for parallelism. The default is 5, but that's usually very low for most systems.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply