CPU considerations for multiple instances

  • I've been researching this and haven't found much info so I'm not sure what most people do. Consider a server with 48 cores running 4 SQL instances. The server has 192GB RAM and I have max memory set per instance, but there isn't a max CPU so to speak. I have MAXDOP set to 8, but that is just per query. If multiple queries come in, one instance could spike all the cores and starve the other instances.

    I'm considering enabling only certain NumaNodes for each instance. Is that the route to go?

    Here's another wrench in the mix. The instances will be in a Veritas cluster so they can/will failover to another physical server. If I set specific NumaNodes for an instance, will it use the same NumaNodes on the failover server?

    Any suggestions or past experiences will be appreciated!

  • Is this OLTP or data warehousing?

    For OLTP on SQL Server 2008 there's still justification for setting MAXDOP to 1. Ideally you shouldn't have any OLTP queries needing multiple cores, and if they do this option will stop them killing the server though their individual performance may suffer. With data warehousing and from SQL 2008R2 on this may not be the best option.

    I don't like the idea of allocating cores to instances because if you are running Active/Active then the best use you can get from the CPUs is the sum of the allocated cores on a node, potentially half the cores which is a waste.

    Using MAXDOP = 1 and monitoring CPU load would be my prefered option.

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • You should be able to assign the cores to specific instances by setting the processor affinity. Look at the properties of the instances.

  • Typically I just let Windows balance them out via the normal scheduling. If you want to limit, rather don't use processor affinity (and please don't set maxdop to 1).

    You can set CPU ratios via a windows tool. Windows resource toolkit or something like that, I forget the exact name. That lets you set limits on CPU usage for various apps

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks, I will look into that tool.

    I have MAXDOP set at 8 right now. From the research I've done, that is a good setting for the amount of cores I have. Sound good?

  • You could look into utilising resource governor (built into SQL) for this very situation

    🙂

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

  • I would probably look at a combination of all of the recommendations so far.

    I would set MAXDOP based on the current recommendation (No. of CPU Cores/No. of Numa = MAXDOP), not to 1 as this could limit some queries. I'd def increase cost threshold for parallelism from the default 5.

    I would let windows manage the scheduling of threads itself.

    I would stay away from setting the processor affinity; its something you will have to remember for server upgrades or any other changes. If you have something that is particularly heavy, I would use resource governor to manage that CPU load within SQL Server.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply