Initial Impressions of WSL 2
daverupert.com
daverupert.com
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 for me.
With WSL I can seamlessly access files from both Linux and Windows. I use the Terminal (Windows) and various Unix tools for a lot of stuff (compiling & testing on Posix, objdump, debugging). And I use Windows GUI tools for editing (Sublime), diffing (BeyondCompare), and so on. I get the best of both worlds.
But WSL2 file access in `/mnt/c/` is now unbearably slow. So I just stick with WSL1.
From what I've read, Microsoft intends to support both WSL1 and WSL2 for the foreseeable future. So that's good.
I'm not sure I believe them. Maintaining a whole tricky "fake" kernel/translation shim must be a lot of work.
This is true even between OSes that share a common ancestor. I was the maintainer of FreeBSD/alpha, and did the compat layer for OSF/1 / DEC UNIX / Tru64 starting with NetBSD's version and adding new calls, etc. The very easiest calls were the simple ones that both inherited from 4.3BSD or earlier (read, write). Medium were things that had diverged in different ways (stat, mmap), and for me the harder things were ABI handlers for the OSF/1 executable format (ecoff).
The hardest stuff was things at almost worked, except for maybe one flag was different, and it was hard to notice because an OSF/1 program would run for 5 minutes, and then coredump.
The lseek() call in your link is closer to what I meant by simple.
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.)
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 for one of them. They probably just haven't "planned" it yet, unless they don't expect they will actually ever get them to feel the same.
He spends most of the second half of the talk explaining (with a profiler) how two query implementations on ActiveRecord which should be doing pretty much about the same thing, actually perform wildly differently, and narrowing it down with data to understand why.
The talk is really interesting and I think it's a parallel to the current discussion in a way because, in Aaron's talk there were two implementations and one was obviously better performing (but unfortunately it was the one that is harder to write.) He argued mostly that, unless there is a reason for these two implementations to behave and perform differently, the one that is slower (but easier to write) should become more like the one that is "enhanced with a performance pro-tip" that arguably the ActiveRecord user shouldn't really need to know about. In other words, that the bad performance was actually a bug.
(tl;dr: the pro-tip is, to build your own pre-sanitized SQL WHERE clause strings, because you may save something like 38% performance in a pathological case, recovered time that the SQL engine was going to spend traversing AST and compiling.)
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. 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?
(And if it can't be done, or can't be done yet, why wouldn't we expect to see both implementations maintained as long as needed to find a solution that pareto-dominates them both?)
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.
The fun part about my example is actually that he saw a 60% performance difference, but only recovered 38% of that by fixing the one bug that was exposed in the talk.
It was decidedly a bug. Refusing to cop out and say "it's a necessary evil, and can't be fixed" got him that 38% boost in one shot. The remaining ~22% is still a problem that has yet to be explained completely, but now it's not as big (or soon won't be, when they resolve the issues created by fixing the bug, which AIUI it couldn't be merged yet...)
I do get your point, and I grok that parts of this problem simply can't be fixed outright. But from my perspective, the bug isn't that WSL2 is missing features of WSL1, it's that WSL1 performs 60% slower for my use cases (*not an actual measurement) while doing what appears to be, at least from my perspective, basically what is meant to be the same task. I don't really know why, except by what some greater experts have shared, some of that which I have acquired by osmosis.
Your use cases are valid, and we mostly agree, when you say the limits of the technology have not been reached, it seems like we're both arguing that there are simply more bugs yet.
Ultimately, the software creator determines what is and isn't a bug - formally through what they label them as, but effectively through how they act upon the behavior. As an end user of a system, things like the above are less like bugs, and more like features.
[1] https://code.visualstudio.com/docs/remote/wsl
* One curious effect is you can't move folders from VS Code due to permissions. So I have to close it and use Windows Terminal for that, but moving folders doesn't happen too often.
The files would live in WSL 2 directly, but then you access them over Windows through the WSL network path?
I don't have insiders installed so I don't know how slow that would be. Like if you CTRL+p'd in Sublime Text, would it have to grab a list of files from over the network on every call, or does it cache these files locally on a per ST session basis, etc..
There's also maybe the option of running ST natively in WSL 2 and expose its GUI over an X-server. I know latency there is very good (near native) because I've done it in the past. This also gives you the added advantage of ST being able to know about your Linux environment which could be nice for linting and other things that require having your programming runtime installed in the same place as your editor.
You can still have shortcuts too in Windows, for pinning stuff to your taskbar or having right click menus. I do this with Vim now with WSL 1, where I have a custom "open with Vim" right click menu in explorer that opens terminal / native Linux Vim that's installed in WSL.
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)
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.
Both windows and Linux should be fine with home on cifs.
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.
I still want my auth credentials encrypted so no telnet and other older tools are not a replacement.
That's basically what they're doing, only that it's not SMB but 9p protocol servers.
Here is a video where they discuss the WSL2 architecture. The link is time-stamped to go to an overview picture of the architecture.
As the article says
>To get the full benefit of WSL 2, you’ll also want to move your project files from /mnt/c/Users/<username>/ over to your new ~/ Linux home directory on your new VHD. You can see the contents of this drive on the Network by going to \\wsl$\<distro name>\<username>\home or typing the command explorer.exe . from your bash prompt.
>This is your Linux filesystem and it acts and behaves as you’d expect. I made a folder called ~/projects that has all my project repos and then I open those projects in VS Code using the code . command.
i have accidentally wiped my home directory on Ubuntu VM reinstall. I cant even backup it up easily.
WSL engineers need to figure out a way to make the Linux home directory to be persistent. If we are living in the docker world, this is a solved problem - docker volumes live separately to the docker VM itself.
WSL2 needs to do something like that.
this is a problem that needs a "docker volume" solution. git is just not enough.
think in terms of people moving to Windows from Linux.
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.
If WSL wants me to migrate to Windows...they should fix this.
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.
WSL1 replaced the init process. For Ubuntu, at least, snaps were not enabled, at least out of the box. There were occasional issues early on where the syscall translation was not perfect. For me, at least, these were all ironed out after a few revisions. Unsure if there were still edges I didn't hit.
WSL2 takes advantage of virtualization technology, so should be an even better Linux experience.
- Ubuntu (18.04 and 20.04)
- Kali
- Debian
- Fedora (remix for WSL)
- openSUSE-Leap-15
- SUSE Linux Enterprise
- Alpine
- Pengwin (Debian-based and apparently optimized for WSL, and an enterprise version)
- Centos (7 and 8.1)
-
How does it handle case-sensitivity?
Source: I have Arch and Ubuntu on WSL1.
Those didn't change. Other things did.
But I'm intrigued, what did change?
That just wasn't going to happen.
My (casual, not work) use relies heavily on Nix, which is built around a centralized SQLite file. I did not enjoy that experience.
WSL2 has been great so far (I’ve been using it for a few months now with no serious issues).
I didn't want it to be this way though. Apple has been continuously pushing out laptops that are not what I want. My Mac is also notifying me nonstop about 2FA authentication and iCloud storage, and I can't seem to turn those off. I used to eagerly await their keynote events to see what cutting edge innovations they will announce. There have been none I care about since Steve passed.
The lack of a decent modern laptop (I just want a proper keyboard without touchbar, some ports, with a decent cooling system) and MacOS becoming more buggy and annoying has pushed me to find an alternative.
WSL1 did not cut it for me, but WSL2 has taken Apple out of my mind entirely with regards to my development environment.
I think a lot of folks take this path because it's just easier. The fact that I know I can do most of the stuff the same way I always have makes it an easier decision to make. I think there's also, for some people, an ideological component, that is, they're still using UNIX, it just happens to be in a Windows host, and that's easier to accept than come to terms with Windows just being a decent OS on its own merits. (I am not saying anyone in particular in this thread is that kind of person, of course.)
With WSL2 you can go from - I wonder if this would work, do a quick no git checkin no vm no docker quick script, then looks good, let's drop this into git, get a dockerfile going, test on docker then test deploy or start going to production.
And it's all pretty fictionless and you can use your Windows machine still for whatever other desktop stuff you have (which many find easier than getting a linux desktop going especially if you need to interop with a word / excel / microsoft business).
I think Microsoft is finally paying a bit of attention to what developers are looking for. The vagrant / docker on windows solutions were in part providing for this need (windows desktop / linux development). This is also what made MacOS so great (unix/bsd under the hood with a nice gui). Why not bake it in? Linux is open source - you don't even have to license it from someone.
But the piece missing is still first class support for X (or Wayland) Linux applications. Without GUI Emacs, for example, or some way of integrating the Windows Emacs well, I find the WSL experience not as productive as booting into my actual Linux partition. But it's like... 90% there.
One thing I really like is that the Windows version of CLion will use SSH to connect into your WSL installation and use the Linux toolchain. So you can develop both Linux and Windows applications using the CLion GUI IDE on Windows, it's quite seamless.
Tramp[1] does this for Emacs. You can run Windows GUI Emacs and use SSH or another protocol to edit files and run commands within the WSL installation. It's pretty seamless.
[1] https://www.gnu.org/software/emacs/manual/html_node/tramp/in...
This isn't an issue for most code within Emacs itself, but it pops up occasionally when using packages from ELPA or MELPA.
[1] https://www.gnu.org/software/emacs/manual/html_mono/elisp.ht...
[2] https://www.gnu.org/software/emacs/manual/html_mono/elisp.ht...
Linux isn't certified, and none of developers using that seem to mind. If Microsoft got WSL "certified", would any Linux user consider it a better Linux than Linux?
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?
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.
No matter how good WSL is, if you want to develop iOS apps, you still have to buy a Mac.
There are around 200 million consumer PCs sold a year. Do you really think any significant number or sold to develop VR apps - that market is minis use.
https://www.theverge.com/2020/5/1/21244468/steam-mac-support...
Coupled with a history of GPU driver support usually being best on Windows and having good GPU support is usually pretty important for VR, its pretty clear why Windows is probably the best platform for VR development at the moment.
https://www.engadget.com/half-life-alyx-adds-1-million-vr-us...
Do you mean machine learning? If so, then that doesn't match my experience at all.
We were deploying into production with Windows, Aix, HP-UX and Solaris.
The Red-Hat Linux server that we had around was only for test purposes.
to comply with company policy that only supports windows on desktops.
Others prefer the Windows desktop, in particular for multi-screen.
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.
Windows + Linux VM has been a better platform for a long time, even before WSL!
Microsoft recognized this and wanted to boost this workflow by providing it themselves.
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.
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.
It frankly disturbed the hell out of me. Windows asked for consent (default to yes, of course) for a lot of invasive things, to the point that I wondered what it was going to do without asking. And even after I said no to them, I saw what I can only describe as ads all over Windows itself. Windows pushing me to use Edge, Windows pimping Cortana even when I said I didn't want to use it, etc. In the hour or so that I used it, I never wanted to use it ever again (and, indeed, I haven't).
Apple and macOS certainly have issues of their own, but I never felt like Apple was trying to advertise to me or violate my privacy. Microsoft made it very clear that they ravenously wanted to do both to me immediately. I'll stick with Debian, thanks.
Wait so now it's just a regular Linux virtual machine? I thought it was a thin translation layer between the kernels? Kinda not as impressive now.
The RAM issue is a clear setback, and makes it annoying trying to do large compile jobs on the Linux side, though it's been a while since I've tried it. In theory it could be possible to handle coorporation between the Linux and Windows RAM usage patterns since they're running a very heavily modified kernel. I'd be very interrested in knowing if anything is hapenning on that front.
That's possible in theory, I've done it with libvirt/KVM. You have to enable discard on all filesystems and swap on the guest, use a virtual disk interface which can pass the discard requests to the host, and configure the host to release the corresponding blocks on a discard request. I don't know if WSL2 comes configured to do all that, but if not, it shouldn't be too hard for them to add this functionality.
It is technically less impressive, but much easier to maintain and stay compatible for Microsoft.
It's only running alongside Windows in the sense that it's running in Hyper-V, which Windows itself effectively does when you have Hyper-V enabled. What is special about this Linux build is that it's specifically made for running alongside Windows since it needs to integrate with the Explorer and other Windows components[0].
0: https://devblogs.microsoft.com/commandline/shipping-a-linux-...
The users who aren't concerned with making the distinction you just brushed aside don't know or care what a VM is so for them Linux is just an app running in Windows. You're making your point the same way they would.
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-w...
WSL1 was like that, but it was severely handicapped by NT filesystem performance, especially for small files or metadata operations. There are a lot of small operations that are more than 2 orders of magnitude slower on Windows than on Linux, and a lot of Linux software just expects them to be fast, so WSL1 is not a great experience for a lot of stuff.
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.
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.
Also they said "That doesn't mean we've given up either", but you really have to do some mental gymnastics to convince yourself that moving to a VM wasn't "giving up" on solving these problems in WSL1.
But in any case, I think the component you want to refer to in that case it the "I/O subsystem".
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 was similarly slow.
From the original NT microkernel design, filesystem access is all asynchronous messaging, and it can be intercepted and modified by drivers at many points. A lot of software takes advantage of that. But it's also why caching isn't as effective as it could be, since you can't rely on all those unknown layers returning the same result each time.
Plus a lot of Windows systems are running an AV which likes to check to see if you should be allowed to read any particular file in case it might be dangerous.
In relation to the above conversation about WSL1 performance characteristics, my impression is that ReFS would be equal or worse to NTFS for what Linux/POSIX file operations expect. (ReFS is still very much on the "SQL Database" side of the analogy, like NTFS as it was of course designed to support much the same transactional semantics, and some additional ones as well at the "virtual storage space" level above the physical pool of drives.)
In danger of getting further aside into tangential spaces, Ubuntu's current experimentation with ZFS by default is probably one to watch to see if the user experience of complicated multi-physical disk file systems like ReFS can be made to fit and is useful to a broader user base than just power users. (Though arguably compared to the broader spectrum of casual Windows users, even some of the more casual Ubuntu users might be considered power users in comparison.)
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).
For ML, 3D, games and what not is probably better to keep Linux in another kind of VM.
I don't consider it odd. It is the way a Type 1 hypervisor works. Windows puts in some effort to hide most of that from the user.
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).
I'd be a little surprised if it really is measurable - just win10 with/without hyper-v? I seem to recall xen (which should be comparable) having a pretty low impact?
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 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.
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...
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 AMD SVM hardware extensions are used to implement Type-1 virtualisation.
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.
It seems like a very smart move from Microsoft. They get rid of the abysmal performance of windows's file system and spawning new processes by using... linux! Provide also an excellent terminal so that developers have the best experience with command line tools, all this without leaving the convenience of Windows!
Not surprising since they dominate the desktop market since forever being smart at strategy.
The only weak point of WSL 2 to my point of view is that you say goodbye to development of native Windows application because you are effectively on Linux. It means you either setup cross-compilation which can be annoying either you go with Visual Studio, the old MS way.
For the moment I will stay with MSYS2 plus Mingw64, they are both excellent and provide a good experience to develop native applications on Windows. At home I will keep using Ubuntu, of course.
For the introduction of WSL 2, I think many of the people using Mac OS X may switch to Windows. They never fully embraced the free-software philosophy and chose Mac OS X because of the high-quality hardware and software and the good terminal experience with unix-like environment. They will easily switch to Windows now.
The small group of people using Linux will probably stay on Linux because of dislike for Microsoft practices and the fondness for free software.
Bad news for free software, good news for Microsoft shareholders!
In my opinion, WSL2 is leveling out the playing field between Windows and MacOS. If you were doing web development (and many people are) it had always been so much easier to get up and running on a Mac. MacOS had native versions of all the stuff web developers use (Python, Ruby, PHP, etc.), on Windows things were always surrounded with a haze of "unsupported" and "non-standard". WSL2 doesn't entirely resolve this issue but it goes a long way towards getting it done.
For myself, I have to do a lot more native Windows development and have had to switch from using Linux at work to Windows (running Visual Studio in a VM under Linux all day just wasn't cutting it). Having all the familiar tools available in WSL2 has made the transition much, much easier.
I don't think Linux will be affected as much. Moreover, Linux is better than ever:
- you can buy laptop with Linux from two companies: Dell and System76, soon from Lenovo
- performance can't be beat (especially for development, with native docker and kvm for virtualization)
- amazing package managers, with fwupd you can even update firmware
- graphics stack is really good and getting better, firefox on wayland with video decoding support, wayland with great hidpi support
- work on chromium on wayland in progress (beta already available), we will have electron apps with hidpi support
- no bloatware (candy crush, 100s of processes...)
- gaming with Proton is miles better than gaming on macOS, still behind Windows for known reasons
Obviously if you need Adobe/Office, Linux loses many points :)
Oh, and WSL1 was banned, of course, on the grounds of being "too expensive and uncertain to support". You could have a Linux VM though, with approved distro, same as what prod machines run.
So really WSL is still confined to a small domain of switchers tired of MBP keyboards, Linux is safe for now :)
Seems like with WSL2, one could run Windows but do all the work using native Linux tools while enjoying quality integration with Windows. It's not a setup I would actually prefer over Linux but it should make any work where Windows is required much more pleasant.
On a personal level it's interesting that Windows is getting WSL right around the time when I stoppped booting my Windows install for games. Proton has been amazing, changed Linux gaming completely almost overnight. It's still not the same experience as on Windows, but between Proton and even the occasional native Linux port of a big-budget game - no longer an extreme rarity - I've been able to play games on Linux like never before.
From what I understand, WSL 1 doesn't have proper access to GPU, and for WSL 2 / Hyper-V, GPU pass-through isn't a thing for cards such as the 1080TI.
On Windows, Conda / Anaconda is quite buggy, and dealing with a regular python install through the CMD command line isn't too pleasant either.
Looks like the modern macbooks don't have any CUDA-capable GPUs. What do folks use for their ML projects? AWS?
I'd suggest avoiding MacBooks if you are in the ML field, or having a dedicated desktop machine somewhere that you connect to.
What kind of bizarre twisted hellscape do we live in where we just accept this as normal -- for a web page.
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.
If you guys have been virtualizing on VMWare or Virtualbox, try KVM. It's blistering fast and the whole SPICE protocol is amazing. You can actually get a usable, snappy 2+ desktop with dynamic resizing, audio redirection and USB redirection (which is SO good i was able to test using a USB soundcard and I got sound to play without underruns! quite a feat)
Do it!
I wonder if the success of WSL this will risk making some tooling that is already less-than-stellar on windows (Git, for example) even worse when the group that actually has to work on windows proper shrinks.
I expect the Windows Git will keep improving if they keep this Windows+Linux trend.
Full builds for my site (almost 300 posts) takes like 20 full seconds, but incremental builds when actively writing to see changes takes about 3 seconds.
So if that 3 seconds ends up being half a second or less that would be a pretty big quality of life improvement.
For Docker related projects (Flask, Rails, Phoenix, Webpack, whatever), WSL 1 is quite speedy already since the mount is happening in the Linux VM running Docker Desktop, not the WSL mount. I wonder if this will end up being any faster with a WSL 2 back-end for Docker Desktop. I'll have to wait until WSL 2 hits Windows stable to try it out.
Since I didn't see it mentioned in this thread - if all one needs is Ubuntu VMs, i.e., for common web development setup, Multipass is a simple and easy tool:
Made by Canonical, runs on Hyper-V (or equivalent), cross-platform support. I have not compared it with WSL 1 or 2, but it's been a smooth user experience.
Found the root problem right there. What the fuck is going on in modern web dev.
I think you can't play inside a VM (like Hyper-V), which is a different story.
All my Blizzard games seem perfectly happy to run on a machine that has Hyper-V.
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 anyone cares:)
0c:00.0 VGA … [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] (rev cf)
OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.36.0, 5.6.2+, LLVM 9.0.1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.2
Then again for lack of a Windows installation I wouldn't know if I'm losing performance. It is however what I expect of the card's age and price segment (mediocre in both I'd say.)Recently I've noticed that some games running under Proton don't reliably save: "X-Com 2" and "Strike Suit Zero". And I can't rule out that happening with other games running under Proton.
The frustration of lost saves makes gaming less enjoyable for me. So now I'm considering running Windows 10 in a guest VM.
(I'm not interested in Win10 + WSL, because I'm not open to Win10's unavoidable-updates and forced-telemetry.)
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.
Actually, running any linux software in general such as middleman or Jekyll is pretty painful on Windows- I recently had a horrible time trying to get git-crypt working for a colleague of mine who was using Windows..
There's a lot of value in being able to just run "linux" (with bash, grep, sed, awk, gcc, python) while being able to access your normal files on a Windows desktop.
You _can_ do this with VirtualBox but it's janky, slow, buggy and generally awkward.
It’s not feasible, as much as I wish it was.
Of course I could just run some Linux distro, but that again would be limiting for non-work-stuff and I prefer not switching between OSs daily. And last time I tried I had big issues with HDPI scaling between screens, hibernation etc. And really, I just don't care that much about what OS I run. Windows works.
1. You like windows
2. You want to use software or hardware that works best with windows
Personally I like windows and I want to run Lightroom and various other software that doesn't work on linux. I also want to have a full *nix OS available and windows with wsl gives me exactly that.
I also still need to maintain several Java projects and some tools that leverage Ruby. Using Java on Windows isn't a big deal, but the Ruby tools are aimed at Unix-ish platforms and I find it a lot easier to work with Ruby under WSL instead of messing around with native Ruby on Windows.
Blizzard games (addicted to StarCraft for life, also enjoy Diablo 3). Steam games (some are supported under Linux but I know I can run all modern games with full video card driver support).
WebEx - need this for work and it seems to really lack support under Linux. Couldn't figure out how to get this working on my Ubuntu 20.04 laptop. Also use RSA and Horizon VMWare and haven't dug into how well those apps work in Linux.
I don't need WSL but I really like it. I get to dip my toes into Linux, and enjoy using bash, running MySQL under Linux, generally find the npm/yarn experience is better.
If at this point you wonder why I don't go Mac it's mostly because I could never justify the price premium to get the hardware I want. In theory Hackintosh could fit the bill but I haven't tried it, and everything "just works" under Windows so I haven't felt the need.
In theory you can develop for Windows being on a Linux PC using a VM or cross-compiler but this isn't always practical or possible. Just have a Windows PC is more simple.
Very cool blog post!
Almost all my work has moved to WSL - the remaining bit (like UART and JTAG access) could be done with better USB support. So I'm definitely hoping for that!
https://github.com/microsoft/terminal/issues/176
This is not a showstopper for me though, and I have been using it as my primary terminal application for many months.
Windows terminal is pretty good, but no, it's not yet the best terminal on windows.
cmder is.
It has panel split, quake mode, git integration...
Now the read map of Windows Terminal is pretty convincing, so let's see how it plays out.
IMO, the best terminal on windows is a linux terminal running in WSL displaying to a windows x server. I use terminator and vcxsrv, and have not had any of the weird vim, ssh, tmux, etc rendering problems I had with cmder.
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).
Last I heard networking/sharing ports didn't work, has that been fixed or is there now a solution?
I've set up a scheduled task to get WSL IP address and update an entry in hosts file then access using http://wsl:PORT.