Performance Flashcards

1
Q

What are several attributes of performance?

A

Speed
Throughput
Responsiveness
Memory Consumption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

To measure performance, we need to design ______ specifically targeting performance objectives

A

tests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When measuring performance, it really comes down to _______

A

benchmarking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are microbenchmarks?

A

Focusing on small things, like the cost of an operation in isolation. It can help identify core performance details and explain causes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are macrobenchmarks?

A

Real world system performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
What are some possible issues in the below code?
startTime = getCurrentTimeInSeconds();
doWorkloadOfInterest();
endTime = getCurrentTimeInSeconds();
reportResult(endTime – startTime);
A
Measurement granularity
Warm up effects
Nondeterminism
Size of workload
System interference
Background programs?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When bench marking, why do workloads need to be chosen carefully?

A

Workloads need to be representative. Some inputs can be pathological to stress test.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Measuring something ____ means nothing

A

once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Using ______ instead of time can be better to predict performance on different machines

A

cycles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is warm up time necessary?

A

Code might not be compiled until it’s executed frequently (JIT for Java)
Need to make sure code is paged in`

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can we alleviate warm up time issues in tests?

A

Run the workload many times before benchmarking it (Bad strategy for JVMs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When benchmarking, you should benchmark many times and average the times to combat ______________ behavior. However, this might throw info away and we might want to know each value

A

Nondeterministic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do we interpret/report a benchmark?

A

Compare that benchmark with your expectation, different solutions, or the performance over time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a benchmark suite?

A

A dataset with multiple benchmarks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are two methods we can use to consider interpreting a benchmark suite?

A
Hypothesis testing (ANOVA)
Summary statistic (condensing a suite to a single number)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the 2 different types of means? What are they each used for? Give their formulas

A

Arithmetic Mean - Good for reporting averages of numbers that mean the same thing: (Summation of X)/N
Harmonic Mean - Good for reporting rates: N/(Summation of (1/x))
Geometric Mean - Good for reporting results that mean different things (timing results across many different tests in the same suite: Nth root(PI(X))

17
Q

If a size of a workload changes, a _______ harmonic mean is required

A

weighted

18
Q

Why would we want to use a geometric mean?

A

Review lecture video for slide 75

19
Q

What low level architectural effects can determine the performance? How well does sampling based profiling work for these? What other tools can measure these effects?

A
Cache misses
Mis-speculations
TLB misses
Not well, due to prediction issues
Tools like perf
20
Q

In what ways can we optimize algorithms in the real world?

A

Hybrid Algorithms - where constants matter
Caching and precomputing
Better performance modeling and algorithms
Asymptotic complexity is less useful in practice - We want to focus on memory, I/O, consistency and speculation, and shapes of workloads
Cache oblivious algorithms and data structures