Docker: Slow Volume Performance When Using WSL2
I recently replaced my CPU and VGA... While doing that, I also formatted the system. Of course, I also dusted out the server computer and updated the packages,
I recently replaced my CPU and VGA... While doing that, I also formatted the system. Of course, I also dusted out the server computer and updated the packages,
I recently replaced my CPU and VGA...
While doing that, I also formatted the system.
Of course, I also dusted out the server computer and updated the packages, but Docker updated and started throwing package errors, so I removed all of Docker and reinstalled everything from scratch.
But then, when Docker updated to a new version, it seemed like the external firewall issue with the network that had been causing problems before was fixed?
Even without creating a shared network, a new network is always created for each container, and the networks that were created seemed to be shareable with one another through CentOS 8 firewalld (though maybe that was because it resolved the warnings that had been appearing).
So even though the network wasn't trusted, I was able to get x-real-ip.
Of course, there could be other issues, so I'll test this later and write a post about it.
So, the important thing today is that I installed Docker while reinstalling Windows, and then, whoa?
Apparently there's something called WSL2. It seems like it's telling you not to use Hyper-V...
https://github.com/microsoft/WSL/issues/4387
https://github.com/microsoft/WSL/issues/4197
But it seems like people have been talking about this issue for a very long time.
It seems to be a problem with Microsoft's WSL, but what good is it if the container starts quickly? What good is it if it gets created quickly?
Sure, from what I've read, some people say to share it so they can use it with support from VS Code and the like.
But I don't see why I should go to that trouble.
If I'm going to go that far on Windows, where I do my development work, I think it'd be better to work more conveniently with volume mounts, even if the containers are a little slower...
Of course, if you're in an environment that uses Docker Volumes, WSL2 seems like it'd be really fast and great, but since my style is to work by mounting the entire Volume... I'll give up on WSL2...
Anyway, as people have been saying, it seems like everyone's either waiting for WSL3 or rolling back to WSL1 (Hyper-V, maybe?).
Just want to bump this as it's Dec 8th with no resolution in sight. HTTP Requests against a Rails stack that executes in <1s on my macbook take 30+ seconds in WSL2 w/Windows.Like me... a Laravel request takes 4 seconds in total...

It's simple. Just turn off the WSL 2 option and turn Hyper-V back on.