虚拟机CPU性能

In the last post on Virtual Machine Performance Tips I said, here are some realistic goals for your Guest OS (VM) performance, that I originally got from J. Sawyer at Microsoft:

在上一篇有关虚拟机性能提示的文章中,我最初是从Microsoft的J. Sawyer获得的,这些是您的Guest OS(VM)性能的一些现实目标:

  • Ideally Virtual PC performance is at:

    理想情况下,Virtual PC的性能为:

    • CPU: 96-97% of host

      CPU:主机的96-97%

    • Network: 70-90% of host

      网络:主机的70-90%

    • Disk: 40-70% of host

      磁盘:主机的40-70%

    Ideally Virtual PC performance is at:

    理想情况下,Virtual PC的性能为:

In the comments Vincent Evans said:

文森特·埃文斯在评论中说:

From personal experience with VM (running in MS Virtual Server) - i have grave doubts about your claim of VM CPU performance approaching anywhere near 90% of native.

从VM的个人经验(在MS Virtual Server中运行)得出的结论,我对您声称VM CPU性能接近本机的90%表示怀疑。

Can you put more substance behind that claim and post a CPU benchmark of your native server vs. vm running on that server? For example i used a popular prime number benchmark (can't remember the name, wprime maybe? not sure.) and my numbers were more like 70% of native.

您能否在此主张后再加上实质内容,并发布本机服务器与在该服务器上运行的vm的CPU基准测试? 例如,我使用了流行的素数基准(可能不记得这个名字,也许wprime?不确定)。我的数字更像是本地人的70%。

I agreed, so I took a minute during lunch and ran a few tests. For the test I used the Freely Available IE6 WindowsXP+SP2 Test Virtual Machine Image along with the Free Virtual PC 2007 and Virtual Server 2005 R2 as well.

我同意了,所以我在午餐时间花了一点时间并进行了一些测试。 对于测试,我使用了免费提供的IE6 WindowsXP + SP2测试虚拟机映像以及免费的Virtual PC 2007Virtual Server 2005 R2

These are neither scientific, nor are they rigorous. They are exactly what they claim to me. They are me running some tests during lunch, so take them as such. I encourage those of you who care more deeply than I to run your own tests and let me know why these results either suck, or are awesome.

这些既不科学,也不严格。 他们正是他们对我的要求。 他们是我在午餐时间进行一些测试,所以就这样吧。 我鼓励你们中那些比我更关心的人进行自己的测试,并让我知道为什么这些结果不好或太棒了。

I used wprime to calculate the square roots of the first 4,194,303 numbers. Wprime can spin up multiple threads, and this was significant because my system has two processors, so you'll see what kind of a difference this made in the tests.

我使用wprime来计算前4,194,303个数字的平方根。 Wprime可以启动多个线程,这很重要,因为我的系统有两个处理器,因此您将看到在测试中有什么不同。

Both Virtual PC and Virtual Server only let the Guest OS use one of the processors, so I did the tests on the Host OS with one, then two processors, to make sure the difference is clear.

Virtual PC和Virtual Server都只允许来宾OS使用其中一个处理器,因此我在主机OS上先进行了测试,然后再进行了两个处理器的测试,以确保两者之间的区别显而易见。

我的硬件(从主机操作系统中的wprime看到) (My Hardware (as seen by wprime from the Host OS))

>refhw
CPU Found: CPU0
Name: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
Speed: 2326 MHz
L2 Cache: 4096 KB
CPU Found: CPU1
Name: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
Speed: 2326 MHz
L2 Cache: 4096 KB
>refhw
CPU Found: CPU0
Name: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
Speed: 2326 MHz
L2 Cache: 4096 KB
CPU Found: CPU1
Name: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz
Speed: 2326 MHz
L2 Cache: 4096 KB

结果 (Results)

Looks like for both tests a VM's CPU, when stressed, runs at just about 90% of the speed of the Host OS, which is lower than the Goal of 96-97% I printed earlier. Tomorrow I'll update this post by rebooting and going into the BIOS and turning off my system's Hardware Assisted Virtualization and seeing if that makes a difference. If the results are lower (I assume they are) then that'll just confirm that VT Technology is useful - I assume that's a fair assumption.

看起来,对于这两个测试,VM的CPU都在承受压力时仅以主机OS速度的90%运行,这比我先前打印的目标96-97%的速度要低。 明天,我将通过重新引导并进入BIOS并关闭系统的硬件辅助虚拟化并查看是否有所作为来更新本文。 如果结果较低(我认为是这样),那只会证实VT Technology有用的-我认为这是一个公平的假设。

You can try these tests yourself on your own machines using wprime. Just make sure you tell wprime how many threads to use in your Host OS, depending on your number of processors. Thanks to Vincent for encouraging the further examination!

您可以使用wprime在自己的计算机上尝试这些测试。 只要确保告诉wprime主机操作系统中要使用多少个线程,就取决于处理器的数量。 感谢Vincent鼓励进一步检查!

翻译自: https://www.hanselman.com/blog/virtual-machine-cpu-performance

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值