{"id":40,"date":"2018-07-18T07:31:08","date_gmt":"2018-07-18T07:31:08","guid":{"rendered":"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=40"},"modified":"2018-08-03T06:54:35","modified_gmt":"2018-08-03T06:54:35","slug":"summarizing-performance-amdahls-law-and-benchmarks","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/chapter\/summarizing-performance-amdahls-law-and-benchmarks\/","title":{"rendered":"Summarizing Performance, Amdahl\u2019s law and Benchmarks"},"content":{"raw":"<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The objectives of this module are to discuss ways and means of reporting and summarizing performance, look at Amdahl\u2019s law and discuss the various benchmarks for performance evaluation.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">We've already looked at the performance equation in the earlier module. You know that the CPU execution time is the most consistent measure of performance and the CPU execution time per program is defined as the number of instructions per program multiplied by the average number of clock cycles per instruction multiplied by the clock cycle time. By improving any of these factors, by paying attention to the parameters that affect these factors, you can have an improvement in performance. Suppose you have only one processor, you can just find out the execution time with respect to that processor, with respect to a particular program, and even compare with another processor which executes the same program. But, what happens when these processors execute multiple programs? How do you summarize the performances and compare the performances? While comparing two processors, A and B, you will have to be careful in saying whether processor A is 10 times faster than or the other way round. You will have to be very careful here because wrong summary can be confusing. This module clarifies issues related to such queries.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">We know that the total execution time is a consistent measure of performance and the relative execution times for the same workload can also be informative. To show an example here for the importance of summarization, suppose if you have three different computer systems, which run two different programs, P1 and P2.Assume that computer A takes 1 second for executing P1 and 1000 seconds to execute P2. Similarly, B takes 10 seconds and 100 seconds respectively and c takes 20 seconds to execute both P1 and P2.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-435 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231.png\" alt=\"\" width=\"472\" height=\"158\" \/>\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\nIf you look at the individual performances,\r\n\r\n&nbsp;\r\n\r\n\u2022 A is 10 times faster than B for program P1\r\n\r\n\u2022 A is 20 times faster than C for program P1\r\n\r\n\u2022 B is 10 times faster than A for program P2\r\n\r\n\u2022 B is\u00a0 2 times faster than\u00a0 C for program P1\r\n\r\n\u2022 C is 50 times faster than A for program P2\r\n\r\n\u2022 C is 5 times faster than B for program P2\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">How do you summarize and say which computer is better? You can calculate the total execution time as 1001 seconds, 110 seconds and 40 seconds and based on these values, you can make the following conclusions:<\/p>\r\n&nbsp;\r\n\r\n\u2022 Using total execution time:\r\n\r\n\u2013\u00a0\u00a0 B is 9.1 times faster than A\r\n\r\n\u2013\u00a0\u00a0 C is 25 times faster than A\r\n\r\n\u2013\u00a0\u00a0 C is 2.75 times faster than B\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">If you want a single number to summarize performance, you can take the average of the execution timesand try to come up with one value which will summarize the performance. The average execution time is the summation of all the times divided by the total number of programs. For the given example, we have<\/p>\r\n&nbsp;\r\n\r\nAvg(A) = 500.5\r\n\r\nAvg(B) = 55\r\n\r\nAvg(C) = 20\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Here again, if you're trying to make a judgementbased on this, you have a problem because you know that P1 and P2 are not run equal number of times. So that may mislead your summary. Therefore, you could assign weights per program. Weighted arithmetic mean summarizes performance while tracking the execution time. Weights can adjust for different running times, balancing the contribution of each program.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">One more issue that has to be mentioned before we go deeper into summarization of performance is the question of the types of programs chosen for evaluation. Each person can pick his own programs and report performance. And this is obviously not correct. So, we normally look at a set of programs, a benchmark suite to evaluate performance. Later in this module, we shall discuss in detail about benchmarks. One of the most popular benchmarks is the SPEC (Standard Performance Evaluation Corporation) benchmark. So the evaluation of processors is done with respect to this.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Even with the benchmark suite, and considering weighted arithmetic mean, the problem would be how to pick weights; since SPEC is a consortium of competing companies, each company might have their own favorite set of weights, which would make it hard to reach consensus. One approach is to use weights that make all\u00a0<span style=\"text-align: initial;font-size: 1em\">programs execute an equal time on some reference computer, but this biases the results to the performance characteristics of the reference computer.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Rather than pick weights, we could normalize execution times to a referencecomputer by dividing the time on the reference computer by the time on the computerbeing rated, yielding a ratio proportional to performance. SPEC uses thisapproach, calling the ratio the SPECRatio. For example, suppose that theSPECRatio of computer A on a benchmark was 1.25 times higher than computerB; then you would know,<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-44 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-10.png\" alt=\"\" width=\"299\" height=\"178\" \/>\r\n<p style=\"text-align: justify\">Also observe that the execution times on the reference computer drop out and thechoice of the reference computer is irrelevant when the comparisons are made asa ratio.Because a SPECRatio is a ratio rather than an absolute execution time, themean must be computed using the <em>geometric<\/em> mean. (Since SPECRatios have nounits, comparing SPECRatios arithmetically is meaningless.) The formula is<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-45 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-11.png\" alt=\"\" width=\"277\" height=\"60\" \/>\r\n\r\n&nbsp;\r\n\r\nUsing the geometricmean ensures two important properties:\r\n<p style=\"text-align: justify\">1.\u00a0 The geometric mean of the ratios is the same as the ratio of the geometricmeans.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">2.\u00a0 The ratio of the geometric means is equal to the geometric mean of the performance ratios, which implies that the choice of the reference computer isirrelevant.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Hence, the motivations to use the geometric mean are substantial, especiallywhen we use performance ratios to make comparisons.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Now that we have seen how to define, measure, and summarize performance, we shall explore certain guidelines and principles that areuseful in the design and analysis of computers. This section introduces importantobservations about design, as well as an important equation to evaluate alternatives. The most important observations are:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">1. Take advantage of parallelism : We have already discussed the different types of parallelism that exist in applications and how architecture designers should exploit them. To mention a few \u2013 having multiple processors, having multiple threads of execution, having multiple execution units to exploit the data level parallelism, exploiting ILP through pipelining.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">2. Principle of Locality: This comes from the properties of programs. A widely held rule of thumb is that a program spends 90% of its execution time in only 10% of the code. This implies that we can predict with reasonable accuracy what instructions and data a program will use in the near future based on its accesses in the recent past. Two different types of locality have been observed. <\/span><em style=\"text-align: initial;font-size: 1em\">Temporal<\/em> <em style=\"text-align: initial;font-size: 1em\">locality <\/em><span style=\"text-align: initial;font-size: 1em\">states that recently accessed items are likely to be accessed in the near future. <\/span><em style=\"text-align: initial;font-size: 1em\">Spatial locality<\/em><span style=\"text-align: initial;font-size: 1em\"> says that items whose addresses are near one another tend to be referenced close together in time.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">3. Focus on the common case: This is one of the most important principles of computer architecture. While making design choices among various alternatives, always favour the most frequent case. Focusing on the common case works for power as well as for resource allocationand performance. For example, when performing the addition of two numbers, there might be overflow, but obviously not so frequent. Optimize the addition operation without overflow. When overflow occurs, it might slow down the processor, but it is only a rare occurrence and you can afford it.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In applying the simple principle of focusing on the common cases, we have to decide what the frequent case is and how much performancecan be improved by making that case faster. A fundamental law, called<em>Amdahl\u2019s Law,<\/em> can be used to quantify this principle.Gene Amdahl, chief architect of IBM's first mainframe series and founder of Amdahl Corporation and other companies found that there were some fairly stringent restrictions on how much of a speedup one could get for a given enhancement. These observations were wrapped up in <em>Amdahl's Law<\/em>. It basically states that the performance enhancement possible with a given improvement is limited by the amount that the improved feature is used. For example, you have a floatingpoint unit and you try to speed up the floatingpoint unit many times, say a 10 X speedup, but all this is going to matter only the if the floatingpoint unit is going to be used very frequently. If your program does not have floatingpoint instructions at all, then there is no point in increasing the speed of the floatingpoint unit.<\/p>\r\n&nbsp;\r\n\r\nThe performance gain from improving some portion of\u00a0 a computer is calculated by:\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-46 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12.png\" alt=\"\" width=\"627\" height=\"159\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Amdahl\u2019s Law gives us a quick way to find the speedup from some enhancement,which depends on two factors:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: justify;font-size: 1em\">1.\u00a0<\/span><em style=\"text-align: justify;font-size: 1em\">The fraction of the computation time in the original computer that can be converted to take advantage of the enhancement - <\/em><span style=\"text-align: justify;font-size: 1em\">For example, if 30 seconds of the execution time of a program that takes 60 seconds in total can use an enhancement, the fraction is 30\/60. This value, which we will call Fractionenhanced, is always less than or equal to 1.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">2.\u00a0<em>The improvement gained by the enhanced execution mode; that is, how much faster the task would run if the enhanced mode were used for the entire program - <\/em>This value is the time of the original mode over the time of the enhanced mode. If the enhanced mode takes, say, 3 seconds for a portion of the program, while it is 6 seconds in the original mode, the improvement is 6\/3. We will call this value, which is always greater than 1, Speedupenhanced.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-48 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13.png\" alt=\"\" width=\"437\" height=\"167\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">That is, suppose you define an enhancement that accelerates a fraction F of the execution time by a factor S and the remainder of the time is unaffected, then you can say, execution time with the enhancement is equal to 1 minus F, where F is the fraction of the execution time for which the enhancement is active, plus F by S, multiplied by the execution time without the enhancement. Speedup is going to be execution time without the enhancement divided by the execution time with enhancement. This is as shown above.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Amdahl\u2019s Law can serve as a guide to how much an enhancement willimprove performance and how to distribute resources to improve cost - performance.The goal, clearly, is to spend resources proportional to where timeis spent. Amdahl\u2019s Law is particularly useful for comparing the overall systemperformance of two alternatives, but it can also be applied to compare two processordesign alternatives.<\/p>\r\n&nbsp;\r\n\r\nConsider the following example to illustrate Amdahl\u2019s law.\r\n\r\nFor the RISC machine with the following instruction mix:\r\n\r\n&nbsp;\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-49 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-14.png\" alt=\"\" width=\"289\" height=\"109\" \/>\r\n<div>\r\n\r\nCPI = 2.2\r\n\r\n&nbsp;\r\n\r\nIf a CPU design enhancement improves the CPI of load instructions from 5 to 2, what isthe resulting performance improvement from this enhancement?\r\n\r\n&nbsp;\r\n\r\nFraction enhanced = F =\u00a0 45% or\u00a0 .45\r\n\r\n&nbsp;\r\n\r\nUnaffected fraction = 1- F = 100% - 45% = 55% or .55\r\n\r\n&nbsp;\r\n\r\nFactor of enhancement = S =\u00a0 5\/2 =\u00a0 2.5\r\n\r\n&nbsp;\r\n\r\nUsing Amdahl\u2019s Law:\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-50 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15.png\" alt=\"\" width=\"449\" height=\"63\" \/>\r\n\r\nYou can also alternatively calculate using the CPU performance equation.\r\n\r\n&nbsp;\r\n\r\nOld CPI = 2.2\r\n\r\nNew CPI =\u00a0 .5 x 1 + .2 x 2 +\u00a0 .1 x 3 + .2 x 2\u00a0 = 1.6\r\n\r\nSpeed up = 2.2 \/ 1.6 = 1.37\r\n\r\n&nbsp;\r\n\r\nwhich is the same speedup obtained from Amdahl\u2019s Law.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The same concept can be extended even when there are multiple enhancements. Suppose three CPU performance enhancements are proposed with the following speedups and percentage of the code execution time affected:<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-51 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16.png\" alt=\"\" width=\"444\" height=\"146\" \/>\r\n<p style=\"text-align: justify\">While all three enhancements are in place in the new design, each enhancement affects a different portion of the code and only one enhancement can be used at a time. What is the resulting overall speedup?<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-52 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17.png\" alt=\"\" width=\"509\" height=\"53\" \/>\r\n\r\nObserve that:\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022 The performance of any system is constrained by the speed or capacity of the slowest point.<\/p>\r\n\r\n<ul>\r\n \t<li style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">The impact of an effort to improve the performance of a program is primarily constrained by the amount of time that the program spends in parts of the program not targeted by the effort<\/span><\/li>\r\n<\/ul>\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The last concept that we discuss in this module is about benchmarks. To evaluate the performance of a computer system, we need a standard set of programs. Individuals cannot use their own programs that will favour their design enhancements and report improvements. So benchmarks are a set of programs that form a \u201cworkload\u201d specifically chosen to measure performance. One of the most successful attempts to create standardized benchmark applicationsuites has been the SPEC (Standard Performance Evaluation Corporation),which had its roots in the late 1980s efforts to deliver better benchmarks forworkstations. SPEC is a non-profit corporation formed to establish, maintain and endorse a standardized set of relevant benchmarks that can be applied to the newest generation of high-performance computers. SPEC develops benchmark suites and also reviews and publishes submitted results from the member organizations and other benchmark licensees.Just as the computer industry has evolved over time, so has theneed for different benchmark suites, and there are now SPEC benchmarks tocover different application classes. All the SPEC benchmark suites and theirreported results are found at <a href=\"http:\/\/www.spec.org\/\"><em>www.spec.org<\/em><em>.<\/em><\/a>The SPEC CPU suite is useful for processor benchmarking forboth desktop systems and single-processor servers.SPEC creates standard sets of benchmarks starting with SPEC89. The latest is SPEC CPU2006 which consists of 12 integer benchmarks (CINT2006) and 17 floating-point benchmarks (CFP2006).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The guiding principle of reporting performance measurements should be <em>reproducibility - <\/em>list everything another experimenter would need to duplicate theresults. A SPEC benchmark report requires an extensive description of the computerand the compiler flags, as well as the publication of both the baseline andoptimized results. In addition to hardware, software, and baseline tuning parameterdescriptions, a SPEC report contains the actual performance times, shownboth in tabular form and as a graph.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">There are also benchmark collections for power workloads(SPECpower_ssj2008), for mail workloads (SPECmail2008), for multimedia workloads (mediabench), virtualization, etc. The following programs or benchmarks are used to evaluateperformance:<\/p>\r\n&nbsp;\r\n\r\n\u2013\u00a0\u00a0 Actual Target Workload:\u00a0 Full applications that run on the target machine.\r\n\r\n\u2013\u00a0\u00a0 Real Full Program-based Benchmarks:\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022 Select a specific mix or suite of programs that are typical of targeted applications or workload (e.g SPEC95, SPEC CPU2000).<\/p>\r\n\u2013\u00a0\u00a0 Small \u201cKernel\u201d Benchmarks:\r\n<p style=\"text-align: justify\">\u2022 Key computationally-intensive pieces extracted from real programs.<\/p>\r\n\u2013\u00a0\u00a0 Examples: Matrix factorization, FFT, tree search, etc.\r\n\r\n\u2022 Best used to test specific aspects of the machine.\r\n\r\n\u2013\u00a0\u00a0 Microbenchmarks:\r\n\r\n<\/div>\r\n<span style=\"text-align: initial;font-size: 1em\">\u00a0 \u00a0 \u2022 Small, specially written programs to isolate a specific aspect of performance characteristics: Processing: integer, floating point, local memory, input\/output, etc.<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: justify;font-size: 1em\">Each of these have their merits and demerits. So, it is always a suite of programs that is chosen so that the disadvantages of one will be outweighed by the advantages of the other.<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: justify;font-size: 1em\">Do we have other methods of evaluating the performance, instead of the execution time? Can we consider MIPS (Millions of Instructions Per Second) as a performance measure?<\/span>\r\n\r\n&nbsp;\r\n\r\n<span style=\"text-align: justify;font-size: 1em\">For a specific program running on a specific CPU, the MIPS rating is a measure of how many millions of instructions are executed per second:<\/span>\r\n<div>\r\n\r\n&nbsp;\r\n\r\nMIPS\u00a0 Rating =\u00a0 Instruction count \/\u00a0 (Execution Time x 106)\r\n\r\n=\u00a0 Instruction count\u00a0 \/\u00a0 (CPU clocks x Cycle time x 106)\r\n<p style=\"text-align: justify\">=\u00a0 (Instruction count\u00a0 x Clock rate)\u00a0 \/\u00a0 (Instructioncount\u00a0 x CPI x 106)<\/p>\r\n=\u00a0\u00a0\u00a0\u00a0 Clock rate\u00a0 \/\u00a0 (CPI x 106)\r\n\r\n&nbsp;\r\n\r\nThere are however three problems with MIPS:\r\n\r\n&nbsp;\r\n\r\n\u2013 MIPS does not account for instruction capabilities\r\n<p style=\"text-align: justify\">\u2013 MIPS can vary between programs on the same computer<\/p>\r\n\u2013 MIPS can vary inversely with performance\r\n\r\n&nbsp;\r\n\r\nThen, under what conditions can the MIPS rating be used to compare performance of different CPUs?\r\n\r\n&nbsp;\r\n\r\n\u2022 The MIPS rating is only valid to compare the performance of different CPUs provided that the following conditions are satisfied:\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">1.\u00a0 The same program is used<\/p>\r\n(actually this applies to all performance metrics)\r\n<p style=\"text-align: justify\">2. The same ISA is used<\/p>\r\n3. The same compiler is used\r\n<p style=\"text-align: justify\">(Thus the resulting programs used to run on the CPUs and obtain the MIPS rating are identical at the machine code level including the same instruction count)<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">So, MIPS is not a consistent measure of performance and the CPU execution time is the only consistent measure of performance.<\/p>\r\n&nbsp;\r\n\r\nLast of all, we should also understand that designing for performance only without considering cost and power is unrealistic\r\n\r\n&nbsp;\r\n\r\n\u2013 For supercomputing performance is the primary and dominant goal\r\n\r\n&nbsp;\r\n\r\n\u2013 Low-end personal and embedded computers are extremely cost driven and power sensitive\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">The art of computer design lies not in plugging numbers in a performance equation, but in accurately determining how design alternatives will affect performance and cost and power requirements.<\/span><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n<p style=\"text-align: justify\">To summarize, we have looked at the ways and means of summarizing performance, pointed out various factors to be considered while designing computer systems, looked at Amdahl\u2019s law, examples for quantifying the performance, the need for and the different types of benchmarks, and last of all other metrics for performance evaluation.<\/p>\r\n&nbsp;\r\n\r\n<strong>Web Links \/ Supporting Materials<\/strong>\r\n\r\n&nbsp;\r\n<ul>\r\n \t<li>Computer Architecture - A Quantitative Approach, John L. Hennessy and David A.Patterson, 5th.Edition, Morgan Kaufmann, Elsevier, 2011.<\/li>\r\n \t<li>Computer Organization and Design \u2013 The Hardware \/ Software Interface, David A. Patterson and John L. Hennessy, 4th.Edition, Morgan Kaufmann, Elsevier, 2009.<\/li>\r\n \t<li>http:\/\/en.wikipedia.org\/wiki\/<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n&nbsp;","rendered":"<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The objectives of this module are to discuss ways and means of reporting and summarizing performance, look at Amdahl\u2019s law and discuss the various benchmarks for performance evaluation.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We&#8217;ve already looked at the performance equation in the earlier module. You know that the CPU execution time is the most consistent measure of performance and the CPU execution time per program is defined as the number of instructions per program multiplied by the average number of clock cycles per instruction multiplied by the clock cycle time. By improving any of these factors, by paying attention to the parameters that affect these factors, you can have an improvement in performance. Suppose you have only one processor, you can just find out the execution time with respect to that processor, with respect to a particular program, and even compare with another processor which executes the same program. But, what happens when these processors execute multiple programs? How do you summarize the performances and compare the performances? While comparing two processors, A and B, you will have to be careful in saying whether processor A is 10 times faster than or the other way round. You will have to be very careful here because wrong summary can be confusing. This module clarifies issues related to such queries.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">We know that the total execution time is a consistent measure of performance and the relative execution times for the same workload can also be informative. To show an example here for the importance of summarization, suppose if you have three different computer systems, which run two different programs, P1 and P2.Assume that computer A takes 1 second for executing P1 and 1000 seconds to execute P2. Similarly, B takes 10 seconds and 100 seconds respectively and c takes 20 seconds to execute both P1 and P2.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-435 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231.png\" alt=\"\" width=\"472\" height=\"158\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231.png 472w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231-300x100.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231-65x22.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231-225x75.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-231-350x117.png 350w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p>If you look at the individual performances,<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 A is 10 times faster than B for program P1<\/p>\n<p>\u2022 A is 20 times faster than C for program P1<\/p>\n<p>\u2022 B is 10 times faster than A for program P2<\/p>\n<p>\u2022 B is\u00a0 2 times faster than\u00a0 C for program P1<\/p>\n<p>\u2022 C is 50 times faster than A for program P2<\/p>\n<p>\u2022 C is 5 times faster than B for program P2<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">How do you summarize and say which computer is better? You can calculate the total execution time as 1001 seconds, 110 seconds and 40 seconds and based on these values, you can make the following conclusions:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 Using total execution time:<\/p>\n<p>\u2013\u00a0\u00a0 B is 9.1 times faster than A<\/p>\n<p>\u2013\u00a0\u00a0 C is 25 times faster than A<\/p>\n<p>\u2013\u00a0\u00a0 C is 2.75 times faster than B<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">If you want a single number to summarize performance, you can take the average of the execution timesand try to come up with one value which will summarize the performance. The average execution time is the summation of all the times divided by the total number of programs. For the given example, we have<\/p>\n<p>&nbsp;<\/p>\n<p>Avg(A) = 500.5<\/p>\n<p>Avg(B) = 55<\/p>\n<p>Avg(C) = 20<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Here again, if you&#8217;re trying to make a judgementbased on this, you have a problem because you know that P1 and P2 are not run equal number of times. So that may mislead your summary. Therefore, you could assign weights per program. Weighted arithmetic mean summarizes performance while tracking the execution time. Weights can adjust for different running times, balancing the contribution of each program.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">One more issue that has to be mentioned before we go deeper into summarization of performance is the question of the types of programs chosen for evaluation. Each person can pick his own programs and report performance. And this is obviously not correct. So, we normally look at a set of programs, a benchmark suite to evaluate performance. Later in this module, we shall discuss in detail about benchmarks. One of the most popular benchmarks is the SPEC (Standard Performance Evaluation Corporation) benchmark. So the evaluation of processors is done with respect to this.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Even with the benchmark suite, and considering weighted arithmetic mean, the problem would be how to pick weights; since SPEC is a consortium of competing companies, each company might have their own favorite set of weights, which would make it hard to reach consensus. One approach is to use weights that make all\u00a0<span style=\"text-align: initial;font-size: 1em\">programs execute an equal time on some reference computer, but this biases the results to the performance characteristics of the reference computer.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">Rather than pick weights, we could normalize execution times to a referencecomputer by dividing the time on the reference computer by the time on the computerbeing rated, yielding a ratio proportional to performance. SPEC uses thisapproach, calling the ratio the SPECRatio. For example, suppose that theSPECRatio of computer A on a benchmark was 1.25 times higher than computerB; then you would know,<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-44 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-10.png\" alt=\"\" width=\"299\" height=\"178\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-10.png 299w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-10-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-10-225x134.png 225w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/p>\n<p style=\"text-align: justify\">Also observe that the execution times on the reference computer drop out and thechoice of the reference computer is irrelevant when the comparisons are made asa ratio.Because a SPECRatio is a ratio rather than an absolute execution time, themean must be computed using the <em>geometric<\/em> mean. (Since SPECRatios have nounits, comparing SPECRatios arithmetically is meaningless.) The formula is<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-45 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-11.png\" alt=\"\" width=\"277\" height=\"60\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-11.png 277w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-11-65x14.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-11-225x49.png 225w\" sizes=\"auto, (max-width: 277px) 100vw, 277px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Using the geometricmean ensures two important properties:<\/p>\n<p style=\"text-align: justify\">1.\u00a0 The geometric mean of the ratios is the same as the ratio of the geometricmeans.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">2.\u00a0 The ratio of the geometric means is equal to the geometric mean of the performance ratios, which implies that the choice of the reference computer isirrelevant.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Hence, the motivations to use the geometric mean are substantial, especiallywhen we use performance ratios to make comparisons.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Now that we have seen how to define, measure, and summarize performance, we shall explore certain guidelines and principles that areuseful in the design and analysis of computers. This section introduces importantobservations about design, as well as an important equation to evaluate alternatives. The most important observations are:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1. Take advantage of parallelism : We have already discussed the different types of parallelism that exist in applications and how architecture designers should exploit them. To mention a few \u2013 having multiple processors, having multiple threads of execution, having multiple execution units to exploit the data level parallelism, exploiting ILP through pipelining.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">2. Principle of Locality: This comes from the properties of programs. A widely held rule of thumb is that a program spends 90% of its execution time in only 10% of the code. This implies that we can predict with reasonable accuracy what instructions and data a program will use in the near future based on its accesses in the recent past. Two different types of locality have been observed. <\/span><em style=\"text-align: initial;font-size: 1em\">Temporal<\/em> <em style=\"text-align: initial;font-size: 1em\">locality <\/em><span style=\"text-align: initial;font-size: 1em\">states that recently accessed items are likely to be accessed in the near future. <\/span><em style=\"text-align: initial;font-size: 1em\">Spatial locality<\/em><span style=\"text-align: initial;font-size: 1em\"> says that items whose addresses are near one another tend to be referenced close together in time.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">3. Focus on the common case: This is one of the most important principles of computer architecture. While making design choices among various alternatives, always favour the most frequent case. Focusing on the common case works for power as well as for resource allocationand performance. For example, when performing the addition of two numbers, there might be overflow, but obviously not so frequent. Optimize the addition operation without overflow. When overflow occurs, it might slow down the processor, but it is only a rare occurrence and you can afford it.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In applying the simple principle of focusing on the common cases, we have to decide what the frequent case is and how much performancecan be improved by making that case faster. A fundamental law, called<em>Amdahl\u2019s Law,<\/em> can be used to quantify this principle.Gene Amdahl, chief architect of IBM&#8217;s first mainframe series and founder of Amdahl Corporation and other companies found that there were some fairly stringent restrictions on how much of a speedup one could get for a given enhancement. These observations were wrapped up in <em>Amdahl&#8217;s Law<\/em>. It basically states that the performance enhancement possible with a given improvement is limited by the amount that the improved feature is used. For example, you have a floatingpoint unit and you try to speed up the floatingpoint unit many times, say a 10 X speedup, but all this is going to matter only the if the floatingpoint unit is going to be used very frequently. If your program does not have floatingpoint instructions at all, then there is no point in increasing the speed of the floatingpoint unit.<\/p>\n<p>&nbsp;<\/p>\n<p>The performance gain from improving some portion of\u00a0 a computer is calculated by:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-46 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12.png\" alt=\"\" width=\"627\" height=\"159\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12.png 627w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12-300x76.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12-65x16.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12-225x57.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-12-350x89.png 350w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Amdahl\u2019s Law gives us a quick way to find the speedup from some enhancement,which depends on two factors:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: justify;font-size: 1em\">1.\u00a0<\/span><em style=\"text-align: justify;font-size: 1em\">The fraction of the computation time in the original computer that can be converted to take advantage of the enhancement &#8211; <\/em><span style=\"text-align: justify;font-size: 1em\">For example, if 30 seconds of the execution time of a program that takes 60 seconds in total can use an enhancement, the fraction is 30\/60. This value, which we will call Fractionenhanced, is always less than or equal to 1.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">2.\u00a0<em>The improvement gained by the enhanced execution mode; that is, how much faster the task would run if the enhanced mode were used for the entire program &#8211; <\/em>This value is the time of the original mode over the time of the enhanced mode. If the enhanced mode takes, say, 3 seconds for a portion of the program, while it is 6 seconds in the original mode, the improvement is 6\/3. We will call this value, which is always greater than 1, Speedupenhanced.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-48 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13.png\" alt=\"\" width=\"437\" height=\"167\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13.png 437w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13-300x115.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13-65x25.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13-225x86.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-13-350x134.png 350w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">That is, suppose you define an enhancement that accelerates a fraction F of the execution time by a factor S and the remainder of the time is unaffected, then you can say, execution time with the enhancement is equal to 1 minus F, where F is the fraction of the execution time for which the enhancement is active, plus F by S, multiplied by the execution time without the enhancement. Speedup is going to be execution time without the enhancement divided by the execution time with enhancement. This is as shown above.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Amdahl\u2019s Law can serve as a guide to how much an enhancement willimprove performance and how to distribute resources to improve cost &#8211; performance.The goal, clearly, is to spend resources proportional to where timeis spent. Amdahl\u2019s Law is particularly useful for comparing the overall systemperformance of two alternatives, but it can also be applied to compare two processordesign alternatives.<\/p>\n<p>&nbsp;<\/p>\n<p>Consider the following example to illustrate Amdahl\u2019s law.<\/p>\n<p>For the RISC machine with the following instruction mix:<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-49 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-14.png\" alt=\"\" width=\"289\" height=\"109\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-14.png 289w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-14-65x25.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-14-225x85.png 225w\" sizes=\"auto, (max-width: 289px) 100vw, 289px\" \/><\/p>\n<div>\n<p>CPI = 2.2<\/p>\n<p>&nbsp;<\/p>\n<p>If a CPU design enhancement improves the CPI of load instructions from 5 to 2, what isthe resulting performance improvement from this enhancement?<\/p>\n<p>&nbsp;<\/p>\n<p>Fraction enhanced = F =\u00a0 45% or\u00a0 .45<\/p>\n<p>&nbsp;<\/p>\n<p>Unaffected fraction = 1- F = 100% &#8211; 45% = 55% or .55<\/p>\n<p>&nbsp;<\/p>\n<p>Factor of enhancement = S =\u00a0 5\/2 =\u00a0 2.5<\/p>\n<p>&nbsp;<\/p>\n<p>Using Amdahl\u2019s Law:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-50 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15.png\" alt=\"\" width=\"449\" height=\"63\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15.png 449w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15-300x42.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15-65x9.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15-225x32.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-15-350x49.png 350w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/p>\n<p>You can also alternatively calculate using the CPU performance equation.<\/p>\n<p>&nbsp;<\/p>\n<p>Old CPI = 2.2<\/p>\n<p>New CPI =\u00a0 .5 x 1 + .2 x 2 +\u00a0 .1 x 3 + .2 x 2\u00a0 = 1.6<\/p>\n<p>Speed up = 2.2 \/ 1.6 = 1.37<\/p>\n<p>&nbsp;<\/p>\n<p>which is the same speedup obtained from Amdahl\u2019s Law.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The same concept can be extended even when there are multiple enhancements. Suppose three CPU performance enhancements are proposed with the following speedups and percentage of the code execution time affected:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-51 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16.png\" alt=\"\" width=\"444\" height=\"146\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16.png 444w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16-300x99.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16-65x21.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16-225x74.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-16-350x115.png 350w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/p>\n<p style=\"text-align: justify\">While all three enhancements are in place in the new design, each enhancement affects a different portion of the code and only one enhancement can be used at a time. What is the resulting overall speedup?<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-52 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17.png\" alt=\"\" width=\"509\" height=\"53\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17.png 509w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17-300x31.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17-65x7.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17-225x23.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-17-350x36.png 350w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/p>\n<p>Observe that:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022 The performance of any system is constrained by the speed or capacity of the slowest point.<\/p>\n<ul>\n<li style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">The impact of an effort to improve the performance of a program is primarily constrained by the amount of time that the program spends in parts of the program not targeted by the effort<\/span><\/li>\n<\/ul>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The last concept that we discuss in this module is about benchmarks. To evaluate the performance of a computer system, we need a standard set of programs. Individuals cannot use their own programs that will favour their design enhancements and report improvements. So benchmarks are a set of programs that form a \u201cworkload\u201d specifically chosen to measure performance. One of the most successful attempts to create standardized benchmark applicationsuites has been the SPEC (Standard Performance Evaluation Corporation),which had its roots in the late 1980s efforts to deliver better benchmarks forworkstations. SPEC is a non-profit corporation formed to establish, maintain and endorse a standardized set of relevant benchmarks that can be applied to the newest generation of high-performance computers. SPEC develops benchmark suites and also reviews and publishes submitted results from the member organizations and other benchmark licensees.Just as the computer industry has evolved over time, so has theneed for different benchmark suites, and there are now SPEC benchmarks tocover different application classes. All the SPEC benchmark suites and theirreported results are found at <a href=\"http:\/\/www.spec.org\/\"><em>www.spec.org<\/em><em>.<\/em><\/a>The SPEC CPU suite is useful for processor benchmarking forboth desktop systems and single-processor servers.SPEC creates standard sets of benchmarks starting with SPEC89. The latest is SPEC CPU2006 which consists of 12 integer benchmarks (CINT2006) and 17 floating-point benchmarks (CFP2006).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The guiding principle of reporting performance measurements should be <em>reproducibility &#8211; <\/em>list everything another experimenter would need to duplicate theresults. A SPEC benchmark report requires an extensive description of the computerand the compiler flags, as well as the publication of both the baseline andoptimized results. In addition to hardware, software, and baseline tuning parameterdescriptions, a SPEC report contains the actual performance times, shownboth in tabular form and as a graph.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">There are also benchmark collections for power workloads(SPECpower_ssj2008), for mail workloads (SPECmail2008), for multimedia workloads (mediabench), virtualization, etc. The following programs or benchmarks are used to evaluateperformance:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013\u00a0\u00a0 Actual Target Workload:\u00a0 Full applications that run on the target machine.<\/p>\n<p>\u2013\u00a0\u00a0 Real Full Program-based Benchmarks:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022 Select a specific mix or suite of programs that are typical of targeted applications or workload (e.g SPEC95, SPEC CPU2000).<\/p>\n<p>\u2013\u00a0\u00a0 Small \u201cKernel\u201d Benchmarks:<\/p>\n<p style=\"text-align: justify\">\u2022 Key computationally-intensive pieces extracted from real programs.<\/p>\n<p>\u2013\u00a0\u00a0 Examples: Matrix factorization, FFT, tree search, etc.<\/p>\n<p>\u2022 Best used to test specific aspects of the machine.<\/p>\n<p>\u2013\u00a0\u00a0 Microbenchmarks:<\/p>\n<\/div>\n<p><span style=\"text-align: initial;font-size: 1em\">\u00a0 \u00a0 \u2022 Small, specially written programs to isolate a specific aspect of performance characteristics: Processing: integer, floating point, local memory, input\/output, etc.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: justify;font-size: 1em\">Each of these have their merits and demerits. So, it is always a suite of programs that is chosen so that the disadvantages of one will be outweighed by the advantages of the other.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: justify;font-size: 1em\">Do we have other methods of evaluating the performance, instead of the execution time? Can we consider MIPS (Millions of Instructions Per Second) as a performance measure?<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-align: justify;font-size: 1em\">For a specific program running on a specific CPU, the MIPS rating is a measure of how many millions of instructions are executed per second:<\/span><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p>MIPS\u00a0 Rating =\u00a0 Instruction count \/\u00a0 (Execution Time x 106)<\/p>\n<p>=\u00a0 Instruction count\u00a0 \/\u00a0 (CPU clocks x Cycle time x 106)<\/p>\n<p style=\"text-align: justify\">=\u00a0 (Instruction count\u00a0 x Clock rate)\u00a0 \/\u00a0 (Instructioncount\u00a0 x CPI x 106)<\/p>\n<p>=\u00a0\u00a0\u00a0\u00a0 Clock rate\u00a0 \/\u00a0 (CPI x 106)<\/p>\n<p>&nbsp;<\/p>\n<p>There are however three problems with MIPS:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013 MIPS does not account for instruction capabilities<\/p>\n<p style=\"text-align: justify\">\u2013 MIPS can vary between programs on the same computer<\/p>\n<p>\u2013 MIPS can vary inversely with performance<\/p>\n<p>&nbsp;<\/p>\n<p>Then, under what conditions can the MIPS rating be used to compare performance of different CPUs?<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022 The MIPS rating is only valid to compare the performance of different CPUs provided that the following conditions are satisfied:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">1.\u00a0 The same program is used<\/p>\n<p>(actually this applies to all performance metrics)<\/p>\n<p style=\"text-align: justify\">2. The same ISA is used<\/p>\n<p>3. The same compiler is used<\/p>\n<p style=\"text-align: justify\">(Thus the resulting programs used to run on the CPUs and obtain the MIPS rating are identical at the machine code level including the same instruction count)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">So, MIPS is not a consistent measure of performance and the CPU execution time is the only consistent measure of performance.<\/p>\n<p>&nbsp;<\/p>\n<p>Last of all, we should also understand that designing for performance only without considering cost and power is unrealistic<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013 For supercomputing performance is the primary and dominant goal<\/p>\n<p>&nbsp;<\/p>\n<p>\u2013 Low-end personal and embedded computers are extremely cost driven and power sensitive<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">The art of computer design lies not in plugging numbers in a performance equation, but in accurately determining how design alternatives will affect performance and cost and power requirements.<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To summarize, we have looked at the ways and means of summarizing performance, pointed out various factors to be considered while designing computer systems, looked at Amdahl\u2019s law, examples for quantifying the performance, the need for and the different types of benchmarks, and last of all other metrics for performance evaluation.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Web Links \/ Supporting Materials<\/strong><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Computer Architecture &#8211; A Quantitative Approach, John L. Hennessy and David A.Patterson, 5th.Edition, Morgan Kaufmann, Elsevier, 2011.<\/li>\n<li>Computer Organization and Design \u2013 The Hardware \/ Software Interface, David A. Patterson and John L. Hennessy, 4th.Edition, Morgan Kaufmann, Elsevier, 2009.<\/li>\n<li>http:\/\/en.wikipedia.org\/wiki\/<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":2,"menu_order":4,"template":"","meta":{"_acf_changed":false,"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-a-p-shanthi"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-40","chapter","type-chapter","status-publish","hentry","contributor-dr-a-p-shanthi"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":7,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/40\/revisions"}],"predecessor-version":[{"id":437,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/40\/revisions\/437"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/40\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapter-type?post=40"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/contributor?post=40"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/license?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}