Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Memory Compression Process: High Memory and CPU Usage in Windows 10 and 11

January 20, 2022 Windows 10Windows 11Windows Server 2019Windows Server 2022

Memory Compression Process: High Memory and CPU Usage in Windows 10 and 11

The Memory Compression feature in Windows 10 and 11 is used to optimize physical RAM utilization by compressing some of the pages in RAM. By using process memory compression, you can keep more processes in physical memory without having to page them on a disk. Required data is retrieved from RAM faster, even though additional CPU resources are spent on compressing/decompressing it. With memory compression, you can reduce RAM usage, hard disk load by reducing the amount of I/O operation, and save SSD resources.

Contents:
  • Compressed Memory in Windows 10 and 11
  • System and Compressed Memory Process High CPU and RAM Usage
  • How to Disable the Memory Compression in Windows 10 and 11?
  • How to Enable Memory Compression on Windows Server 2016/2019/2022 or Windows 10?

Microsoft first introduced memory compression by the Memory Manager (MM) process in Windows 10 and Windows Server 2016. In this article, we will look at how to view compressed memory usage statistics in Windows, how to enable or disable RAM compression (if your computer is slow due to the high load of the Memory Compression process).

Compressed Memory in Windows 10 and 11

If the Windows Memory Manager detects low memory, it tries to compress unused pages of memory instead of writing them to a paging file on disk to free up RAM for other processes.

Originally, the process System and compressed memory was located inside the System process, which is not too convenient for troubleshooting. In modern Windows builds (Win 10 20H2 and Windows 11), this functionality is separated into a separate Memory Compression process, which is hidden from the Task Manager. You can get information about this process using the Get-Process PowerShell cmdlet:

Get-Process -Name "Memory Compression"

Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
0 0 1548 380920 1,104.59 1764 0 Memory Compression

Get-Process -Name "Memory Compression" - get working set in RAM

You can only view the current level of memory compression usage in the Windows Task Manager.

Go to the Performance tab and select the Memory section. The current value of compressed memory usage is displayed in the In use (Compressed) parameter. In my example, 4.5 GB is used, of which 373 MB is compressed. To understand what initial amount of memory was compressed, hover the mouse over the Memory composition graph:

In use compressed (373 MB). Compressed memory stores an estimated 1549 MB of data, saving the system 1176 MB of memory.

As you can see, the memory compression level reaches almost 315%, so the RAM savings are quite large.

compressed memory usage in windows 10

Also, you can see the actual CPU usage and memory size used by the Memory Compression process in Windows 11/10 using Process Explorer.

Run the Process Explorer and find the Memory Compression process in the System process tree.

check memory compression process usage with process explorer

The Memory Compression process is serviced by the SysMain (formerly SuperFetch) service. SysMain reduces disk writes (paging) by compressing and consolidating memory pages. If this service is stopped, then Windows does not use RAM compression.

You can check the status of the SysMain service using PowerShell:

get-service sysmain

sysmain service and memory compression in windows 10

In most cases, if your computer works normally and has sufficient RAM size, the compressed memory process works fine and doesn’t require any action from the administrator.

System and Compressed Memory Process High CPU and RAM Usage

The SysMain service and the Memory Compression process are used to improve computer performance. But sometimes it happens that the memory compression process starts to heavily load the CPU or hard drive of the computer (up to 100%, this can be seen in the Task Manager), or takes up too much RAM resources. Of course, the computer starts to work slow or hangs up.

System and compressed memory process high cpu and RAM usage

What can you do in this case?

I will give you a couple of tips that will help you to fix the problem of high PC resources usage by the Compressed Memory process

  • Try to temporary disable the page file on your computer (No paging file option), restart your computer, enable the paging file (Automatically manage paging file size for all drives option), and reboot again;
  • If the problem of the high load of the computer by the Compressed memory process occurs only after waking from the Sleep or Hibernate modes (and disappears after the restart), try to download and install the latest versions of drivers for your storage controllers (ACPI/AHCI/RAID/SCSI), hard drives and video card from the official websites. After that, it is recommended to disable automatic driver update. update disk driver

If these actions didn’t help, you can try to completely prevent Windows from using compressed memory.

How to Disable the Memory Compression in Windows 10 and 11?

If you want to make sure that Windows 10 works stable without using compressed memory, you can temporarily disable this feature. To do it, open an elevated PowerShell prompt. Let’s make sure that the compressed memory is enabled:

Get-mmagent

ApplicationLaunchPrefetching : True
ApplicationPreLaunch         : True
MaxOperationAPIFiles         : 512
MemoryCompression            : True
OperationAPI                 : True
PageCombining                : True

The parameter MemoryCompression: True shows that the compressed memory is enabled.

Let’s disable the compressed memory in Windows:

Disable-MMAgent –MemoryCompression

And restart your computer:

Restart-Computer

Disable-MMAgent –mc (complete disablie memory compression)

Check if the overall system performance has changed after disabling compressed memory. If the performance has improved, you can leave your Windows 10 with the compressed memory disabled.

In some cases, users are recommended to fix problems with compressed memory with the following actions:

  1. Disable the SysMain service (ex SuperFetch) (services.msc -> SysMain -> Startup type: Disabled). This will disable Windows 10/11 memory optimization processes in Memory Manager;
  2. Disable full memory diagnostic RunFullMemoryDiagnostic task in the Task Scheduler (Task Scheduler -> Task Scheduler library -> Microsoft -> Windows -> MemoryDiagnostic -> RunFullMemoryDiagnostic (Detects and mitigates problems in physical memory – RAM) -> Disable;disabling RunFullMemoryDiagnostic task
  3. Try disabling the network activity monitoring driver (Network Data Usage, NDU) (described in the article about non-paged memory pool in Windows);
  4. Disable real-time protection in your antivirus. Perhaps it doesn’t work correctly with compressed memory;
  5. Check your Windows image system files using DISM and SFC.

These tips can help you get to rid of the high load of the computer by the Compressed Memory process. However, this disables the underlying Windows performance optimization features, which may adversely affect the overall performance of your device.

How to Enable Memory Compression on Windows Server 2016/2019/2022 or Windows 10?

Memory compression is disabled by default in all versions of Windows Server.

Run the Get-mmagent command to verify that compressed memory is disabled. In the screenshot below, we have shown that in Windows Server 2022 the value of Memory Compression = False.

memorycompression disabled in windows server 2022

For Windows to use memory compression, the following conditions must be met:

  • The paging file must be enabled (at least the minimum size 16 Mb);
  • The SysMain service must be running;
  • You are using Windows 10/11 or Windows Server 2016+.

To enable memory compression in Windows, run the PowerShell command:

Enable-MMAgent -MemoryCompression

Reboot your computer.

Enabling memory compression automatically turns on another SysMain feature, Page Aggregation. This memory manager function is used to merge memory pages with the same content (a kind of RAM deduplication).

As a rule, the Memory Compression feature in Windows 10 and 11 works quite effectively and doesn’t require any interventions. If memory compression causes any problems on your computer, it is likely that you have problems with system settings, hardware, or drivers. If necessary, the memory compression can be completely disabled.

5 comments
5
Facebook Twitter Google + Pinterest
previous post
Complete List of Ms-Settings URI Commands on Windows 11
next post
Enter-PSSession: Running Remote Commands in Interactive Shell

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Removing Azure Arc Setup Feature on Windows Server...

November 9, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

5 comments

EBK21 May 2, 2020 - 1:29 pm

Memory compression may cause bluescreen(like page corruption) when memory is used nearly full and system is under heavily load.It still occur in win10 2004.So if you use win10 for heavy work then it’s recomennded to disable the feature.

Reply
Daniel August 6, 2020 - 6:27 pm

Suddenly had this high CPU and memory. culprit: running Microsoft.Photos.exe … i left it opened with an image in zoomed mode… few hours later, high CPU and Memory. Closing it restored system. Windows 10 Pro Version 1909 (OS Build 18363.959)

Reply
Tom September 14, 2020 - 3:47 pm

Yes, the memory compression process causing a high CPU load within the main system process, was due to running Microsoft.Photos.exe with one static simple picture. Microsoft.Photos.exe seems to be the “Bug” here. Just closing Microsoft.Photos.exe resolved the problem, immediately lowering the CPU load to normal values. TY! — Win10 1909, Ent. (current Patchlevel Auhust 2020)

Reply
ilianko November 3, 2020 - 11:11 am

There was very anoying lag / slow response on my rdp* after I disabled the memory compression, remote desktop connection is OK.
*Virtualbox on Debian host with Windows 10 guest

Reply
phobic February 4, 2022 - 9:05 am

I disabled compression on my Lenovo P1 – and now all programs opens twice as fast! :O

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Allow Multiple RDP Sessions on Windows 10 and 11
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows
  • Fixing ‘The Network Path Was Not Found’ 0x80070035 Error Code on Windows
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top