windows 我可以使用哪些工具来确定我的应用程序的硬件要求?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3227766/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What tools can I use to determine the hardware requirements of my application?
提问by Tom Wright
For regular readers: The saga? continues...
对于普通读者:传奇?继续...
My app runs fine on my development machine - which was purchased (5 years ago) as a fairly good gaming rig. As such, it's 64bit, has a 2.2GHz clock-speed and has 2GB of memory.
我的应用程序在我的开发机器上运行良好 - 这是(5 年前)作为一个相当不错的游戏装备购买的。因此,它是 64 位的,时钟速度为 2.2GHz,内存为 2GB。
The machines at work however, are standard Dell issue office computers and really struggle to even start my app, let alone run it.
然而,工作中的机器是标准的戴尔办公电脑,甚至很难启动我的应用程序,更不用说运行它了。
(Explanation... I can imagine people screaming at me: "What on earth are you doing to require a spec like that?" Well, I'm doing a lot of real time image analysis and audio generation. So there.)
(解释......我可以想象人们对我尖叫:“你到底在做什么才能要求这样的规范?”好吧,我正在做很多实时图像分析和音频生成。所以。)
Our team has the budget to buy a dedicated laptop (needs to be portable) to run it on. So now I've been tasked with generating a minimum required spec.
我们的团队有预算购买一台专用的笔记本电脑(需要便携)来运行它。所以现在我的任务是生成最低要求的规范。
What tools can I use to determine the lowest spec capable of comfortably running my app?
我可以使用哪些工具来确定能够轻松运行我的应用程序的最低规格?
Update:The answers so far, whilst useful, focus more on alternatives to profiling. So I've put up a bounty to see if there is any software that'll do this sort of thing.
更新:到目前为止的答案虽然有用,但更多地关注分析的替代方案。所以我悬赏来看看是否有任何软件可以做这种事情。
采纳答案by Matt
Do you have access to a good profiler? I think it would be worthwhile to understand the performance bottlenecks in your application. If it turns out that your application is CPU bound, then you'll obviously want to consider splurging on a high-end processor. Is the application multi-threaded? If so, is your application taking advantage of multiple processors or is it getting serialized because of synchronization?
您可以使用一个好的分析器吗?我认为了解应用程序中的性能瓶颈是值得的。如果事实证明您的应用程序受 CPU 限制,那么您显然要考虑在高端处理器上挥霍。应用程序是多线程的吗?如果是这样,您的应用程序是利用多个处理器还是因为同步而被序列化?
If the application is IO bound, perhaps you should instead consider getting an SSD drive.
如果应用程序受 IO 限制,也许您应该考虑使用 SSD 驱动器。
Perhaps the app is spending too much time paging? etc...
也许该应用程序花费了太多时间进行分页?等等...
If you have access to Visual Studio 2010 Ultimate, I'd recommend checking out the Concurrency Profiler. It will help you visualize what's happening in your program and identify the performance bottlenecks. It will show you where your app is spending time: waiting on IO, memory management, etc. While this tool certainly won't tell you what the minimum hardware requirements are, it should give you a good idea of what hardware improvements will help your app perform better.If you don't have VS2010, you could probably conduct a similar analysis with any good profiler. The cool thing about the Concurrency Visualizer is that it focuses on exposing concurrent and multi-threaded performance problems.
如果您可以访问 Visual Studio 2010 Ultimate,我建议您查看Concurrency Profiler。它将帮助您可视化程序中发生的情况并确定性能瓶颈。它会告诉你你的应用程序在哪里花费时间:等待 IO、内存管理等。虽然这个工具肯定不会告诉你最低硬件要求是什么,但它应该让你很好地了解哪些硬件改进将帮助你应用程序性能更好。如果您没有 VS2010,您可能可以使用任何好的分析器进行类似的分析。Concurrency Visualizer 最酷的地方在于它专注于暴露并发和多线程性能问题。
回答by Scrappydog
Nothing beats real world testing...
没有什么能比得上现实世界的测试......
Try running your app on a variety of hardware and come up with a recommended minimum based on YOUR PERCEPTION of acceptable performance.
尝试在各种硬件上运行您的应用程序,并根据您对可接受性能的看法提出建议的最低要求。
Note: There is often a big difference between absolute minimum hardware requirements and recommended minimum acceptable requirements (which it sounds like is what you are really after).
注意:绝对最低硬件要求和推荐的最低可接受要求之间通常存在很大差异(这听起来像是您真正想要的)。
回答by bta
One option is to create a series of virtual machines with varying system configurations and try your app out in each (you will want to do this on a high-performance machine). That way, you can adjust the amount of memory the VM has, the CPU type, etc and simulate testing the software on a variety of systems. While testing, you can use the Windows Task Manager to see how much of the host CPU and memory your app is using. For a comfortable experience, you will want your app to fit within physical memory as much as possible (plus about 1-1.5 GB for the OS and other background services).
一种选择是创建一系列具有不同系统配置的虚拟机,并在每个虚拟机中试用您的应用程序(您将希望在高性能机器上执行此操作)。这样,您可以调整 VM 的内存量、CPU 类型等,并在各种系统上模拟测试软件。在测试时,您可以使用 Windows 任务管理器查看您的应用程序使用了多少主机 CPU 和内存。为了获得舒适的体验,您会希望您的应用程序尽可能地适合物理内存(加上大约 1-1.5 GB 用于操作系统和其他后台服务)。
Also keep in mind whether your app has any features that require hardware support (DirectX 11, CUDA, etc) and make sure that you include that in your hardware requirements.
还要记住您的应用程序是否有任何需要硬件支持的功能(DirectX 11、CUDA 等),并确保将其包含在您的硬件要求中。
回答by Joel Mansford
From the brief info it doesn't sound like your PC is a particularly high spec. What spec are the Dell machines you've seen run it slow?
从简要信息来看,您的 PC 听起来并不是特别高的规格。你见过的戴尔机器运行速度慢是什么规格?
I'd try another PC in case the 'work' machines are just bad software builds (guessing standard XP disk controller drivers etc).
如果“工作”机器只是糟糕的软件版本(猜测标准的 XP 磁盘控制器驱动程序等),我会尝试另一台 PC。
I wouldn't generally recommend going down the VM route as really that's only any good for constraining RAM usage. If however you need to check alternative OS's / Service Packs then VMs ARE a good way to go.
我通常不建议沿着 VM 路线走下去,因为这实际上只对限制 RAM 使用有好处。但是,如果您需要检查替代操作系统/服务包,那么虚拟机是一个不错的选择。
Lastly you say the app is slow to load, what is it doing on load? It may be an idea to look at the performance monitors to see whether it is disk, RAM or CPU constrained. Use Google to find useful counters for monitoring each.
最后你说应用加载很慢,它在加载时做了什么?查看性能监视器以查看它是否受磁盘、RAM 或 CPU 限制可能是一个想法。使用 Google 查找有用的计数器来监控每个计数器。
回答by High Performance Mark
Forgive me for stating the b*****g obvious but:
请原谅我陈述了明显的 b*****g 但是:
Use YOUR software to check the hardware requirements for YOUR software.
使用您的软件检查您的软件的硬件要求。
I don't quite understand why the spec of your development machine isn't simply the required spec for the laptop you propose to buy. But if that's not good enough for some reason, run your software on some hardware with other specifications. You could, for example take 1GB RAM out of your development machine to see how things go with less memory available.
我不太明白为什么您的开发机器的规格不仅仅是您打算购买的笔记本电脑所需的规格。但是,如果由于某种原因这还不够好,请在具有其他规格的某些硬件上运行您的软件。例如,您可以从开发机器中取出 1GB RAM,以查看可用内存较少的情况。
There is a huge amount of benchmarking software available for all sorts of tasks. For example LINPACK is much used for benchmarking supercomputers. The flaw in all of these off-the-shelf benchmarks, and in the approach in general, is that they only give you good information about how a computer runs the benchmark. Transforming benchmark results into predictions of performance of hardware with your software is more an art than a science. In the supercomputer world organisations benchmark their own key applications on new platforms before purchasing.
有大量的基准测试软件可用于各种任务。例如,LINPACK 多用于对超级计算机进行基准测试。所有这些现成的基准测试以及一般方法的缺陷在于,它们只能为您提供有关计算机如何运行基准测试的良好信息。使用您的软件将基准测试结果转换为对硬件性能的预测与其说是科学,不如说是一门艺术。在超级计算机世界中,组织在购买之前在新平台上对他们自己的关键应用程序进行基准测试。