WSL 2 is getting faster Windows file system access

TL;DR

Microsoft has landed a WSL 2 update that assigns dedicated DMA pools to virtio devices, significantly improving file I/O performance for cross-OS workflows. This change removes a major contention point, enhancing efficiency for developers working across Windows and Linux.

Microsoft has implemented a new feature in WSL 2 that assigns dedicated DMA pools to each virtio device, significantly improving cross-OS file system access performance. This development addresses a key bottleneck in the virtiofs path, benefiting workflows that involve frequent file exchanges between Windows and Linux environments.

The update, merged into the WSL 2 kernel in late May 2026, introduces per-device SWIOTLB (System I/O Translation Lookaside Buffer) pools. Previously, all virtio devices shared a single global DMA buffer, leading to contention during heavy I/O operations. The new implementation allocates a dedicated, contiguous physical memory range below the 4 GB boundary for each device, which is then published via sysfs and injected into the device at creation.

This change requires the latest WSL kernel, specifically Microsoft.WSL.Kernel 6.18.26.3-1, and is part of the WSL 2 DeviceHost 1.2.29-0 update. Users on older kernels will see a message indicating missing patches that limit performance improvements. The update primarily benefits file-heavy workflows, such as development projects stored on Windows drives but built within the Linux environment, where frequent file I/O occurs.

Why It Matters

This development is significant because it reduces the latency and contention involved in cross-OS file operations in WSL 2. For developers and users relying on WSL for integrated Windows/Linux workflows, especially those working on large projects or with numerous small files, this translates into faster build times and more responsive performance. It also enhances the efficiency of virtio network adapters sharing the same DMA infrastructure.

Amazon

WSL 2 compatible Linux development environment

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Since its launch in 2019, WSL 2 has progressively improved cross-OS file access performance. Initially, WSL 1 used DrvFs for direct NTFS access, which was fast for certain workloads. WSL 2 introduced a full Linux kernel running in a Hyper-V VM, switching to a 9P protocol for file sharing, which added protocol overhead. The advent of virtiofs around 2021 offered a more efficient shared-memory approach, reducing serialization overhead. The recent addition of per-device DMA pools marks the latest step in this evolution, further narrowing the performance gap.

“The new per-device SWIOTLB pools significantly improve virtio device performance by removing contention points at the DMA layer.”

— Microsoft WSL team

“Allocating dedicated DMA pools per device reduces bottlenecks and enhances overall file system performance in WSL 2.”

— Ben Hillis, WSL kernel developer

Amazon

high performance SSD for Windows Linux dual boot

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how widely adopted this update will become or how it may impact other aspects of WSL 2 performance beyond file I/O. The default remains Plan 9 over Hyper-V socket, and virtiofs remains an opt-in feature. Further testing and user feedback are awaited to quantify real-world benefits across different workflows.

TP-Link USB to Ethernet Adapter (UE306), Supports Nintendo Switch, 1Gbps Gigabit RJ45 to USB 3.0 Network Adapter, Foldable & Portable Design, Plug and Play, Compatible with Windows, macOS, and Linux

𝐇𝐢𝐠𝐡-𝐒𝐩𝐞𝐞𝐝 𝐔𝐒𝐁 𝐄𝐭𝐡𝐞𝐫𝐧𝐞𝐭 𝐀𝐝𝐚𝐩𝐭𝐞𝐫 – UE306 is a USB 3.0 Type-A to RJ45 Ethernet adapter that adds a…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Microsoft is expected to continue refining WSL 2’s file system performance. Future updates may include broader default support for virtiofs, further kernel improvements, and additional performance optimizations. Users are advised to update to the latest kernel and enable virtiofs for optimal results.

Amazon

dedicated DMA pool hardware for virtualization

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What is the main benefit of this DMA pool update in WSL 2?

The main benefit is a reduction in contention for DMA resources, which improves file I/O performance during cross-OS workflows, especially when working with many small files or large projects.

Do I need to change my configuration to benefit from this update?

Yes, you should set virtiofs=true in the [wsl2] section of your .wslconfig file and update your WSL kernel to the latest version using wsl.exe –update –pre-release.

Is virtiofs enabled by default in WSL 2?

No, virtiofs remains an opt-in feature; the default transport still uses Plan 9 over Hyper-V sockets.

Will this update affect other WSL 2 features or only file I/O?

The primary focus is on improving file system performance and DMA efficiency. Broader impacts are still being evaluated.

When can I expect wider adoption or further improvements?

Microsoft is likely to continue releasing kernel updates and performance enhancements in upcoming WSL 2 updates, with broader support and default configurations possible in future releases.

Source: Hacker News

You May Also Like

DNA Data Storage Could Shrink Your Data Center to a Shoebox

Just how close are we to shrinking data centers into a shoebox with DNA storage, and what hurdles remain before this becomes reality?

MIT researchers 3D print three-sided zipper that stiffens into rods, coils, and arches

MIT researchers have revived a 1980s patent to create a 3D-printed zipper that shifts between soft and rigid states, enabling versatile structural applications.

Nvidia CEO’s Charitable Foundation Signs GPU Deal With CoreWeave

Nvidia’s charitable foundation has entered into a GPU supply agreement with CoreWeave, marking a notable development in AI hardware provisioning.

Guitar tuner that uses phone accelerometer

A new guitar tuning app leverages phone accelerometer data to detect string pitch, offering a novel approach to tuning for musicians.