-2

There are 2 purpose of posting this question:

  1. Finding a process to determine the best possible value that can be used for setting MAX and MIN memory of SQL Server on bare metal?

Note: I know the standard formula that we use for setting MIN and MAX memory for SQL Server hosted on a VM / Physical Server. So please don't close this question thinking I am asking how to set MIN and MAX memory. I am talking about the intricacies that comes with hosting multiple instances on a bare metal host.

  1. Understanding exactly how SQL Server Memory will behave in normal and memory pressure situations that comes at Baremetal Host Level?

Note: We are enabling Lock Pages in Memory for each SQL Server Instance.

Any links to whitepapers / articles that gives more info about dynamic memory allocations in bare metal, how sql server gets impacted with that would really help.

NOTE: Hyper-V is used on top of Bare-Metal Server. So basically we have one beefy bare metal server and with help of Hyper-V we are going to manage it and will deploy 10 VMs on top of that beefy bare metal host. Will do over-allocation and stuff (as told by Infra team). For example: D: Drive of Host will be mapped to D: Drive of all 10 VMs hosted and they all will share IOPS of D: Drive of host. Same will be case of Memory. They all will be sharing memory.

I hope this info helps.

1
  • This is unclear, like your orig q. You say you want to find a process to determine MIN/MAX then say you already know how to, then mention you have multiple instances - that is a huge detail and you need to explain more. The 2nd part is "how does MSSQL memory work" essentially, which is a huge topic and too broad for DBA.SE in my opinion. You should start by reading the docs and then ask a specific question afterwards. Commented May 29, 2020 at 15:47

1 Answer 1

2

the intricacies that comes with hosting multiple instances on a bare metal host

The short answer is don't do it. In the long run there's nothing to be gained from hosting multiple instances on a bare-metal server. Just use a hypervisor (Hyper-V is free) and decouple your SQL Server instances from any particular host.

There are edge cases where running on bare metal makes sense for scale-up scenarios, but if you're hosting multiple instances, you should use virtualization.

The slightly-longer answer is to affinitize each instance to a a subset of the NUMA nodes (preferably 1), and set the min server memory for each instance to the tested minimum for production operation. And either

1) Don't set max server memory and allow the instances to contend for memory. Be aware that this will not end up with an optimal allocation across the instances, and you should periodically trim the memory use of instances by setting max server memory, waiting for the instance to trim its caches, and restore the setting. After observing this for some time you may want to switch to setting max server memory for some or all of the instances.

or

2) Set max server memory for all instances explicitly and monitor the Page Life Expectancy (PLE) of all instances and move memory from instances with high PLE to instances with low PLE. Also keeping in mind that it's optimal to keep memory allocations for the instances running on a NUMA node under the amount of memory available on that NUMA node. You you may want to move instances between NUMA nodes as you change the memory allocation.

2
  • Yes we are using Hyper-V to virtualize / manage Bare metal host. Forgot to mention in the question. I will update the question now. So we have one big bare metal server and with the help of Hyper-V we are managing it and mapping D: (for example) Drive of host to D: Drive of all the servers that are hosted on that bare metal. So of D: Drive of host has 8000 IOPS, and 10 servers are deployed, then D: Drive of each server will shared the same IOPS and will be mapped to D Drive of host. Now can you please guide on how I should MAX and MIN Memory for each VM? Commented May 29, 2020 at 19:56
  • Either manually allocate memory to VMs and monitor the Page Life Expectancy and adjust as in 2) above or use Hyper-V Dynamic Memory per Running SQL Server with Hyper-V Dynamic Memory download.microsoft.com/download/D/2/0/… Commented May 29, 2020 at 20:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.