Performance comparison between WSL and WSL2 in Windows 10 May 2020

Tech Media Phoronix tested the performance of WSL and WSL 2 in Windows 10 May 2020 with Ubuntu 20.04 on WSL/WSL2 and Ubuntu 20.04 LTS, both installed in pc bare metal outside of Windows.

The computer hardware devices used for this test are the Intel Core i9 10900K (Comet Lake) CPU, paired with 2 x 8GB DDR4-3200 memory, Samsung 970 EVO 250GB NVMe SSD hard drive, Gigatech Z490 AORUS MASTER and Radeon RX 5700 XT graphics. The specific test environment is as follows:

Performance comparison between WSL and WSL2 in Windows 10 May 2020

With the Phoronix test suite, dozens of different benchmarks were performed. The test results are as follows:

Performance comparison between WSL and WSL2 in Windows 10 May 2020

As you can see from the test results above, WSL2 performs best when performing heavy CPU workloads, such as machine learning LC0 chess benchmarking and NAMD testing. In namD testing, WSL performs the same as WSL2, slightly faster than Ubuntu. In LC0 testing, WSL2 performs faster. Especially in the scenario where the Eigen backend was used in LC0 testing, WSL2’s performance was even slightly ahead of Ubuntu itself — perhaps because Windows provided better power management behavior or similar behavior.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

The figure above is the result of testing some Java workloads, and it’s clear that WSL2 performs better than WSL. The test was using OpenJDK, and the best performance was the bare metal version of Ubuntu 20.04.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

When testing with some applications, it is rare to see that WSL performs better than WSL2. However, from the overall results of this test, the performance of WSL/WSL2 is also very close to the performance of the bare metal version Ubuntu 20.04, the three are very similar.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

The above tests do not see the performance gap between the three, because overall it’s pretty good. But if you look closely, the bare metal version of Ubuntu 20.04 still has a slight advantage.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

The test results here show that WSL2 does outperform Ubuntu 20.04 slightly when tested with other programs.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

The test results in the figure above reflect the performance in terms of I/O operations. This is the WSL’s short board, where poor performance just includes I/O operations, a disadvantage that many users have criticized since its inception. By WSL2, it took a more virtual machine-like approach, resulting in a significant increase in I/O throughput. WSL2’s code compilation performance is even the same as Ubuntu 20.04.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

WSL2 generally performs “good enough” in at least every workload for users who may have to use Windows 10 for some reason. Even in various kernel micro-benchmarks tests, WSL2 is essentially the same as Ubuntu 20.04 and its Linux 5.4 core.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

Performance comparison between WSL and WSL2 in Windows 10 May 2020

The figure above reflects the performance of the socket activity and context switching, and WSL2 is much better than both WSL and Ubuntu 20.04 due to architectural changes.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

The figure above shows how well you do on WSL/WSL2 in most CPU-only workload scenarios, such as renderers.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

Facebook’s RocksDB database performs similarly between WSL2 and Ubuntu 20.04 LTS, while in WSL, poor I/O performance leads to poor results.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

Even using Git in WSL2 is a huge speed boost than WSL.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

This test consists of a total of 69 tests. Ubuntu 20.04 LTS won 60% of the tests, which means an interesting result, with 40% of tests WSL/WSL2 faster than Ubuntu 20.04 LTS itself, although usually won by a narrow margin.

Performance comparison between WSL and WSL2 in Windows 10 May 2020

When comparing the geometric averages of the 69 benchmark results of the three, WSL2 performs approximately 21% better than the WSL, while Ubuntu 20.04 is only 8% faster. WSL2 has a faster I/O because it addresses the major bottlenecks in WSL. More noteworthy is that the performance of WSL2 is very close to that of Ubuntu itself. View all 69 benchmarks with OpenBenchmarking.org.

Read morehttps://www.phoronix.com/