Vmmem high CPU usage
Windows Build Number
Microsoft Windows [Version 10.0.21387.1]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.10.16
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
I'm struggling to actually repro this issue deterministically. But looks like more prominent when waking up from sleep. Whit this issue I'd like to gather feedback on how to collect the most useful information to debug this behavior.
I tried to isolate the failing component (ex. not running Docker Desktop and WSL2 "only"), but I failed miserably.
Usually my workflow:
- VSCode Stable v1.56.2 with WSL Remote v0.56.2 for work (usually Java + SQL)
- VSCode Insiders v1.57.0 with WSL Remote v0.56.2 for personal projects (usually JS related)
- Docker Desktop (Windows) v3.3.3 (64133) running (with mongo or postgres)
In the past I tried to alleviate the issue with a .wslconfig but didn't worked.
My machine (Lenovo X1 Carbon) has 16GB of RAM and usually Vmmem RAM consumption float around ~4GB.
Excluded those hiccups WSL2 experience is pretty neat and flowlessy.
Expected Behavior
WSL2 stay idle when no user workload are launched.
Actual Behavior
Vmmem "randomly" uses high cpu/power amount (60%-70%) for couple of minutes (2 to 5 min) before settling down. This also happen when on battery without doing anything WSL2 releated (but with Docker Desktop running), killing autonomy.
Diagnostic Logs
I'll provide an .etl dump as the next hiccup occurs.
I also see high vmmem cpu usage from time to time (stuck at ~25% CPU). When checking htop on my only running image, I see that one core is being used 100%, but none of the processes are using any CPU. So not sure what's happening / what's the culprit. Docker images not running at the moment.
C:\Users\mats>wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
docker-desktop-data Stopped 2
docker-desktop Stopped 2
Have the opposite problem with docker, though. Suddenly it will use all available ram even when not running any containers (but the wsl distributions are running)
Edit: A pic of htop when this occurs. Nothing visible using CPU, but it's using much CPU on multiple cores anyway.

The day after, also waking up from night sleep.
Like @Matsemann htop do not show anything relevant.
The day after, also waking up from night sleep.
Like @Matsemann
htopdo not show anything relevant.
The high CPU usage can be seen from Task Manager
Yes, and from the htop screenshot. But you cannot see what is using the CPU (other than the generic vmmem but that can be anything). So there is something spinning somewhere draining resources for no good reason.
I'm hitting this too, so if anyone has any suggestions on how to capture what is going on, I am happy to record it.
Update, I can reproduce this 100% of the time by turning off my 2nd monitor (one core in Linux gets pegged to 100%, but htop doesn't show any processes using CPU power).
If I run 'xeyes', as soon as xeyes open the mystery CPU usage disappears, so I assume it's something to do with the new graphics integration, and actually running a program gives it a kick?
Great find! I've always experienced it after computer has been sleeping (like when coming back after lunch), but I also can reproduce it by reconnecting a monitor. Which I guess is what happens when the computer starts after sleep.
Running xeyes or any wslg app doesn't seem to stop it here, though.
I'm hitting this too, so if anyone has any suggestions on how to capture what is going on, I am happy to record it.
Yes, if someone from wsl team could tell us how to give them better diagnostics that would be nice. As we've said, nothing shows up as using resources in the wsl images themselves. But we can see a high cpu core usage in htop, or vmmem cpu usage in task manager. But don't know how to see what is causing it.
Update, I can reproduce this 100% of the time by turning off my 2nd monitor (one core in Linux gets pegged to 100%, but htop doesn't show any processes using CPU power).
Can confirm,
wsl --shutdown, set monitor projection to single screen- Startup
wsl, normal htop - Make monitor projection to extend
- Suddenly 1 core spin up in htop
I tried messing with refresh rate (my first monitor has 144, my second 60), but no luck. In the process, I found that when I tried to change the refresh rate, the screen "refresh", then the 100% core in htop gone.
So I tried to just reset the graphic driver (Win+Ctrl+Shift+B), and the 100% core is also gone.
Although, currently its fresh restart and reproduced reliably, but only 1 core spinning up. In the past I had like 3 core spinning up out of nowhere. I also use Docker for Windows, which for this purpose I turn off first, because I also had bad experience on that docker hogging CPU while no container running
Update
Using docker for windows, I get 3 core spinning up when projecting to second screen, and Win+Ctrl+Shift+B still works like a charm
Windows 10, build 21390.2025 WSL2, Arch Linux, 2 monitor setup,
I think this is indeed related to WSLg, which creates a hidden "system distro" instance for each running user distro. That's why you can't see anything in htop. When the 100% core usage happens you can run this from the terminal:
wsl.exe --system -d $WSL_DISTRO_NAME top
I bet the culprit is the weston binary inside the system distro. Recently there was a similar problem that has been fixed in the weston repository.
As a possible confirmation of this, I had this issue continuously (with vmmem using 50% of CPU without anything running on WSL2). I disabled WSLg in wslconfig and restarted the distributions. The issue (so far) seems to be fixed.
With wsl.exe --update you will get WSLg 1.0.24 which contains some fixes about high cpu usage.
If it helps, I was already running 1.0.24 (updated yesterday) and still seeing the issue. Disabling WSLg seems to have fixed it. I'll keep testing.
I too can reproduce this 100% by turn on/off my second monitor. Is this issue user "workaround-able" or do we have to wait for Microsoft. If so is there a way to expedite such a serious issue?
Side note: opening xeyes only drop the CPU usage from 25% to 17%. and after I closed xeyes the cpu went back up to 25%. So far I have not found a reliable way to make it run normally again other than to disable wslg with guiApplications=false added to .wslconfig inside the personal folder, do a complete wsl shutdown and restart, or wait it out. If anyone find a better way to keep the functionality (preferably automatable) as a workaround that be great.
@lishan89uc have you tried Win+Ctrl+Shift+B
I occasionally get this issue as well and it usually gets fixed when I shut down the WSL completely. This time I tried pressing the Win+Ctrl+Shift+B combo and that seems to have fixed the CPU usage in this instance.
I also experienced this today and the Win + Ctrl + Shift + B trick solved the issue.
Worth mentioning that this is now happening on Windows 11:
Edition Windows 11 Pro
Update 21H2
Installed on 01-Jul-21
OS build 22000.51
Experience Windows Feature Experience Pack 421.16300.0.3
Also happened on mine. Consistently happens after locking the screen. My system is a laptop with internal 4K display (switched off) and external 5K display via Thunderbolt (set to second screen only). Build 22000.71, WSL2 kernel version 5.10.43, WSL2 last updated 18 July 2021.
When vmmem's CPU usage is very high, in my case, stopping Docker desktop solved the problem.
- I usually use hibernate to shut down my computer. And I use WSLg (and dual monitors), Docker desktop, and VSCode.