概述
1.What is a performance metric?
Before we can begin to understand any aspect of a computer system’s performance,we must determine what things are interesting and useful to measure.The basic characteristics of a computer system that we typically need to measure are:
• a count of how many times an event occurs;
• the duration of some time interval;
• the size of some parameter.
For instance,we may need to count how many times a processor initiates an input /output request.We may also be interested in how long each of these requests takes.Finally,it is probably also useful to determine the number of bits transmitted and stored.
From these types of measured values,we can derive the actual value that we wish to use to describe the performance of the system.This value is called a performance metric.
2.Processor and system performance metrics
1)The clock rate
In many advertisements for computer systems,the most prominent indication of performance is often the frequency of the processor’ s central clock.The implication to the buyer is that a 250 MHz system must always be faster at solving the user’ s problem than a 200 MHz system,for instance.However,this performance metric completely ignores how much computation is actually accomplished in each clock cycle,it ignores the complex interactions of the processor with the memory subsystem and the input /output subsystem,and it ignores the not at all unlikely fact that the processor may not be the performance bottleneck [1].
2)MIPS
A throughput or execution-rate performance metric is a measure of the amount of computation performed per unit time.Since rate metrics are normalized to a common basis,such as seconds,they are very useful for comparing relative speeds.For instance,a vehicle that travels at 50 m/s will obviously traverse more ground in a fixed time interval than will a vehicle traveling at 35 m/s.
The MIPS metric is an attempt to develop a rate metric for computer systems that allows a direct comparison of their speeds.While in the physical world speed is measured as the distance traveled per unit time,MIPS defines the computer system’s unit of“distance” as the execution of an instruction.Thus,MIPS,which is an acronym for millions of instructions executed per second,is defined to be
(2. 1)
where is the time required to execute n total instructions.
3.SPEC
To standardize the definition of the actual result produced by a computer system in“typical”usage,several computer manufacturers banded to together to form the System Performance Evaluation Cooperative(SPEC).This group identified a set of integer and floating-point benchmark programs that was intended to reflect the way most workstation-class computer systems were actually used.Additionally,and,perhaps,most importantly,they also standardized the methodology for measuring and reporting the performance obtained when executing these programs.
4.Benchmark programs
To measure the maximum speed of an automobile,it must be in motion.Similarly,a computer must be executing some sort of program when you attempt to measure any aspect of its performance.Since you are ultimately interested in how the computer performs[2] on your application programs,the best program to run is,obviously,one of your own applications. Unfortunately,this is not always possible since a substantial amount of time and effort may be required to port your existing application to a new computer system.It will perhaps not be cost-effective to port the application if the only goal is to measure the performance of the new system.
Owing to these practical and logistical difficulties in running your application program on the system or systems being evaluated,you instead are often forced to rely on making measurements while the computer system is executing some other program.This surrogate program is referred to as a benchmark program since it is used as a standard reference for comparing performance results.
Since different application domains have different execution characteristics,a wide range of benchmark programs has been developed in the attempt to characterize these different domains.Furthermore,different types of benchmarks satisfy the needs of many different types of users.Designers of new computer systems,for instance,often need benchmarks during the early stages of the design process that are focused on exercising specific components of the system.Since these early design stages typically rely on simulations to estimate performance,these benchmarks must be relatively small and easy to use.A large organization deciding which of several systems to purchase,on the other hand,may be committing a large sum of money on the basis of results of their performance tests.Consequently,they need much more complete benchmark programs that more accurately characterize their application environment.
1.什么是性能指标
在开始了解计算机系统某一方面的性能之前,必须决定量度哪些东西是有意义和有用的。通常需要量度的计算机系统基本性能是:
一个事件发生了多少次;
某个时间间隔的持续时间;
某个参数的大小。
例如,可能需要统计处理器启动一个I/O请求的次数,也可能对这些请求持续多长时间感兴趣。最后,确定所传输和存储的位数也可能是有用的。
从这几种类型的测量值中,我们能够导出希望用于描述该系统性能的实际值,这个值称为性能度量指标。
2.处理器和系统的性能指标
l)时钟频率
很多计算机系统的广告中,最突出的性能指标通常是处理器中央时钟的频率。这对购买者暗示,使用250MHz的系统解决用户的问题比200MHz的系统快。然而,这一性能指标完全不管在每一时钟周期内实际完成了多少次运算,也不管处理器与存储器子系统和输入输出子系统之间的复杂交互,根本没有考虑处理器未必是性能的瓶颈这一事实。
2)MIPS(百万指令每秒)
吞吐量或执行速率的性能指标是单位时间内完成的计算量的度量。由于速率指标以秒为时间基准,是规范化的,故用于比较相对速度非常有用。例如,在固定的时间间隔内每秒走50m的车很明显比每秒走35m的要快。
人们力图以MIPS作为计算系统速率指标,它允许直接比较计算速度。如果把物理上的速度定为单位时间的移动距离,则MIPS定义了计算机系统执行指令的“距离”单位。因此,作为每秒执行百万条指令数的英文首字母缩略语MIPS定义为
(2.1)
式中te为执行全部n条指令所需的时间。
3.SPEC
为了在“典型”应用中对计算机系统产生的实际结果的定义加以标准化,几家计算机制造厂商联手成立了系统性能评价合作组织(SPEC)。该组织选定了一组整数和浮点基准程序,力图反映大多数实际使用的工作站级计算机系统性能。此外,同时也许是最重要的,他们也使通过执行这些程序对性能进行测量和报告的方法标准化了。
4.基准程序
为了测量一辆汽车的最高速度,汽车必须开动。同样,要测量计算机的任何性能时,必须让计算机执行某种程序。因为用户最终的兴趣是计算机在执行应用程序时的表现,很明显,要运行的程序最好是用户自己的一个应用程序。但不幸的是,由于大量的时间和精力要用于移植用户的应用程序到一个新的计算机系统中,而这总是不太可能的。如果仅仅为了测量新系统的性能,移植应用程序多半是不经济的。
由于在已有系统或正接受评价的系统上运行用户的应用程序有这样和那样的一些实际困难,往往被迫转向在该计算机系统正在执行其他程序时进行测量。这种代用程序叫做基准程序,因为它是用作比较最后性能的参考标准。
由于不同的应用领域有不同的运行特性,所以开发了范围很广的基准测试程序,目的是不同领域的特性。不同类型的基准程序满足了很多不同类型用户的需要。例如,新的计算机系统的设计者,常常在设计过程的初期需要用基准测试程序去集中检查系统的特定部件。因为早期设计阶段一般要依靠模拟测试来评价性能,所以这些基准程序必须相对短小和容易使用。另一方面,大单位从几种系统中选购一种时,要依据这些系统性能测试结果而支付大额款项,因而,他们需要更完整的基准程序套件,以便更准确地表征其应用环境。
最后
以上就是文艺西牛为你收集整理的计算机性能的量度的全部内容,希望文章能够帮你解决计算机性能的量度所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复