评估软件最低要求
有没有办法评估软件的最低要求? 我的意思是,我怎样才能发现我的应用程序需要的最小 RAM 量?
谢谢!
Is there a way to evaluate the minimum requirements of a software? I mean, how can I discover, for example, the minimum amount of RAM that my application will need?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
分析器在这里不会为您提供帮助。 也不会估计数据结构的大小。
探查器当然可以告诉您代码在哪里花费了最多的 CPU 时间,但它不会告诉您是否未达到性能目标 - 例如,您的用户对任何给定系统上的应用程序的性能是否满意或不满意。
简单地计算数据结构的大小以及一次可以分配的数据结构根本无法让您准确了解一段时间内的内存使用情况。 原因是内存使用量由许多其他因素决定,包括应用程序执行的 I/O 量、应用程序使用的操作系统服务,以及最重要的应用程序使用内存的时间性质。
了解最低要求的最有效方法是
您可以对 CPU 和其他组件(例如磁盘、网络或 GPU)执行相同的操作。
另请注意,这里没有简单的答案 - 有效地制定最低要求才是真正的工作。 如果您的应用程序对某个平台方面的参与性敏感,则尤其如此。
还有其他因素 - 例如,您的应用程序可能在一种配置中运行良好,直到用户打开另一个可能占用内存或占用 CPU 的应用程序。 用户很少只打开一个应用程序。
这意味着,除了指定最低要求之外,您还必须有效地设置用户期望 - 即解释您的应用程序何时表现良好,何时表现不佳,以及影响性能的因素是什么。
[1]:http://msdn.microsoft.com/en-us/ Library/ms751538.aspx强文本
A profiler will not help you here. Neither will estimating the size of data structures.
A profiler can certainly tell you where your code is spending the most CPU time, but it will not tell you if you are missing performance targets - e.g. if your users will be happy, or unhappy with the performance of your application on any given system.
Simply computing the size of data structures, and how many may be allocated at any one time will not at all give you an accurate picture of memory usage over time. The reason is that memory usage is determined by many other factors including how much I/O your application does, what OS services your application uses, and most importantly the temporal nature of how your application uses memory.
The most effective way to understand minimum requirements is to
You can do the same with the CPU and other components such as disk, networking or the GPU.
Also note that there is no simple answer here - doing an effective job at setting minimum requirements is real work. This is especially true if your application is participatory sensitive to one platform aspect or another.
There are other factors as well - for example, your app may run fine in one configuration until the user opens another application that may be memory hungry or a CPU pig. Users rarely only have one application open.
This means that in addition to specifying minimum requirements you must do an effective job in setting user expectations - that is explaining when your application will perform well, and when it won't, and what the factors are that impact performance.
[1]: http://msdn.microsoft.com/en-us/library/ms751538.aspxstrong text
理想情况下,您可以根据目标受众确定软件的最低要求,然后在开发过程中根据该配置测试您的软件,以确保它提供令人满意的体验。
您可以查看运行您的软件的系统,了解您的应用程序消耗了多少内存,并使用它来指导消耗了多少内存。 CPU 有点复杂 - 您可以尝试对 CPU 要求进行建模,但准确地做到这一点可能具有挑战性。
但最终,您需要在目标基础系统上测试您的应用程序。
Ideally, you'd decide on the minimum requirements of a piece of software based on your target audience, and then test your software during development on that configuration to ensure it delivers a satisfactory experience.
You can look at a system running your software and see how much memory is being consumed by your application, and use that to guide how much memory is being consumed. CPU is a little bit more complex - you could try to model your CPU requirements, but doing this accurately can be challenging.
But ultimately, you need to test your app on the base system you are targeting.
给定应用程序使用的数据结构,估计它们在正常使用中将占用多少空间。 使用该估计,设置许多机器(虚拟或物理)以在不同场景(即不同的目标操作系统、不同的虚拟内存设置等)下测试估计。
然后衡量应用程序在不同场景下的性能。 您的最低设置将是性能最差但仍可接受的机器。
Given the data structures used by the application, estimate how much space they will take up in normal use. Using that estimation, set up a number of machines (virtual or physical) to test the estimate in different scenarios (i.e. different target operating systems, different virtual memory settings, etc).
Then measure the performance of the application in the different scenarios. Your minimum settings will be the machine that performs the least adequately while still being acceptable.
您可以在对软件进行压力测试时尝试使用性能分析器。
You could try using a performance profiler on your software while stress testing it.
您可以使用虚拟化在虚拟机中重复运行具有不同 RAM 量的代表性测试套件……当性能由于交换而低于可接受的水平时,您就发现了内存需求。
You could use virtualization to repeatedly run a representative test suite with different amounts of RAM in the virtual machine...when the performance falls below acceptable levels due to swapping, you've found the memory requirement.