Our website use cookies to improve and personalise your experience and to display advertisements (if any). Our website may also include cookies from third parties like Google Adsense, Google Analytics, Youtube. By using the website, you consent to the use of cookies.

SQL Server Performance

It is pretty important to make sure you set the Max Server memory setting for SQL Server 2005/2008 to something besides the default setting (which allows SQL Server to use as much memory as it wants, subject to signals from the operating system that it is under memory pressure). This is especially important with larger, busier systems that may be under memory pressure.

This setting controls how much memory can be used by the SQL Server Buffer Pool.  If you don’t set an upper limit for this value, other parts of SQL Server, and the operating system can be starved for memory, which can cause instability and performance problems. It is even more important to set this correctly if you have “Lock Pages in Memory” enabled for the SQL Server service account (which I always do for x64 systems with more than 4GB of memory).

These settings are for x64, on a dedicated database server, only running the DB
engine, (which is the ideal situation).

image

You can change this value in the SQL Server Management Studio by right clicking on the server and selecting properties, then under the memory option

image

To set the “Lock Pages in Memory” option:-

On the Start menu, click Run. In the Open box, type gpedit.msc.

The Group Policy dialog box opens.

  1. On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.
  2. Expand Security Settings, and then expand Local Policies.
  3. Select the User Rights Assignment folder (The policies will be displayed in the details pane.)
  4. In the pane, double-click Lock pages in memory.
  5. In the Local Security Policy Setting dialog box, click Add.
  6. In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe.

Finally, I have learned that it is a good idea to temporarily adjust your MaxServerMemory setting downward by a few GB if you know you will be doing a large file copy on your database server (such as copying a large database backup file).

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts