hn.today

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

tonym.us6 points1 comments
Screenshot of WSL3 Performance is about 5-60% faster than WSL2 depending on the workload

Benchmarking compares WSL 3.0.2.0 (Linux 6.18.40.1) against WSL 2.6.3.0 (Linux 6.6.87.2) on an HP ProDesk with an Intel i5-8500T, 16 GB RAM, Windows 11 (VBS active), running an Alpine Linux 3.23 minirootfs with Go 1.27.1. The VM was pinned to 2 vCPUs and 4 GB RAM. Microbenchmarks show modest syscall improvements (getppid throughput +3.98%, entry/exit latency -3.83%), substantial scheduler/IPC gains (100k ping-pong +12.7%, context-switch latency -11.25%, hackbench -10.06%), and a dramatic memory-bandwidth jump (glibc memcpy 1 GB: 7.84 → 12.64 GB/s, +61.35%).

Analysis attributes the bandwidth surge to larger page-reporting granularity (page_reporting.page_reporting_order=5) that reduces hypervisor traps and page-table overhead, and credits upstream 6.18 scheduler refinements plus tighter Hyper‑V VMBus handling for lower IPC latency. An end-to-end Go build (GoReleaser) ran ~3.9% faster in wall-clock (191.3s → 183.8s), with kernel time collapsing ~16% (~9s saved) while user CPU time barely moved. Practical takeaway: WSL3 materially speeds memory- and IPC-heavy workloads (in-memory DBs, socket-heavy microservices, container-heavy flows) while compute‑bound builds remain limited by pinned vCPU frequency/count even though syscall/kernel overhead is reduced.

Read on tonym.us1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

Next.js 16.4

Next.js 16.4

Next.js 16.4 introduces Cache Components, a new default programming model that enhances performance by enabling faster loads and instant client navigation. All new apps will use Cache Components by default, with improvements like reduced memory usage and smaller bundles, and migration tools for existing apps. (nextjs.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.