Live data from Hacker News

Windows Subsystem for Linux: The lost potential

jmmv.dev

61–70 of 250 posts

Re: Windows Subsystem for Linux: The lost potential

#61

This is a really interesting article, and WSL 1 was a testament to Dave Cutler's vision for the NT architecture re: support for multiple operating environments (read 'Showstopper!' for more background). Also, as someone hacking with a custom OS kernel in their spare time, I found this quote illuminating when it comes to understanding the lower level: > A user-space process is a collection of binary instructions that…

WSL 1 actually doesn't use the NT subsystem architecture like SFU/Interix did (and this article implies). Instead WSL 1 was implemented with a relatively new feature called "pico processes". See: https://docs.microsoft.com/en-us/archive/blogs/wsl/pico-proc...

Re: Windows Subsystem for Linux: The lost potential

#62
I don’t have a dog in this fight, nor any experience with Windows since 7, nor much familiarity with the various low level differences that might make WSL 1 the giant ball of asterisks and footnotes and incompatibilities that I can intuitively imagine based on the conceptual explanation. That said, as a Mac user—a system with a great deal more common heritage with Linux—knowing that such a compatibility approach for (say) Docker hasn’t even been attempted, despite the huge amount of developer goodwill it could generate, because the OSes are so significantly different... I’m impressed that WSL 1 was even tried.

Also as such an outsider, I have to wonder if a similar approach in the opposite direction (bring core Windows APIs more in line with *nix, build traditional Windows environment compatibility layers on top for existing software, eventually become a Linux) might have been a more expensive but more successful and future proof approach. Even so, that sounds (even in the abstract) a lot to ask. Even from one of the largest software vendors in existence.

I’m sure there’s a ton of details I’m missing or getting confused, but it’s interesting brain food for me as someone fully in the Apple ecosystem but perpetually casually watching the MS ecosystem and its improvements as a backup plan.

Re: Windows Subsystem for Linux: The lost potential

#63

Not sure I agree with this write up. Microsoft can and is already plumbing various host bits into the guest virtual machine (e.g. GPU). There's nothing preventing them from exposing processes, per the author's wishes, but it really comes down to -- do folks really need/want that? If so, file an issue in the WSL repository and get the ball rolling!

[deleted]

Re: Windows Subsystem for Linux: The lost potential

#64
post #53

I too was really sad to see WSL 1 be replaced by what seems to be just a built-in VM. One of the great things about WSL 1 is that I can run Linux tools on my laptop without the memory overhead of a VM. My laptop only has 8GB of ram which is not enough for Windows and a Linux VM to comfortably share, but plenty to run the Linux tooling I want under WSL 1. On my desktop with 16GB of ram I can just run Virtualbox. WSL 2…

Most windows laptop has user-accessible ram slots. You might be able to upgrade your ram and save yourself some trouble.

Re: Windows Subsystem for Linux: The lost potential

#65
post #24

Earlier quoted context omitted.

I agree with the sentiment but, some scenarios have become orders of magnitude more complicated on WSL2 like connecting to a daemon on Windows or vice versa. I understand clear cut security boundaries and separate network interfaces, but it's extremely hard to get them running smoothly now. Everything was on localhost on WSL1. Memory usage has also gone bonkers with the VM approach, causing unnecessary overhead for c…

I apologize if I'm missing something here, but if casual users don't care about performance, what's the overhead here?

Example: on WSL1 I could cheaply run Linux CS labwork including valgrind checks etc. - with less resources and much snappier than with VirtualBox VMs

I'm not confident about diving into WSL2.

Re: Windows Subsystem for Linux: The lost potential

#66

Earlier quoted context omitted.

Even within Explore to mount a remote linux server over ssh?

why would you need that if you have the command line functionality already? Windows has shipped with sftp for a while now. about the only think missing is a stand alone ssh client on the windows side but for that there is putty.

I like my GUIs when they're more efficient. All major Linux file managers and the Mac OS one support sftp mounts graphically.

Re: Windows Subsystem for Linux: The lost potential

#67
post #24

Earlier quoted context omitted.

I agree with the sentiment but, some scenarios have become orders of magnitude more complicated on WSL2 like connecting to a daemon on Windows or vice versa. I understand clear cut security boundaries and separate network interfaces, but it's extremely hard to get them running smoothly now. Everything was on localhost on WSL1. Memory usage has also gone bonkers with the VM approach, causing unnecessary overhead for c…

WSL1 hasn't gone away for those who prefer it. But we're talking about an extra gigabyte. It's still cheaper than a full VM.

It's even cheaper to only use what you need with msys2!

bash inside mintty gives me all I need, with minimal overhead.

Eventually, I'd like to see bash inside Windows Terminal made easily available - complete that with busybox, and you cover 90% of the Linux usecases without having to download anything (a bit like how starting Terminal.app offers most of what you need on MacOS)

Add an option to install packages using msys2/pacman for the power users, and I believe most people would not waste time (or disk space, or ram) playing with WSL1 or WSL2 just to run the one thing they may need.

Re: Windows Subsystem for Linux: The lost potential

#68
post #24

Earlier quoted context omitted.

I agree with the sentiment but, some scenarios have become orders of magnitude more complicated on WSL2 like connecting to a daemon on Windows or vice versa. I understand clear cut security boundaries and separate network interfaces, but it's extremely hard to get them running smoothly now. Everything was on localhost on WSL1. Memory usage has also gone bonkers with the VM approach, causing unnecessary overhead for c…

WSL1 hasn't gone away for those who prefer it. But we're talking about an extra gigabyte. It's still cheaper than a full VM.

It's clear that they are not enthusiastic about delivering new features to WSL1. Consider how WSL2 now exclusively features CUDA support, Wayland support, loop mounts, Docker, etc.

Re: Windows Subsystem for Linux: The lost potential

#69

Earlier quoted context omitted.

I apologize if I'm missing something here, but if casual users don't care about performance, what's the overhead here?

IIRC WSL 2 use 50% of your memory in Windows, or 8GB (whichever is smaller) by default.

I have 32 GB. Hardware is cheap for Windows. imo That's one of its main perks vs Apple

Re: Windows Subsystem for Linux: The lost potential

#70
post #59

I'm extremely ignorant about OS design, but based on this it sounds like WSL1 could be fairly described as basically Linux for the Windows kernel, whereas WSL2 is more like a really fancy VM. Is that the gist of it?

More or less. Though I'd rephrase your description of WSL1 as "Linux for the NT kernel". In that sense "Win32" (the API used by Windows programs) could also be described as "Win32 for the NT kernel". They are both subsystems that translate their APIs into NT kernel calls. Windows NT used to have a number of these subsystems but all except Win32 were deprecated and eventually removed.

I see, that makes sense! This is a really interesting design and seeing it this way gives me more respect for the Windows operating system generally. Is this subsystem concept something that has a parallel on the *nix/BSD side of the fence? Or is it unique to the NT architecture?
Post reply on HN