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.
- On the Start menu, click Run. In the “Open” box, type gpedit.msc.
- On the “Group Policy” console, expand Computer Configuration, and then expand Windows Settings.
- Expand Security Settings, and then expand Local Policies.
- Select the User Rights Assignment folder.
- In the right details pane, double-click Lock pages in memory.

- In the “Local Security Policy Setting” dialog box, click Add.
- In the “Select Users or Groups” dialog box, add an account with privileges to run sqlservr.exe (e.g. NetworkService).
Related Articles
- How to Enable PAE in x86 32-bit Windows Server 2003 and 2000 to Use Large 4GB or More RAM Memory
- How to Enable PAE on 32-bit Windows Vista for 4 GB or More Memory
- How to Enable, Use and Support 4GB or More Physical RAM Memory in 32-bit Windows Vista
- Test Memory On Computer for Errors with Windows Memory Diagnostic RAM Tester
- Backup and Disk Imaging via Macrium Reflect Free Edition
- Download Softick Card Export II Trial to Emulate Windows Mobile as Portable Hard Disk
- Hide and Lock Private Files Into Password Protected Lockbox
- Prevent Theft of Personal Information Through Web-based Malware with Haute Secure 2.0
- Fujitsu Launched New 320GB Hard Disk Drive with AES Hardware Encryption
- Windows Cannot Hibernate Computer with More Than 4 GB Memory










































November 14th, 2009 00:21
“add an account with privileges to run sqlservr.exe”
How do you know which accounts to add?
February 20th, 2009 01:15
“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.
July 20th, 2008 10:22
[...] about it here: Enable Lock Pages in Memory to Prevent Database Paging to Disk