Live data from Hacker News

Initial Impressions of WSL 2

daverupert.com

201–210 of 233 posts

Re: Initial Impressions of WSL 2

#201
post #86

Earlier quoted context omitted.

Personally I never had a problem with filesystem performance on WSL 1. I certainly don't think it was so bad that the whole thing needed to be scrapped in favor of a virtual machine.

Windows does something weird with the filesystem that I have never figured out. In a msys2 shell, git is incredibly incredibly slow. I actually don't even bother running git in msys2 anymore; I just use the native git in that directory. (I use msys2 to cross-compile AVR stuff.) This seems to be a known issue, but nobody knows how to fix it. (It's some UAC thing, apparently.) I imagine this is what WSL 1 used, and it…

Yep, Windows FS is very slow. If you have an antivirus it is extremely slow, but even if you don't, it is still very slow. This is not really an issue of msys2 or WSL, this is an issue of Windows itself.

Re: Initial Impressions of WSL 2

#202

Just a reminder that enabling Hyper-V (needed for WSL2) will make your computer boot your current Windows install inside a VM too. This might makes a slight performance impact. And you might also encounter issues with Type 2 virtualization software such as VirtualBox or VMWare Workstation. (I will still stick to WSL 1 because of that).

that seems odd; what is the performance impact of turning on Hyper-V for the root/host windows instance?

Unfortunately I have no number to give you. I did a search on the subject a while ago and all that I could find is numerous post on multiple forums with people indicating slowness, lower fps in games, shuttering. Weirdly, this is something that could be tested pretty easily with a benchmark.

In my understanding on how a Hypervisor works, the only thing that I'm almost confident to say is that there is an impact but it's probably not noticeable or highly related to your workload (maybe on I/O?).

People will probably not care about that impact in fact (considering that Hyper-V is enabled by default and there are multiple security features of Windows now relying on Hyper-V).

Re: Initial Impressions of WSL 2

#203
post #186

Earlier quoted context omitted.

> i have accidentally wiped my home directory on Ubuntu VM reinstall. I cant even backup it up easily. Normally, it'd live on an nfs mount, or a cifs share. If you're stuck with VMs for some reason, setting up a dedicated storage appliance would probably be the way to go.

Or it will live inside my linux dual boot...where it should. If WSL wants me to migrate to Windows...they should fix this.

You could alway try your luck with shared windows/Linux home on zfs...

Re: Initial Impressions of WSL 2

#204
post #200

Earlier quoted context omitted.

You may be right but: 1.) The Hyper-V component isn't installed on my Windows 20H1 install. WSL 2 may use Hyper-V technology, but the full thing does not appear to be installed. 2.) So far, VirtualBox is working just fine. I haven't noticed any issues yet while using several virtual machines. Nothing seems amiss at all.

The Hyper-V hypervisor is obviously running. I don't remember the corresponding name in the optional components. The complete Hyper-V suit you use to manually create and run VM does not need to be installed by default, but that's irrelevant. Windows provides more and more features that relies on the hypervisor, e.g. Windows Sandbox, Edge Protected Mode, Credential Guard, etc. Those features (and WSL2) are not availab…

Indeed, until very recently, Virtual Box could not be run with Hyper-V enabled. One the recent release, fixed that but the price was some performance optimization was disabled. So it's not optimal [1].

VMWare has a tech preview of the next version of Workstation which should work with the new Windows 2004 [2]

[1] https://forums.virtualbox.org/viewtopic.php?p=470529#p470529

[2] https://blogs.vmware.com/workstation/2020/01/vmware-workstat...

Re: Initial Impressions of WSL 2

#205

Earlier quoted context omitted.

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…

SMB to/from a linux VM is pretty slow, I've spent time trying to optimize it. The performance hits bottlenecks in a few places including (if enabled) transport encryption. You'll have similar problems if you try to shuffle a few gigs across an ssh tunnel locally too (if you're sufficiently clever and willing to wield a compiler in anger, you can disable transport encryption entirely for a nice speed boost). For refer…

I really don’t understand why they disable the NULL cipher. If I want to take the risk and transfer data cleartext over my LAN I don’t see why I need to custom compile ssh/scp to do so (and miss out on security updates since its no longer a tracked package).

I still want my auth credentials encrypted so no telnet and other older tools are not a replacement.

Re: Initial Impressions of WSL 2

#206

Earlier quoted context omitted.

Windows can be controlled entirely by the keyboard, out of the box (Start+ArrowKey). MacOS always required extra setup with Karabiner and other tools to mostly accomplish the same thing. The BSD derived base in MacOS made a great developer OS but the windowing system often felt lacking.

macOS has full keyboard access and you don’t need Karabiner to enable it.

It's my understanding that MacOS requires extra setup for those shortcuts regardless of Karabiner.

If you feel that extra setup is acceptable then any almost modern OS will fit your needs. There's something to be said for standardized shortcuts that work on every MS Windows instance.

Re: Initial Impressions of WSL 2

#207
post #77

Earlier quoted context omitted.

WSL 1 and WSL 2 can coexist and be used according to what needs one's scenarios present. I imagine MS collected enough requirements to also justify a full Linux VM. There will be some slowness somewhere, the 2 versions now let you choose on which side of the boundary to place it. https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq

They could've instead worked on speeding up the I/O subsystem and sped up Windows altogether. I refuse to believe it's impossible. The more plausible reasons to me seem to be (a) they have to work independently from the I/O subsystem team(s) for whatever reason (maybe they didn't care enough to cooperate), or (b) it's too tricky to get right and prone to bugs, so they preferred not to have to deal with it and risk br…

I/O subsystem performance is just one aspect. WSL 1 is missing a lot of other stuff probably because the effort to implement it all was to great. MS would have to duplicate a lot of the effort already put in by Linux developers. So they went the route of a full Linux VM.

And no matter how much MS improves WSL 1 there would always be something missing that enough users want/need. For example I care more about the network related stuff that wasn't implemented (NETLINK_ROUTE\RTM_GETROUTE, AF_PACKET family) because this excluded nmap.

Re: Initial Impressions of WSL 2

#208

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?

A huge number of things are terribly supported on Linux. Just as much better linux generally is for software dev, it's that same amount worse for most else. When I last tried going full linux (admittedly over five years ago), I remember wifi being a nightmare. Netflix had issues I can't remember specifically. Even ubiquitous formats like pdfs and word docs wouldn't always work correctly. More recently, I remember spotify being a pain and youtube not working as well. Maybe it's better now, but support for new mainstream products always lags in linux.

It's why so many of us try to get the best of both worlds. Dual booting with mainstream OS and linux, or ssh'ing from a mainstream OS to a machine on linux, using OSX + unix terminal, or windows + unix terminal, both options together always seems better than either option alone.

Kinda like how you could do anything in C++ that you can in Python, and vice versa. But the ecosystem is often what determines the best choice. Sticking with one and only one limits you.

Re: Initial Impressions of WSL 2

#209
post #4

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.

How does it compare to real Linux distributions? Does it have a package manager? Is it like Debian? What are the limitations?

I'm using full ubuntu in it. The only real pain is anything that relies on systemd (which comes up unsurprisingly often).

Re: Initial Impressions of WSL 2

#210

Earlier quoted context omitted.

The Mac is 10% of Apple’s revenue. How much of that 10% do you really think are developers that would switch just because Microsoft supports Linux? Especially considering that macOS is a real certified Unix not just tacked on.

There are tail wagging the dog incentives here. Part (not all) of the Mac resurgence was that you needed a Mac to develop iPhone apps. Part (not all) of the new Windows resurgence is that if you even really want to play around with ML or VR dev you need a Windows machine. I feel like it's about the possibilities - with WSL, Windows Terminal I get what's essentially the mac experience but can suddenly do so much more.

> Part (not all) of the new Windows resurgence is that if you even really want to play around with ML...

Do you mean machine learning? If so, then that doesn't match my experience at all.

Post reply on HN