0

I'm on Windows 11, using WSL2 (Windows Subsystem for Linux). I recently upgraded my RAM from 32 GB to 64 GB.

While I can make my computer use more than 32 GB of RAM, WSL2 seems to be refusing to use more than 32 GB. For example, if I do

$ python3
>>> import torch
>>> a = torch.randn(100000, 100000) # 40 GB tensor

Then I see the memory usage go up until it hit's 30-ish GB, at which point, I see "Killed", and the python process gets killed. Checking dmesg, it says that it killed the process because "Out of memory".

Any idea what the problem might be, or what the solution is?

1
  • 1
    Post the contents of your .wslconfig file located here: C:\Users\<your_user_name>\ it’s probably a hidden file
    – Ramhound
    Commented Jun 21, 2022 at 1:54

1 Answer 1

1

Found the answer here: https://stackoverflow.com/a/72693871/1114253 Basically, WSL2 only allowed using half the memory by default, and you have to update (or create) your .wslconfig file to make it higher.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .