5 ms·
It's definitely better than cygwin, but cygwin was ok already. I don't see it as a game changer.
by samuel 4y ago
It's definitely better than cygwin, but cygwin was ok already. I don't see it as a game changer.
- sureglymop 4y agoPersonally i think it's cool but less interesting than cygwin and less interesting than wsl 1. A well integrated virtual machine is cool and all, but actually translating system calls or rewriting software for another environment is more interesting.
- anderspitman 4y agoMy understanding is they tried using more of a cygwin approach for a couple years with WSL1, but ultimately they weren't able to get some major software like Docker to work, not to mention the long tail.
- WorldMaker 4y agoWSL1 was much more interesting than cygwin: cygwin is a collection of ports. WSL1 used the existing binaries and transported kernel calls directly to a Linux kernel "personality" for the NT Kernel (which was designed to flexibly support multiple "personalities" like that way back in the day, but which hadn't been put to much use in recent decades before WSL1 brought it back and did something cool with it). (WSL2 is a lightweight VM in a traditional VM sense.)
- cercatrova 4y agoInteresting, sure, but WSL2 is simply much better to use as a daily driver and for production. I don't have to worry about whether stuff works or not like in WSL1, because, as you say, it's a VM so most stuff should work just fine.
- mmis1000 4y agoI think everything except io is an okay in wsl1 if you only run user space software. But the io throughput is just bad. Iterate over 1000 image and hash each one costs only 1s in Linux and whole 20 seconds on wsl1. The way wsl2 implement fs is just far better. Let alone if you use nodejs and have tens of thousands of files in node_modules. 'npm install' will cost you a whole 5 minutes.
- apitman 4y agoWhat's the TLDR of how WSL2 has improved fs performance? Planning to do a deep dive soon but super curious.
- WorldMaker 4y agoWSL1 when accessing Windows files and Linux files uses direct IO via the NT Kernel. This is "slow" because NTFS has a different CAP theorem tradeoff than POSIX expected file system semantics. (It's direct file access so working with one big file is sometimes faster: the trick is that's what NTFS is better optimized for: bigger, fewer files atomic transactions. POSIX semantics work better for lots of small files and doesn't guarantee atomic transactions in the same way.) From Windows (such as in Explorer) accessing WSL1 Linux files the safe way passes through a Plan9-derived file server as intermediary. This is surprisingly quick, but not without overhead. (But you can if you need to, do some unsafe operations directly on the files in NTFS.) WSL2 when accessing Windows files accesses them through a Plan9-derived file server as intermediary. This is surprisingly quick, but not without overhead. WSL2 when accessing Linux files is using a Linux filesystem in a virtual hard disk file (VHD) similar to any other VM technology. Using a Linux file system it naturally exhibits POSIX semantics and is fast in the way Linux operations are expected to exhibit in lots of little files scenarios. From Windows (such as in Explorer) accessing WSL2 Linux files passes through a Plan9-derived file server as intermediary. This is surprisingly quick, but not without overhead. Some operations Windows can do directly via VHD support in Windows.
- anderspitman 4y agoThanks. That makes sense. So sounds like no magic happening, just the speed you would expect from accessing a virtual disk directly in a VM. You think there's any chance Microsoft ever expands their 9p support to allow users to mount arbitrary 9p filesystems?
- WorldMaker 4y agoYup, nothing to magic, just the usual symptoms of Windows and Linux have always had different ideas of how files are supposed to work, so give Linux its own (virtual) hard drive instead. I don't know anything directly about Microsoft's 9p plans, but the blogs give an impression they are considerably pleased at the 9p file server for what they've been using it for (especially these cross-platform communications) and they might use it for other things. https://devblogs.microsoft.com/commandline/a-deep-dive-into-how-wsl-allows-windows-to-access-linux-files/ https://devblogs.microsoft.com/commandline/a-deep-dive-into-... It would be pretty wild if Windows supported arbitrary 9p filesystems, but it is a kernel-level driver and they do seem interestingly confident in it.
- qubex 4y agoI remember using the POSIX and OS/2 ‘personalities’ back in Windows 2000 (or maybe NT 4.0 Sp6a, I forget, it was so many years ago).
- layer8 4y agoIsn’t Cygwin still better than WSL2 in terms of shared file system (shared with Windows) performance?
- nailer 4y agoImagine every x64 compiled linux app is ready to use with cygwin That’s what WSL is like
- pessimizer 4y agoIt's a game changer because it's branded and marketed. Soon people will be forced to use it in particular contexts, let's say for the DRM Subsystem For Windows Subsystem For Linux. And since you need the DRM Subsystem For Windows Subsystem For Linux to run those few pieces of crucial software, WSL becomes your daily driver. Then MS starts shipping their own downstream distro with even more extensions that hook into Windows...
- alfalfasprout 4y agoDRM access I wouldn't be surprised by. But I highly doubt forcing their own distro. The whole point of WSL is being able to use off the shelf distros while staying inside windows.
- alfalfasprout 4y agoThe reason they pivoted away from wrapping linux syscalls, etc. was that ultimately efficiently supporting features tied tightly to hardware (eg; CUDA) became extremely difficult (at least, achieving decent performance). Virtualization is so efficient nowadays that it's much performant to go that route vs porting where often there will be difficult to debug performance regressions and bugs. So what WSL provides instead is much tighter integration between that linux VM and windows (including performant filesystem access, etc.).