问题描述
在许多不同的来源上,您都可以了解有关虚拟机中的计时问题.由于每个基准测试都依赖于时间保持,因此我不确定如何解释例如apache基准测试或xdebug分析器在vmware上的结果以及它们的可信度.
On many different sources you can read about time keeping issues in virtual machines. As every benchmark relies on time keeping i am not sure how to interpret e.g. apache benchmark or xdebug profiler results on vmware and how credible they are.
http://communities.vmware.com/docs/DOC-5581
VMware建议为性能测试构建一个特殊的虚拟机.此外,还有许多技巧似乎是解决方法(安装VMware Tools,特殊配置等).
VMware suggests to build a special vm for performance testing. There are many tips in addition which seems to be workaround solutions (install VMware Tools, special configuration and so on).
尤其是在磁盘I/O性能问题上,我非常担心结果的准确性. Rasmus Lerdorf在drupalcon上谈到了这一点,并说他在统计调用方面的一些性能改进在他的VMware基准测试中是不可见的,因为VMware具有特殊的磁盘缓存,您无法与物理磁盘进行比较:
Especially when it comes to disk i/o performance issues i´m very concerned about how accurate the results are. Rasmus Lerdorf talked about it at drupalcon, saying that some of his performance improvements regarding stat calls aren´t visible in his VMware benchmarks because VMware has special disk caching you can´t compare to physical disks:
http://www. nowpublic.com/tech-biz/rasmus-lerdorf-simple-hard-drupalcon-2008-key-note
毕竟,我不确定VMware是否完全可以进行任何基准测试.
After all this I´m not sure if VMware is capable for any benchmarking at all.
推荐答案
很大程度上取决于您要执行的操作.
A lot depends on what you are trying to do.
- 只需保持测量以寻找回归
- 查找可以修复的时差,以提高性能
许多人认为这些是相同的,但我认为这是由于实际操作的经验有限(2).
Many people think these are the same, but I think that comes from limited experience actually doing (2).
我做的方式(2)不是衡量,而是在几个随机的时间点询问正在发生什么以及为什么.为此,是否在虚拟机上并不重要.如果它要花很多时间进行偷偷摸摸的事情,您将看到它是否在虚拟机上.确切的分数无关紧要.揭露偷偷摸摸的活动很重要.
The way I do (2) is not measuring, but asking, at a few random points in time, what is happening and why.For that, it doesn't matter very much if it's on a virtual machine or not.If it's doing something sneaky that takes a large fraction of time, you will see that whether or not it's on a virtual machine.The exact fraction doesn't matter. Exposing the sneaky activity is what matters.
这是一个 Python中的示例,但是您可以使用任何语言进行操作.
Here's an example in python, but you can do it in any language.
这篇关于基准测试,在虚拟机上进行性能分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!