4 ms·
Windows Subsystem for Linux performance is close to bare-metal Linux
- viraptor 6y agoThe setup seems to differ in what security mitigation options are enabled in the kernel on wsl2 and Ubuntu. I wonder if that's where the difference comes from. Having a system in a VM outperform similar kernel on bare metal is a bit weird.
- lsllc 6y agoI think this is usually because the host OS is caching the files that make up the VM disk image. So effectively, the VM is running from a ram disk. Intuition says that you could probably configure caching/readahead on the bare-metal system to do the same with similar performance results.
- viraptor 6y agoWsl2 is winning on some CPU-bound tests though. For example page 2 has lots of CPU-only benchmarks. The caching didn't matter there.
- lsllc 6y agoFor Dolfyn where the WSL2 improvement was fractional better I'd say that was within the error bars. For LZ4 unless the test somehow accounts for that by preloading the data I'd put that down to host-OS caching.
- samus 6y agoThe difference in performance and power management on both Linux and Windows influence and muddle the picture, especially when things have improved so far with WSL2.
- viraptor 6y agoI checked and it turns out their running Ubuntu with "ondemand" CPU scanning rather than "performance". It could explain at least a part of it and I'm surprised they haven't tried to match the VM/non-VM CPU baseline before comparing IO performance.
- chmod775 6y agoMost of these benchmarks do a minimal number of syscalls per unit of work, if any. Meaning, unless syscalls are horribly slow, you'd expect them to be pretty much unaffected by the underlying OS. It's not even really only WSL being benchmarked here, but also stuff like the OS' scheduling etc. Micro-benchmarks for each syscall and comparing their actual performance might be more useful - it would allow you to more easily control for auxiliary differences between the operating systems - so you don't accidentally benchmark ext4 vs ntfs or something instead of your syscall. Edit: I was unaware WSL2 is essentially a linux kernel in a VM now. What is even the point of benchmarking this and why is it supposed to be a successor to WSL? This is something completely different conceptually.
- digisocialnet 6y agoIf you use the Linux file system it is useable, but trying to install a nice module into the Windows file system is not fun.