logoalt Hacker News

WSL3 Performance is about 5-60% faster than WSL2 depending on the workload

137 points • by tonymet • last Wednesday at 9:06 PM • 96 comments • view on HN

Comments

jesse_dot_id • today at 10:35 AM

I jumped ship from Windows a couple of years ago after having used it since the early 90's. One of the primary reasons was how much I had to fight with WSL2 in my day-to-day work. But now it's becoming even more apparent that Microsoft does not care about its operating system. I don't even know what they could do to get me back. Trust continues to be a huge problem in the AI era of Microsoft.

➕ show 2 replies
1718627440 • today at 10:33 AM

WSL2 is a different product from WSL1, not a different version. Is WSL3 now a different version of WSL2 or another separate product?

➕ show 1 reply
mellosouls • today at 2:39 PM

I love WSL, but giving this a major upgrade label (2 to 3) seems a bit of a stretch, at least from the viewpoint of an average dev user.

Perhaps it reflects the amount of work and thought that has gone into it, but I really think the optics are better if the selling points are immediately obvious to the user.

Hopefully some light will be shed in further blogs.

➕ show 1 reply
armcat • today at 9:45 AM

Great job in benchmarking! I wasn't even aware of the WSLc (WSL3) release. For others, the release info is available here: https://github.com/microsoft/WSL/releases/tag/3.0.1

EDIT: stumbled on the previous HN post here: https://news.ycombinator.com/item?id=49970507

➕ show 2 replies
binsquare • today at 10:29 AM

Lot of the WSL2 lag is not the VM itself, it's the 9P file sharing and interop.

I found that seems like anything under /mnt/c goes through 9P

➕ show 2 replies
c7b • today at 1:56 PM

My memory is a bit foggy, but the original WSL promised a much more ambitious integration with Windows, sort of container-like. It had a lot of rough edges when I first tried it, but they promised they'd work on it. That, together with their promise that W10 would be the 'last' Windows and they'd switch to a more OSX-style rolling release model was what pushed me to adopt Windows in ~2016. In the first years of Nadella it really felt like MS would listen to developers. Within less than two years iirc they'd given up on the WSL ambition, with WSL2 being a mere VM with noticeably worse performance for some of my workloads, and completely reneged on their W10 promise, even vowing to make my newly purchased hardware obsolete.

In summary, I really couldn't care less what improvements they make to WSL, and neither should anyone else, imho. If you want Linux, for the love of god just use Linux. Emulation works great the other way round by now.

➕ show 3 replies
exacube • today at 2:09 PM

Are majority of the perf gains really from tuning from the kernel's `page_reporting_order` param?

ReDress • today at 12:47 PM

syscall/basic getppid() throughput 1,474,691 ops/s 1,533,399 ops/s +3.98% Entry/exit latency 0.6781 µs/op 0.6521 µs/op -3.83% sched/pipe 100k process ping-pong 48,445 ops/s 54,589 ops/s +12.68% Context switch latency 20.64 µs/op 18.32 µs/op -11.25% sched/messaging Hackbench (20 groups, 800 tasks) 14.507 s 13.047 s -10.06% mem/memcpy glibc default bandwidth (1GB) 7.84 GB/s 12.64 GB/s +61.35%

This is great, this is some good work. But, like an issue I described before with Linux kernel io-uring[1], this fails to test and demonstrate performance with a healthy server load.

This obviously fails to depict a healthy server load because it's just way too specific.

1.https://news.ycombinator.com/item?id=44604793

lacuno-cloud • today at 12:06 PM

I am not sure about WSL in general right now - no matter if WSL3 is more performant.

For me, Claude bypassed my sudo security by executing `wsl.exe -u root`. The Claude does not need any sudo password :)

xaduha • today at 10:24 AM

I find that stuff that it offers over a normal Hyper-V VM is stuff that I don't need, leaky abstractions galore.

➕ show 1 reply
tonymet • last Wednesday at 9:24 PM

Despite the container support getting most of the attention, I discovered a measurable performance improvement with WSL3 by accident. Luckily I had another machine to upgrade so I ran an AB test comparing WSL 2 to WSL3 .

If you want a real bump in performance, I have a clever trick . Hardware isn’t cheap these days, so we demand the most of our software.

➕ show 2 replies
sys_64738 • today at 12:30 PM

Isn't this just WSL2 v3?

la_fayette • today at 10:17 AM

ok great benchmark! I work with herdr/pi for dev work and need to use a windows machine from my company. WSL currently unfortunately lags so much when typing, not sure why when using herdr... Using powershell, some features are missing, so i can't wait to try WSL3 and hope for improvements.

➕ show 1 reply
hougaard • today at 2:13 PM

Interesting, hacker News has truly become the new slashdot :)

shevy-java • today at 10:59 AM

WSL is one of the few good ideas Microsoft had in the last ... 5000 years or so.

cdud3 • today at 10:06 AM

And yet it's still factors faster without a whole Windows around it.

➕ show 1 reply
bewareofscams • today at 10:09 AM

[dead]

PunchyHamster • today at 11:08 AM

Amazing they managed to make virtualisation that slow in WSL2

tw1984 • today at 1:45 PM

Microsoft still refuses to fix the most obvious issue here - Windows should be rebuilt on top of a linux kernel.

➕ show 1 reply