WSL2 slow

ΠžΠΏΡƒΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½ΠΎ oioioooi - 21/03/2024 - 09:24
wsl1-2

WSL2 mounts and binds the host drives so these are accessible in guest OS from the /mnt/* location and this type of mount has inferior performance.

Not only the performance is slow in apps, it's slow overall - composer might time out, npm hickups, etc.

So whether your apps are located in those mount points (read from host drives), move them to a location somewhere within the installed WSL distribution, e.g. /var/www.

As from https://learn.microsoft.com/en-gb/windows/wsl/compare-versions it is explicitly mentioned that WSL2 has better integration but sacrifices IO performance across file systems.

... with the exception of performance across OS file systems, which can be addressed by storing your project files on the same operating system as the tools you are running to work on the project

Π’Π΅Π³ΠΈ