Solved

memory management for multiple SQL instances

Posted on 2014-07-27
10
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

756 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