> He further mentions that unzipping tarbars could see a 20 times performance increase.
Boy, do I love unzipping tarbars! On a more serious note, it’s great that WSL has gotten much faster, although it’s a little disappointing that they threw out the older, more interesting architecture to get it and just used a VM.
I agree wholeheartedly. I know it was probably a fool’s errand especially in a world where Docker for Windows was doing the same thing WSL2 does but worse, but WSL1’s design just satisfied me in a way that Hyper-V will not. Presumably, this also means you have to have Hyper-V enabled, crippling all other VM software. Hope the integration is impressive at least, to hopefully make up for it. I admittedly don’t run Windows these days but WSL is definitely one of the highlights of modern Windows and it’s hard to not follow its progress.
I also wonder how integration changes with sockets/networking, hardware access, Windows Firewall, etc. Last I checked, relations with Windows Firewall were strained by the lack of proper support for picoprocesses.
* And for me the nice one is the integration with VS Code, I just select which distro I want to work in and VS Code will start it (if it isn't running), connect to it as a remote dev environment, and be able to control it as if the VM were within VS Code. It can be done manually with VirtualBox, but VirtualBox gives me no advantages in return.
* The networking implementation makes both 127.0.0.1 which is occasionally useful for me.
That's not a feature. And in practice it's not even relevant, because you can start your VM at Windows startup and use Putty to ssh into booted system which takes a fraction of second.
Also slim CentOS image boots, well, not in one second, but something like 5 seconds. Fast enough IMO.
Last time I checked (months ago) VirtualBox just couldn't run under Hyper-V. If you Google around you'll see lots of threads, e.g. https://superuser.com/q/1208850
Apparently they claim that as of February 19, 2020, they've "Restored the ability to run VMs through Hyper-V, at the expense of performance". https://www.virtualbox.org/wiki/Changelog-6.1
I’m using hyper-v and virtualbox together, seems to be fine performance-wise. Only reason we’re using vbox is that we already have vagrant scripts set up for it and hyper-v didn’t seem to work as well as a target for vagrant.
Restored? That's a weird line. I don't think it ever lost it since the feature was added in 6.0 (released December 18 2018), it was just annoying to activate.
VirtualBox seems a victim of Oracle's usual apathy as a project custodian. Nearly every other VM vendor has added or accepted (Microsoft employees were even directly involved in PRs to qemu and other) performance improvements on Hyper-V.
It's almost like Oracle is trying to upsell VM servers at the expense of the day-to-day operations of the once well regarded open source project they maintain?~
> WSL 2 will be available on all SKUs where WSL is currently available, including Windows 10 Home.
> The newest version of WSL uses Hyper-V architecture to enable its virtualization. This architecture will be available in the 'Virtual Machine Platform' optional component. This optional component will be available on all SKUs.
I don't really grok this, does this mean Hyper-V will be available on Windows 10 Home? That's the only reason I am considering buying a pro license.
Stop blaming Hyper-V for "crippling other VM software". You ever tried to run VBox and KVM together? It's a limitation of the processor's virtualization extension.
Problem is once Hyper-V is installed and enabled, no other VM can even be started regardless of no Hyper-V VMs actually running. This limitation does not exist on linux afaik. I have run libvirt based VMs and VirtualBox VMs at the same time on linux just fine in the past.
That’s not what’s happening. Hyper-v is a type-1 hypervisor. When it’s running, even your Windows instance is running within hyper-v. Windows 10 has the hypervisor platform that lets other vm developers hook into the hyper-v host architecture, that’s how you can get android emulators and virtualbox running under hyper-v. It all works fine but is a little unintuitive to set up.
Most likely you just wasn't using VirtualBox own virtualization since it's cant work alongside with KVM. Current version of virtualbox just use KVM just like libvirt.
Although, I don’t know if both kinds of VMs can run in parallel. I recall at least doing so with VMWare in the past.
The thing is, when enabling Hyper-V on Windows, you can’t do anything without fully rebooting. On Linux I know for a fact you do not need to reboot to switch between VMs.
Hyper-V is a type 1 hypervisor. Even windows runs within it when enabled. Comparing to KVM would be better rather than VBox or VMWare. Try VBox with KVM to see same effect.
The complaint is not necessarily with Hyper-V itself, it is with WSL2 requiring Hyper-V, thus stopping you from using WSL2 and VBox (or VMware) on the same machine - though apparently they have very recently fixed this.
The things I liked the most about WSL were the ability to share the same file system (and RAM, etc.) and not have to care about partitioning any resources. And to search the Linux files on the Windows side and even modify them with tools that can handle them (yes, I know what I'm doing). Now all of that goes out the window(s)... so I'm pretty unenthusiastic about WSL2. And the 9P server has been next to useless for me on WSL1. It's so darn slow for a local filesystem, it's almost like accessing files over SMB.
It needs a VHD, which requires setting aside a partition of your disk, meaning you can't dynamically share space with your Windows files. That's a huge downside for me. (By "partition" here I'm just referring to the English sense, not the MBR/GPT per se.)
You also can't nor search/modify your Linux files directly from Windows like I mentioned. The 9P server with WSL1 has been so slow as to be unusable for some directories when I try to use it. Does it feel native SSD-speed on WSL2?
As for RAM, does it really share RAM with Windows? That's great news if it does, but I don't think I've seen any VMs do this, though I've never tried it with Hyper-V... if it does,
I'm guessing that's what lets it use memory ballooning?
It's a resizable VHD that handles its business in the background, so I don't understand the complaint. And you can access your Linux files in Windows just fine when using WSL2. Just go to `\\wsl$`.
WSL2 is the first thing to legit make me reconsider my daily-driver Fedora setup in...well, since I started using it in ~2016. I just do not think about it, it's great.
And yes the \\wsl$ is the 9P server I just tried to explain is incredibly slow compared to normal files on WSL1. I haven't tried WSL2 yet but I don't expect going through a VM would be faster.
I've never looked as to whether it shrinks it, but I assume not (that would be hard). OTOH, storage is cheap, so I've never really worried.
I never used WSL1 in anger, but accessing WSL2 over the \\wsl$ is not particularly slow. It's not as fast as native, but I don't notice it. I do almost all of my access of files on the Linux image via a terminal and VSCode-over-WSL-Remote, though.
Well "storage is cheap" for you but why assume my money and everyone else's is cheap? I'm low on space and I need to shell out hundreds of dollars to get a larger version of what I have just to use WSL2. Or I could just keep using WSL1 and save my money, especially in this economy. Why in the world would I get a new SSD just for WSL2?
This isn't about using it "in anger". I'm not pushing it to some kind of corner case, you just need to use it for real instead of trying hello-world examples. You notice this immediately as you're dealing with nontrivial folder contents. To give you an idea, this is the speed of raw grep from inside WSL1 Ubuntu:
$ time sudo grep -ri asfadsfadf /etc
real 0m0.075s
user 0m0.016s
sys 0m0.063s
This is the speed from \\wsl$ (MSYS2):
real 0m9.227s
user 0m0.078s
sys 0m0.561s
And this is the speed on the raw files from Windows (MSYS2):
real 0m0.092s
user 0m0.000s
sys 0m0.046s
\\wsl$ is literally some 60x-70x slower than direct access, and it's not because I'm "using it in anger". If you don't believe me, try it yourself with any program you prefer and see if you get similar speed before you tell me I'm wrong.
This is par for the course on \\wsl$. Explorer lags, too, if you try to browse a folder with a bunch of subfolders that actually have some contents. It's plain as daylight to me. Not noticing to me is like not noticing that your car suddenly goes 1mph instead of 65mph.
Normal interactions from within WSL of course feel normal. It's just a VM with a fancy name after all. Which is removing pretty much all the overhead of the Windows I/O system, and which has hence been faster for ages. I'm surprised \\wsl$ would be faster though; that should have more overhead going through a VM, not less. If I ever try out WSL2 I'll have to give it a shot, but somehow my past experiences don't leave me optimistic...
time grep -ri asfadsfadfg /home/me/python-venvs
0.79s user
0.14s system
99% cpu
0.928 total
wsl time grep -ri asfadsfadfg /home/me/python-venvs
0.83s user
0.10s system
99% cpu
0.932 total
EDIT: cleaned up and formatted the output for better visibility, reacting to your comment.
First command ran from a zsh Terminal session in WSL
Second one ran from a powershell session using the wsl "bridge" executable.
I can't make sense of your command lines (why are you passing grep to grep??), but you're comparing pure-Windows against pure-WSL? I was comparing the two of those against \\wsl$ which is the slow one...
Just like what you normally use with a Hyper-V VM. A resizable VHD which grows but not shrinks, and with a size limit. Heck they even have a document on what to do when you exceed the default 256GB limit: https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes...
Supposedly it can release memory, as of October. It wasn't working in January when I last tried it, but I guess it's worth putting it back on auto to see what happens.
Part of my clings to hope that this is strictly because rewriting all those gazillion syscalls was a PITA, and they will eventually convert on something in between WSL1 and WSL2 where the Linux "front end" is used with NT, like the opposite of a rump kernel.
This is an interesting take considering Linux is Unix-like and macOS is technically a BSD derivative. I don’t think macOS will ever have a Linux syscall translation layer/subsystem (WSL1) nor a lightweight VM with special integration (WSL2) but you can do sort of similar things in third party software, I think. Docker for Mac is using the native VM framework and includes a filesystem integration called osxfs, but despite mentioning the source code in documentation it does not appear to be open source at this time?
Exactly. It really doesn't need a syscall translation layer anyway given its Unix + BSD and POSIX foundations. Although this open-source project [0] does exist for macOS but it looks like its inactive.
I find that most of the linux-like versions of user-space tools can be installed via homebrew. What functionality would you been hoping for from a linux vm?
would this VM be able to have any GPL v3 licensed tools?
Yeah, the drive for a "WSL" is really because Microsoft/Windows doesn't play nice with the *nix world of tools/commands that developers are falling in love with.
With OSX, the terminal experience is great, no need for a "WSL" over there!
I switched to WSL2 a month ago and it's been great. With WSL1 I'd regularly run into subtle compatibility problems but haven't seen anything like that with 2. Despite a handful of annoyances, the Win10+WSL2+Visual Studio Code Dev environment has been a lot more pleasant than OSX.
I never thought I’d say it but because of this exact setup with VS Code I’ve actually stopped using my MBP at home in favor of my desktop, which was really only built with gaming in mind. I’ve now gotten used to having all the extra computing power at hand and would struggle to go back to a laptop as my primary development machine.
I'm looking at selling my Mac and just getting an iPad to replace it - running Windows 10 + WSL + VSCode on my desktop pc is more pleasant for me to code at home with than my macbook.
But why could not you do the same before? Even before WSL there was MSYS, which IMO is great, unless you need to compile a C program, that directly uses Linux headers.
It’s possible I could have and I just wasn’t sufficiently in the know about which tools to use. I hadn’t used MSYS. I’ve taken my current workflow so far as to even use nix as my primary package manager. Would this have been easily possible before? I ask in earnest. My setup right now is such that even mildly arcane things like that just seem to work for the most part.
I've stopped coding on my 2012 Macbook Air in favour of my desktop PC for similar reasons. The fact that my ports are shared between Windows and Linux makes the web dev I do a dream.
The new Terminal app is great too. I've got all the same split pane stuff that I rely on in iTerm, including useful keyboard shortcuts for switching between them and resizing them. I'm very impressed.
I'm currently trying to do the same, I'm sick of running out of ram on my MBP. What software/setups do you find indispensable to move to Windows? I'm not a first time Windows-only user, but first time to do full development work. For what it's worth I already use VSCode, I'm doing FE Development, and I use Docker a lot. I'm kind of unsure due to having to lose my Mac-specific tools such as Maccy (Clipboard Manager) and Alfred (Quick Launcher).
Did the same. Just that i use emacs with x410. Only gripe I have at the moment that docker eats up a lot of memory. But everything else works perfectly fine. Was quite surprised and happy.
The update to migrate the filesystem took way longer than the docs said, I ended up just letting it run and came back a few hours later. And it wasn't like I had much in there. Otherwise it was straightforward.
I switched to windows insider to get it, but WSL2 should hit GA in the next month or two.
The most annoying issues mysteriously fixed themselves after 6mo or so: a trackpad that would go haywire ever once in a while, and diagonal tearing on the screen. It was a brand new model so maybe there were driver updates.
The fingerprint scanner is way flakier than the mac. This is on a Lenovo X1 Extreme gen2.
Win10 is just a little less... elegant than OSX. But not in a way that really bothers me on a day to day basis.
I'm agnostic to Win10 vs OSX as a desktop environment. What I like is running an real copy of Debian that starts instantly, and has transparent access to local files. I'm sure I could cobble something together with VMWare but this just works so cleanly. Homebrew is a fine option on OSX but its nowhere near is nice a full linux system.
Is there a shell+terminal+font combo that folks really like for WSL? I've tried the new terminal beta with zsh and--for reasons I can't quite articulate right now--it feels "off" and I invariably proceed to boot up virtualbox for my debian, i3, kitty, fira code setup to get work done. Maybe it's the break in filesystems and $HOME?
Edit: learning that WSL2 does away with the syscall-translating tech and mandates Hyper-V, the question of whether to look into this further becomes thornier!
Zsh have a long list of nice features that Bash lacks. Two of my favourites:
1. Imagine you are in a directory with file1.ext and file2.ext. You type f[TAB], it autocompletes it to file. So far, Bash and Zsh are the same. If you continue pressing [TAB], bash prints a list of files so you can complete typing the name yourself. Zsh starts cycling through filenames.
2. In Zsh, you can type for example /u/lo/b[TAB] and it automatically expands the path to /usr/local/bin. If multiple paths match the original expression, it shows a list and pressing tab cycles through the options.
Zsh is quite feature-rich, and for the most part a drop-in replacement for Bash. See this slide deck for more Zsh awesomeness:
Windows Terminal uses grayscale instead of subpixel antialiasing by default. They recently added the ability to turn on subpixel antialiasing. (I'm not sure if that's what you mean by "off".)
It looks exactly the same as xterm on my native Linux laptop.
I've even gone as far as running i3 through WSL1 / wsltty and it worked very well with 1 monitor. I stopped using it because I have 2 monitors, but if I had 1 monitor it would have been usable for day to day development.
This is great news. Looks like I neither need a separate Linux VM or dual booting Ubuntu desktop install anymore for testing my software given it will also run on WSL2 on general availability.
Another clever move from Microsoft and the Windows Teams.
VMWare [0] will also support the Hypervisor Platform Api [1] allowing it to run besides WSL2 which uses Hyper-V. VirtualBox is still struggling and runs slow if at all with WSL2 and Hyper-V [2]
This of course has implications on how you setup Docker on a Windows machine, each way having pros and cons.
Ever since Docker became a popular tech, VMware has had little choice: I need docker for my job, so I can't use VMware. That doesn't get them the dollars they want.
I’ve been in the opposite boat for a while. I need virtual box so can’t use docker on windows but it seems that has changed since February so will give that a try
This is a worrisome development. We seem to be heading toward a future where hypervisor drivers can only be provided by Microsoft, and you're out of luck if they don't do the job.
Hypervisors that need more capability are going to have to do some crazy stuff to stay compatible. One option is to save and restore the whole hypervisor state whenever it runs. Another option is to be some sort of boot loader, seizing the hypervisor capability before Windows can get to it.
Type 2 hypervisors are going to be in an interesting state. The Windows bootloader already has a flag you can easily toggle (without removing the Hyper-V role or config) but the problem is more features are starting to depend on Hyper-V being there one layer up (it's a type 1 hypervisor). I'm surprised nested virtualization can't be used for the type 2 hypervisor since Hyper-V picked this feature up a few years back and it seems like that would have solved all of the problems.
Nested virtualization only works when the outer hypervisor supports all the features that the inner hypervisor needs. If the outer hypervisor is Hyper-V, then that limits the inner hypervisor to the features that Hyper-V bothered to implement.
In other words, you can't implement a hypervisor more advanced than Hyper-V.
If you instead want to be on the outside, with Hyper-V on the inside, then you can't just write a driver. You have to implement a boot loader. You also have to implement nested virtualization, even if you otherwise had no need to do so.
Hyper-V is able to nest ESXi and KVM (and Hyper-V of course) and vice versa ESXi and KVM are able to nest Hyper-V. I'm not sure what would be limited.
Yeah that's the difference between a type 1 and type 2 hypervisor. A type 1 runs on the bare metal, a type 2 runs via drivers underneath an existing OS. Since Hyper-V is a type 1 (like ESXi) you can't use a type 2 hypervisor on the root VM to escape being under Hyper-V you either have to do some sort of nesting or disable Hyper-V from loading and reboot.
Heh, it's funny that I'm actually a hypervisor developer and I don't use that terminology. The whole team doesn't. I actually had to look up "type 1" and "type 2" to remind myself which was which. Those are terribly non-descriptive. Our terminology is "bare metal" or "OS" or "boot loader", and "VMX driver". Anyway...
Our hypervisor is far more demanding than ESXi, KVM, and Hyper-V. It needs to interact with low-level Intel processor details in a way that is not supported by any other hypervisor. It won't run correctly if nested inside any other hypervisor. If we supported running under another hypervisor, we would lose important functionality.
If it becomes impossible or impractical to disable Hyper-V, we'll need to do something strange and annoying. Perhaps we could load the driver very early in boot, before Hyper-V loads. Booting as an OS ("type 1", ugh) is an option too, but maintaining that and using it is a real pain. Probably we'd drop Windows host support before we did that.
Question -- from what I understand, WSL2 is closer to Linux running in a VM, whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly correct?
Regarding that, remember a number of years ago, prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process, which ended up functioning similar to running it in a VM. Would WSL2 be closer to this model, or is it really running Linux under a stripped down Hyper V?
Ah, I completely forgot about flinux. Seems there were a lot of neat innovations back in the earlier days, including a couple of single system images (SSI) implementations (the opposite of VMs, making a network of hosts look like a single multiple processor system).
> Question -- from what I understand, WSL2 is closer to Linux running in a VM, whereas WSL1 was like a Windows kernel level version of Cygwin. Is that mostly correct?
Yes, that's essentially correct. You could also think of it as WINE in reverse; one big difference from cygwin is that it runs unmodified binaries rather than needing to recompile.
> prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process
> which I think is still a thing, although not super popular.
Yeah, I compiled a version last week. It's occasionally nice for kernel devs to have an env to try out new ideas, so it more or less gets maintained.
Google's gvisor project is sort of a blend of that and WSL. A reimplementation of the linux syscall layer like WSL, but as a linux process like UML instead of as a kernel module as in WSL.
Did WSL1 not use the same binaries as a regular distro? IIRC it will download regular x86-64 .deb packages straight from e.g. Ubuntu’s APT repositories.
There is a big difference in that WSL1 only needed to implement Linux syscalls, they could use glibc and all other libraries from the Linux distribution that you are running, whereas Wine needs to reimplement all Windows APIs to work with most applications.
Also, Wine is really a program on top of Linux, while personalities are a core feature Windows. At a low level, the Windows kernel is agnostic wrt. the system ABI. Win32 is just one personality of the Windows kernel, just as NT used to have an OS/2 personality to run 16-bit OS/2 programs.
When you boot into Windows 10 normally, you are interacting with applications run by one of these subsystems.
WSL1 is now another of these subsystem.
Like wine, you are getting an API that looks just like Linux.
But, unlike wine, that Linux is a first-class citizen as far as the OS is concerned. It would be straightforward for the Windows devs to connect the Linux subsystem across to the Windows security module (see diagram). There is no analogy for that with Wine on Linux.
Kind of. But from a userland perspective, Cygwin is a (very slow and complicated) layer between the application and the kernel, whereas WSL1 really is (and importantly, feels) like just another API for the exact same kernel. That's kind of its entire advantage over Cygwin, so I wouldn't really compare them like that.
They mean MS replacing the Windows kernel with Linux kernel. Which doesn't sound as crazy as it did just a couple of years ago. Just put all the Windows crap in a VM, similar to WSL2.
I dont understand how that would provide any benefit. First problem, all those lovely windows drivers for every piece of hardware and laptop ever made would need porting to Linux.
While similar in concept, Wine is better than WSL1 in a lot of ways due to supporting sound, graphics, and GPU acceleration.
I've always been suspicious of WSL because it follows a narrative that benefits Microsoft - that Linux is primarily a command-line/server environment, and the graphical and audio applications for Linux are not worthwhile. It doesn't have to be like this. WSL1 was based on an Android environment for Windows Phone called Project Astoria, which did support graphics.
The graphical and audio applications for linux aren't worthwhile, or at least they're not competitive with the top proprietary offerings. It's not really about the theoretical capacity of of linux to support audio and graphics. The low market share of desktop linux makes it not economically worthwhile for top proprietary software companies to port to linux. That's just an unfortunate fact. I don't really want to edit graphics with Gimp when Photoshop exists, and I don't really want to produce music in Ardour when Ableton Live exists.
I think the only real way to fix this is to change the economic incentives by increasing desktop Linux market share, which is a long and uphill battle.
WSL1 can do graphics just fine, if you run the X server in your Windows environment (which is the right way to do this, in any case). There's implementations - forks of Xming, I assume - that are set up to work like that with minimum hassle, e.g. https://x410.dev/
Yeah, I was trying to set up Selenium (testing framework) with WSL 2. Its workable but you need to write more code to hack around WSL limitations on graphical apps. Using Selenium is a much better experience on macOS and desktop Linux.
There are several Windows features that rely on HyperV under the hood. Home supports them. It does not give the user the ability to run their own virtual machines though.
Unfortunately no. This would have been a very useful feature to me since currently I use a Windows laptop to write code to run on a linux gpu server under my desk.
> WSL extension allows for the VS Code UI to run on the Windows side with a VS Code Server running within the WSL VM
This was why I have finally switched away from developing on windows, there's something about the VS remote code server setup that will spawn tons of processes and eventually slow WSL to a crawl. Possibly my fault, I haven't gone through all my extensions and settings carefully, but also not an issue when running VS code on unix without the server.
WSL1 was a great invention but Microsoft gave up on it, either because of the filesystem performance problems or because of the debuggers. https://github.com/microsoft/WSL/issues/2028 (lldb, rr, delve all affected). This looks like a dreaded case of the first 90% is easy, it's the second 90% that is hard. Imagine implementing a translator for a vast majority of Linux syscalls just to find certain flavors of ptrace are just not doable. I do not have insider knowledge to ascertain this happened but this would be my educated guess.
WSL2 is a VM like any other VM with an uncertain promise for better networking experience and even less certain promise for cross OS file performance which is much, much worse than WSL1 which was already abominable. https://github.com/microsoft/WSL/issues/4197#issuecomment-60...
It was a very nice dream, pity it didn't work out.
Because I am using an eGPU Windows 10 needs to stay as the primary OS on the laptop. I bought a little fanless machine from Aliexpress (with laptop-like hardware) for <$300 USD it'll be my home Linux server. What can one do?
I guess https://www.reddit.com/r/VFIO/comments/am10z3/success_thunde... could be a solution if I wanted to go back to Linux primary but I really badly don't want to. Constant hardware headaches were par for the course -- I was solely Linux 2004-2017. I don't want to be again. If there would be a cheap remote sysadmin service... but it doesn't exist. QuadraNet will sysop a server for $39 a month, that'd be awesome for a laptop... but I have never seen anyone doing that.
I guess it's subjective. I've been using Linux on Windows 10 pretty successfully for a year now to do some things that would otherwise be much more inconvenient.
WSL was very cool from a pure tech standpoint, but I've never been clear what the actual use case for it was. WSL2 seems to be more along the lines of coLinux, which I felt the same way about when it was new.
There are a number of use cases where Docker for Mac and Windows are painful compared to Linux, and to overcome those problems (like fs performance on shared volumes) people spend a lot of time building hacky solutions.
I use Docker on macOS daily for work. I love it, and am grateful for it, but the experience is NOTHING like using Docker on Linux. Docker for macOS runs in a virtual machine, and requires dedicating RAM to the daemon. You aren’t directly using the host OS’ kernel either, which can lead to wonky behavior, especially in regards to networking (IME).
- Bind mount performance is appalling, even with the delegated/cached modes. I understand the reasons for this, but it's still a major issue for some workloads. To use PHP development as an example, where a popular framework boot-up can read hundreds of files per request (as well as writing out to caches), it's not uncommon to see 5 second response times for a page that displays "hello world" and nothing else. Thankfully there are tools like docker-sync and Mutagen which, while it's one extra thing to set up, get you back to nearly native performance.
- com.docker.hyperkit is nuts. I can have a single container idling in the background doing nothing, hear my laptop fans spin up, and know without checking that com.docker.hyperkit is using 200% CPU for no discernible reason. Restarting the daemon brings things back down...for a while.
At the office we use Linux, but since I've been working from home on my Mac I've gone back to Vagrant for as many projects as I can. Heavier and far less easy to orchestrate yes, but I've found I actually end up with better and more predictable performance (and far less time with my laptop doing double duty as a space heater).
Docker Desktop 2.1.x with WSL1 works amazingly well.
I've been running this set up for over a year and the volume performance is superb.
Flask, Phoenix, Rails and Webpack driven apps are all a fantastic experience. For example Webpack takes 150ms to compile SCSS / ES6 JS diffs for large real world projects. Web server reloads on code change are effectively instant and I get microsecond response times in some Phoenix apps in development.
This is on 6 year old hardware too and the source code isn't even sitting on an SSD (but Docker Desktop is installed on an SSD).
In all cases, everything is running in Docker through Docker Deskop and I use the Docker CLI / Docker Compose in WSL as a client to connect to Docker Desktop.
Docker runs in a VM on macOS, with significant penalties to filesystem speed. I haven't used it for a few years, but booting the large Rails app I work on was several times slower under Docker.
well, I definitely wouldn't use MS-DOS, because it doesn't support node or docker, but also because it's been obsolete since before Terminal.app existed.
One of my main pain points in Windows is that the terminal app options are so crap compared to iterm2 or even the plain terminal app. The app itself is definitely a draw too
None, as I stay away from them as far I can avoid them, Java and .NET are perfectly fine and IDEs have docker support in case I really need to deal with it.
Nah, you just target Windows with toolchains that support Windows natively, like I am expected to target UNIX with toolchains that support UNIX natively.
Your statement goes into both directions.
Guess why "Year of Linux Desktop" has failed to happen, and no, ChromeOS and Android aren't really GNU/Linux, the kernel is irrelevant to userspace languages and public APIs.
Well, if you want to use multimedia and do web development on the same machine, what are you going to do? Linux support is somewhere between nonexistent and utterly broken for the first one and the same can be said for the second on Windows. So your choices are, 1. run Linux primary, put Windows in a VM 2. run Windows primary and put Linux in a VM 3. Give up and just run a separate Linux server.
There are about 5000 of us who did choose a laptop for its keyboard and pointer: it's the ThinkPad 25 Anniversary Edition. I have an SK-8855 already and also ordered the new TEX Shinobi so my unwavering stance on my laptop needing a proper keyboard+pointer might change but for now my choice of weapon is the TP25.
The Linux multimedia story improves significantly if you avoid Nvidia GPU hardware. My work desktop (AMD Radeon) and laptop (Intel HD Graphics) work fine, and perform as the hardware should.
This seems like comment from early 2000s. I don't remember last time I head problems with BT or sound, and I went through dozen of installations in last 3 years (for me and others). I had to give up on Nvidia drivers but Intel graphics serves me great.
And these were times when I needed community help, most of the time I could get it working by pairing again or some such nonsense. It never worked reliably, in general.
Note I switched to Windows as my daily driver in 2018 January.
Canonical broke wlan and OpenGL for many of us when they decided to replace fully working closed source drivers, with work in progress open source replacements.
So even Ubuntu isn't necessarily a guarantee of stability.
Yes. Yes, I did. At least with Arch I could keep on working because only one of BT / printer / scanner broke on update, most of the production bits kept working. When I ran Ubuntu the system shattered every six months so badly I couldn't work for 2-3 days.
Been running some flavour of Debian for > 10 years. Now on my dell XPS 13 9350. Upgraded to Debian 10, a kernel regression broke the brcfmac driver for my Broadcom wireless. Now I need to disable power saving on the WiFi card. Still, sometimes the WiFi card just dies. Sometimes reloading the kernel module works, sometimes only a hard reset will do.
Broadcom unfortunately has never been well supported on Linux. I've always used ThinkPads for running Linux and have never had these sorts of hardware issues (and I keep laptops for at least 8 years). You need to buy a machine with running Linux in mind (or more specifically, Debian, which has even less out-of-the-box hardware support for laptops).
> Web development on Windows has been like surfing for those of us doing Java and .NET web development, since like ever.
This similitude baffles me. Do you mean "had to wear protective equipment, had to drive constantly between locations, we were knocked over every few seconds, and we risked drowning several times"...?
It means riding the top wave while enjoying the Sun, hearing the cool background music coming from the loudspeakers on the beach, and feeling like a champion.
What problems did you experience in web development on Windows? I worked with Linux, Mac and Windows, but I didn‘t have any problems on any platform with a typical modern webpack/react/angular/typescript/elm etc.. stack. Even docker support with Hyper-V is okay imho.
I use it all the time. I develop software for Windows but being able to use various Linux utilities and software is super convinient.
Many of them have ports to Windows but it's just easier when it's all already available. Some days ago I needed to run some penetration test software and while supposedly I should be able to download the code myself and build in Windows, just installing using apt is a lot easier.
Development. At work we rely heavily on it to get work done because having an almost-linux-like environment is much better than having to run a WAMP stack or similar silly stuff.
It's made mine and my coworkers lives so much easier compared to before, so I'm certain use cases exist. Since WSL2 runs on HyperV, for some of my coworkers it's not an option, since they rely on VMware and similar for other essential work.
I haven't used all variants of VMs but my experience with VMs is very different from WSL2. For example:
* Smooth set up. Don't have to install some large commercial 800MB MSI like VMware workstation, download some Linux image, go through partitioning of file system etc.
* Well integrated. I can open up a terminal and it acts as any other window in my system (meaning I don't get the window in a window effect as you get with a new VM).
* My file system is mapped automatically. No need to set up Shared Folders or whatever manually.
* Better startup perf. WSL starts in a second on my computer. Never had the same experience with full VMs. Even if I use something like alpine just starting VMware or VirtualBox takes a lot longer than starting WSL.
Saying it is like any other VM seems just incorrect. Saying it didn't work out seems even more misguided.
I have been using multipass very successfully the past few weeks. It's a full fat VM and has an experience very similar to that of WSL. https://multipass.run/
> Saying it didn't work out seems even more misguided.
That may be, but the rest of your comment seems to be unrelated to the matter at hand since you merely listed some advantages of WSL2 instead of addressing the disadvantages that are causing people trouble.
NT supports process monitoring, inspection, and alteration in a manner that's already basically a superset of ptrace. As I mentioned in another comment, I can imagine some internal resistance to adding the necessary hooks for complete support eventually making WSL1 infeasible to support --- but for social infeasibility, not technical infeasibility.
Big companies that employ lots of smart people frequently seize up and become incapable of innovating because their internal parts mesh against each other and halt the whole machine. I suspect that's what happened here.
There was a MS employee on twitter the other day (sorry, I forgot who) saying it was because there were legal issues with naming something with a title that has someone else's trademark as the first word.
That completely makes sense in my mind just because my favorite reddit app is called slide for reddit. I think reddit forced everyone to use x for Reddit in their name as opposed to Reddit X.
Reddit did exactly that, like five or six years ago. A bunch of apps had to change their names, which is how you end up with apps like "rif is fun for Reddit," where the first part stands for "Reddit is Fun."
People commonly say that, but with WSL 1 it was technically quite correct: it’s a Windows Subsystem, for providing Linux. Linux Subsystem for Windows would arguably be slightly inaccurate. The name just feels so strange because Windows hasn’t had many such Subsystems (win32 has essentially been the only one this century).
Under WSL2, the WSL name is no longer technically accurate at all, but it’s what everyone knows it as, and the difference normally doesn’t matter, so they keep it.
I think of it as "Windows Subsystem for [running] Linux".
The architecture descends from the Windows NT architecture:
The user mode layer of Windows NT is made up of the "Environment subsystems", which run applications written for many different types of operating systems, and the "Integral subsystem", which operates system-specific functions on behalf of environment subsystems.
Though as other users pointed out, in WSL 2, the name is inaccurate.
Does anyone know if WSL2 supports utf8 characters in filenames, such as ":" and "<>" etc?
WSL had a limitation that it couldn't display such characters when I accessed a Linux parition through Samba. I know there is a Samba workaround for name mangling, but I prefer to access the actual filenames as created by org-mode.
Edit: Samba was running in an Alpine VM that mounted a ZFS partition. The network folder was mounted through Windows.
On a Win10 host, I want to edit code in sublime and have the runtime environment in linux. I want fast code search and fast build times.
I've found no way to accomplish the above.
Code in Windows + Windows Sublime means build in WSL will be slow because cross-os i/o
Code in Linux + Windows Sublime means code search will be slow because cross-os i/o
Code in Linux + Linux Sublime + Winodws Xserver means interface is laggy because, well, Xserver
VSCode gets around this by running in a client/server model with client on Windows and Server in Linux... but then I'm stuck with an Electron based editor instead of Sublime.
What Electron-related problems have you had with VSCode? I've been using it as my primary for a few years now and it's been nothing but stellar. And that integration sounds incredibly cool.
The electron hate really is getting old. vscode and some other electron apps run far faster than many comparable programs with a more traditional architecture. Yes electron could be considered inelegant, but so can a great many things in computing. If it works, we should use it.
Yep. If anything, "old-school" Visual Studio is the one that feels bloated by comparison, despite being a native app. Software quality cannot be reduced to the choice of language or framework.
VSCode is truly a full-fledged IDE for TypeScript at least, and via plugins it can play the part for several other languages, including Rust. Mostly those depend on the quality of their Language Server implementations.
When I tried VSCode a year ago, I found it to have an input lag, compared to sublime.
Given your comments, I just installed it right now to try it out again. I like the built in terminal & git integration. Code search performance is excellent (w/ code hosted in WSL) due to this new client/server model... and there was no input lag in the editing window.
The only lag I noticed was in CTRL-P selector, but that's a small compromise given the client/server model solves the real time waster.
I think I'm going to try it out over the next few weeks :)
Not an Electron-related problem, just a general issue: What made me give up on VSCode after trying to make it work again(this March) was the fuzzy search just not being very good in my Rails projects. I can ctrl-shift-r in sublime and get to the method definition I want in 4-5 characters. It's probably my primary code navigation technique: see a thing, wanna check the def, 1-2 seconds later I'm there.
There's some VSCode extension that claims to mimic this but the fuzzy search seems much worse and it just doesn't quite work. Yes you can use the solargraph extension to sort of go to the def in vscode and it does all sorts of cool things, but I just never got into it.
It seems like a small thing but I just couldn't get over it, because I do it so often.
The main other difference is I much prefer the GitSavvy Sublime text extension to VSCode's built-in git handling. Particularly how I can see a summary of the commit I am making in GitSavvy whereas there doesn't seem to be a way to get all the file changes in one screen in VSC(though to be fair I didn't look around much for a way to do this, there probably is an option somewhere).
That being said if fuzzy search was working the same as in Sublime, I'd probably switch to Code.
Yeah, its level of support for different languages definitely varies. For TypeScript it feels like a paid IDE. For Rust and Clojure it works quite admirably, since it's the most prominent free (graphical) option for each. For Python, it's... underwhelming. That's too bad about Rails, but I also can't say I'm super surprised.
Or most open source non-windows software work. So many tools run great (or only run) under Linux, and dev tooling for these projects is also heavily Linux-centric. Often you might be able to get a package working under Windows, but support is thin and it's prone to breakage. Easier to just run it under Linux in a VM, like what WSL2 is doing.
419 comments
[ 3.4 ms ] story [ 343 ms ] threadBoy, do I love unzipping tarbars! On a more serious note, it’s great that WSL has gotten much faster, although it’s a little disappointing that they threw out the older, more interesting architecture to get it and just used a VM.
I also wonder how integration changes with sockets/networking, hardware access, Windows Firewall, etc. Last I checked, relations with Windows Firewall were strained by the lack of proper support for picoprocesses.
Starting up VS Code on a machine with WSL2 immediately gives you the option to use it as the VS Code environment, it is pretty great.
* The Linux filesystem shows up in Windows as a disk even when the underlying VM is not booted, you can see an example here: https://redmondmag.com/articles/2020/04/08/~/media/ECG/redmo...
* And for me the nice one is the integration with VS Code, I just select which distro I want to work in and VS Code will start it (if it isn't running), connect to it as a remote dev environment, and be able to control it as if the VM were within VS Code. It can be done manually with VirtualBox, but VirtualBox gives me no advantages in return.
* The networking implementation makes both 127.0.0.1 which is occasionally useful for me.
Also slim CentOS image boots, well, not in one second, but something like 5 seconds. Fast enough IMO.
How does hyper-V cripple other VM software?
I just had to enable it to use a prebuilt VM I need, now I’m a little worried
Apparently they claim that as of February 19, 2020, they've "Restored the ability to run VMs through Hyper-V, at the expense of performance". https://www.virtualbox.org/wiki/Changelog-6.1
Though I remember it working at some point before that, too...
It's almost like Oracle is trying to upsell VM servers at the expense of the day-to-day operations of the once well regarded open source project they maintain?~
https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes
I don't really grok this, does this mean Hyper-V will be available on Windows 10 Home? That's the only reason I am considering buying a pro license.
The above commenter linked to a far more thorough explanation https://superuser.com/questions/1208850/why-cant-virtualbox-...
no. not together. Still a limitation of the virtualization extensions.
Although, I don’t know if both kinds of VMs can run in parallel. I recall at least doing so with VMWare in the past.
The thing is, when enabling Hyper-V on Windows, you can’t do anything without fully rebooting. On Linux I know for a fact you do not need to reboot to switch between VMs.
This is being addressed, as discussed by commenter below [1] and at [2].
[1] https://news.ycombinator.com/item?id=22874047
[2] https://blogs.vmware.com/workstation/2020/01/vmware-workstat...
You also can't nor search/modify your Linux files directly from Windows like I mentioned. The 9P server with WSL1 has been so slow as to be unusable for some directories when I try to use it. Does it feel native SSD-speed on WSL2?
As for RAM, does it really share RAM with Windows? That's great news if it does, but I don't think I've seen any VMs do this, though I've never tried it with Hyper-V... if it does, I'm guessing that's what lets it use memory ballooning?
WSL2 is the first thing to legit make me reconsider my daily-driver Fedora setup in...well, since I started using it in ~2016. I just do not think about it, it's great.
And yes the \\wsl$ is the 9P server I just tried to explain is incredibly slow compared to normal files on WSL1. I haven't tried WSL2 yet but I don't expect going through a VM would be faster.
I never used WSL1 in anger, but accessing WSL2 over the \\wsl$ is not particularly slow. It's not as fast as native, but I don't notice it. I do almost all of my access of files on the Linux image via a terminal and VSCode-over-WSL-Remote, though.
This isn't about using it "in anger". I'm not pushing it to some kind of corner case, you just need to use it for real instead of trying hello-world examples. You notice this immediately as you're dealing with nontrivial folder contents. To give you an idea, this is the speed of raw grep from inside WSL1 Ubuntu:
This is the speed from \\wsl$ (MSYS2): And this is the speed on the raw files from Windows (MSYS2): \\wsl$ is literally some 60x-70x slower than direct access, and it's not because I'm "using it in anger". If you don't believe me, try it yourself with any program you prefer and see if you get similar speed before you tell me I'm wrong.This is par for the course on \\wsl$. Explorer lags, too, if you try to browse a folder with a bunch of subfolders that actually have some contents. It's plain as daylight to me. Not noticing to me is like not noticing that your car suddenly goes 1mph instead of 65mph.
WSL2 is much much faster.
With WSL 1 installing an Ubuntu package or performing an upgrade was unbearably slow, with WSL 2 it feels normal.
\\wsl$ is also much faster, yes
First command ran from a zsh Terminal session in WSL
Second one ran from a powershell session using the wsl "bridge" executable.
Just like what you normally use with a Hyper-V VM. A resizable VHD which grows but not shrinks, and with a size limit. Heck they even have a document on what to do when you exceed the default 256GB limit: https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes...
https://github.com/docker/for-mac/issues/77
https://docs.docker.com/docker-for-mac/osxfs/#performance-is...
[0] https://github.com/linux-noah/noah
With OSX, the terminal experience is great, no need for a "WSL" over there!
https://github.com/ish-app/ish
https://github.com/linux-noah/noah
They have varying stages of support for Linux syscalls.
I'm looking at selling my Mac and just getting an iPad to replace it - running Windows 10 + WSL + VSCode on my desktop pc is more pleasant for me to code at home with than my macbook.
Nix is probably not supported on MSYS, but YMMW. I'd love to have something like it on Windows.
The new Terminal app is great too. I've got all the same split pane stuff that I rely on in iTerm, including useful keyboard shortcuts for switching between them and resizing them. I'm very impressed.
Thanks
I switched to windows insider to get it, but WSL2 should hit GA in the next month or two.
Win10 is just a little less... elegant than OSX. But not in a way that really bothers me on a day to day basis.
I can also run Linux docker images now.
Edit: learning that WSL2 does away with the syscall-translating tech and mandates Hyper-V, the question of whether to look into this further becomes thornier!
Zsh have a long list of nice features that Bash lacks. Two of my favourites:
1. Imagine you are in a directory with file1.ext and file2.ext. You type f[TAB], it autocompletes it to file. So far, Bash and Zsh are the same. If you continue pressing [TAB], bash prints a list of files so you can complete typing the name yourself. Zsh starts cycling through filenames.
2. In Zsh, you can type for example /u/lo/b[TAB] and it automatically expands the path to /usr/local/bin. If multiple paths match the original expression, it shows a list and pressing tab cycles through the options.
Zsh is quite feature-rich, and for the most part a drop-in replacement for Bash. See this slide deck for more Zsh awesomeness:
https://www.slideshare.net/jaguardesignstudio/why-zsh-is-coo...
You can get it via the Microsoft Store and it comes with support for connecting to WSL, Powershell, and cmd.exe out of the box.
Been using terminal and 2 row powerline. It’s amazing. Hard to go back to conemu or similar in windows.
Screenshots of my terminal and set up are in my dotfiles https://github.com/nickjj/dotfiles.
It looks exactly the same as xterm on my native Linux laptop.
I've even gone as far as running i3 through WSL1 / wsltty and it worked very well with 1 monitor. I stopped using it because I have 2 monitors, but if I had 1 monitor it would have been usable for day to day development.
It supports tab, and is very configurable (thankfully there is a search box in the settings dialog!)
Can't recommend it enough.
Another clever move from Microsoft and the Windows Teams.
This of course has implications on how you setup Docker on a Windows machine, each way having pros and cons.
[0] https://blogs.vmware.com/workstation/2020/01/vmware-workstat...
[1] https://docs.microsoft.com/en-us/virtualization/api/hypervis...
[2] https://forums.virtualbox.org/viewtopic.php?p=473538
Hypervisors that need more capability are going to have to do some crazy stuff to stay compatible. One option is to save and restore the whole hypervisor state whenever it runs. Another option is to be some sort of boot loader, seizing the hypervisor capability before Windows can get to it.
That'll be some tough code to debug.
In other words, you can't implement a hypervisor more advanced than Hyper-V.
If you instead want to be on the outside, with Hyper-V on the inside, then you can't just write a driver. You have to implement a boot loader. You also have to implement nested virtualization, even if you otherwise had no need to do so.
Yeah that's the difference between a type 1 and type 2 hypervisor. A type 1 runs on the bare metal, a type 2 runs via drivers underneath an existing OS. Since Hyper-V is a type 1 (like ESXi) you can't use a type 2 hypervisor on the root VM to escape being under Hyper-V you either have to do some sort of nesting or disable Hyper-V from loading and reboot.
Our hypervisor is far more demanding than ESXi, KVM, and Hyper-V. It needs to interact with low-level Intel processor details in a way that is not supported by any other hypervisor. It won't run correctly if nested inside any other hypervisor. If we supported running under another hypervisor, we would lose important functionality.
If it becomes impossible or impractical to disable Hyper-V, we'll need to do something strange and annoying. Perhaps we could load the driver very early in boot, before Hyper-V loads. Booting as an OS ("type 1", ugh) is an option too, but maintaining that and using it is a real pain. Probably we'd drop Windows host support before we did that.
Regarding that, remember a number of years ago, prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process, which ended up functioning similar to running it in a VM. Would WSL2 be closer to this model, or is it really running Linux under a stripped down Hyper V?
Yes, that's essentially correct. You could also think of it as WINE in reverse; one big difference from cygwin is that it runs unmodified binaries rather than needing to recompile.
> prior to VMs there was a patch set for the Linux kernel porting it to user space -- so you could run Linux as a user process
User Mode Linux (UML; https://en.wikipedia.org/wiki/User-mode_Linux), which I think is still a thing, although not super popular.
> Would WSL2 be closer to this model, or is it really running Linux under a stripped down Hyper V?
Not even stripped down; it's running Hyper V. (This is one of the big problems with WSL2; if you use it, you can't use non-HyperV virtualization.)
Yeah, I compiled a version last week. It's occasionally nice for kernel devs to have an env to try out new ideas, so it more or less gets maintained.
Google's gvisor project is sort of a blend of that and WSL. A reimplementation of the linux syscall layer like WSL, but as a linux process like UML instead of as a kernel module as in WSL.
Also, Wine is really a program on top of Linux, while personalities are a core feature Windows. At a low level, the Windows kernel is agnostic wrt. the system ABI. Win32 is just one personality of the Windows kernel, just as NT used to have an OS/2 personality to run 16-bit OS/2 programs.
WSL1 shows off a character of the Windows kernel, Environment Subsystems: https://en.wikipedia.org/wiki/File:Windows_2000_architecture... (top right)
When you boot into Windows 10 normally, you are interacting with applications run by one of these subsystems.
WSL1 is now another of these subsystem.
Like wine, you are getting an API that looks just like Linux.
But, unlike wine, that Linux is a first-class citizen as far as the OS is concerned. It would be straightforward for the Windows devs to connect the Linux subsystem across to the Windows security module (see diagram). There is no analogy for that with Wine on Linux.
Kind of. But from a userland perspective, Cygwin is a (very slow and complicated) layer between the application and the kernel, whereas WSL1 really is (and importantly, feels) like just another API for the exact same kernel. That's kind of its entire advantage over Cygwin, so I wouldn't really compare them like that.
Apparently Windows XP was going to do that, then it was Vista with its DX 10 drivers, then WinRT, then Win10,....
It takes time to replace the crap apparently.
Though Wine is quite good.
I've always been suspicious of WSL because it follows a narrative that benefits Microsoft - that Linux is primarily a command-line/server environment, and the graphical and audio applications for Linux are not worthwhile. It doesn't have to be like this. WSL1 was based on an Android environment for Windows Phone called Project Astoria, which did support graphics.
I think the only real way to fix this is to change the economic incentives by increasing desktop Linux market share, which is a long and uphill battle.
[1] https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#does-w...
Regarding hyper-v they are only making necessary component needed for wsl2 available.
\\wsl$\Ubuntu-18.04\home\username
This was why I have finally switched away from developing on windows, there's something about the VS remote code server setup that will spawn tons of processes and eventually slow WSL to a crawl. Possibly my fault, I haven't gone through all my extensions and settings carefully, but also not an issue when running VS code on unix without the server.
WSL1 was a great invention but Microsoft gave up on it, either because of the filesystem performance problems or because of the debuggers. https://github.com/microsoft/WSL/issues/2028 (lldb, rr, delve all affected). This looks like a dreaded case of the first 90% is easy, it's the second 90% that is hard. Imagine implementing a translator for a vast majority of Linux syscalls just to find certain flavors of ptrace are just not doable. I do not have insider knowledge to ascertain this happened but this would be my educated guess.
WSL2 is a VM like any other VM with an uncertain promise for better networking experience and even less certain promise for cross OS file performance which is much, much worse than WSL1 which was already abominable. https://github.com/microsoft/WSL/issues/4197#issuecomment-60...
It was a very nice dream, pity it didn't work out.
Because I am using an eGPU Windows 10 needs to stay as the primary OS on the laptop. I bought a little fanless machine from Aliexpress (with laptop-like hardware) for <$300 USD it'll be my home Linux server. What can one do?
I guess https://www.reddit.com/r/VFIO/comments/am10z3/success_thunde... could be a solution if I wanted to go back to Linux primary but I really badly don't want to. Constant hardware headaches were par for the course -- I was solely Linux 2004-2017. I don't want to be again. If there would be a cheap remote sysadmin service... but it doesn't exist. QuadraNet will sysop a server for $39 a month, that'd be awesome for a laptop... but I have never seen anyone doing that.
Tell me which you would rather use for node and or docker development.
- com.docker.hyperkit is nuts. I can have a single container idling in the background doing nothing, hear my laptop fans spin up, and know without checking that com.docker.hyperkit is using 200% CPU for no discernible reason. Restarting the daemon brings things back down...for a while.
At the office we use Linux, but since I've been working from home on my Mac I've gone back to Vagrant for as many projects as I can. Heavier and far less easy to orchestrate yes, but I've found I actually end up with better and more predictable performance (and far less time with my laptop doing double duty as a space heater).
I've been running this set up for over a year and the volume performance is superb.
Flask, Phoenix, Rails and Webpack driven apps are all a fantastic experience. For example Webpack takes 150ms to compile SCSS / ES6 JS diffs for large real world projects. Web server reloads on code change are effectively instant and I get microsecond response times in some Phoenix apps in development.
This is on 6 year old hardware too and the source code isn't even sitting on an SSD (but Docker Desktop is installed on an SSD).
In all cases, everything is running in Docker through Docker Deskop and I use the Docker CLI / Docker Compose in WSL as a client to connect to Docker Desktop.
It's all documented at https://nickjanetakis.com/blog/setting-up-docker-for-windows....
I have WSL1 installed, but very seldom feel the need to actually use it.
These days, there's the Windows Terminal, which is fine, surely, https://www.microsoft.com/en-us/p/windows-terminal-preview/9...
Your statement goes into both directions.
Guess why "Year of Linux Desktop" has failed to happen, and no, ChromeOS and Android aren't really GNU/Linux, the kernel is irrelevant to userspace languages and public APIs.
Not sure why you'd use or mention 'MS-DOS' since that stopped being a thing about 20 years ago, a decade before node existed.
Most people choose their laptops based on the OS, not on the pointing device.
However my T420 and X220 still perform excellently even after 9 years.
https://bbs.archlinux.org/viewtopic.php?id=204875 2015 November
https://bbs.archlinux.org/viewtopic.php?id=206032 2015 December
https://bbs.archlinux.org/viewtopic.php?id=210685 2016 March.
And these were times when I needed community help, most of the time I could get it working by pairing again or some such nonsense. It never worked reliably, in general.
Note I switched to Windows as my daily driver in 2018 January.
It seems sound is still a gigantic mess of PulseAudio and ALSA https://wiki.archlinux.org/index.php/PulseAudio
So even Ubuntu isn't necessarily a guarantee of stability.
Bluetooth has never worked.
2006 was for me the turning point where Linux was only used via VMs or some remote box.
WSL2 is just fine, I don't need to mess with VMWare any longer.
And if I am not doing Linux deployments, I can do plain Windows development, like I have done since Windows 3.0.
For the Linux desktop experience I have a surviving ASUS netbook.
This similitude baffles me. Do you mean "had to wear protective equipment, had to drive constantly between locations, we were knocked over every few seconds, and we risked drowning several times"...?
Most decent languages work great cross platform. I'm not sure what I'm supposed to be missing.
To be frank, the only think that bothers me about web dev on Windows is that the Elixir repl doesn't support "up" for editing the previous command.
Many of them have ports to Windows but it's just easier when it's all already available. Some days ago I needed to run some penetration test software and while supposedly I should be able to download the code myself and build in Windows, just installing using apt is a lot easier.
Maybe there was also some long term goals, like making Windows better platform for Linux software in general (server use).
It's made mine and my coworkers lives so much easier compared to before, so I'm certain use cases exist. Since WSL2 runs on HyperV, for some of my coworkers it's not an option, since they rely on VMware and similar for other essential work.
* Smooth set up. Don't have to install some large commercial 800MB MSI like VMware workstation, download some Linux image, go through partitioning of file system etc.
* Well integrated. I can open up a terminal and it acts as any other window in my system (meaning I don't get the window in a window effect as you get with a new VM).
* My file system is mapped automatically. No need to set up Shared Folders or whatever manually.
* Better startup perf. WSL starts in a second on my computer. Never had the same experience with full VMs. Even if I use something like alpine just starting VMware or VirtualBox takes a lot longer than starting WSL.
Saying it is like any other VM seems just incorrect. Saying it didn't work out seems even more misguided.
That may be, but the rest of your comment seems to be unrelated to the matter at hand since you merely listed some advantages of WSL2 instead of addressing the disadvantages that are causing people trouble.
Big companies that employ lots of smart people frequently seize up and become incapable of innovating because their internal parts mesh against each other and halt the whole machine. I suspect that's what happened here.
https://docs.microsoft.com/en-us/cpp/build/reference/subsyst...
After WSL was dropped in favor of the VM approach in WSL2 it’s just a zombie name though I think?
Under WSL2, the WSL name is no longer technically accurate at all, but it’s what everyone knows it as, and the difference normally doesn’t matter, so they keep it.
The architecture descends from the Windows NT architecture:
Though as other users pointed out, in WSL 2, the name is inaccurate.>Because we cannot name something leading with a trademark owned by someone else. > >Think of it as Windows' Subsystem for Linux. >#ApostrophiesMatter
Just be glad we didn't call it Subsystem For Running POSIX/GNU/Linux Binaries on Windows (SFRPGLBW)
WSL had a limitation that it couldn't display such characters when I accessed a Linux parition through Samba. I know there is a Samba workaround for name mangling, but I prefer to access the actual filenames as created by org-mode.
Edit: Samba was running in an Alpine VM that mounted a ZFS partition. The network folder was mounted through Windows.
I've found no way to accomplish the above.
Code in Windows + Windows Sublime means build in WSL will be slow because cross-os i/o
Code in Linux + Windows Sublime means code search will be slow because cross-os i/o
Code in Linux + Linux Sublime + Winodws Xserver means interface is laggy because, well, Xserver
VSCode gets around this by running in a client/server model with client on Windows and Server in Linux... but then I'm stuck with an Electron based editor instead of Sublime.
"source code editor" vs full fledged IDE
It doesn't make much sense to compare the two in general imho.
Given your comments, I just installed it right now to try it out again. I like the built in terminal & git integration. Code search performance is excellent (w/ code hosted in WSL) due to this new client/server model... and there was no input lag in the editing window.
The only lag I noticed was in CTRL-P selector, but that's a small compromise given the client/server model solves the real time waster.
I think I'm going to try it out over the next few weeks :)
There's some VSCode extension that claims to mimic this but the fuzzy search seems much worse and it just doesn't quite work. Yes you can use the solargraph extension to sort of go to the def in vscode and it does all sorts of cool things, but I just never got into it.
It seems like a small thing but I just couldn't get over it, because I do it so often.
The main other difference is I much prefer the GitSavvy Sublime text extension to VSCode's built-in git handling. Particularly how I can see a summary of the commit I am making in GitSavvy whereas there doesn't seem to be a way to get all the file changes in one screen in VSC(though to be fair I didn't look around much for a way to do this, there probably is an option somewhere).
That being said if fuzzy search was working the same as in Sublime, I'd probably switch to Code.
(I tried rewording this question a few times to not sound snarky, but failed.)
Java and .NET Web development has been perfectly fine the last decades.
Also node is not going to stop downloading the whole Internet regardless of the host OS.
WSL2 in particular lets me use a BTRFS partition and expose it to windows with a lot less awkwardness than the VM I had before.