Hacker News new | ask | show | jobs
by losvedir 2627 days ago
> The clue is that MSWin running in a VM on Linux is faster than on hardware.

I'll join the fray in expressing skepticism here. Source?

Anyway, I think this WSL distro is pretty cool. I've set up WSL on my Windows computer for kicks and while it was neat I never quite got it to work for the rust development and environment I wanted. I ended up just doing it in Windows.

But if this sets up rust and VS Code (the editor I wanted to use) painlessly, then I'll have to give it another shot.

1 comments

The filesystem is notably slower on Windows. It's easy to test it out for yourself; clone any big repo (eg: linux) in WSL and run `git status`. The Microsoft engineers have already done a lot of heroic efforts with WSL. The issue seems to be more inherent to the design and really hard to solve.

ref: https://github.com/Microsoft/WSL/issues/873

To be clear, this is for a specific use-case. I don't believe that all applications will have similar performance profiles and that Linux wins over Windows in all of the cases like OP seems to suggest.

It's definitely true in my experience that disk operations are slower in Windows. Folks on this thread are getting flack for poor comparisons (IMO Windows is worse at lots of small files), but even when you remove that, and say, look at mostly portable code that deals with a single file, as I have seen using sqlite as an example, it does worse.

Not to mention Windows has built in antivirus reacting to all your filesystem activity by default...

It's entirely possible to disable this by adding an exception for the WSL directory in Windows Defender. In my experience, this vastly improves IO from within linux.
Good luck convincing your employer to do this. One feature request from me in case someone from MSFT is reading - please design things so that no file modify hooks are invoked at all for files under wsl directory. Files in wsl should be in a secure sandbox by default outside the reach of any antivirus.

I have heard that system devs at Microsoft have Admin mode enabled. I think that is why they dont realise how bad the dev experience is on windows when you dont have admin. You cant turn windows indexing off, you cant exclude things from anti virus, you cant launch Application Verifier. All dev workflows should work without Admin.

I am reliably informed that the top developers ay MS Research are in WSL 80% of the time.
Satya,if you are reading this - Do an experiment by taking away everyones admin privileges for two weeks. See how many people can still do their jobs. Fix every single developer use case you find that needs admin.
I wasn't talking about WSL at all actually. I have never used it. Disk performance is just worse on Windows. With or without defender. (And defender is the default.)
Based on limited testing, I think IO is slower on Windows even when there's no filesystem involved at all. The block layer is just slower, despite having so few features that it's hardly worthy of being called a layer compared to what's possible on Linux.
Based on my limited testing, a VM running on a NTFS file backed disk runs just as fast natively.
The WSL filesystem. That says nothing about the question.
Windows supports multiple file systems; Microsoft could solve this by adding ext4 support directly into Windows and running WSL from a separate partition.
No, because you still suffer from Windows buffer management, Windows I/O scheduling, and Windows kernel-thread scheduling.

It has been tried.