I have windows 10 2004, 8-core amd cpu, 12gb ram, running an existing wsl2 debian instance just fine. I can run a typical web stack php-fpm nginx mariadb redis-server with existing WSL and the performance is fine. I have been reading that wsl2 and docker is much better now and wanted to try it out.
I installed docker 2.3.0.4 with wsl2 and installed devilbox as the web stack.
I have limited the wls process to 4gb and 4 cpus using the .wslconfig file and that's all cool and works fine.
What doesn't work fine is that a simple php page (e.g. <?php echo time(); ?>
can take 15-30 seconds to show up! anything that talks to a database incurs a 90 second load time. running a stock standard empty wordpress site is out of the question. Running the same script / site / database on nginx/debian on WSL2 works perfectly.
I can't run docker desktop application after windows rebooted (it worked before I rebooted). THe icon docker installer placed on my desktop doesn't do anything when I launch it. I don't see a process turning up in task manager. Nothing seems to crash, it just doesn't work. I can right click on the docker icon in the tray and get to the dashboard that way. I generally work at the command line anyway so it's no big deal, thought I'd mention it.
the devilbox installation sets up a local web server and that all works reasonably well. i had to docker-compose up
several times to get it to pull the containers properly but then I do have terrible internet. the web interface is pretty snappy, I can launch tools like phpmyadmin and they LOAD fine. If I try to restore a 10mb database with 100 tables, it will time out and crash and burn. Restoring the same database through the shell via mysql works fine, even if my disk load goes to 90% and stays there for 5 minutes.
any virtual host web server I create performs abysmally. php pages take around 90 seconds to show up. a page with phpinfo() might take 45-90 seconds of white screen to show up.
HOW do I figure out why docker is just so bad compared to straight up linux on WSL2 on the same environment? I'm guessing it's something to do with the io bit windows task manager says the disk io is averaging 2% load.