Vmmem High Memory Usage in Windows 11: What It Is and How to Limit It

Glass cube inside a nearly full memory module bar, illustrating a virtual machine using RAM
Glass cube inside a nearly full memory module bar, illustrating a virtual machine using RAM

Last reviewed: November 24, 2026. Steps follow Microsoft documentation where it exists; none was run on a real PC.

Vmmem high memory usage in Windows 11 usually means a virtual machine is holding RAM. Vmmem is the Task Manager name for that memory. WSL 2, Hyper-V, Windows Sandbox and Docker Desktop can all use it. This guide explains what Vmmem is, how to find the feature that owns the memory, and how to set limits with a .wslconfig file.

Quick answer

Quick answer

  • Vmmem is the Task Manager entry for memory used by virtual machines, including WSL 2, Hyper-V, Windows Sandbox and Docker Desktop (general guidance).
  • Memory can stay high after you close a Linux terminal, because the WSL 2 utility virtual machine can keep running. Microsoft says wsl --shutdown stops it.
  • Run wsl --list --running first to see what is active before you change anything.
  • Limit WSL 2 with a .wslconfig file in your user profile folder. The change applies after wsl --shutdown.
  • A high Vmmem value on its own is not a sign of malware, and RAM cleaners and PC cleaners do not reclaim this memory (general guidance).

In this guide

What Vmmem is

Open Task Manager and you may see a process named Vmmem. On some systems the WSL 2 entry appears as vmmemWSL. In both cases the number is memory that a virtual machine has taken from Windows.

Several Windows features run virtual machines. WSL 2 runs a Linux kernel in a lightweight virtual machine. Hyper-V runs full virtual machines that you create yourself. Windows Sandbox runs a temporary desktop in a virtual machine. Docker Desktop can use the WSL 2 backend, which also runs in a virtual machine.

Features that can show up under Vmmem

  • WSL 2 distributions such as Ubuntu.
  • Hyper-V virtual machines you created.
  • Windows Sandbox sessions (general guidance).
  • Docker Desktop with the WSL 2 backend.

The Microsoft pages read for this guide do not use the label Vmmem. The explanation that the number is the virtual machine's memory is general guidance based on how these features work.

Why memory stays high after you close a terminal or VM

Closing a Linux terminal window does not always stop the WSL 2 virtual machine. Microsoft describes wsl --shutdown as a command that "immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine." That wording shows the utility VM is separate from the terminal window.

Microsoft also says the command "may be necessary in instances that require you to restart the WSL 2 virtual machine environment, such as changing memory usage limits or making a change to your .wslconfig file." So a limit change needs a restart of the VM.

Cached memory comes back slowly

Linux keeps recently used files in memory as a cache. That cache can keep the VM holding RAM after your work ends. Microsoft's advanced settings page documents an experimental setting called autoMemoryReclaim. It has three values. disabled turns automatic reclaim off. gradual returns cached memory slowly. dropCache, the default, returns it immediately.

The Docker Desktop WSL page also recommends this setting. It is covered in the Docker section below.

Normal use or a leak

A high Vmmem value is not always a problem. If you ran a large build, a database or a Docker image build, the number rises while the work runs. It may fall, or stay high for a while, after the work ends. That is normal use.

A leak looks different. The number climbs over hours or days, even when you are not running WSL, Docker or a VM. It does not fall after a full wsl --shutdown. These signs are general guidance. Microsoft does not publish a threshold that separates normal use from a leak.

Signs of normal use

  • The number rises during a task and falls after it ends.
  • wsl --list --running shows a distro you are actively using.
  • Restarting the distro or the Docker engine brings the number down.

Signs that point to a leak

  • The number climbs while nothing is open.
  • wsl --list --running shows nothing, but the number stays high.
  • The number returns after a full wsl --shutdown.

If no virtual machine feature is open, check other causes first. The guide on Windows 11 memory high with nothing open walks through those checks.

Match your symptom

Use this table to match what you see. Then follow the decision tree below it.

What you seeLikely ownerFirst check
Vmmem stays high after you close a Linux distroWSL 2 utility VM still runningwsl --list --running
Vmmem rises during a Docker image buildDocker Desktop on the WSL 2 backendRunning containers and the .wslconfig memory value
Vmmem is high with no Linux or Docker openHyper-V virtual machine or a Sandbox sessionHyper-V Manager and any open Sandbox window
Another process is the biggest userNot VmmemTask Manager details, sorted by memory

If another process is the biggest user, the cause is different. The guide on WebView2 high memory in Windows 11 covers one common case.

Service Host can also be the main user. See the guide on Service Host high CPU and memory. Registry processes are covered in the Registry process guide for Task Manager.

Decision tree: which feature owns it

Start here if you are not sure which feature is running. For guided help, you can open the Repair Assistant and describe what you see.

  • Is Vmmem using a lot of memory?
    • Did you recently open WSL, Docker Desktop, Windows Sandbox or a Hyper-V VM?
      • Yes: run wsl --list --running.
        • A distro is listed: close the work in it, then decide whether to set a limit.
        • No distro is listed: check Docker Desktop and Hyper-V next.
      • No: check Hyper-V Manager for running VMs, then any open Sandbox window.
        • A VM or Sandbox is running: close it after saving work, then compare the number.
        • Nothing is running: treat it as a possible leak and use the leak signs above.

Confirm which feature owns Vmmem

Do these checks before you change any setting. None of them stops anything.

  1. Note which features you use: WSL, Docker Desktop, Hyper-V or Sandbox.
  2. Open Task Manager and sort by memory.
  3. Run the WSL check below and note the result.
  4. Compare the Vmmem value before and after each check.

Run the WSL check

wsl --list --running

Microsoft documents that --running lists only the distributions that are currently running. The list also shows each distro's state and its WSL version.

You should see

A list of running distributions with their state and WSL version. If the list is empty or says no distribution is running, no WSL distro is active. The exact empty-list text can vary (general guidance).

If it does not help

Docker Desktop on the WSL 2 backend can show its own distro in this list (general guidance). Check Docker next, then move on to Hyper-V and Sandbox.

Check Hyper-V and Sandbox

Open Hyper-V Manager. The Virtual Machines list shows each VM and whether it is running. Hyper-V Manager is available only when the Hyper-V feature is installed (general guidance).

For Windows Sandbox, close any open sandbox window and recheck Vmmem. The Microsoft Windows Sandbox page did not return readable content during this check, so its steps are general guidance. A walkthrough is in the Windows Sandbox guide.

Hyper-V, WSL 2 and Sandbox generally need virtualization turned on in the BIOS (general guidance). The BIOS virtualization guide explains how to check that setting.

You should see

The VM list in Hyper-V Manager with each VM marked Running or Off. If you never created a VM, the list is empty.

If it does not help

Close Sandbox completely, then recheck Vmmem. If the number falls, Sandbox was the owner (general guidance).

Limit WSL 2 memory with .wslconfig

Microsoft documents .wslconfig as the file that sets WSL 2 resource limits. The file does not exist by default. You must create it in your user profile folder, which is usually C:\Users\YourName. The file name starts with a dot and has no extension.

Settings you can set

  • memory: how much memory to assign to the WSL 2 VM. Microsoft's default is 50 percent of total memory on Windows.
  • processors: how many logical processors to assign. The default is the number Windows has.
  • swap: how much swap space to add. The default is 25 percent of memory, rounded up to the nearest GB. Use 0 for no swap file.

Microsoft describes swap as disk-based RAM that is used when memory demand exceeds the limit. Heavy swap use can slow work down (general guidance).

Sparse VHD and reclaim options

The [experimental] section holds autoMemoryReclaim, covered above, and sparseVhd. Microsoft says sparseVhd defaults to false, and when set to true, any newly created VHD is set to sparse automatically. The page does not describe shrinking an existing disk.

Set the limit

Save your work first

wsl --shutdown immediately stops all running WSL distributions and the WSL 2 VM. Save files and close Linux programs before you run it. A memory value that is too low can make Linux work fail or slow down (general guidance).

  1. Save your Linux work and close the terminal windows.
  2. Create or edit the file %UserProfile%\.wslconfig with the settings below.
  3. Run wsl --shutdown, then start your distro again.
  4. Check Vmmem in Task Manager after your normal work.
notepad %UserProfile%\.wslconfig
[wsl2]
memory=4GB
processors=2
swap=2GB

The values above are examples, not recommendations. Pick numbers that fit your PC's RAM and your work.

wsl --shutdown

You should see

After you start the distro again, wsl --list --running shows it running. Vmmem should not climb above about the memory value you set (general guidance).

If it does not help

Check that the file is named .wslconfig and not .wslconfig.txt, which Notepad can add (general guidance). Confirm the file sits in your user profile folder. Run wsl --shutdown again, because Microsoft says changes may need a shutdown. This guide uses no registry edits.

Hyper-V dynamic memory

Each Hyper-V VM has its own memory settings in Hyper-V Manager. Microsoft's Dynamic Memory page lists Startup RAM, Minimum RAM and Maximum RAM. Minimum RAM can be as low as 32 MB, up to the Startup RAM value. Maximum RAM can be set from the Startup RAM value up to 1 TB.

Microsoft explains that the minimum setting "allows Hyper-V to reclaim the unused memory from the virtual machines." A lower Maximum RAM caps how much one VM can hold.

Check the VM first

Changing a VM's memory settings may require the VM to be off. Save its work first. The Microsoft page confirms the settings, but not the menu path (general guidance).

You should see

The VM's Maximum RAM value matches what you set. Vmmem may fall while the VM is idle, but this guide does not promise that.

If it does not help

Check whether more than one VM is running, since each one has its own memory. Stop an idle VM only after saving its work.

Docker Desktop memory

Docker's WSL 2 page says that because WSL 2 uses dynamic memory allocation, "Docker Desktop requests only the CPU and memory it actually needs." Docker also suggests enabling autoMemoryReclaim, which the page says has been available since WSL 1.3.10 as an experimental setting.

The Docker page says the setting "allows Windows to reclaim unused memory from the WSL virtual machine, preventing the Linux kernel's page cache from holding onto large amounts of RAM after container image builds complete."

The Docker page does not describe a memory slider for the WSL 2 backend, so a Docker Desktop memory cap is not confirmed here. Docker uses the WSL 2 VM, so the .wslconfig memory value applies to it (general guidance).

Check the running containers

docker ps

You should see

A table of running containers. If none are running, you see only the header row (general guidance).

If it does not help

Restart the WSL VM

Adding the setting below and then running wsl --shutdown stops every running distro and container.

[experimental]
autoMemoryReclaim=gradual

Add these lines to .wslconfig, then run wsl --shutdown so the setting applies. The option is marked experimental on Microsoft's page.

When to turn the feature off

Turn a feature off only when you do not use it. If you never use WSL, Docker, Hyper-V or Sandbox, the VM memory should stop once those features are off (general guidance). Microsoft does not describe a single switch for Vmmem.

Windows lets you turn optional features on or off from its Windows Features dialog (general guidance). Turning off WSL, Virtual Machine Platform or Hyper-V stops those VMs from starting. It also breaks Docker Desktop on WSL 2 and any distro you still need.

Check what depends on the feature

Turning off a Windows feature can need a restart. It stops every VM that depends on it, so save your work first.

Memory integrity and virtualization-based security also use virtualization. Read the memory integrity and VBS performance guide before you change either one. Do not switch them off only to reduce Vmmem.

Not malware, and why RAM cleaners do not help

A high Vmmem value on its own is not a sign of malware. Vmmem is tied to virtualization features that Windows includes (general guidance). If you installed none of those features and the memory keeps climbing, look at the other causes above and run a normal Windows Security scan.

RAM cleaners and PC cleaners do not reclaim this memory. The memory belongs to the virtual machine. It returns when the VM stops, when a reclaim setting acts, or when you shut WSL down. A cleaner that clears other caches does not change that. The PC cleaner vs RAM cleaner guide explains the difference in detail.

Our PC repair guides cover the other common causes of high memory use. Start there when Vmmem is not the owner.

No registry edits are needed for any step in this guide. The changes are limited to .wslconfig and the VM and Docker settings.

Frequently asked questions

Understanding the process

Is Vmmem a virus?

No, not by its name alone. It is the Task Manager entry for memory used by virtual machine features. Check whether you use WSL, Hyper-V, Sandbox or Docker Desktop. If you use none of them and memory climbs with nothing open, check other causes and run a normal Windows Security scan.

Why does Vmmem stay high after I close my Linux terminal?

The WSL 2 utility virtual machine can keep running after the terminal closes. Microsoft says wsl --shutdown terminates all running distributions and that VM, so use it when you need the memory back, after you save your work.

Does wsl --shutdown delete my Linux files?

Microsoft describes it as terminating running distributions and the VM. The pages read for this guide do not describe deleting files, but save your work before you run it anyway.

Does a memory cap make WSL faster?

This guide does not promise a speed gain. A cap limits how much RAM the VM can take, which can leave less for your other work.

Fixing and limiting it

Where do I put the .wslconfig file?

In your user profile folder, usually C:\Users\YourName. It does not exist by default, so you create it. Then run wsl --shutdown so the settings apply.

Can a RAM cleaner reduce Vmmem?

No. RAM cleaners and PC cleaners do not reclaim memory held by a virtual machine (general guidance). The PC cleaner vs RAM cleaner guide explains the difference in detail.

Does Docker Desktop have its own memory slider for WSL 2?

The Docker page we opened does not describe one for the WSL 2 backend. Docker uses the WSL 2 VM, so the .wslconfig memory value is the setting to check, as general guidance.

Should I turn off WSL or Hyper-V to fix this?

Only if you do not use them. Turning them off stops the VMs and breaks Docker Desktop on WSL 2 and any distro you still need.

Sources

How this guide was checked

We opened four official pages and read the returned text: Microsoft's advanced WSL settings page, Microsoft's basic WSL commands page, Microsoft's Dynamic Memory page for Hyper-V, and Docker's WSL 2 backend page. Microsoft's Windows Sandbox overview was also opened, but the text returned was not about Windows Sandbox. Nothing from it is used, so Sandbox statements are general guidance.

The Microsoft pages read do not use the name Vmmem. The explanation of what the process is and why it holds memory is general guidance. So are the Docker Desktop limit wording, the Windows Features dialog and the Hyper-V Manager menu path.

No step in this guide was run on a real PC. Commands come from the documentation or are standard forms of them. Check each output on your own machine. Example values are illustrations, not recommendations.