Are there any recommendation on SQL server MULTIPLE instances on the same server : min and max memory setting recommendation ?
Are there any recommendation on SQL server MULTIPLE instances on the same server : min and max memory setting recommendation ?
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.
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
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!
if the server has 100GB memory with two SQL instance .
instanceA set 70GB max and 50GB min
instanceB Set 80GB max and 50GB min
iwith initially instanceA has many workloads and buffer boom up to 70GB ... later on instanceB has also many workloads , so the total memory of both instance would roughly be 50GB ?
I never recommend changing the min memory option. Setting the min memory on both instances will cause each instance to never use >50GBs after it allocates that much RAM.
Also you need to leave room for the OS memory usage. You should never set Max memory to equal total physical RAM. You need to leave room for the OS and other processes, at least 5-10GBs.
if the server has 100GB memory with two SQL instance .
i> InstanceA set 70GB max and 50GB min
instanceB Set 80GB max and 50GB min
Sorry, I should have been clearer. The sum of min server memory should be well be below the total RAM in the machine. The OS needs space to breathe.
I agree with Tom, that min server memory is nothing worth playing with. Although in a scenario like this where you over-provision max server memory (because it makes sense), that it can be a good idea to set min as well, so that that it is not dwarfed entirely. But I would not set it above 20 GB,
If you do this - do not enable LPIM for either instance. If LPIM is enabled then that instance will not release memory - and you could starve the OS. Much better to make sure the combined max memory settings of all instances is less than the total memory available to the server. If you do have instances where their workloads do not intersect - then maybe you could over-provision, but that is going to take a lot more research on each instances workloads and usage patterns.
16 people are following this question.