SQL Max Memory Calculator

Calculate how much RAM you should dedicate to all the SQL instances on your server. Want to know how it works? Read more below...
5013.6 MB
Max Memory
Total Ram on Server (GiB):
Number of Cores:
Architecture:
Other Apps RAM (MB):

About the calculator

The original idea of a tool for calculating the SQL Server Max Memory comes from Vlad Catrinescu, SharePoint MVP, who wrote a very popular whitepaper SQL Server Performance in a SharePoint Environment:

Despite of the formula (see below) in the whitepaper, Vlad Catrinescu also provided a tool for calculating max memory, a windows forms application that is freely downlodable at sqlmem.codeplex.com

The goal of the SQL Max web app is to take this idea a step further and make it available directly in your browser, on desktop at work, or on the go in your mobile. This mobile web app will also be available for offline access. Simply put, why should you dowload a zip file, extract and run the .exe file? Perhaps you cannot run executable files due restrictions, or perhaps you are not running Windows at all.

Check out our contributors!

Formula

SQL Max Memory = TotalPhyMem - (NumOfSQLThreads * ThreadStackSize) - (1GB * CEILING(NumOfCores/4)) - OS Reserved
NumOfSQLThreads = 256 + (NumOfProcessors*- 4) * 8 (* If NumOfProcessors > 4, else 0)
ThreadStackSize = 2MB on x64 or 4 MB on 64-bit (IA64)
OS Reserved = 20% of total ram for under if system has 15GB. 12.5% for over 20GB

How to set a fixed amount of memory

Here is the instruction how to set the memory, source: technet
  1. In Object Explorer, right-click a server and select Properties.

  2. Click the Memory node.

  3. Under Server Memory Options, enter the amount that you want for Minimum server memory and Maximum server memory.

    Use the default settings to allow SQL Server to change its memory requirements dynamically based on available system resources. The default setting for min server memory is 0, and the default setting for max server memory is 2147483647 megabytes (MB). The minimum amount of memory you can specify for max server memory is 16 MB.

Contributors

Anatoly Mironov
Anatoly's gravatar
Erik Kronberg
Erik Kronberg's gravatar
Johannes Milling
Johannes Milling's gravatar
Björn Roberg
Björn Roberg's gravatar
Stina Qvarnström
Stina Qvarnström's gravatar
Vlad Catrinescu
Vlad Catrinescu's avatar
Help to spread the word:
Twitter LinkedIn Facebook Google+