Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High resource use according to task manager when nothing is happening in wsl #11000

Open
1 of 2 tasks
ajkessel opened this issue Jan 9, 2024 · 4 comments
Open
1 of 2 tasks

Comments

@ajkessel
Copy link

ajkessel commented Jan 9, 2024

Windows Version

10.0.19045.3803

WSL Version

2.1.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.137.3-1

Distro Version

Ubuntu 23.04

Other Software

No response

Repro Steps

taskmgr often shows vmmem with "very high" power usage and 2GB of RAM when wsl is doing nothing -- no terminal window or application even open. When I run top in wsl, I don't see anything using significant amounts of RAM or CPU. echo 3 > /proc/sys/vm/drop_caches seems to free up some memory. I've tried adding autoMemoryReclaim=gradual to .wslconfig but I don't see it doing anything.

I'm often seeing wsl freeze/crash as indicated in #10378 , requiring reboot to fix (wsl --shutdown isn't enough), but I don't know if that's related to this overall resource issue or not.

This is on a 2023 top-end X1 Carbon, so it shouldn't be maxing out system resources so easily.

Expected Behavior

Normal/low RAM/CPU usage

Actual Behavior

High RAM/CPU usage

Diagnostic Logs

I could upload the output of collect-wsl-logs.ps1 if needed.

Copy link

github-actions bot commented Jan 9, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 9, 2024

Thank you for reporting this @ajkessel.

Next time this reproduces, can you run:

wsl --debug-shell

And inside that shell, share the output of top ?

@ajkessel
Copy link
Author

ajkessel commented Jan 9, 2024

Is this what you're looking for?

image

Resource use is moderate when this was taken, but still higher than I would expect given that almost nothing is actually happening in wsl.

Does this mean it's actually trying to use more than 10GB of RAM?

@MKN-MCI
Copy link

MKN-MCI commented Feb 13, 2024

I just experienced WSL hanging with a vmmem process hogging ~8GiB memory and ~80% CPU.

Happened during build of a C++ application using g++ in a VSCode Dev Container with code residing on the Windows filesystem accessed by WSL via the mounted path in /mnt/c.

wsl hang task manager processes, crop

In my situation all attempts to do anything with WSL hung, including wsl --debug-shell.

Killing it using taskkill /f /im wslservice.exe as directed here made the open shells terminate and I could start new ones:

[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

WSL versions:

c:\>wsl --version
WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3930

@github-actions github-actions bot mentioned this issue May 8, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants