Live data from Hacker News

Initial Impressions of WSL 2

daverupert.com

191–200 of 233 posts

Re: Initial Impressions of WSL 2

#191

Earlier quoted context omitted.

None. The point is how many people care about running Linux in a VM (which is all WSL2 is) on Windows instead of running a native Unix operating system? Out of those that do care about running Linux, what is the practical difference between running Linux in a VM on Windows and Linux on a VM on Macs?

Apple doesn’t put time and effort into making Linux on a VM feel at home on macOS.

It doesn’t have to. How does WSL feel “more at home” than the third party VM solutions available for Macs?

Re: Initial Impressions of WSL 2

#192
post #121

Earlier quoted context omitted.

Hyper-V is not installed by default on Windows and I have not been required to install it for anything except WSL 2 (and Hyper-V itself). I think Docker on Windows also uses it but I don't use that. Windows Defender has never indicated a requirement for Hyper-V to me.

It is not anywhere in the Windows features dialog mentioned explicitly but many features install an hypervisor under the covers. Not Hyper-V itself but a hypervisor which inhibits other VM hypervisors from functioning.

If you are talking about "Windows Hypervisor Platform", that indeed has Hyper-V as a dependency.

Re: Initial Impressions of WSL 2

#193

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).

The thing about Type 2 virtualization not working is true, but if you hyper-v enabled you already have type-1 virtualization so type 2 is kinda irrelevant.

I've been using Hyper-V for about 5 years and never noticed any performance impact worth mentioning. Type 1 hypervisor VMs are still technically running on the metal.

Re: Initial Impressions of WSL 2

#194
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…

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 reference I had a situation where I needed to pull/push 1-2gb blobs across the VM boundary on a regular basis, so it ended up mattering a lot - sub-1-minute times vs 5-10 minute copies.

Re: Initial Impressions of WSL 2

#195
post #70

Earlier quoted context omitted.

Yes, but translating syscalls across two Unix like systems is likely much easier. Big parts of it even just straight mapping one number to another.

This is somewhat true, but not entirely. You have to remember that FreeBSD and Linux share no common ancestors, and FreeBSD defines its ABI at the libc level, whereas Linux defines it at the syscall level. There are also subtle differences in how various internal kernel mechanisms work (such as flag definitions for calls). See linux_common_open() for an example of an "easy" straight mapping. https://github.com/freebs…

> FreeBSD defines its ABI at the libc level, whereas Linux defines it at the syscall level

Actually, this really does make it more impressive than I'd realized, especially since FreeBSD didn't just shim libc in - I've run an Alpine Linux (musl-based) chroot on FreeBSD and that worked, which it wouldn't have if they just made a glibc-like wrapper. (I think.)

Re: Initial Impressions of WSL 2

#196

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).

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. That doesn't sound right. Hyper-V is a Type-1 hypervisor, so by definition the Windows installation would not be running in its own VM (for some definition of VM). And its pretty much exactly the same for Qemu/KVM on Linux, where Intel VT-x or…

Unless I'm terribly wrong, when Hyper-V is enabled, it converts the current host Windows to a "Parent partition". This is what it's described here: https://superuser.com/questions/836116/hyper-v-appears-to-ru...

Re: Initial Impressions of WSL 2

#197

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.

Those of us who have been using Linux around the the year 2000 will remember the April fool joke on Slashdot about running Linux alongside Windows. The often repeated mantra, first they ignore you, then they laugh at you, then they fight you and then you win. The main reason of this seamless integration happening between Linux and Windows is most probably the fact that developers or the "cool kids" going to MacOS by…

Here we are: https://linux.slashdot.org/story/05/04/01/1453253/gentoo---g... (perhaps there were others)

Re: Initial Impressions of WSL 2

#198

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).

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.

Is "Hyper-V" or "Windows Hypervisor Platform" enabled in Windows Features screen?

Re: Initial Impressions of WSL 2

#199
post #92

Wow, per the block chart of how this works https://i.redd.it/po98dksksjx21.png It's using the 9P Filesystem to sync the two between systems... that's interesting.

> It's using the 9P Filesystem to sync the two between systems... that's interesting.

Not rare; qemu/libvirt does the same thing (well, as one option; qemu also supports smb).

Re: Initial Impressions of WSL 2

#200

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).

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 available when you are not running under the hypervisor.

MS also provides an API so that third party VM tools can run, and Virtual Box can use it, but still recently it had tons of issues. Maybe the situation is somehow better now, I don't know. I don't think this is an option with VMWare though.

Post reply on HN