Solved

memory management for multiple SQL instances

Posted on 2014-07-27
10
133 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
 
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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this article I will describe the Copy Database Wizard 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.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now