When I woke up my Windows laptop from sleep to work, I noticed that everything seemed to be sluggish and the laptop fans were running at full blast. This is usually a sign of some runaway process consuming all of the CPU. I opened Task Manager to check this and found a vmmem
process consuming almost all of the CPU. I found that this process was unkillable from Task Manager, even with administrator privileges.
It turns out that vmmem is a process used by Windows VM (virtual machine) subsystem, most typically used by WSL. I had been running a Ubuntu WSL in a Terminal before closing that window. I guess WSL had not been cleanly shutdown and its vmmem was a runaway process now.
We know the root cause, how do we kill an unkillable process like vmmem? It turns out that shutting down WSL cleanly will clean up the VMs too.
I opened a command prompt and used this command to shutdown WSL:
C:\> wsl --shutdown
This command ran for about a minute and vmmem disappeared after that and the laptop fans became quiet.