Key points
- Improve RAM Efficiency: Windows 11 Memory Compression reduces memory pressure by compressing inactive memory pages in RAM before paging to disk.
- Enabled by Default: Memory Compression is turned on by default in Windows 11 and is managed by the Windows Memory Manager.
- Use PowerShell: “Get-MMAgent” to check Memory Compression status, “Enable-MMAgent -mc” to enable, and “Enable-MMAgent -mc” to disable.
- Reduce Pagefile Usage: Compressed memory is stored in RAM, which is significantly faster than paging to disk.
- Disabling Memory Compression Is Rarely Necessary: For most systems, Memory Compression provides benefits with minimal CPU overhead.
- Monitor Compressed Memory: Open Task Manager → Performance → Memory and review the “In use (compressed)” value to see real-time activity.
Windows 11’s Memory Compression helps the system use RAM more efficiently. When RAM fills up, Windows first compresses inactive memory pages and keeps them in RAM. Only when compressed memory is insufficient does Windows page data to 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 this feature 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 of the feature should help determine if you need to proceed to the next steps.
- Press Win + X, click Terminal (Admin), and select Windows PowerShell.
- Check if the Memory Compression is enabled by entering this command:
Get-MMAgent
- Look for “MemoryCompression” and check if it says True (enabled) or False (disabled).
- Close the 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 appropriate script to enable or disable the feature:
- To enable:
Enable-MMAgent -mc
- To disable:
Disable-MMAgent -mc
Step 3: Restart the SysMain service
While Memory Compression relies on the SysMain service is part of the Windows Memory Manager and doesn’t strictly require the SysMain service to function, SysMain improves overall memory optimization behavior. Once you’ve enabled or disabled Memory Compression, you can restart the service by copying and pasting the following code:
Restart-Service SysMain
To check its status. run this command:
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:
| Command | Purpose |
Get-MMAgent | Checks the current configuration of the Memory Manager Agent and the MemoryCompression status |
Enable-MMAgent -mc | Enables Memory Compression |
Disable-MMAgent -mc | Disables Memory Compression |
Restart-Service SysMain | Restarts the SysMain service, which is tied to performance optimization |
Get-Service SysMain | Checks 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, and Memory Compression operates alongside such techniques. In most modern setups, this works without issue, but testing in production environments is recommended.
Task Manager visibility
You can confirm the status of Memory Compression using the Task Manager:
- Press Ctrl + Shift + Esc.
- Go to Performance > Memory.
- 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 this command:
Enable-MMAgent -mc
On systems with 32GB or more RAM, the performance impact of memory compression is typically negligible, and disabling it is rarely necessary. Also, consider testing Memory Compression with your hypervisor setup before enabling it to ensure the two techniques won’t conflict and lead to inefficiencies.
Check out the short table below for recommended actions in specific RAM scenarios:
| Scenario | Recommendation |
| 4–8GB RAM | Keep enabled |
| 16GB RAM | Keep enabled |
| 32GB+ RAM | Optional |
| Gaming PC | Keep enabled |
| Enterprise VM | Test before changing |
