Measuring Performance Flashcards
Latency
time needed to complete a task. Usually related to execution time of a program.
Throughput
no. of tasks completed in a fixed time. Related to bandwidth.
Latency/CPU Performance equation/total time to run a program
time = dynamic instruction count x CPI x clock period
time = no. of instructions x CPI x clock period
Dynamic instruction count
the number of instruction count at run time, related to execution of program. Different from static instruction count that does not change.
Speedup
old time/new time
assuming old time is longer than new time
Amdahl’s Law equation
speedup = 1/ ( (1 - f) + (f/s) )
f is the fraction of time spend in optimisable code
s is the speed up of the optimized code
Amdahl’s Law in words
The maximum speedup of a program is limited by the fraction of the program that can not be improved.
Lab 1 only uses functional execution driven. What does this mean?
The program is compiled with a certain optimization and the simulation runs the binary file.
What did you do in Lab 1?
Wrote the simulator that simulates a different stage pipelines and verified its accuracy using a microbenchmark. Then ran the simulator with a given trace file to calculate the %drop in performance compared to an ideal pipeline with no stalls.
-O0
no optimization, all data is saved on the stack
-O1
optimization made, a lot of code