Solved

memory management for multiple SQL instances

Posted on 2014-07-27
10
141 Views
Last Modified: 2014-07-31
I have a SQL 2012 VM that is running 40 GBs of RAM and 6 instances.  As I understand I need to set the max of each to where the sum of all of them is lower than 40 GBs of RAM.  My only confusion is the minimum.  The article below says the minimum should have a sum slightly lower than the total what my total physical memory is..  That doesn't make sense to me.  Can someone elaborate on this?

https://www.conetrix.com/Blog/post/Best-Practices-for-Memory-Management-of-Multiple-Instances-of-SQL-Server-2008-R2.aspx
0
Comment
Question by:gopher_49
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 11

Expert Comment

by:indianguru2
ID: 40222900
You can leave the min memory to the default which is 0. What it actually means is you have to decide based on the load of each instance, how much memory should it be allocated to start with so that it will have that much memory at any given time and is not taken away when not being used.

The actual article mentioned above is from here:
http://msdn.microsoft.com/en-US/library/ms178067.aspx
0
 

Author Comment

by:gopher_49
ID: 40223347
Okay.  I have historical graphs capturing the memory used by each instance.  Ill check the stats after peak usage to see what each instance actually uses. I'll then set the max to 25% higher than what's actually being used.  I think thats an accurate way to approach this.
0
 
LVL 11

Accepted Solution

by:
indianguru2 earned 500 total points
ID: 40223729
And min as the peak usage what you see. Just make sure you don't assign more than you physically have after summing up all the instances :)
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40223863
It is basically saying that if you use the Minimum Memory approach then you need to set them so the sum total is 1-2Gb less than the physical RAM available. You always need to leave 1 or 2Gb of RAM free for the OS to use.
0
 

Author Comment

by:gopher_49
ID: 40224084
Okay.  I plan on allocating 12 GBs of RAM to the virtual machine.  Currently there is 40 GBs.  We plan to reduce it for we can't migrate it to other ESXi hosts due to its memory allocation being too high.  Plus..  We want the ability to utilize the memory on other VM's.  So..  For example.  If my 6 x instance never exceed 500MBs of RAM (determined via performance counters) I could make each instances min to 500 and max to 750.  That way I know its getting enough memory and some to grow.  I'll keep at least 2 GBs for the OS when everything allocated.

Does this seem like a sound config?
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40224131
That sounds reasonable to me, if you're working on the assumption that each instance is holding roughly the same amount of data and has roughly the same workload. Otherwise you might need to weight that memory allocation towards the heavier use instances.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40225495
I plan on allocating 12 GBs of RAM to the virtual machine.
It is a shame you did not mention the fact that it was a virtual machine in you original question as that changes everything.  The answer is not the same as on a physical box.

For a virtual server (assuming VMWare) I would urge you to read up on Brent Ozar's blog on the subject.  Let me know if you cannot track it down.
0
 

Author Comment

by:gopher_49
ID: 40225510
In the title of my question I state it's a VM..  But you are correct.  I didn't mention it in the most recent post...  I'll read the blog.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 40225858
In the title of my question I state it's a VM.
Ah good point.  I overlooked it entirely.

This is the articles I was referring to:
How to Set SQL Server Max Memory for VMware

Although this one also applies:
How Much Memory Does SQL Server Need?
0
 

Author Closing Comment

by:gopher_49
ID: 40231695
I'm using performance counters to get a good understanding of how much each instance uses over a week..  I'll then set my min and max based on these stats.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question