How to Enable Memory Compression in Windows Server to Reduce Page File Usage

Listen to this Post

If your Windows Server is constantly using 100% of the Page File, enabling Memory Compression can help optimize performance. This feature compresses memory pages in RAM instead of writing them to disk, reducing excessive Page File usage.

Steps to Enable Memory Compression

1. Open PowerShell as Administrator

  • Press `Windows + X` and select Windows PowerShell (Admin).

2. Check Current Memory Compression Status

Run:

Get-MMAgent 

– Look for MemoryCompressionTrue means enabled, `False` means disabled.

3. Enable Memory Compression

Execute:

Enable-MMAgent -mc 

4. Verify Activation

Run `Get-MMAgent` again to confirm `MemoryCompression` is `True`.

5. Restart the Server

Restart-Computer -Force 

You Should Know: Additional PowerShell and System Commands

  • Monitor Page File Usage:
    Get-Counter "\Memory\% Committed Bytes In Use" 
    

  • Check Memory Usage:

    Get-WmiObject Win32_OperatingSystem | Select-Object TotalVisibleMemorySize, FreePhysicalMemory 
    

  • Adjust Page File Size Manually:

    $computersys = Get-WmiObject Win32_ComputerSystem -EnableAllPrivileges 
    $computersys.AutomaticManagedPagefile = $false 
    $computersys.Put() 
    

  • Disable Memory Compression (if needed):

    Disable-MMAgent -mc 
    

  • Analyze Memory with Performance Monitor:

Run `perfmon.exe` and track `\Memory\Page Faults/sec`.

What Undercode Say

Memory Compression is a valuable feature for Windows Servers struggling with high Page File usage. However, always monitor system performance after enabling it. For deeper analysis, use Windows Performance Toolkit (wpr.exe) or Resource Monitor (resmon.exe).

Expected Output:

  • Reduced Page File activity.
  • Improved system responsiveness.
  • Confirmation via `Get-MMAgent` showing MemoryCompression: True.

For further reading:

References:

Reported By: Francisco Di%C3%AAgo – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image