DOC PREVIEW
CMU CS 15213 - Performance Evaluation I

This preview shows page 1-2-3-25-26-27 out of 27 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

15 213 Performance Evaluation I November 5 1998 Topics Performance measures metrics Timing Profiling class22 ppt Performance expressed as a time Absolute time measures metrics difference between start and finish of an operation synonyms running time elapsed time response time latency completion time execution time most straightforward performance measure Relative normalized time measures running time normalized to some reference time e g time reference time Guiding principle Choose performance measures that track running time class22 ppt 2 CS 213 F 98 Performance expressed as a rate Rates are performance measures expressed in units of work per unit time Examples millions of instructions sec MIPS millions of fp instructions sec Mflops sec Mflop 10 6 flops millions of bytes sec MBytes sec MByte 2 20 bytes millions of bits sec Mbits sec Mbit 10 6 bits images sec samples sec transactions sec TPS class22 ppt 3 CS 213 F 98 Performance expressed as a rate cont Key idea Report rates that track execution time Example Suppose we are measuring a program that convolves a stream of images from a video camera Bad performance measure MFLOPS number of floating point operations depends on the particular convolution algorithm n 2 matix vector product vs nlogn fast Fourier transform An FFT with a bad MFLOPS rate may run faster than a matrix vector product with a good MFLOPS rate Good performance measure images sec a program that runs faster will convolve more images per second class22 ppt 4 CS 213 F 98 Timing mechanisms Clocks returns elapsed time since epoch e g Jan 1 1970 Unix getclock command coarse grained e g us resolution on Alpha long int secs ns struct timespec start stop getclock TIMEOFDAY start P getclock TIMEOFDAY stop secs stop tv sec start tv sec ns stop tv nsec start tv nsec printf ld ns n secs 1e9 ns class22 ppt 5 CS 213 F 98 Timing mechanisms cont Interval count down timers set timer to some initial value timer counts down to zero then sends Unix signal course grained e g us resolution on Alphas void init etime first it value tv sec 86400 setitimer ITIMER VIRTUAL first NULL Using the interval timer class22 ppt double get etime struct itimerval curr getitimer ITIMER VIRTUAL curr return double first it value tv sec curr it value tv sec first it value tv usec curr it value tv usec 1e 6 init etime secs get etime P secs get etime secs printf lf secs n secs 6 CS 213 F 98 Timing mechanisms cont Performance counters counts system events CYCLES IMISS DMISS BRANCHMP very fine grained short time span e g 9 seconds on 450 MHz Alpha unsigned int counterRoutine Alpha cycle counter 0x601fc000u 0x401f0000u 0x6bfa8001u unsigned int counter void void counterRoutine Using the Alpha cycle counter class22 ppt cycles counter P cycles counter cycles printf d cycles n cycles 7 CS 213 F 98 Measurement Discretization errors pitfalls need to measure large enough chunks of work but how large is large enough Unexpected cache effects artificial hits or misses cold start misses due to context swapping class22 ppt 8 CS 213 F 98 The nature of time real wall clock time user time time executing instructing instructions in the user process system time time executing instructing instructions in kernel on behalf of user process real wall clock time We will use the word time to refer to user time class22 ppt 9 CS 213 F 98 Anatomy of a timer Tstart time T1 Tfinish program execution time dt T2 Tn Tk clock interrupt tick interval 2 timer period dt secs tick timer resolution 1 dt ticks sec Assume here that Tk Tk 1 dt class22 ppt 10 CS 213 F 98 Measurement pitfall 1 Discretization error actual program execution time Tstart time T1 dt T2 Tfinish Tn measured time Tn T1 actual time Tn T1 Tfinish Tn Tstart T1 absolute error measured time actual time fstart Tstart T1 dt fraction of interval overreported ffinish Tfinish Tn dt fraction of interval underreported absolute error dt fstart dt ffinish dt fstart ffinish maxclass22 ppt absolute error dt 11 CS 213 F 98 Examples of discretization error actual running time time Actual time near zero measured time dt Absolute measurement error dt class22 ppt 12 CS 213 F 98 Examples of discretization error cont actual running time time Actual time near 2dt measured time dt Absolute measurement error dt class22 ppt 13 CS 213 F 98 Estimating the timer period dt start 0 while start end get etime dt end start printf dt lf n dt Digital Unix Alpha systems dt 1ms class22 ppt 14 CS 213 F 98 Modeling discretization error Key idea need to measure long enough to hide the discretization error Example start get etime for i 0 i n i P tprime get etime start Question how big must tprime be in order to get a good estimate of the running time of the loop class22 ppt 15 CS 213 F 98 Relative error analysis Let t and t be the actual and measured running times of the loop respectively and let dt be the timer period Also let t t be the absolute error and let t t t be the relative error Problem What value of t will result in a relative error less than or equal to Emax Fact 1 t t dt Fact 2 t dt t We want t t t Emax dt t Emax dt Emax t dt Emax t dt dt class22 ppt Emax dt t 1 algebra 2 16 CS 213 F 98 Relative error analysis start get etime for i 0 i n i P tp get etime start t Example Let dt 1 ms and Emax 0 05 i e 5 relative error Then dt Emax dt t 001 05 05 t t 0 070 seconds 70 ms class22 ppt 17 CS 213 F 98 Measurement pitfall 2 Unexpected cache effects Call ordering can introduce unexpected cold start misses measured with Alpha cycle counter ip array1 array2 array3 68 829 cycles ipp array1 array2 array3 23 337 cycles ipp array1 array2 array3 70 513 cycles ip array1 array2 array3 23 203 cycles Context switches can alter cache miss rate 71 002 67 968 68 840 68 571 69 911 class22 ppt 23 617 23 384 23 365 23 492 23 692 ip ipp cycles on unloaded timing server 18 CS 213 F 98 Measurement summary It s difficult to get accurate times discretization error but can t always measure short procedures in loops global state mallocs changes cache behavior It s difficult to get repeatable times cache effects due to ordering and context switches Moral of the story Adopt a healthy skepticism about measurements Always subject measurements to sanity checks class22 ppt 19 CS 213 F 98 Profiling The goal of profiling is to account for the cycles used by a program or system Basic techniques src translation gprof Graham 1982 binary translation Atom DEC 1993 pixie MIPS 1990 direct simulation SimOS Rosenblum 1995 statistical sampling prof


View Full Document

CMU CS 15213 - Performance Evaluation I

Documents in this Course
lecture

lecture

14 pages

lecture

lecture

46 pages

Caches

Caches

9 pages

lecture

lecture

39 pages

Lecture

Lecture

36 pages

Lecture

Lecture

45 pages

Lecture

Lecture

56 pages

lecture

lecture

11 pages

lecture

lecture

9 pages

Lecture

Lecture

36 pages

Lecture

Lecture

37 pages

Exam

Exam

16 pages

Lecture

Lecture

10 pages

Lecture

Lecture

43 pages

Lecture

Lecture

8 pages

Lecture

Lecture

8 pages

Lecture

Lecture

36 pages

Lecture

Lecture

43 pages

Lecture

Lecture

12 pages

Lecture

Lecture

37 pages

Lecture

Lecture

6 pages

Lecture

Lecture

40 pages

coding

coding

2 pages

Exam

Exam

17 pages

Exam

Exam

14 pages

Lecture

Lecture

29 pages

Lecture

Lecture

34 pages

Exam

Exam

11 pages

Lecture

Lecture

9 pages

Lecture

Lecture

37 pages

Lecture

Lecture

36 pages

lecture

lecture

46 pages

Lecture

Lecture

33 pages

Lecture

Lecture

57 pages

Lecture

Lecture

32 pages

Lecture

Lecture

46 pages

Lecture

Lecture

40 pages

Lecture

Lecture

11 pages

Lecture

Lecture

6 pages

Lecture

Lecture

43 pages

Lecture

Lecture

12 pages

Lecture

Lecture

18 pages

Exam

Exam

10 pages

Lecture

Lecture

45 pages

Lecture

Lecture

37 pages

Exam

Exam

24 pages

class09

class09

21 pages

class22

class22

37 pages

class20

class20

30 pages

class27

class27

33 pages

class25

class25

21 pages

class04

class04

31 pages

Lecture

Lecture

59 pages

class01a

class01a

14 pages

class12

class12

45 pages

class29

class29

33 pages

Lecture

Lecture

39 pages

Lecture

Lecture

6 pages

class03

class03

34 pages

lecture

lecture

42 pages

Lecture

Lecture

40 pages

Lecture

Lecture

47 pages

Exam

Exam

19 pages

R06-B

R06-B

25 pages

class17

class17

37 pages

class25

class25

31 pages

Lecture

Lecture

15 pages

final-f06

final-f06

17 pages

Lecture

Lecture

9 pages

lecture

lecture

9 pages

Exam

Exam

15 pages

Lecture

Lecture

22 pages

class11

class11

45 pages

lecture

lecture

50 pages

Linking

Linking

37 pages

Lecture

Lecture

64 pages

Integers

Integers

40 pages

Exam

Exam

11 pages

Lecture

Lecture

37 pages

Lecture

Lecture

44 pages

Lecture

Lecture

37 pages

Lecture

Lecture

9 pages

Lecture

Lecture

37 pages

Lecture

Lecture

45 pages

Final

Final

25 pages

lecture

lecture

9 pages

Lecture

Lecture

30 pages

Lecture

Lecture

16 pages

Final

Final

17 pages

Lecture

Lecture

8 pages

Exam

Exam

11 pages

Lecture

Lecture

47 pages

Lecture

Lecture

9 pages

lecture

lecture

39 pages

Exam

Exam

11 pages

lecture

lecture

41 pages

lecture

lecture

37 pages

Lecture

Lecture

59 pages

Lecture

Lecture

45 pages

Exam 1

Exam 1

18 pages

Lecture

Lecture

41 pages

Lecture

Lecture

32 pages

Lecture

Lecture

30 pages

Lecture

Lecture

9 pages

Lecture

Lecture

9 pages

Lecture

Lecture

15 pages

Lecture

Lecture

11 pages

Lecture

Lecture

9 pages

Lecture

Lecture

34 pages

Lecture

Lecture

40 pages

Lecture

Lecture

4 pages

Lecture

Lecture

46 pages

Lecture

Lecture

8 pages

Lecture

Lecture

65 pages

Lecture

Lecture

38 pages

Lecture

Lecture

35 pages

Lecture

Lecture

8 pages

Lecture

Lecture

34 pages

Lecture

Lecture

8 pages

Exam

Exam

13 pages

Lecture

Lecture

43 pages

Lecture

Lecture

9 pages

Lecture

Lecture

12 pages

Lecture

Lecture

9 pages

Lecture

Lecture

34 pages

Lecture

Lecture

43 pages

Lecture

Lecture

7 pages

Lecture

Lecture

45 pages

Lecture

Lecture

24 pages

Lecture

Lecture

47 pages

Lecture

Lecture

12 pages

Lecture

Lecture

20 pages

Lecture

Lecture

9 pages

Exam

Exam

11 pages

Lecture

Lecture

52 pages

Lecture

Lecture

20 pages

Exam

Exam

11 pages

Lecture

Lecture

35 pages

Lecture

Lecture

47 pages

Lecture

Lecture

18 pages

Lecture

Lecture

30 pages

Lecture

Lecture

59 pages

Lecture

Lecture

37 pages

Lecture

Lecture

22 pages

Lecture

Lecture

35 pages

Exam

Exam

23 pages

Lecture

Lecture

9 pages

Lecture

Lecture

22 pages

class12

class12

32 pages

Lecture

Lecture

8 pages

Lecture

Lecture

39 pages

Lecture

Lecture

44 pages

Lecture

Lecture

38 pages

Lecture

Lecture

69 pages

Lecture

Lecture

41 pages

Lecture

Lecture

12 pages

Lecture

Lecture

52 pages

Lecture

Lecture

59 pages

Lecture

Lecture

39 pages

Lecture

Lecture

83 pages

Lecture

Lecture

59 pages

class01b

class01b

17 pages

Exam

Exam

21 pages

class07

class07

47 pages

Lecture

Lecture

11 pages

Odyssey

Odyssey

18 pages

multicore

multicore

66 pages

Lecture

Lecture

6 pages

lecture

lecture

41 pages

lecture

lecture

55 pages

lecture

lecture

52 pages

lecture

lecture

33 pages

lecture

lecture

46 pages

lecture

lecture

55 pages

lecture

lecture

17 pages

lecture

lecture

49 pages

Exam

Exam

17 pages

lecture

lecture

56 pages

Exam 2

Exam 2

16 pages

Exam 2

Exam 2

16 pages

Notes

Notes

37 pages

Lecture

Lecture

40 pages

Lecture

Lecture

36 pages

Lecture

Lecture

43 pages

Lecture

Lecture

25 pages

Exam

Exam

13 pages

Lecture

Lecture

32 pages

Lecture

Lecture

12 pages

Lecture

Lecture

58 pages

Lecture

Lecture

29 pages

Lecture

Lecture

59 pages

Lecture

Lecture

41 pages

Lecture

Lecture

50 pages

Exam

Exam

17 pages

Lecture

Lecture

29 pages

Lecture

Lecture

44 pages

Lecture

Lecture

41 pages

Lecture

Lecture

52 pages

Lecture

Lecture

40 pages

Lecture

Lecture

33 pages

lecture

lecture

10 pages

Lecture

Lecture

27 pages

Lecture

Lecture

29 pages

Lecture

Lecture

39 pages

Lecture

Lecture

9 pages

Lecture

Lecture

29 pages

Lecture

Lecture

8 pages

Lecture

Lecture

43 pages

Lecture

Lecture

43 pages

Lecture

Lecture

75 pages

Lecture

Lecture

55 pages

Exam

Exam

12 pages

Lecture

Lecture

43 pages

Lecture

Lecture

35 pages

lecture

lecture

36 pages

Exam

Exam

33 pages

lecture

lecture

56 pages

lecture

lecture

64 pages

lecture

lecture

8 pages

Exam

Exam

14 pages

Lecture

Lecture

43 pages

Lecture

Lecture

36 pages

lecture

lecture

56 pages

lecture

lecture

75 pages

lecture

lecture

36 pages

Lecture

Lecture

50 pages

Lecture

Lecture

45 pages

Lecture

Lecture

13 pages

Exam

Exam

23 pages

Lecture

Lecture

10 pages

Lecture

Lecture

48 pages

Lecture

Lecture

83 pages

lecture

lecture

57 pages

Lecture

Lecture

33 pages

Lecture

Lecture

39 pages

Lecture

Lecture

33 pages

lecture

lecture

54 pages

Lecture

Lecture

30 pages

Exam

Exam

13 pages

Lecture

Lecture

36 pages

Lecture

Lecture

40 pages

Exam

Exam

17 pages

Lecture

Lecture

9 pages

Exam

Exam

15 pages

Lecture

Lecture

44 pages

Lecture

Lecture

34 pages

Lecture

Lecture

24 pages

Lecture

Lecture

29 pages

class12

class12

43 pages

lecture

lecture

43 pages

class22

class22

22 pages

R06-B

R06-B

25 pages

class01b

class01b

19 pages

lecture

lecture

29 pages

lab1

lab1

8 pages

Caches

Caches

36 pages

lecture

lecture

55 pages

Lecture,

Lecture,

37 pages

Integers

Integers

40 pages

Linking

Linking

38 pages

lecture

lecture

45 pages

Lecture

Lecture

61 pages

Linking

Linking

33 pages

lecture

lecture

40 pages

lecture

lecture

40 pages

Lecture

Lecture

32 pages

lecture

lecture

48 pages

lecture

lecture

44 pages

Exam

Exam

11 pages

Lecture

Lecture

31 pages

Lecture

Lecture

46 pages

Lecture

Lecture

40 pages

Lecture

Lecture

40 pages

Exam

Exam

12 pages

Lecture

Lecture

42 pages

Lecture

Lecture

36 pages

Lecture

Lecture

45 pages

Lecture

Lecture

41 pages

Lecture

Lecture

13 pages

Lecture

Lecture

35 pages

Lecture

Lecture

20 pages

Final

Final

19 pages

Lecture

Lecture

33 pages

Lecture

Lecture

50 pages

Lecture

Lecture

33 pages

Lecture

Lecture

27 pages

Lecture

Lecture

6 pages

Exam

Exam

15 pages

Lecture

Lecture

24 pages

Lecture

Lecture

23 pages

Lecture

Lecture

43 pages

Lecture

Lecture

32 pages

Lecture

Lecture

52 pages

Lecture

Lecture

37 pages

Lecture

Lecture

36 pages

Lecture

Lecture

34 pages

Lecture

Lecture

40 pages

Lecture

Lecture

15 pages

lecture

lecture

21 pages

Lecture

Lecture

58 pages

Lecture

Lecture

49 pages

Lecture

Lecture

36 pages

Lecture

Lecture

11 pages

Lecture

Lecture

12 pages

Lecture

Lecture

58 pages

Lecture

Lecture

33 pages

Exam

Exam

15 pages

Lecture

Lecture

35 pages

Lecture

Lecture

10 pages

Lecture

Lecture

25 pages

Lecture

Lecture

31 pages

Lecture

Lecture

24 pages

Lecture

Lecture

34 pages

Lecture

Lecture

50 pages

lecture

lecture

35 pages

Lecture

Lecture

11 pages

Lecture

Lecture

39 pages

Lecture

Lecture

45 pages

Lecture

Lecture

41 pages

exam1-f05

exam1-f05

11 pages

Lecture

Lecture

4 pages

Lecture

Lecture

17 pages

Exam

Exam

17 pages

malloc()

malloc()

12 pages

Lecture

Lecture

57 pages

Lecture

Lecture

30 pages

Lecture

Lecture

30 pages

Lecture

Lecture

47 pages

Lecture

Lecture

33 pages

Exam

Exam

12 pages

Lecture

Lecture

43 pages

Lectures

Lectures

33 pages

Lecture

Lecture

36 pages

lecture

lecture

33 pages

Exam

Exam

14 pages

Lecture

Lecture

43 pages

Lecture

Lecture

25 pages

Load more
Download Performance Evaluation I
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Performance Evaluation I and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Performance Evaluation I and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?