Enable memory compression on Windows 11

Windows 11 includes a powerful, often overlooked feature designed to maintain system responsiveness during heavy multitasking. Memory compression is a memory management technique that balances available RAM against CPU cycles to prevent system slowdowns.

This guide explains how memory compression works, why it is critical for modern workflows, and how to verify it is active on your system.

Understand memory compression

To understand memory compression, visualize your computer’s RAM (Random Access Memory) as a physical desk. When you open applications, you place documents and tools on that desk. Eventually, the desk runs out of space.

Without memory compression, Windows moves the least-used items from your fast desk (RAM) to a filing cabinet across the room (your hard drive or SSD). This process is called “paging.” Retrieving items from the filing cabinet takes significantly longer than reaching across the desk, which causes the computer to feel sluggish or “stutter.”

Memory compression offers a smarter alternative. Instead of moving items to the slow filing cabinet, Windows compresses the data and keeps it on the desk. This reduces the size of the data so it fits in the available RAM, keeping it instantly accessible.

Analyze the trade-off

Memory compression represents a strategic trade-off between processor power and storage speed:

  • Compression: Requires a small amount of CPU power to compress and decompress data.
  • Paging: Requires zero CPU power but incurs a high latency penalty because reading from a disk is exponentially slower than reading from RAM.

For most modern systems, the CPU is incredibly fast and can compress or decompress data in nanoseconds. In contrast, reading from a disk—even a high-speed NVMe SSD—takes significantly longer. Therefore, spending a tiny fraction of CPU power to keep data in fast RAM is almost always preferable to waiting for the disk.

Verify the status

You can determine if Windows 11 is currently compressing memory using Task Manager.

  1. Right-click Start and select Task Manager.
  2. In the left navigation pane, select Performance.
  3. Select Memory.
  4. Locate the “In use (Compressed)” section under the memory composition graph.

You will typically see a value such as “6.4 GB (500 MB)”. This indicates that 6.4 GB of RAM is currently in use, and 500 MB of that data is compressed. If this number is visible, the feature is active and functioning correctly.

Configure the feature via PowerShell

While enabled by default, you may need to re-enable memory compression if it was previously disabled for troubleshooting. You might also disable it for specific high-performance environments, such as dedicated virtual machine hosts where every CPU cycle is critical.

Check current state

  1. Right-click Start and select Terminal (Admin) or PowerShell (Admin).
  2. Run the following command:
Get-MMAgent

Verify that the MemoryCompression line reads True.

Enable memory compression

If the status is False, use this command to enable it:

Enable-MMAgent -mc
Restart-Computer

Disable memory compression

To disable the feature (recommended only for testing or specific high-RAM workstations):

Disable-MMAgent -mc
Restart-Computer

Determine when to use memory compression

For the vast majority of users, memory compression should remain enabled.

  • Low RAM (8 GB or less): Essential. It prevents the system from constantly writing to the disk, which keeps the computer usable under load.
  • High RAM (32 GB or more): Useful. Even with ample RAM, Windows will compress inactive browser tabs or background processes to maximize contiguous space for active heavy tasks, such as compilation, rendering, or gaming.

Disabling this feature forces Windows to rely strictly on the page file once RAM fills up, often resulting in noticeable performance degradation when switching between applications.