Enable Lock Pages in Memory for 7-Zip in Windows

Enabling the Lock Pages in Memory privilege in Windows allows 7-Zip to allocate large memory pages, significantly speeding up compression and decompression operations by reducing translation lookaside buffer (TLB) misses. This guide explains how to grant this security privilege to your user account using the Windows Local Security Policy editor and apply it to 7-Zip.

Requirements

To enable this feature, you must:

  • Run a Windows Pro, Enterprise, or Server edition (Windows Home editions do not include the Local Security Policy snap-in by default).
  • Have administrator access to your system.

Step 1: Open the Local Security Policy Editor

  1. Press Win + R on your keyboard to open the Run dialog box.
  2. Type secpol.msc and press Enter (or click OK).
  3. If prompted by User Account Control (UAC), click Yes.

Step 2: Navigate to User Rights Assignment

  1. In the left pane, expand the Local Policies folder.
  2. Click on the User Rights Assignment subfolder.

Step 3: Configure the Lock Pages in Memory Policy

  1. In the right pane, locate and double-click the policy named Lock pages in memory.
  2. In the properties window, click the Add User or Group... button.
  3. In the text box under Enter the object names to select, enter your Windows username (or type Administrators to grant it to all admin accounts).
  4. Click Check Names to verify the entry.
  5. Click OK, then click Apply and OK to close the policy window.

Step 4: Restart Your Computer

For the new security privilege to take effect, you must restart your computer or sign out and sign back in to your Windows user account.


Step 5: Verify Large Pages in 7-Zip

  1. Open 7-Zip File Manager.
  2. If your account relies on elevated privileges through the Administrators group, run 7-Zip as Administrator by right-clicking its shortcut and choosing Run as administrator.
  3. Open Tools > Benchmark or start a large compression task with a large dictionary size.

7-Zip will automatically request and lock memory pages if the privilege is active and sufficient contiguous RAM is available.