Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比

2024年 7月 19日 18.2k 0

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-1

今年初,当 Microsoft 和 Canonical 发布 Windows 10 Bash 和 Ubuntu 用户空间,我尝试做了一些初步性能测试 Ubuntu on Windows 10 对比 原生 Ubuntu,这次我发布更多的,关于原生纯净的 Ubuntu 和基于 Windows 10 的基准对比。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-2

Windows 的 Linux 子系统测试完成了所有测试,并随着 Windows 10周年更新放出。 默认的 Ubuntu 用户空间还是 Ubuntu 14.04,但是已经可以升级到 16.04。所以测试首先在 14.04 测试,完成后将系统升级升级到 16.04 版本并重复所有测试。完成所有基于 Windows 的 Ubuntu 子系统测试后,我在同样的系统上干净地安装了 Ubuntu 14.04.5 和 Ubuntu 16.04 LTS 来做性能对比。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-3

配置为 Intel i5 6600K Skylake,16G 内存和 256G 东芝 ssd,测试过程中每个操作系统都采用其原生默认配置和软件包。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-4

http://openbenchmarking.org/embed.php?i=1608096-LO-BASHWINDO87&sha=09989b3&p=2

这次 Ubuntu/Bash on Windows 和原生 Ubuntu 对比测试,采用开源软件 Phoronix 测试套件,完全自动化并可重复测试。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-5

首先是 SQLite 嵌入式数据库基准测试。这方面开箱即用的 Ubuntu/Bash on Windows 性能是相当的慢,但是如果将环境从 14.04 升级到 16.04 LTS,性能会快很多。然而,对于繁重磁盘操作的任务,原生 Ubuntu Linux 几乎比 Windows 的子系统 Linux 快了近 2 倍。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-6

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-7

编译测试作为额外的繁重磁盘操作测试显示,定制的 Windows 子系统真的成倍的限制了 Ubuntu 性能。

接下来,是一些使用 Stream 的基本的系统内存速度测试:

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-8

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-9

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-10

奇怪的是,这些 Stream 内存的基准测试显示 Ubuntu on Windows 的性能比原生的 Ubuntu 好!这个现象同时发生在基于同样的 Windows 却环境不同的 14.04 和 16.04 LTS 上。

接下来,是一些繁重 CPU 操作测试。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-11

通过 Dolfyn 科学测试,Ubuntu On Windows 和原生 Ubuntu 之间的性能其实是相当接近的。 对于 Ubuntu 16.04,由于较新的 GCC 编译器性能衰减,两个平台上的性能都较慢。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-12

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-13

透过 Fhourstones 测试和 John The Ripper 测试表明,通过在 Windows 的 Linux 子系统运行的 Ubuntu 的性能可以非常接近裸机 Ubuntu Linux 性能!

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-14

类似于 Stream 测试,x264 结果是另一个奇怪的情况,其中最好的性能实际上是使用 Linux 子系统的 Ubuntu On Windows!

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-15

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-16

计时编译基准测试非常利于裸机 Ubuntu Linux。这是应该是由于大型程序编译需要大量读写磁盘,在先前测试已经发现了,这是基于 Windows 的 Linux 子系统缓慢的一大领域。

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-17

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-18

Ubuntu 14.04/16.04 与 Windows 10 周年版 Ubuntu Bash 性能对比-19

许多其他的通用开源基准测试表明,严格的针对 CPU 的测试,Windows 子系统的 Ubuntu 的性能是很接近的,甚至是与原生安装在实际硬件中的 Ubuntu Linux 相等。

最新的 Windows 的 Linux 子系统,测试结果实际上相当令人印象深刻。让人沮丧的仅仅只是持续缓慢的磁盘/文件系统性能,但是对于受 CPU 限制的工作负载,结果是非常引人注目的。还有很罕见的情况, x264 和 Stream 测试,Ubuntu On Windows 上的性能看起来明显优于运行在实际硬件上 的Ubuntu Linux。

总的来说,体验是十分愉快的,并且在 Ubuntu/Bash on Windows 也没有遇到任何其他的 bug。如果你有还兴趣了解更多关于 Windows 和 Linux 的基准测试,欢迎留言讨论。

via: https://www.phoronix.com/scan.php?page=article&item=windows10-anv-wsl&num=1

作者:Michael Larabel 译者:VicYu/Vic020 校对:wxy

本文由 LCTT 原创编译,Linux中国 荣誉推出

相关文章

Linux 命令行的聊天工具 CenterIM
Linux 桌面年仍未到来 但 Linux 移动之年已到来
12 个在线学习 Linux 技能网站
Linux Mint : 会是另一个新的 Ubuntu 吗?
W3Conf 开发者大会将于下周召开
Ubuntu 10.04 ARM 处理器上网本版本结束服务期

发布评论