This tutorial will show you how to enable or disable Memory Compression in Windows 10 and Windows 11.
Memory Compression allows Windows 10 and Windows 11 to make better use of available memory on all systems by reducing physical memory utilization, resulting in fewer pagefile IO operations and a reduced reliance on disk. Furthermore, it improves the speed of writing to and reading from disk when MM determines paging must be enacted. Microsoft expects users to experience improved overall responsiveness and usability on all devices running Windows 10 and Windows 11.
Microsoft enabled the Memory Manager (MM) to compress infrequently-accessed memory pages which reduces the amount of reads and writes to the disk (pagefile) and therefore improves responsiveness. Compressing memory reduces the amount of memory used per process, allowing the operating system to maintain more applications in physical memory at a time before enacting traditional paging.
When Memory Manager’s policy does dictate paging, the data being written to or read from the disk is already compressed to typically around 40 percent of its original size. This compression improves the performance of other unrelated operations on the system by reducing a major source of interfering IO load. The end result is a snappier, more responsive experience with improved app launch performance and consistency.
Memory Compression is faster than using the page file, but does use more CPU resources. Your system may not perform as fast as it would if it didn’t need to compress data in memory. If you see a lot of compressed memory and suspect it’s the reason your PC is a bit slow, the only solution for this is to install more physical memory (RAM) or disable Memory Compression.
You must be signed in as an administrator to enable or disable Memory Compression.
Contents
- Option One: See if Memory Compression is Currently Enabled or Disabled
- Option Two: Enable Memory Compression
- Option Three: Disable Memory Compression
EXAMPLE: See amount of compressed memory in Task Manager
1 Open Windows Terminal (Admin). and select Windows PowerShell.
2 Copy and paste the
Get-MMAgent
command into Windows Terminal (Admin), and press Enter. (see screenshot below)3 Look to see if MemoryCompression shows as True (enabled) or False (disabled).
4 You can now close Windows Terminal (Admin) if you like.
This is the default setting.
1 Open Windows Terminal (Admin). and select Windows PowerShell.
2 Copy and paste the
Enable-MMAgent -mc
command into Windows Terminal (Admin), and press Enter. (see screenshot below)3 Close Windows Terminal (Admin).
4 Restart the computer to apply.
1 Open Windows Terminal (Admin). and select Windows PowerShell.
2 Copy and paste the
Disable-MMAgent -mc
command into Windows Terminal (Admin), and press Enter. (see screenshot below)3 Close Windows Terminal (Admin).
4 Restart the computer to apply.
That's it,
Shawn Brink
Last edited: