Skip to main content
Code and think

Windows WSL2

WSL2 is a great thing. It makes Docker on Windows useful. However, it can consume a lot of resources. A situation where you are running out of RAM because of Vmmem process can be quite common:

High memory consumption of Vmmem

Vmmem process using a lot of RAM

In order to avoid this, you can limit the amount of resources available to WSL2. One way to achieve this is by creating .wslconfig file in your user profile.

The content of the file can be for example:

[wsl2]
memory=12GB
processors=4

Reference