Windows Subsystem for Linux (Ubuntu Bash on Windows) Benchmarked Against Native Ubuntu 14.04 and 16.04

Microsoft recently announced that they brought Ubuntu userspace to Windows, and that this features will be officially released in Windows 10’s Anniversary Update and called Windows Subsystem for Linux. But people part of the company’s insider program can already try the beta version of “Bash on Windows”, and Phoronix ran some benchmarks in bash in Windows 10, and repeated the tests in Ubuntu 16.04, Ubuntu 14.04, and Clear Linux. The test machine was based on an Intel Xeon E3-1280 v5 Skylake CPUwith 16GB of RAM and 120GB Samsung 850 EVO SSD.

Many of the results show Windows Subsystem for Linux (I’ll just call it Windows 10 in the rest of the post) just performing a little slower than on the Linux distributions, but there are also some outliers, which I’m going to cover here.

The most surprising results is when Windows 10 clearly outperforms Linux at its own game which should not be happening.

Click to Enlarge
Click to Enlarge

That’s the case for Stream 1.2 triad and add benchmarks. Stream is supposed to benchmark the system memory (RAM) performance. The copy operation from the same benchmark is still faster in Linux however, except in Ubuntu 14.04.

Click to Enlarge

The table below summarize the operation for the 4 stream tests:

I don’t have any explanation for the issue, but maybe some people can provide some clues in the comments.

There were also benchmarks where bash on Windows 10 is  much slower, likely due to the use of NTFS instead of EXT-4.

Click to Enlarge

The Compile bench “tries to age a filesystem by simulating some of the disk IO common in creating, compiling, patching, stating and reading kernel trees. It indirectly measures how well file systems can maintain directory locality as the disk fills up and directories age. This current test is setup to use the makej mode with 10 initial directories”. Since Ubuntu bash on Windows is designed for developers this may actually matter. The poor performance is confirmed with Timed PHP compilation benchmark.

Click to Enlarge

So it may pay off to try some other file systems if possible in Windows 10.

SciMarks v2.0 Fast Fourier Transform is another benchmark that’s quite faster in bash in Windows 10.

Click to Enlarge

That one is also odd, so there must be some operations that the Windows kernel does faster than the Linux kernel, even after the overhead of converting Linux calls to Windows calls.

Windows 10 got back to struggling with Redis open-source data structure server benchmark that’s likely reliant on storage I/Os.

Click to Enlarge

The other benchmark results where more or less in line with expectations, although there were some regressions between Ubuntu 16.04 and Ubuntu 14.04.

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

8 Replies to “Windows Subsystem for Linux (Ubuntu Bash on Windows) Benchmarked Against Native Ubuntu 14.04 and 16.04”

  1. “ubuntu userland” i.e. GNU? GNU/M$, who’d have thunk that’d be the next thing they’d want to EEE is GNU Bash.

    All tests would depend on the compiler somewhat which might explain the 14.04 differences in the memory tests. Since CPU bound things should only depend on the hardware, the main OS contributors would be the page table setup or context switching rate, or power throttling/burst modes.

    Those NTFS times mirror my experience with it (native) – it’s total junk.

  2. @FransM
    You’ve right and I guess it should be “GNU bash with Ubuntu userspace” but that’s a big too long for a title, especially I had to use other words too…

    Anyway that Bash on Ubuntu on Windows thing makes it very hard to use the right names.

  3. So he messed up storage configuration in Windows, tested different compilers and obviously syscalls (according to the screenshots the Linux subsystem reports a kernel 3.4.0). And the most interesting thing (huuuuuge standard deviation, see the Stream values above) is not even commented. Another round of useless passive benchmarking as usual 🙂

    It might be interesting how results differ if PTS would start to use optimised settings and not nonsense ‘defaults’ and demanding tests like cpuminer.

    BTW: I don’t get why bash is mentioned at all since it’s about the performance of this “Windows Subsystem for Linux” and neither bash nor Ubuntu (I would assume you can replace the whole Ubuntu userland with something else)

  4. @cnxsoft
    You start C:\Windows\System32\bash.exe (could also be called C:\Windows\System32\enter_hell.exe 😉 ) and then you get a root shell that is bash by default (I would suspect it could also be zsh or sh later), the userland will be downloaded the first time you start WSL and is a stripped down Ubuntu 14.04 LTS (x86-64) and most importantly there is no interconnection to the Windows world apart from sockets and filesystem access (/mnt/c/ — OMG). It’s a nice feature for developers that want to quickly try out things or are more familiar with Unix tools but there is no real interaction with Windows applications possible.

    Therefore the whole benchmarking approach is even more questionable than as usual with the Phoronix stuff. And when you’re talking about performance both bash/Ubuntu aren’t relevant but WSL’s syscall implementation. And even in this early stage it already seems quite performant and we might even see Linux stuff being executed faster using the Windows kernel 😉

    I had some hope there would be more integration between Linux and Windows possible with WSL. Like on OS X for example where I have full access to application objects from BSD using osascript and the like or am able to interact between Cocoa apps and BSD stuff through Automator.

  5. The storage benchmarks being bad probably reflects that the abstraction layer needs to do a lot of work for every filesystem access, emulating what the Linux expects from its filesystems, directory structure, acess rights. Benchmarks that are only bottlenecked by RAM usage or CPU power should have it easier.

  6. The differences in math performance might be due to different compilers used for making the kernels of Windows10 and Ubuntu, using different features of the CPU. Just guessin’… Otherwise it makes absolutely no sense that such simple calls yield such different results.

Leave a Reply

Your email address will not be published. Required fields are marked *