Colin Devroe

Reverse Engineer. Blogger.

Like? Subscribe.

Microsoft releases WSL 2

May 7, 2019

Lots of Microsoft developer related announcements over the last few days. Since I use WSL every single day I am really looking forward to this WSL 2 release.

Initial tests that we’ve run have WSL 2 running up to 20x faster compared to WSL 1 when unpacking a zipped tarball, and around 2-5x faster when using git clone, npm install and cmake on various projects.

Significant speed improvements. But this bit really takes the cake:

WSL 2 uses an entirely new architecture that uses a real Linux kernel.

WSL 1 used an entirely different approach. They described it like this:

It is the space between the user mode Linux binaries and the Windows kernel components where the magic happens. By placing unmodified Linux binaries in Pico processes we enable Linux system calls to be directed into the Windows kernel. The lxss.sys and lxcore.sys drivers translate the Linux system calls into NT APIs and emulate the Linux kernel.

WSL 1 is a light-weight emulated Linux experience that allows us to use things like Bash commands within Windows without a full VM. WSL 2 is full Linux kernel properly piped to use the Windows stack.

I’m no expert in these sorts of things but this work seems pretty amazing on the surface and using it every day has been great and it has gotten better very rapidly.

Leave a Reply