I have 32 GB ram laptop with 11th Gen i5@2.9GHz (12 CPU), Still docker utilise all my cpu and overheats the system for just running mysql and phpmyadmin. The fan is running most of the time even when there is room temperature is low.
Is it fault of windows or docker or docker image that I'm using. It's kind of blockage I'm facing while doing development.
Top comments (9)
Do realize that docker is running virtualized on Windows vs Linux. On Linux it runs native unless you use Docker Desktop for Linux. On Windows it’s running virtualized weather you are running it in WSL or Windows!
it's there because you could potentially run windows containers on it (so, for giggles mostly)
my colleagues noticed a slight improvement after switching to wsl2 instead of having an actual vm managed by hyper-v, around a yr ago, though.
I noticed both are installed on my system,
running cmd "wsl --list --verbose" shows docker-desktop and docker,
and also there are 6 services starting with hyper-v,
should I disable hyper-v?
learn.microsoft.com/en-us/windows/...
you need to make sure docker is on wls2, from the link above you should see some general info on wsl and a compare between wsl1 and wsl2.
I run docker on linux but just the engine without docker desktop, so I'm not sure where to look for the right options in the menus.
Anyways, they should be available for sure during docker desktop installation as a preference. So, I don't think it's about disabling virtualization system-wise, but rather about making sure your wls2 is correctly setup and your docker desktop install runs on it.
Well it depends, do you use the WSL Integration?
I personally would also check the Ressource Allocation.
Because, especially in terms of RAM the service will take everything it can depending on what you set it to.
So if set to 8GB the Service will take ~8GB the moment it starts.
If you use the wsl integration you can set the Limits via an '.wslconfig' file in your User Dir.
Here's mine:
[wsl2]
memory=3GB # Limits VM memory in WSL 2 to 2 GB
processors=4 # Makes the WSL 2 VM use four virtual processors
Docker Desktop on Windows isnt the best but in combination with WSL its actually good enough imo.
So long
Thanks for the processor info.
Kinda off topic, but how do you handle with ports forwarding between WSL and your system? Docker was the reason why I switched to Ubuntu, cause working with that was hell, and one day it's just stopped working.
I only know about port forwarding with docker-compose.yaml or docker run -p.
Docker on windows has always been a drame for us. By the way, that was one of the reasons why we migrated to linux in development.