Hacker News new | ask | show | jobs
by riedel 489 days ago
WSL1 is actually quite similar afaik. Unfortunately also development stalled here in favour of WSL2. I remember Co-Linux to be a a thing around 2005, but it never stuck with me as I was mostly happy with Cygwin until all the libuv and go (now rust) stuff popped up.
1 comments

I don't think WSL1 development stalled in as much as Microsoft made the determination that it wasn't a viable path forward. I/O was piss slow and chasing syscalls <-> NT API calls probably wasn't very fun.

Microsoft already knew Hyper-V quite well so a VM made sense, they just had to put some automagic management around it.

If anything, WSL1 showed me that MS still has some programming chops lurking around (I mean, obviously, I know they have some truly amazing developers and their research talent is top notch), but that project was technically pretty cool with the pico-processes and syscall translation layer.

But the one thing they would never be able to overcome was CUDA and kernel modules. If you show people "Linux" and they can't build their software, then it might as well be hot garbage.

I use WSL2 daily and far more often than my actual Linux VMs. It's not the fastest, but it did solve a huge chunk of the problems with WSL1. No, it's not native, but I already have 3 monitors, a huge tower, and a Mac Mini M1 on my desk. I didn't need a native box at my fingertips (those go on a rack in the basement, lol).

Isn't WSL2 still slower than WSL1 for accessing Windows drives and networks? I use WSL1 because I don't have HyperV available on my work PC, but it's also convenient because I perform most of my work on Windows.
WSL2 uses a lower level, simpler API than HyperV which is a full-fledged hypervisor. That's why it is also available on Windows Home. If you can enable WSL1, you should also be able to use WSL2 unless the HW virtualization is completely blocked off. You need to run a command to change the default though.

WSL2 cross-OS I/O performance is lower than WSL1. Especially with the random access patterns and constant stat/access calls made by Linux-targetting programs. However that should be the rare option to take. Working on native ext4 FS of WSL2 is almost as fast as running native Linux. So you should really copy files in and work on them in WSL.