Windows

What Is Memory Compression in Windows and How Do You Enable or Disable It?

Introduced in Windows 10, memory compression is a feature that gives your RAM more breathing room to prevent your computer from lagging. Windows will turn on memory compression by default, and you could disable it if you please.

But what does it do exactly, and should you even disable it in the first place? Let’s take a look at this feature in a little more detail.

What Are Page Files in Windows?

Before we get into memory compression and its importance, let’s clear out a very important concept related to it: page files.

Page files are hidden system files that Windows stores in secondary storage, which is usually your local drive. They contain information that your RAM (physical memory) doesn’t need right away. In this way, page files serve as a type of secondary RAM, because your computer will store data in page files when your physical memory is full.

Without page files, you’ll notice your computer is much slower or is frequently crashing, malfunctioning, or losing data. Your apps might even suffer the same fate since your computer will have nowhere to store the temporary data it needs to keep them running. Furthermore, page files reduce the need to free up physical memory yourself.

However, when your computer stores and retrieves data from secondary storage, a process known as paging, it can contribute to slowing down your PC. That is because reading data from a hard drive is significantly slower than RAM.

That’s where memory compression comes in.

What Is Memory Compression in Windows, and Why Is It Important?

Memory compression in Windows reduces the size of data before writing it to RAM. This process allows your computer to store more files in physical memory than it normally would, reducing the need for page files. No paging means a faster computer.

MAKEUSEOF VIDEO OF THE DAY

To see paging in action, Right-click Start and select Task Manager. In Task Manager, navigate to the Performance tab and click on Memory in the left sidebar. You will see how much memory Windows compressed under In Use (Compressed); the figure in the brackets represents the memory compression.

Memory tab in task manager.

How to Enable Memory Compression

If you don’t have memory compression enabled on your computer, you can do it yourself through PowerShell. Press the Win Key, input powershell in the search bar, and press Enter. When the PowerShell app shows up in the results, click on Run as Administrator.

Opening PowerShell through search.

Type Enable-MMAgent -mc and then press Enter to run the command.

Enabling memory compression in PowerShell.

To see if the command worked, open PowerShell again as administrator, enter Get-MMAgent, and press Enter. Check where it says MemoryCompression, and if the value is True, it worked.

Checking memory compression in PowerShell.

How to Disable Memory Compression

Considering how important memory compression is, there may be a scenario where you might want to disable it. For example, since compressing data can take some processing power, there are scenarios where it can slow down your computer when it’s running low on physical memory.

If your computer is compressing a lot of data or relying too much on paging, and you think it affects performance a lot, adding more RAM is the best solution.

To disable memory compression, run PowerShell as an administrator, type Disable-MMAgent -mc, and press Enter.

Disabling memory compression in PowerShell.

If you then run the Get-MMAgent command, you’ll now see that the value of MemoryCompression is False, meaning it’s you’ve successfully disabled it.

Checking memory compression in PowerShell.

Memory Compression Demystified

Now you know what memory compression is, why it is important, and how you can enable and, if you need to, disable it.

However, we advise against disabling memory compression since it gives your RAM more room to play. It helps you avoid a majority of the problems that you can encounter when your physical memory is full. Particularly, the feature prevents your computer from having to store files it readily needs so far away in secondary storage.

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button