microsoft / microsoft/WSL

Memory/Cpu limit for each distribution

Open
#8,570 22 comments 25 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

I have Docker Desktop installed, and it includes two Linux distribution docker-desktop and docker-desktop-data.

With wsl --list, I can see totally 3 distributions.

C:\>wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
docker-desktop-data
docker-desktop

I have 16G physical memory, and like to give Ubuntu-20.04 8G. But if I do it in .wslconfig, all 3 distributions are affected.
There are totally 24G committed(over-committed). After a while, when I compile some programs and do some developing work, the computer is extremely slow, with lots of page faults.

There should be an option to set the resource limit of each distribution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .wslconfig behavior and the wsl --list output described in the report. Compare the resource settings applied to Ubuntu-20.04, docker-desktop, and docker-desktop-data, then define the expected per-distribution memory and CPU behavior before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.