/
/

Enable or Disable Memory Compression in Windows 11

Enable or Disable Memory Compression in Windows 11 blog banner image

Windows 11’s Memory Compression helps the system use RAM more efficiently. When RAM starts to fill up, Windows writes inactive data to the slower pagefile on disk. However, Memory Compression compresses some memory contents so more data can stay in RAM rather than be offloaded to disk. This process improves responsiveness and speeds up performance.

While there are things you need to consider before turning on or off Memory Compression, it’s a generally helpful feature to know about. This guide will walk you through enabling or disabling Memory Compression in Windows 11.

How to enable or disable Windows 11’s Memory Compression with PowerShell

Before turning Memory Compression on or off, note that you’ll need administrative privileges. To enable or disable Memory Compression with PowerShell, follow the steps below:

Step 1: Check if Memory Compression is enabled or disabled

Check if Memory Compression is enabled or disabled using PowerShell. Knowing the status should help determine if you need to proceed to the next steps. Do so by following the steps below:

  1. Press Win + X, click on Terminal (Admin), and select Windows PowerShell.
  2. Check if the Memory Compression is enabled by copy-pasting:
    • Get-MMAgent
  3. Look for “MemoryCompression” and check if it says True (enabled) or False (disabled).
  4. Close Windows Terminal if you’re satisfied with the status.

Step 2: Enable/disable Memory Compression using PowerShell

You’ll want to open PowerShell again to turn on or off Memory Compression. Afterward, copy and paste the script to enable or disable the feature:

  • To enable:

Enable-MMAgent -mc

  • To disable:

Disable-MMAgent -mc

Step 3: Restart the SysMain service

Memory Compression relies on the SysMain service. You’ll need to restart the service once you enable or disable Memory Compression by copying and pasting the following code:

Restart-Service SysMain

To check its status:

Get-Service SysMain

If disabled, Memory Compression may not function correctly. You may also need to restart the device to apply the changes.

Memory Compression PowerShell commands

Take note of the following PowerShell commands for future reference:

CommandPurpose
Get-MMAgentChecks the current configuration of the Memory Manager Agent and the MemoryCompression status
Enable-MMAgent -mcEnables Memory Compression
Disable-MMAgent -mcDisables Memory Compression
Restart-Service SysMainRestarts the SysMain service, which is tied to performance optimization
Get-Service SysMainChecks the current status (Running/Stopped) of the SysMain service

Things to consider before disabling Memory Compression

Turning Memory Compression on or off in Windows 11 affects device performance, so knowing its effects is crucial. For one, Memory Compression affects RAM usage, which may offer little benefit to high-end computers. Here are other things you need to keep in mind before turning the feature on or off:

Performance impact

Memory compression compresses memory pages in RAM to avoid using slower pagefiles on disk. This improves performance and responsiveness on low-RAM systems because reading compressed data from RAM is faster than reading uncompressed data from the hard drive.

However, there’s enough physical memory to avoid paging on high-RAM systems, meaning compression won’t amount to anything. It may even add unnecessary CPU overhead.

Virtual machines

In virtual environments, the hypervisor will likely use memory management techniques like ballooning to allocate RAM across virtual machines.

If the guest OS (in this case, Windows) performs Memory Compression, this could conflict with the hypervisor’s memory controls, leading to inefficiencies. It’s best to test Memory Compression with your hypervisor setup before broadly enabling it.

Task Manager visibility

You can confirm the status of Memory Compression using the Task Manager:

  1. Press Ctrl + Shift + Esc.
  2. Go to Performance > Memory.
  3. Look for “In use (compressed).

Third-party tools

PC optimization or performance tools like registry cleaners or RAM optimizers may automatically adjust system settings, including Memory Compression. This may result in conflicts, especially if a tool re-enables compression after disabling.

If you want to reliably control Memory Compression, disable or avoid third-party tools that may change system memory settings.

Improve performance by enabling Memory Compression in Windows 11

Memory Compression is a feature that reduces the data size to allow the computer to store more files in physical memory than it usually would. If you’re using a device with limited RAM (4 to 8GB), it’s best to keep compression enabled to improve performance and responsiveness. To do so, open PowerShell and enter “Enable-MMAgent -mc.”

If you plan to disable Memory Compression, only do so if your device has enough RAM (16GB+). Also, consider testing Memory Compression with your hypervisor setup before enabling it to ensure the two techniques won’t conflict and lead to inefficiencies.

FAQs

Memory Compression is a feature in Windows 11 that reduces data size before writing it to RAM. This allows the computer to store more files in physical memory than it usually would, reducing the need for page files on Windows.

It’s a feature that helps systems use RAM more efficiently, speeding up performance and improving responsiveness on systems with limited RAM (4 to 8GB).

It’s generally advised to avoid disabling Memory Compression unless you have a specific reason, such as having a system with 16GB+ of RAM. Keep Memory Compression enabled on systems with limited RAM to improve performance by reducing the need for slower disk-based paging.

Memory Compression improves performance on devices with limited RAM by allowing more programs to stay in memory instead of swapping to disk. Compression keeps more data in memory instead of using the slower hard drive. Memory compression uses a bit of CPU to compress data but saves time compared to disk access.

You might also like

Ready to simplify the hardest parts of IT?