Enable system memory compression (MemoryCompression)

Windows 11 has a feature that compresses system memory to improve performance and reduce the use of physical memory. This does this function by storing part of the memory in compressed form in RAM, this function is also known as “MemoryCompression”.

Compressing system memory helps to reduce the number of read / write requests from the hard disk, resulting in fewer page file IO operations and reduced hard disk dependence.

Memory compression can help improve the user experience in general. However, additional CPU actions may be required during data compression and decompression.

Compressed memory usage

Windows also uses memory compression to reduce the amount of memory used per process, freeing up RAM memory to hold more applications in RAM without using traditional paging. All this helps computer systems with a layer of pre-installed memory.

Enable MemoryCompression in Windows 11

You must first check that memory compression is already enabled. If it is not already enabled, you can enable it yourself.

To check if memory compression is already enabled, right-click the start button. Click Windows Terminal (Administrator) to open Windows Terminal.

In the Windows Terminal window, type the following command:


You can now see immediately whether memory compression is enabled or not.

Enable memory compression in Windows 11

If the “MemoryCompression” value is “true” then it is enabled and if it is “false” it is disabled. With “MemoryCompression” value “false” you can enable it in the following way.

In the Windows Terminal window type:

Enable-MMAgent -mc

Then close the window and restart your computer.

To turn off memory compression, type:

Disable-MMAgent -mc

Then close the window and restart your computer.

Also read: Clean up virtual memory when shutting down the computer.

I hope you have helped with this. Thanks for reading!

Share this PC tip via Social Media and help other people as well. Help and share computer knowledge via the social media buttons below.

Need help? Or do you have a question?

I’ll be happy to help you. Please provide the most comprehensive description of your computer problem. You can ask your question at the bottom using the comments field. Thank you too 🙂

My computer help is free, but without warranty. If you have asked a question, you should check this page regularly to see if a comment has been posted. You will not receive an automatic email with a question or response.
I respond to your question within 24 hours, usually faster.