Live data from Hacker News

Windows Subsystem for Linux: The lost potential

jmmv.dev

111–120 of 250 posts

Re: Windows Subsystem for Linux: The lost potential

#111

Earlier quoted context omitted.

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

Is that an upper bound? My Ubuntu 20.04 console sessions on WSL2 consume a couple tens of Mb.

Look for a 'vmmemory' entry in your process list, it'll likely be in the hundreds of megs, if not a gig or so.

Re: Windows Subsystem for Linux: The lost potential

#112
post #22
post #11

I remember NT was to have an OS/2 subsystem, probably because it started out as OS/2 3.0, with a New Technology (NT) kernel. I know there was a POSIX system, but I never saw or interacted with it and, legend says, it was only used to check a box in government contracts.

The original POSIX subsystem was not very useful -- a minimal set of system calls, plus a Microsoft re-branded MKS Toolkit to provide shells and utilities. Microsoft ended up buying Interix, who offered a much more pleasant UNIX-on-Windows setup. That was supported for many years as "SFU" and later "SUA" SUA was still a pretty weird UNIX though. PE-COFF binaries, and a linker that wasn't 100% GNU compatible, and a lo…

My understanding is they initially developed the tech beneath WSL to run Android apps on Windows Phone, actually.

https://mspoweruser.com/windows-subsystem-for-linux-started-...

Re: Windows Subsystem for Linux: The lost potential

#113

Starting my development journey on Windows many years ago, discovering Linux and eventually daily driving MacOS for years - WSL1 has enabled me to once again make Windows 10 my daily driver for both work and play for the last year. I spent several months using WSL2 but because the implementation attempts to hide virtualization behind a curtain, it was unclear where the magic successfully blended the guest with the ho…

>The WSL2 guest can't connect to services (tcp, ports, whatever) running on the Windows host

I assume you're talking about how you need to use the hosts ip rather than localhost? Because you definitely can access host ports. I'm even connecting WSL2 to an X server running on windows.

Re: Windows Subsystem for Linux: The lost potential

#114
post #90
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…

> some scenarios have become orders of magnitude more complicated on WSL2 like connecting to a daemon on Windows or vice versa This is about my only issue with WSL2, but it's a big one. Perhaps worse than this being a problem is that Microsoft don't seem to be providing any solutions - there are various GitHub issues about it, with non-Microsoft ransoms being the ones providing workarounds (but these depend on your e…

Running an npm install for an app of moderate complexity on WSL1 was such a painful experience that it turned me off of using the service for work dev entirely. Now with WSL2 it's much better, and I use it daily to the point where I have done away with my dual boot. (I still keep around a Linux notebook for edge cases.)

Obviously this is only re: fs perf, I can't speak to your other issues which do seem quite challenging. But I can definitely understand why they would have seen fs perf as a priority.

Re: Windows Subsystem for Linux: The lost potential

#116
post #9

Contra opinion: the VM option reduced the service interface between Windows and Linux to a single kernel implementation and a few drivers, rather than every possible userspace program ever written. It's an amazing and obvious trade off. My inner architecture astronaut appreciates all the ideas in this post, but I've been trying to kill that guy for over a decade now. The bottom line is WSLv1 design SUCKED precisely b…

Correct, but... this is not WSL. This is a VM. Let's see this from the opposite point of view: WSL1 is to WSL2 what WINE is to a VM running Windows. Two completely different approaches. The thing that would have allowed the WSL1 to do was to really integrate between Windows and Linux: imagine writing running a Linux command, piping its output in a Windows command to pipe it again in a Linux command. Imagine sending a…

> That thing about the filesystem performance could have been the occasion to optimize NTFS and even to add to the NT kernel the support for other filesystem, natively.

I doubt that would be feasible given how important backwards compatibility is for Microsoft's business. WSL1 seemed like a huge effort on its own, so changing one of the most critical OS features would be a little ambitious.

Re: Windows Subsystem for Linux: The lost potential

#117

Earlier quoted context omitted.

Correct, but... this is not WSL. This is a VM. Let's see this from the opposite point of view: WSL1 is to WSL2 what WINE is to a VM running Windows. Two completely different approaches. The thing that would have allowed the WSL1 to do was to really integrate between Windows and Linux: imagine writing running a Linux command, piping its output in a Windows command to pipe it again in a Linux command. Imagine sending a…

Windows Subsystem for POSIX was already tried. It didn't take off.

Isn't the only reason that it didn't take off because it was so incomplete?

Re: Windows Subsystem for Linux: The lost potential

#118
post #21

Earlier quoted context omitted.

Wait, I didn't even know that was a thing. I am on WSL2 and don't have that either, nor do I think I ever saw it in Microsoft's docs. Interesting, thanks. Let's see if I get it to work for me. For now I always went with \\wsl$. Edit: Wait, are you on an insider build by chance? https://blogs.windows.com/windows-insider/2020/04/08/announc... Seems like this isn't in yet otherwise.

Yes this feature is only available on Insiders builds for right now!

Thank you for your work on this project. Although like the author I have some reservations about moving to a virtualization-based approach, nonetheless I am grateful attention is being paid to these kind of technologies at all. WSL has totally changed my development workflow for the better.

Re: Windows Subsystem for Linux: The lost potential

#120

Earlier quoted context omitted.

but it is included, as well as scp

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

Unfortunately it lacks Explorer integration although the command line client works well. SFTP integration in Explorer is one of the few big weak points remaining for Linux interoperability.
Post reply on HN