Parallel Performance Flashcards

1
Q

What are the four main causes of performance degradation in parallel computing?

A
  • Starvation – Not enough parallel work to keep processors busy
  • Latency – Delay in transferring data between system components
  • Overhead – Extra work needed for parallel execution (e.g., thread management)
  • Waiting – Processes competing for shared resources

Acronym: SLOW

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

What is parallel speed-up? How is it defined mathematically?

A

How much faster the parallel program is compared to the serial version.

S{N} = T{N}/T{0}, where T{0} is serial execution time and T{N} is parallel execution time on N processors.

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

What is parallel efficiency? How is defined mathematically?

A

Whether speed-up represents efficient use of the resources.

E{N} = S{N}/N, where S{N} is speed-up on N processors.

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

What is strong scaling?

A

Keeping the total problem size fixed and increasing the number of processors to reduce execution time.

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

What does Amdahl’s Law state about parallel performance?

A

The maximum achievable speed-up is limited by the fraction of the program that cannot be parallelised.

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

What is the formula for Amdahl’s Law?

A

S{N} = 1/(s + p/N), where:
- s is the serial fraction
- p is the parallel fraction
- N is the number of processors

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

What is the theoretical maximum speed-up if infinite processors were available?

A

S{max} = 1/s = 1/(1−p)

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

How does Gustafson’s Law challenge Amdahl’s Law?

A

It assumes that problem size increases with the number of processors, leading to better scaling than predicted by Amdahl’s Law.

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

What is the formula for Gustafson’s Law?

A

S{N} = s + pN, where:
- s is the serial fraction
- p is the parallel fraction
- N is the number of processors

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

What is weak scaling?

A

Keeping the workload per processor constant while increasing the number of processors, leading to increased total problem size.

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

Why are barriers used in parallel programming?

A

To ensure all threads complete their work before proceeding to a critical section (e.g., writing output).

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

How can implied barriers be removed to improve performance?

A

Using #pragma omp for nowait to remove unnecessary waiting while ensuring correctness.

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

What are the three main loop scheduling strategies in OpenMP?

A
  • (static, chunk) – Assigns equal chunks to threads in a round-robin manner.
  • (dynamic, chunk) – Assigns chunks dynamically as threads finish their work.
  • (guided, chunk) – Initially large chunks that decrease in size.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why is load balancing important in MPI programs?

A

To ensure all processors are utilised effectively and prevent idle time due to uneven work distribution.

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

What is the role of an interconnect in HPC clusters?

A

It facilitates communication between compute nodes by carrying MPI messages

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

What are common interconnect technologies used in HPC clusters?

A
  • Gigabit Ethernet
  • Infiniband
17
Q

What are three key factors affecting MPI message transmission time?

A
  1. Number of hops between nodes
  2. Blocking factor of the network
  3. Other network traffic
18
Q

How is message transmission time modelled?

A

t = L+ M/B, where:
- L is the latency
- M is the message size
- B is the bandwidth

19
Q

When is latency more important than bandwidth? When is bandwidth more important than latency?

A

When sending many small messages.

When sending large messages.

20
Q

How does communication overhead scale in 2D and 3D domain decomposition?

A
  • 2D: R{2D} = 4/N
  • 3D: R{3D} = 6/N

As subdomain size decreases, communication overhead increases.

21
Q

What are examples of parallel overheads in MPI and OpenMP?

A
  • MPI: Extra code for message passing and process synchronisation.
  • OpenMP: Thread management, loop scheduling, and synchronisation overhead.
22
Q

How does Amdahl’s Law change when considering parallel overheads?

A

The speed-up formula includes the extra overhead term:
S{N} = 1/(s + p/N + (n{p}v)/T{0}), where n{v}v represents parallel overhead as a fraction of serial runtime.

23
Q

What is super-linear speed-up, and when does it occur?

A

When speed-up exceeds N due to improved cache utilisation at smaller problem sizes.