Initial Benchmarks Of Microsoft's WSL2 - Windows Subsystem For Linux 2 On Windows 10 Is A Mixed Bag
Since the release of WSL2 as a Windows 10 Insider Preview update this week, we've been putting the new Windows Subsystem for Linux 2 under some benchmarks compared to WSL1 and bare metal Linux. While WSL2 has improved the I/O performance thanks to the new Hyper-V-based virtualization approach employed by WSL2, the performance has regressed in other areas for running Linux binaries on Windows 10. Here are our preliminary benchmark results.
In this comparison is a look at the Windows 10 WSL1 performance against that of the new WSL2 when using the same Windows 10 Insiders build as of this week that introduced the Windows Subsystem for Linux 2 support. The Ubuntu 18.04 LTS WSL instance was used for testing with its default packages. In addition to looking at the WSL1 vs. WSL2 performance of Ubuntu 18.04, Ubuntu 18.04.2 LTS itself was also tested bare metal on the same system for looking at the raw performance of Ubuntu on the Intel desktop being tested. Additionally, Clear Linux 29920 was also tested for what has largely become a "gold standard" for Linux performance in showing what Intel systems are capable of achieving performance-wise under Linux, so that is being used in this comparison as a reference point.
Originally the plan was also to test Hyper-V itself with an Ubuntu image but it was crashing often on this latest Windows 10 build so that wasn't possible. Likewise, the latest Oracle VM VirtualBox was running into issues on this new Windows 10 build so it was not tested as another VM reference point. But additional WSL2 performance benchmarks will be coming soon with this just being an initial look at the WSL2 performance capabilities.
The same system was used for all the benchmarking and was an Intel Core i7 8700K Coffeelake system with 16GB of DDR4 RAM, 128GB Toshiba NVMe solid-state drive, ASUS TUF Z370-PLUS motherboard, and Intel UHD Graphics 630. Each OS was kept in its default state except where otherwise noted. Facilitating all of these Windows 10 and Linux benchmarks was the open-source Phoronix Test Suite benchmarking software.