I’m curious which you use since Julia only supports WSL 2 (tier 2), but I think works for both.
Note, WSL 1 still supported, and neither is clearly better. " WSL 2 is “20x faster compared to WSL 1” for file access, but that flips around for file access to /mnt/c, i.e. C drive, maybe only downside of WSL 2.
WSL 1 has(?)/had small issues with floating point (I’m don’t think fixed and maybe never will).
WSL 2 has slow file I/O performance, but WSL 1 as fast as possible to /mnt/c since WSL 2 uses 9P from Plan9 intriguingly… For I/O otherwise WSL 2 is claimed near-native speed, not sure if it reverses for WSL 1 outside of /mnt/c
I’m assuming my info (from AI) is still valid:
Benchmarks consistently show a stark contrast depending on the workload:
Operation
Scenario
WSL 2 (via 9P to /mnt/c/)
WSL 2 (native ext4 filesystem)
Performance Difference (approx.)
Small File Write
npm install (many small files)
Very Slow
Very Fast
10x - 50x slower on 9P
Large File Transfer
Copying a 1GB ISO file
Fast
Very Fast
~1.5x - 2x slower on 9P
Small File Read
git status on a large repo
Slow
Fast
5x - 10x slower on 9P
Also out of curiosity the reverse, what are people’s experience with running Windows Julia in Wine on Linux? There’s probably no read use for it expect for testing (e.g. I don’t have Windows, and want to test something Windows specific soon). Is that also the reason people use WSL for Julia?
Good question, since it’s a “chatty” (according to AI conversation, thus slower) non-ideal networking protocol, used by WSL in non-networking (the Linux kernel talking to the Windows kernel in internal to the CPU “networking”), to mount the C drive (maybe more so networking actually useful?), and was likely chosen as non-GPL. It’s strange they didn’t use e.g. SMB/SAMBA or NFS…
I do nearly all of my dev work in WSL2 sind around 2 years now and am quite happy with it. In nearly never access the mounted c drive. Occasionally, I do it the other way around, for looking at images in a git folder with windows tools for example. Therefore, I never had any performance problems and it felt quite stable. From what i‘ve heard, wsl2 is what most people use nowadays and most of the guides you find (for stuff like gui applications, cuda within wsl, …) will explain stuff for wsl2.
If you speak about filesystem access performance. I have seen a big improvement in this regard when switching to WSL2. See Announcing WSL 2 for information about what M$ introduced in WSL2. Working in /mnt/c from WSL2 is a non-sense for me. I use Windows directly.