如何准备持续的基准环境

发布于 2024-12-19 07:09:01 字数 126 浏览 2 评论 0原文

当我进行图形基准性能测试(C++)时,我发现应用程序有时会有点快或慢。这与当前操作系统状态/缓存/内存使用情况以及图形硬件状态有关。

我用的是Win7。我想知道是否有一些指南告诉我如何获得稳定/恒定的环境进行基准性能测试?

When I am doing graphics benchmark performance test (C++), I find the application is sometimes a little faster or slower. And this is related with current operating system status/caches/memory usage, and graphics hardware status.

I am using Win7. I am wondering if there is some guideline to tell me how to get a stable/constant environment for benchmark performance testing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

戏剧牡丹亭 2024-12-26 07:09:01

有很多方法可以做到这一点 - 我在测试中倾向于使用 WAIK(Windows 自动安装工具包,可从 Microsoft 免费获得)在单独的工作站上部署最小的 Windows 7 系统。

然后,需要考虑/更改以下配置项(尽量不要偏离典型的用户计算机太多,否则您的基准测试将没有建设性):

  • 将分页文件设置为静态 2x RAM
  • 禁用自动更新
  • 禁用驱动器索引

这些 可以代表高级用户(即使我使用自动更新和驱动器索引,我也会在我离开/睡觉时安排它们)

代表一个相当最佳的测试环境,爱好者仍然可以获得,因此 为了缓存和内存使用情况 - 至少在 Win7 Professional 中,您可以编写远程启动脚本 - 例如,我会让一个脚本过夜运行我的基准测试(用于大型回归测试),每次运行后重新启动操作系统。或者我会在不重新启动的情况下运行相同的基准测试 5-10 次,以查看缓存使用情况是否发生变化。

最后,还有引导加载程序开关来控制处理器数量和可用 RAM 数量 - 我的测试机器是具有 16GB RAM 的 AMD Phenom X6,但我们需要测试性能如何随核心数量变化(有些用户会单核系统,有些会有多核系统),以及 RAM 量(从 1-16GB)。

这通常在检查点发布之前完成,以查看是否由于此后发生的额外功能和额外优化而需要调整推荐或最小推荐。

There are many ways to do that - what I tend to do for my testing, is using WAIK (Windows Automated Installation Kit, available free of charge from Microsoft), to deploy a minimal windows 7 system on a separate workstation.

Then, the following configuration items need to be considered/changed (try not to deviate too much from a typical user machine, thou, otherwise your benchmark would not be constructive):

  • Set Paging File to static 2x RAM
  • Disable Automatic Updates
  • Disable Drive Indexing

These represent a reasonably optimal environment for testing, that is still attainable by enthusiasts, and thus can be representative of a Power-User (even if I use Automatic Updates and Drive Indexing, I schedule them both for when I'm away/sleeping)

As for caches and memory usages - at least in Win7 Professional, you can script remote startup - so for instance, I would have a script run my benchmark overnight (for large regression tests), restarting the OS after each run. Or I would run the same benchmark 5-10 times without rebooting, to see if cache usage changes.

Finally, there are bootloader switches to control the number of processors and the amount of available RAM - my test machine is an AMD Phenom X6 with 16GB of RAM, but we need to test how performance changes with the number of cores (some users would have single-core systems, and some would have multi-core systems), and with the amount of RAM (from 1-16GB).

This is usually done prior to a checkpoint release, to see if recommended or minimal recommendation need to be adjusted due to both extra features and additional optimization that happened since.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文