Enable Lock Pages in Memory to Prevent Database Paging to Disk

Lock Pages in Memory is a Windows security setting policy that determines which accounts can use a process to keep data in physical memory, which prevents the system from paging the data to virtual memory on disk, directly improves the response time speed of the process, especially data-intensive program such as SQL Server database management system, as access time from RAM is definitely faster than disk I/O.

Lock Pages in Memory option privilege must be enabled to configure Address Windowing Extensions (AWE) which allow a 32-bit software application to access more physical memory than it has virtual address space. Both settings are normally used to optimize Microsoft SQL Server database server running on Windows 2000, Windows Server 2003 and Windows Server 2008 by allowing the user account running SQL Server to load the whole process in physical memory without using any paging file flow over to disk.

Note that exercising or enabling this privilege could significantly affect system performance by decreasing the amount of available random access memory (RAM). So, a system is recommended to have large memory size, typically bigger than 4 GB. Which mean that on 32-bit operating system, PAE has to be enabled, although neither Lock Pages in Memory nor AWE depend on PAE. Beside, on 32-bit operating systems, setting this privilege when not using AWE can significantly impair system performance. However, on 64-bit operating system, although not required, it’s recommend to lock pages in memory.

To enable Lock Pages in Memory setting, system administrator has to use the Windows Group Policy tool (gpedit.msc) to enable this policy for the account used by SQL Server.

  1. On the Start menu, click Run. In the “Open” box, type gpedit.msc.
  2. On the “Group Policy” console, expand Computer Configuration, and then expand Windows Settings.
  3. Expand Security Settings, and then expand Local Policies.
  4. Select the User Rights Assignment folder.
  5. In the right details pane, double-click Lock pages in memory.

    Lock Pages in Memory Policy

  6. In the “Local Security Policy Setting” dialog box, click Add.
  7. In the “Select Users or Groups” dialog box, add an account with privileges to run sqlservr.exe (e.g. NetworkService).

3 Responses to “Enable Lock Pages in Memory to Prevent Database Paging to Disk”

  1. Brad
    November 14th, 2009 00:21
    3

    “add an account with privileges to run sqlservr.exe”

    How do you know which accounts to add?

  2. kyle mera
    February 20th, 2009 01:15
    2

    “Windows cannot find “gpedit.msc.”

    When going under control panel, edit group policies it says, MMC cannot open the file “C:\windows\system32\gpedit.msc.

    I looked up that directory and the file is not there!
    I am an administrator account by the way.

  3. Enable Lock Pages in Memory to Prevent Database Paging to Disk - P2P Talk!
    July 20th, 2008 10:22
    1

    [...] about it here: Enable Lock Pages in Memory to Prevent Database Paging to Disk

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

lock pages in memory - awe requires the 'lock pages in memory' privilege - lock pages in memory windows 2003 - lock memory pages - address windowing extensions awe requires the 'lock pages in memory' privilege - Address Windowing Extensions (AWE) requires the 'lock pages in memory' privilege - se lock memory - sql lock pages in memory - lock memory pages privilege - se lock memory vista - Address Windowing Extensions (AWE) requires the 'lock pages in memory' - Lock Pages in Memory SQL - "Lock Pages In Memory" - cannot use large memory pages due to lack of privileges - lock pages in memory privilege - lock memory pages vista - awe lock pages in memory - Locked Pages in Memory - Lock Pages in Memory - lock pages in memory vista - lock pages in memory permission - AWE requires the lock pages in memory privilege - lock pages in memory windows 7 - lock page in memory - Address Windowing Extensions (AWE) requires the 'lock pages in memory' privilege - windows 2003 Lock Pages in Memory - windows lock pages in memory - Se Lock Memory Privilege - lock memory pages - memory lock - Cannot use large page memory pages due to lack of privileges - Lock Pages in Memory AWE - enable lock pages in memory - Address Windowing Extensions (AWE) requires the 'lock pages in memory' - Lock Pages in Memory option - Enable the Lock Pages in Memory Option - lock memory pages privilege vista - lock memory - how to lock pages in memory - vista lock pages in memory - Cannot use large page memory pages due to lack of privileges. - requires the 'lock pages in memory' privilege - lock pages in memory windows vista - all - locking pages in memory - lock page memory - SQL Serever 2008 x86 Support for Locked Pages - SeLockMemoryPrivilege - windows vista lock pages in memory - lock memory pages windows 7 - windows lock memory - lock pages in memory vista home - (AWE) requires the 'lock pages in memory' privilege - se lock memory privilege vista - lock page in memory vista - lock pages - Enable the Lock Pages in Memory - windows server 2008 lock pages in memory - 'Lock pages in memory' - awe requires lock pages in memory - se-lock-memory - "lock memory pages" - "locked pages in memory" - 'lock pages in memory' - enable large memory pages - windows 7 lock memory pages - how to enable lock pages in memory - lock pages in memory xp - Vista lock memory pages - lock pages in memory 64 bit vista - lock pages memory - "Address Windowing Extensions (AWE) requires the 'lock pages in memory' privilege" - vista awe - lock pages in memory' privilege - se memory lock -