1. 71

  2. 9

    I’m glad they mentioned that the filesystem operations will be faster. I wish they would explain further as to how they achieved that. This was my biggest concern using WSL last year while I was working on a Magento 2 site. Serving pages was slow, DI compilation was slow, JS build scripts were slow, everything was slow.

    1. 17

      I’m guessing it’s probably the obvious route given the description they use – Linux gets its own block backing store like a regular VM and manages its own cache just like a regular disk, and all the ugly coherence issues are completely dodged. Nobody ever needed a 1:1 filesystem translation in the first place, and they’re too hard and/or impossible to build without suffering the woeful perf issues WSL1 had

      Really sad they’re giving up on the WSL1 approach – an independent reimplementation of Linux had immense value for all kinds of reasons. Must be heartbreaking for a lot of people who worked so hard to get it to where it was

      Anyone care to place wagers on how long it’ll take after release before it’s hacked to run FreeBSD? :)

      1. 16

        Must be heartbreaking for a lot of people who worked so hard to get it to where it was

        I thought the same thing! I’m also a bit bummed because the current implementation makes use of the “personalities” feature of the NT kernel, whereas the new one is a VM.

        1. 11

          It is a bit of a shame indeed. Also a good example of Agile development. I suppose the initial developers thought it would be a nice way to go, so they tried it out and shipped it. I suppose they couldn’t be sure in advance that the file system would be that much slower, or that people would be that concerned about it. Now that they know that, they had to switch over to a VM to get the performance level that people demanded. Too bad, but hard to predict ahead of time.

          1. 6

            Nobody ever needed a 1:1 filesystem translation in the first place

            Honestly, that was the one reason I would find WSL interesting: seamlessly sharing data between Linux and Windows programs.

            1. 3

              an independent reimplementation of Linux had immense value for all kinds of reasons

              There’s nothing really stopping someone else from doing it (I encourage them to call it ENIW).

              For what it’s worth, I believe FreeBSD still has a Linux emulation layer.

              1. 2

                I believe SmartOS does too.

              2. 3

                Yeah this was the logical conclusion of the WSL team initially targeting ABI compatibility with Linux. Diversity of implementation would probably have had a better chance of surviving if the WSL team targeted POSIX source compatibility, like macOS. That would have given them more wiggle-room.

                That’s not to say the WSL team made the wrong decision to target ABI compatibility, they likely have different goals for their corporate customers.

                1. 6

                  Their goal wasn’t an OS though, they want to use the old Mac OS X argument: you can run all your Windows programs on your Mac, so your only machine should be a Mac.

                  Just swap Mac and Windows.

                  1. 2

                    If they just wanted POSIX source compatibility, they could have continued development of the POSIX subsystem / SFU. Apparently there’s something to be gained from being able to run unmodified Linux binaries (otherwise we’d just have Windows Ports). My guess is that the goal is to grow Azure – it’s likely to be a bigger revenue source than Windows in the future.

                  2. 3

                    Really sad they’re giving up on the WSL1 approach – an independent reimplementation of Linux had immense value for all kinds of reasons. Must be heartbreaking for a lot of people who worked so hard to get it to where it was

                    It seemed like it involved a lot of kludges onto NT though - to the point it seemed the easier approach to me was refurbishing the old POSIX subsystem and making it feel modern. There was a lot of (wasted) potential there.

                    1. 1

                      Anyone care to place wagers on how long it’ll take after release before it’s hacked to run FreeBSD? :)

                      It sounds like it’s a modified Linux kernel, so it would probably also have to be a modified FreeBSD kernel.

                  3. 10

                    Does this mean we’re gravitating towards a de facto Linux monoculture? As much as I’m happy it’s based on a GPL kernel, I’m also feeling a kind of sadness over reduction of diversity… Even though Windows was already really more or less POSIX-like, at least compared to some OSes from earlier days. Now, apart from fringe/research/hobby OSes (though these cannot be completely ignored, fortunately), the only thing I can think of that feels like it may reasonably flirt with the mainstream would probably be Fuchsia?

                    1. 13

                      GuixSD on GNU Hurd or bust.

                      1. 7

                        I don’t think we will see Windows go by the wayside, we will see POSIX go.

                        I think what we will see will be a birth of LINUX as the defacto cross-platform standard. SmartOS did it(linux compat) ,FreeBSD did it(linux compat) and Windows did it (WSL). All the cloud/VM vendors stop at Linux compat, and maybe windows compat. Occasionally one will specialize for macOS as well(parallels comes to mind), but most basically stop at Linux support.

                        Sure, the FreeBSD one isn’t all caught up to 4.19 standards, but neither was WSL1. SmartOS mostly is caught up. WSL2 will be caught up, and likely stay that way.

                        I think this isn’t really a note against the WSL1 approach so much as they didn’t want to spend so many resources babysitting the linux changelog, which tends to be massive. WSL2 should make handling the linux changelog much, much easier…. one hopes :)

                        I’m not sure I’m personally in favor of POSIX dying, but I think that’s the future here. Linux compat won.

                        1. 3

                          The NT kernel is not going anywhere. They’re just shipping a papered-over VM + a patched Linux kernel with Windows.

                          1. 6

                            In theory yes; but I seen an argument here and there that “meh, it seems we don’t really have to support Windows, as it’s got WSL, so we can just keep coding only for Linux”. Extending this some time into future, I would expect the NT kernel might phase out into insignificance. (A.k.a. become commoditized, into “just a one more semi-hardware platform for Linux”.)

                            1. 8

                              Extending this some time into future, I would expect the NT kernel might phase out into insignificance

                              Not likely. The only reason Windows has survived into the twenty-teens is because of Microsoft’s muscling of Windows into enterprises and onto consumer PCs in the past plus a fanatical devotion to maintaining compatibility with software compiled back in the mid 1990’s. If Microsoft as a company was starting to falter under its own jurassic weight, there might be some merit to the argument as competitors (Apple) swooped in to claim the abandoned marketshare, but that’s not the case. The company is stronger than ever.

                              My crazy, wild, out-there prediction is that it won’t be too long before Microsoft simply starts giving away Windows to consumers. They do about a billion in revenue from consumer Windows, almost all of that via OEMs presumably. So giving it to end-users will not hurt anything but would do wonders to encourage adoption among the next generation of developers. These new coders will probably have no particular loyalty to Apple when Windows is just as good for web development now that it ships with a fully functional copy of Linux under the hood.

                              1. 5

                                As an individual developer, that’s how I feel about it. I’m not interested in developing or maintaining a Windows front end for my Mac emulator; it’s enough to know that it works in a Linux VM.

                                This is another instance of the same logic that gives us “We don’t need to make a native desktop app because you can use our website in a browser.” If supporting Windows by supporting Linux is cheating, then so is shipping an Electron app.

                                1. 4

                                  The thing is, I don’t want nor intend to slap some quick label on it, like “cheating”. It’s just that I see some awesome advantages of the situation, as well as some maybe not so obvious …disadvantages? questions? concerns? It definitely puts me in some kind of a meditative/pensive mood, and I wanted to share those… observations? as I find them interesting, and think they may be unexpected and thought provoking to others. That’s also kinda why I tried to emphasize this less obvious side of things.

                                2. 4

                                  Extending this some time into future, I would expect the NT kernel might phase out into insignificance.

                                  I saw this sentiment on HN, too. I don’t buy it, though. The main customers of Windows kernel are consumers, businesses, and huge businesses (enterprises). Windows is superior to Linux for consumers since it has better user experience. It’s main competitors are tablets and netbooks for those who mainly use browsers. The gamers will continue to drive sales. Then, there’s workstation users like A/V who mostly split between Windows and Mac with more transitioning to Windows over time.

                                  On business side, they basically need a lot of desktops, servers, COTS apps, and custom apps. The apps were probably built to work closely with Windows kernel since it’s path of least resistance. Lots of the Microsoft and 3rd party tech will have obscure protocols and data formats to make escape to or integration with competitors harder. That’s called intentional lock-in. Even without it, lots of the companies (esp enterprises) will have built huge stacks of software that they can’t port without risk of major losses. Microsoft keeping strong backward compatibility means choosing them is low to no risk. That rigged choice is unintentional lock-in.

                                  Microsoft’s billions of dollars worth of lock-in to things strongly coupled with Windows kernel means it isn’t going anywhere for a while. The only thing that could negatively effect the kernel is copyright/patent reform that lets people build and sell bug-for-bug compatible implementations of any software. Then, a project like ReactOS might get massive investment from governments or companies that don’t want to be dependent on Microsoft. Meanwhile, companies are dependent and can’t afford to move, so they’ll stay on there much like they and others have on mainframes for decades. Yeah, people said all this stuff about mainframes and AS/400’s, too. Still highly profitable businesses due to lock-in.

                                  1. 1

                                    Ah, I follow now.

                                3. 2

                                  This particular development doesn’t mean that, no. That is already well underway on the ‘server’ end. Despite the relative merits of other UNIX-like OSs, the majority will use Linux. It’s down to who knows it and who you can hire. The choice is between distros.

                                  Microsoft know this and have embraced it. .NET is now a first class citizen on Linux. Now Linux will be a first class citizen on Windows. For developers, this is excellent. Server OS running perfectly (with Docker!) alongside your workstation OS? Just brilliant. Maybe this will tempt some away from their Macs.

                                  I was all ready to use W10 as workstation OS and thought the plans looked perfect, but the quality issues (sort but I’m not waiting for that start menu to open!) and the advertising have kept me coming back to MacOS.

                                  1. 2

                                    You might even say they’ve embraced and extended it…

                                  2. 2

                                    Does this mean we’re gravitating towards a de facto Linux monoculture?

                                    I think the answer is yes, but I’m hoping the answer is no. Apart from competition being a good thing, I also hope the future is something based on message passing, not a traditional kernel.

                                    1. 1

                                      MacOS is still BSD-based.

                                    2. 3

                                      Does anyone know if this new WSL implementation requires Hyper-V, meaning we can’t use VirtualBox or VMWare at the same time as WSL?

                                      1. 3

                                        Can someone explain the technical limitation here, that prevents other hypervisors running when Hyper-V is enabled?

                                        I reasonably regularly run Parallels + VMWare + Virtualbox concurrently on macOS, and this “our way or the highway” approach with HyperV approach strikes me as just plain weird.

                                        1. 5

                                          If I understood correctly (but it’s been a long time since I looked into it, so I might misremember or things might have changed), when you run Hyper-V, it will replace the Windows kernel and run Windows within a paravirtualized guest on top of the Hyper-V hypervisor.

                                          Since your Windows is running in a virtualized environment, and nested virtualization is black magic, VirtualBox and VMWare will not detect or be able to access VT-d / VT-x / AMD-V. Effectively, you are not running VirtualBox next to Hyper-V, but inside Hyper-V.

                                          Windows has recently also introduced a new security feature called “Credential Guard” which requires your Windows session to be running on top of Hyper-V, and thus also blocking any other hypervisors from being used.

                                          1. 4

                                            IIRC, Hyper-V works more like Xen; the host becomes dom0.

                                            1. 1

                                              Oh I see, and presumably HyperV doesn’t (or can’t? I can’t say Ive tried it on a Xen vm) embed the cpu capabilities to do ‘nested’ virtualisation (e.g. you can enable Hyper V or run vb/vmware on a windows VM running in Parallels on a Mac, if you enable “Nested Virtualisation” in Parallels)

                                        2. 2

                                          I was gonna troll about maybe just install a Linux if you need it that much, but having to work on Windows with Docker is a huge pain thanks to Hyper-V… Being able to get rid of it would be fantastic.

                                          EDIT: Oh it’s a freaking VM again.

                                          1. 1

                                            The 10K question for me: Will this remove the utterly braindead Win32 CONSOLE that current WSL users are manacled to? It’s one of my big pain points in using it to get real work done.

                                            • It’s super slow.
                                            • Cutting and pasting large blocks of text is almost impossible

                                            Here’s hoping. I don’t really care if it’s a magical layer or a VM :)

                                            1. 2

                                              Yeah, it’s horrible isn’t it. I run an SSH server and PuTTY in to localhost to solve this.

                                              1. 1

                                                No, the console will remain for backwards compatibility. My reading is that you can run PowerShell etc within this new shell.

                                                1. 3

                                                  Update: See the Windows Terminal announcement below - clearly I’m not the only one whinging :)

                                                  Supposedly they’re making console better too, so hope springs eternal I guess :)

                                                  Mostly at home I just boot into Kubuntu when I want to do UNIX work and leave Windows for games or other random work and that works pretty well, but I’m shackled to WSL for work remote access through Amazon Workspaces Windows 10.

                                              2. 1

                                                So I guess, this is a completely different approach compare to WSL 1. From what I understand, WSL 2 will be a full VM running in Hyper-V with everything configure out of the box.

                                                1. 1

                                                  I hope they improved the hardware drivers support, I had a hard time getting my GPUs to work on WSL

                                                  1. 1

                                                    This is probably for the best. Current WSL is really buggy and a lot of syscalls seem to not be implemented correctly. Bug fixes take eons to show up in the regular release channel and stability is definitely not there.

                                                    It’s a shame since I was hoping to use it with CLion as an alternative to Visual Studio, but it’s looking like just using linux is the best, low cost way to do c++ development.