-
Notifications
You must be signed in to change notification settings - Fork 834
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
Memory/Cpu limit for each distribution #8570
Comments
This is an interesting suggestion, would be much easier to add a setting to allow a single per-distro limit. Would that be good enough for you? |
Sorry. What you mean by "a single per-distro limit"? I'm thinking about something like:
|
@kingsimba Did you find any solution for this? I also need this. |
No. I brought more DDR4s. Luckily, they are very cheap nowadays. |
@kingsimba Thanks for your reply! I think that will be my solution too. So now I face another issue with trying to convince my client that they need to buy more RAM for their laptops... xD |
@benhillis could you explain this? As for original request, it could be expanded beyond just cpu/memory. New (hidden) settings allow configuring networking (bridging, DHCP, MAC). What if I want distros on different vSwitch, or having static MAC but have 2 VMs (distros) running at the same time? IMHO, I would love for something like this (using sample from docs):
Ubuntu section would override globals for just distro named Ubuntu ArchWSL section would override globals for just distro named ArchWSL. Globals would apply to all. So in order of applying settings: |
I need this too. I need config resources per distributions. Can it be a feature request? |
Shouldn't these limits go into |
I don't mind any way it's done, as long as it's done per distro/instance. But as I always see it, despite official description in the docs that simplifies it to "wslconfig is global, wsl conf is per distro", wsl.conf actually has settings that are OS specific, and is read by WSL OS on boot, while wslconfig has settings that are VM specific (eg virtual hardware like CPU, RAM, NIC, ...) and are read by the WSL as subsystem, before distro is run. It would also allow for VM RAM (for example) to be set before we install and run distro, otherwise if you have 8GB global, VM will still need to boot once with 8GB before you're able to set it to 2GB in wsl.conf, then force WSL2 shutdown and restart. wslconfig with both global and per distro "virtual hardware" settings just seems like a better (cleaner) solution. For starters it would be a plus if we got another input from devs |
Any update on this? Would love to set memory limits on a per distribution basis. |
Same here. Trying to setup OpenShift Local, which requires 10 GB of memory. As others, I only have 16 GB total. So I would be over committed if I needed to run a second distro. |
Same here ... I think the issue is particularly relevant with docker desktop. The memory just jumps to unnecessary levels whenever I start it. |
After failing to search for the solution to limit memory to the docker desktop, I thought running DD in a different distro and limiting its memory would work, but seems like that will also not work. |
C'mon. |
They should. But is it possible to do that right now? |
Hey guys, same problem here, any update? |
Honestly, I'm surprised that this feature does not exist, this should be a basic thing to have. |
wsl is an amazing feature, I want to set up one master 8GB and 2 nodes 4GB for practicing, but I can not do that now. I want this feature. |
To configure the individual distros memory limits would be important. I'm working on SolidCP Web hosting control panel. If one could limit the distros resources one could use WSL to provide Linux container hosting on Windows |
One can run each wsl distro under a separate local user, and so each wsl distro can have it's own .wslconfig, but like this probably each running instance uses it's own loaded kernel and the memory the kernel uses is not shared |
I have Docker Desktop installed, and it includes two Linux distribution
docker-desktop
anddocker-desktop-data
.With
wsl --list
, I can see totally 3 distributions.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.
The text was updated successfully, but these errors were encountered: