Live data from Hacker News

Initial Impressions of WSL 2

daverupert.com

111–120 of 233 posts

Re: Initial Impressions of WSL 2

#111
post #3

No free lunch, of course. Faster file access with WSL2 (vs WSL1), if you stay in the Linux world. But if you point it at Windows files (/mnt/c, etc), it's pretty slow. WSL2 just moved the slowness from one side to the other. Accessing the Linux FS from Windows (\\wsl$\) is also slow. That said, I am a fan, and get a lot of use out of WSL1. Since I don't use the Windows interop much, WSL2 should be a performance win f…

I'm sure I'm missing something but I don't get this problem with filesystem access performance. It seems the obvious way to do this was to have SMB mounts on either side and optimize the hell out of the already existing SMB implementations on both OSes to get the performance close enough to disk. Maybe have a dedicated virtual network interface exposed only to the VMs and not to the LAN to avoid security issues.

It probably wouldn't get exactly up to native high-end SSD performance but I'd wager you can get it close enough that people wouldn't care.

Meanwhile, try to do a "git status" right now in Linux in WSL2 on a sizable repo in your /mnt/c and feel yourself slowly die inside.

It seems like a bunch of people thought it would be a great science project to write custom kernel drivers for Linux and Windows and learn some stuff along the way. So now they're stuck supporting two complicated software implementations for god knows how long, because neither of them does the job on its own.

Like I said, I'm probably missing something. I'm a network guy, so maybe to me everything can be solved by the network stack.

(edited last line)

Re: Initial Impressions of WSL 2

#112
post #95

Big fan of WSL, get power of Windows and the full power of Linux combined. Can easily switch between gaming and development.

I've been using Steam on (Debian) Linux for quite a while and haven't really run into issues. I mostly play Dota 2 and Stellaris, which come Linux native, but also a bunch of other stuff including quite a few Windows native / Proton-"translated" games. All this on AMD graphics with standard open source drivers btw, did not install either proprietary drivers or "special" open source versions. (Card is this in case any…

I think I tried Imperator: Rome on Fedora and it didn't work. But I don't recall. Everything else from Steam has worked for me.

With Lutris I've been able to get every other game working that I've wanted to play - including Blizzard games, other MMOs like FFXIV, and Path of Exile. But there definitely are some quirks and other things you might need to deal with.

Like to play FFXIV, the first play worked. The second didn't - it failed with some network error. Eventually I figured out that if I deleted a folder the first run created (some web cache/settings folder) it would usually work. That included settings for storing my login information, so I wasn't able to have the game remember that. This workaround also didn't always work. So sometimes I would have to delete the folder, start the application. Close it down, delete the folder, restart the application. It usually worked the first try.

Another annoyance I eventually found out: the error I was getting was the same as what you would get when their servers were down.

Re: Initial Impressions of WSL 2

#113
post #62

Earlier quoted context omitted.

You could already do that with WSL1. Source: I have Arch and Ubuntu on WSL1. Those didn't change. Other things did.

They didn't say that something changed. But I'm intrigued, what did change?

WSL2 uses a VM while WSL1 uses a Linux like interface over a system-call DLL.

Re: Initial Impressions of WSL 2

#114
post #31

What are some use cases that would cause a person to choose Windows as their primary OS, but require WSL? At what point do you just move to a *nix OS and virtualize Windows on the rare occasion that it’s truly needed?

My simple answer: the IT department will let me have a Thinkpad or a Macbook Pro. You are not allowed to install the OS of your choice on the Thinkpad.

Re: Initial Impressions of WSL 2

#115
post #94

Earlier quoted context omitted.

WSL1 managed to corrupt SQLite dbs. Which is really annoying, and does not happen with WSL2. My (casual, not work) use relies heavily on Nix, which is built around a centralized SQLite file. I did not enjoy that experience.

Wow, that's amazing/terrible. Would you have a link to a repro?

I think this is the relevant bug: https://github.com/Microsoft/WSL/issues/2395

WSL2 has been great so far (I’ve been using it for a few months now with no serious issues).

Re: Initial Impressions of WSL 2

#116
post #47

Earlier quoted context omitted.

Why not just move to Linux?

The GUI isn't as great as Windows and it's often buggy. Let's face it.

Do you find the microsoft gui great? Honest question, because I have a desktop with windows and I find its gui a clusterfuck of randomness, especially since it seems two or three different ui "languages" are constantly fighting each other since w8.

Re: Initial Impressions of WSL 2

#117

I must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU. Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.

Why use WSL2 instead of just running linux directly? Why do you need Windows in there?

Re: Initial Impressions of WSL 2

#118
post #3

No free lunch, of course. Faster file access with WSL2 (vs WSL1), if you stay in the Linux world. But if you point it at Windows files (/mnt/c, etc), it's pretty slow. WSL2 just moved the slowness from one side to the other. Accessing the Linux FS from Windows (\\wsl$\) is also slow. That said, I am a fan, and get a lot of use out of WSL1. Since I don't use the Windows interop much, WSL2 should be a performance win f…

I'm sure I'm missing something but I don't get this problem with filesystem access performance. It seems the obvious way to do this was to have SMB mounts on either side and optimize the hell out of the already existing SMB implementations on both OSes to get the performance close enough to disk. Maybe have a dedicated virtual network interface exposed only to the VMs and not to the LAN to avoid security issues. It p…

Great question. They do have an in-depth blog post of how it works for WSL1: https://docs.microsoft.com/en-us/archive/blogs/wsl/wsl-file-...

Though it doesn't mention why they didn't try what you suggested.

The actual I/O doesn't seem so bad...like writing to a single file. It's things you mention, that create or modify lots of files (git clone, for example) that are really slow.

Edit: Apparently, the Windows side \\wsl$\ access does do what you're suggesting, sort of: https://devblogs.microsoft.com/commandline/a-deep-dive-into-...

It's using a 9P network file server, derived from plan9.

Re: Initial Impressions of WSL 2

#119
post #106

Earlier quoted context omitted.

> I'm not sure I believe them. I'm not sure why anyone should. They literally say "We currently have no plans to deprecate WSL 1" while simultaneously claiming "We are committed to making WSL 2 feel the same as WSL 1" . There's no way their goal is to reach a steady state where they feel the same and yet both have to be maintained. Making them feel the same is literally what you do when your goal is to stop support f…

I watched Aaron Patterson's keynote from RailsConf 2020 (these talks all just came out this week, Couch Edition) and I'm struck when reading your comment that it's absolutely possible to do this, and ultimately you may or may not reach a state where it's possible to "end-of-life" one or the other alternative without making anyone cry about it. He spends most of the second half of the talk explaining (with a profiler)…

> But given enough time, perhaps they will fix the bugs, and the two can be made to perform similarly, fixing bugs on either side, and the need for two alternatives will go away. So why would that be bad?

Because (possibly unlike with your Rails example?) the suggestion that this is possible to do by improving the VM side is, to be blunt, a lie. A VM is a fundamentally leaky abstraction, in far more ways than just the timing behavior (i.e. performance), and the need for both won't go away by just "fixing" the VM side. It's literally impossible for them to ever make a VM "feel the same" as WSL1. To give you a taste: My "feel" was that I wouldn't have to deal with all the VHD/disk/partition/volume management I was so happy to finally get away from. My "feel" for WSL1 was that I could compress its files with the WoF LZX compression in Windows 10 to save a ton of disk space and yet still read them with native Windows tools as if nothing was different about them. My "feel" for WSL1 was that I could actually read and even move Linux files around directly from inside Windows as long as WSL1 wasn't running, treating a WSL folder just like a regular folder. My "feel" was that I could even use Windows tools to alter these files as long as I maintained the Linux attributes correctly.

And my "feel" was that using WSL would have zero impact on any VM technologies that I may or may not want to use, but that's another can of worms.

I could go on, but hopefully you get the point. Either you have to dismiss my "feel" for being somehow "invalid" to your liking, or you have to realize you'll never get the same feel.

> My point is that, exactly. If there is bad performance over here, it is a bug. Bad performance over there, bug. But bad performance over here, that can only be solved by swapping for bad performance over there? This does not sound like a bug anymore, it starts to sound more decidedly like a trade-off.

Only if you assume "only solve X via Y" is correct. I don't believe that's true. I believe they just haven't put in the required work yet, and that if they did put in the work, they could still improve WSL1 substantially. The real reason for why they haven't done so is anyone's guess, but to me, there are multiple signs (not just I/O-performance-related) that suggest the WSL team has to do most of their work independently and can't necessarily get sufficient cooperation from the teams working on different subsystems, and hence this is why they've been unable to improve things. Or maybe the folks who can work on the required parts are no longer available. Regardless of the reason though, I don't believe they've reached the limits of the technology yet.

Re: Initial Impressions of WSL 2

#120
For the past couple years I've developed on macOS, and the few years before that in a different role, on windows. On both machines I ended up resorting to a Linux VM to avoid frustrating differences between my dev environment and my prod environment.

Windows was totally off, macOS nearly just worked but every now and then an update would kill my dev environment and I would have to spend a day fixing it.

WSL1 was totally insufficient, and a few months ago I would say that I strongly prefer macOS to windows. Having toyed with WSL2, however, the speed and seamlessness has impressed me. I haven't tried it for full time work, but I'm getting the impression that it's superior to my current workflows with Parallels on macOS.

That said I'd just prefer a high quality full-Linux-dev environment. Going to just lobby for a Thinkpad instead of a MacBook on my coming machine refresh.

Post reply on HN