WSL3 Performance is about 5-60% faster than WSL2 depending on the workload
Recorded: Oct. 10, 2026, 10:01 a.m.
| Original | Summarized |
WSL2 vs WSL3 Benchmarks: Performance, Memory, and Syscall Scaling // Tony Metzidis Tony Metzidis GitHub Categories WSL2 vs WSL3 Benchmarks: Performance, Memory, and Syscall Scaling With the release of the WSL 3.x stack, Microsoft bumped the default virtualization runtime and advanced the shipped guest kernel from the 6.6 LTS branch up to 6.18. The Test Environment Guest OS: Alpine Linux 3.23.0 (x86_64) Guest Kernel (WSL3): 6.18.40.1-microsoft-standard-WSL2 Go Version: Go 1.27.1 Host Machine: HP ProDesk 400 G4 Desktop Mini (DM) Processor: Intel Core i5-8500T (6C/6T Coffee Lake @ 2.10 GHz base) Host RAM: 16 GB DDR4 Host OS: Windows 11 Pro (Build 26200.9550, VBS active) WSL Resource Allocations (.wslconfig): processors=2 (pinned to 2 vCPUs) Low-Level Kernel Microbenchmarks Benchmark Suite syscall/basic Entry/exit latency sched/pipe Context switch latency sched/messaging mem/memcpy What the Kernel Deliberations Tell Us Memory Bandwidth Surge (+61.35%): Real-World Workload: GoReleaser Compilation Metric Real (Wall-clock) User (CPU Time) Sys (Kernel Time) Breaking Down the Runtime Split Kernel Overhead (sys) Collapsed by ~16%: Takeaways High-Churn IPC and Memory-Intensive Systems Win: Local workloads running in-memory databases (Redis, SQLite), container-dense workflows, or microservices passing payloads over Unix domain sockets benefit immediately from the +61% memory bandwidth boost and 10–11% lower context-switching latency. See Also The Security Tax in WSL3: Benchmarking Kernel Mitigations Against WSL 2.x ©️ 2025 Tony Metzidis |
An empirical comparison between the Windows Subsystem for Linux 2 and WSL 3 stack, focusing on performance, memory handling, and system call scaling, was conducted by Tony Metzidis to evaluate the practical impact of the WSL 3.x release. The testing involved side-by-side benchmarking of WSL 2.6.3.0 (Linux kernel 6.6.87) against WSL 3.0.2.0 (Linux kernel 6.18.40), utilizing a specific test environment consisting of an Alpine Linux root filesystem, Go 1.27.1, and an Intel Core i5-8500T processor with 16 GB of RAM under Windows 11 Pro. The analysis began with low-level kernel microbenchmarks to isolate raw performance metrics, independent of user-space tooling. In memory bandwidth, the most significant improvement observed was a surge in sequential memory throughput, increasing by 61.35%, from 7.84 gigabytes per second to 12.64 gigabytes per second. This substantial gain is primarily attributed to kernel command-line optimizations in the 3.x stack, specifically the page_reporting mechanism. Increasing the page reporting granularity reduces the frequency of hypervisor traps and page-table walking overhead encountered when the guest kernel interacts with the Hyper-V dynamic memory reclamation interface. Regarding scheduling and inter-process communication (IPC) latency, the results indicated a net reduction. Benchmarks measuring process ping-pong and messaging latency showed improvements, with context switch latency decreasing by 11.25 percent. This reduction was linked to refinements in the upstream kernel 6.18 scheduler and more efficient handling of Hyper-V VMBus synthetic interrupts, which diminished the CPU-to-CPU wake penalties when tasks migrated across pinned virtual CPUs. Raw system call throughput, such as getppid operations, experienced a modest increase of 3.98 percent, reflecting fixed architectural boundaries on 8th-generation Intel hardware. When evaluating a real-world computational workload, specifically compiling the GoReleaser codebase, the wall-clock time showed a slight net improvement of approximately 3.91 percent. However, a deeper analysis of the execution time revealed a more profound improvement in kernel execution time. Kernel time measurements decreased by 15.98 percent, as the compiler experienced less time spent inside the kernel executing system calls like openat, mmap, and futex, due to improved slab caching and reduced trap overhead within the newer kernel structure. The breakdown of the total time highlighted a critical distinction between wall-clock performance and system execution efficiency. Since the compilation process is predominantly a user-space compute workload, accounting for over 80 percent of the execution time, the overall wall-clock duration was largely constrained by the physical limits of the constrained virtual CPU execution environment and core frequency. While the kernel overhead decreased significantly, the aggregate wall-clock time remained bound by the hardware ceiling. The overall takeaway is that upgrading from WSL 2.x to WSL 3.x provides distinct benefits depending on the application profile. Workloads characterized by high-churn IPC and memory-intensive operations, such as in-memory databases or container workflows, immediately benefit from the considerable memory bandwidth increase and reduced context-switching latency. Conversely, compute-bound tasks, such as compilation, see a substantial reduction in the time spent in kernel operations, although the total elapsed time is still ultimately governed by the underlying constraints of the physical CPU resources. |