Cores not being used on Windows 2008 SQL Server 2012

  • 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,

  • 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