SQL server multiple instances on the same server : min and max memory setting recommendation

sakuraime 2,326 Reputation points
2021-07-28T04:12:47.43+00:00

Are there any recommendation on SQL server MULTIPLE instances on the same server : min and max memory setting recommendation ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,799 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 44,501 Reputation points
    2021-07-28T06:14:21.007+00:00

    min and max memory setting recommendation

    The settings depends on the workload per instance, which we don't know and so we no one can give a recommendation.
    Memory setting can be change on the fly, so "play" with them to see the effects / performance changes.

    0 comments No comments

  2. AmeliaGu-MSFT 13,976 Reputation points Microsoft Vendor
    2021-07-28T09:45:55.653+00:00

    Hi sakuraime,

    Agree with Olaf. It is better to give each instance memory proportional to its expected workload or database size. You can experiment to find the best settings for your usage pattern. And please make sure the total value of max server memory of all instances does not exceed the total physical memory on your machine. And the sum of min server memory of all instances is 1-2 GB less than the total physical memory on your machine.

    Please refer to this doc which might help.

    Best Regards,
    Amelia

    0 comments No comments

  3. Erland Sommarskog 111.2K Reputation points MVP
    2021-07-28T10:14:20.25+00:00

    As Olaf and Amelia say, it depends on your workload. Amelia suggests that "total value of max server memory of all instances does not exceed the total physical memory on your machine". This certainly a good idea, since this removes the risk that the instances start fighting with each other. Then again, this also means that you may use less of the memory available. So if the instances are used irregularly, it may be OK to have the total of max server memory to exceed the available RAM.

    However, the sum of total min server memory should always be safe below the the total RAM. Obvious? One would think so, but I have experienced a situation where someone had configured two instances on a machine with 64 GB of RAM with 60 GB for min server memory and 62 GB of RAM. This was a performance-test server, and the idea was that only one instance should be running at a time, but at one occasion both instances were started. It was completely hilarious how slow it was!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.