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 vmmem - memory usage when converting from wsl1 to wsl2 #4159

Closed
ioweb-gr opened this issue Jun 17, 2019 · 14 comments
Closed

high vmmem - memory usage when converting from wsl1 to wsl2 #4159

ioweb-gr opened this issue Jun 17, 2019 · 14 comments
Labels
duplicate wsl2 Issue/feature applies to WSL 2

Comments

@ioweb-gr
Copy link

I'm experiencing extreme memory usage while converting a wsl1 image to wsl 2. Apparently vmmem keeps increasing steadily, for me it reached up to 16GB of RAM of a 32GB total.

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Version 10.0.18917 Build 18917

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
    Converting a kali-linux image from wsl1 to wsl2

  • What's wrong / what should be happening instead:
    the memory usage is constantly increasing. Possible memory leak?
    image

Normally the process should be completed with minimum memory usage.

@benhillis
Copy link
Member

Duplicate of #4166.

@theunclebobbyb
Copy link

This ever get fixed? WSL just used all 64gb of my ram. I tried shutting down wsl and now its just hanging and it won't allow me to start wsl again.

@PHBMdeveloper
Copy link

image
Temos solução?

@DevelCL
Copy link

DevelCL commented May 14, 2020

There is a WORKAROUND on 14-may: #4166 (comment)

@frei-x
Copy link

frei-x commented May 17, 2020

This ever get fixed? WSL just used all 64gb of my ram. I tried shutting down wsl and now its just hanging and it won't allow me to start wsl again.

fierce!

@andre-ss6
Copy link

As #4166 has been locked; I just hope the final fix doesn't boil down to just putting a hard limit on the VM RAM usage.

@AnshulKathet
Copy link

this is steadily increasing RAM consumption. Suggest a fix please #4166

@krzystooof
Copy link

Workarounds:

  • create drop_cache command in your WSL distro like Yenohal
    or
  • create C\Users\<your user>\.wslconfig file containing:
[wsl2]
memory=6GB 
processors=5 

With limits that suits your needs.

Official support:

As written in #4166 issue in build 20175 Microsoft has changed the default memory scheme in WSL 2 to use 50% of your memory in Windows, or 8GB (whichever is smaller).

@nielsarts
Copy link

I fixed this issue by using the following command in your powershell:
wsl --shutdown
start your wsl again and boom

@davidshen84
Copy link

davidshen84 commented Dec 16, 2020

I am trying to convert my wsl 2 to 1, and ran into this memory issue. I tried the drop_cache trick in the comments, but it does not work for me. Also, I think that trick is only for releasing the memory while wsl2 is running, but wsl2 is not running while converting, right?

Update

I was being impatient...the memory still climb up to about 7 GB during the conversion, but it eventually released the memory and finished the conversion.

@ggcaponetto
Copy link

This is still a issue in 2021. Does anybody have a workaround?

@ffyuanda
Copy link

Still an issue, just apt install eats around 6 GB on my 16 GB Windows 10.

@gctech1
Copy link

gctech1 commented Jan 20, 2023

2023 any updates pls?

@tildrum
Copy link

tildrum commented Nov 7, 2023

Same issue here, there are some fix ? thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate wsl2 Issue/feature applies to WSL 2
Projects
None yet
Development

No branches or pull requests