---
title: "Problem set 8: data centers, accelerators, reliability and I/O"
heading: "Problem set 8: warehouse-scale computing, accelerators, dependability, storage and evaluation"
eyebrow: S4 · Problem set 8
type: problems
---

::: hook
These problems cover lessons 37 to 46: side channels, near-data computing, PUE, energy proportionality and electricity cost, tail latency and failure rates, systolic arrays and accelerator rooflines, availability, redundancy and RAID, disk access, PCIe links, DMA and interrupt coalescing, queueing, SSD lifetime, sampling and CPI stacks.
:::

::: pool
pick: 12

::: check
kind: parts
given: N = 20000 | 80000; p = 250 | 400; i = 0.35 | 0.6; u = 0.2 | 0.4; E = 1.1 | 1.4; c = 60 | 90

## {N} servers peak at {p} W, idle at {i} of peak and run at {u} utilization, with PUE {E} and electricity at {c} dollars per MWh.

::: part
answer: p*i + (p - p*i)*u
unit: W
tolerance: 0.5%

### Average power per server?

::: misses
- [any] Idle plus the load-dependent part.
:::
:::

::: part
answer: N*(p*i + (p - p*i)*u)*E/1e6*730*c
tolerance: 0.5%

### Monthly electricity cost (730 hours), in dollars?

::: misses
- [any] Facility power × hours × price.
:::
:::
:::

::: check
kind: parts
given: u = 0.15 | 0.35; i = 0.25 | 0.55; p = 0.005 | 0.01; k = 50 | 300

## A server idles at {i} of peak and runs at {u}; requests fan out to {k} servers, each slow with probability {p}.

::: part
answer: 100*u/(i + (1 - i)*u)
unit: %
tolerance: 0.5%

### Energy efficiency relative to full load?

::: misses
- [any] $u/(i + (1 - i)u)$.
:::
:::

::: part
answer: 100*(1 - (1 - p)^k)
unit: %
tolerance: 0.5%

### Fraction of requests that are slow?

::: misses
- [any] $1 - (1 - p)^k$.
:::
:::
:::

::: check
kind: parts
given: N = 30000 | 120000; M = 4 | 8; T = 15 | 25; I = 12 | 20

## {N} servers with an MTTF of {M} years; the facility draws {T} MW in total for {I} MW of IT load.

::: part
answer: N*24/(M*8760)
tolerance: 0.5%

### Failures per day?

::: misses
- [any] N × 24 / MTTF in hours.
:::
:::

::: part
answer: T/I
tolerance: 0.5%

### PUE?

::: misses
- [any] Total over IT.
:::
:::
:::

::: check
kind: parts
given: n = 128 | 256; f = 0.9 | 1.05; B = 100 | 1000

## An {n} × {n} systolic array at {f} GHz runs passes of {B} input vectors.

::: part
answer: n*n*2*f/1000
unit: TOPS
tolerance: 0.5%

### Peak rate?

::: misses
- [any] $2n^2f$.
:::
:::

::: part
answer: 100*B/(B + 2*(n - 1))
unit: %
tolerance: 0.5%

### Utilization of a pass?

::: misses
- [any] $B/(B + 2(n - 1))$.
:::
:::
:::

::: check
kind: parts
given: d = 300 | 600 | 900; n = 128 | 256; P = 90 | 250; W = 50 | 600; B = 8 | 64

## A layer of width {d} on an array of width {n}; separately, an accelerator of {P} TOPS and {W} GB/s running a layer that reuses each 8-bit weight across a batch of {B}.

::: part
answer: 100*d/(n*ceil(d/n - 0.0001))
unit: %
tolerance: 0.5%

### Tiling efficiency?

::: misses
- [any] $d/(n\lceil d/n \rceil)$.
:::
:::

::: part
answer: (P + W*2*B/1000 - abs(P - W*2*B/1000))/2
unit: TOPS
tolerance: 0.5%

### Attainable rate?

::: misses
- [any] min(peak, bandwidth × 2B).
:::
:::
:::

::: check
kind: parts
given: M = 30000 | 200000; R = 8 | 48; a = 0.99 | 0.999; k = 2 | 3

## A component with MTTF {M} hours and MTTR {R} hours; and a service of {k} independent replicas each available {a}.

::: part
answer: 1e6*R/(M + R)
unit: ppm
tolerance: 0.5%

### The component's unavailability?

::: misses
- [any] MTTR/(MTTF + MTTR).
:::
:::

::: part
answer: -log(1 - a)*k
tolerance: 0.5%

### The service's nines?

::: misses
- [any] $-\log_{10}(1 - a)^k$.
:::
:::
:::

::: check
kind: parts
given: a = 150000 | 400000; b = 80000 | 250000; c = 1000000; N = 6 | 10; R = 24 | 72

## A server needs parts with MTTFs of {a}, {b} and {c} hours; a RAID 5 array has {N} disks of MTTF {c} hours and a {R}-hour rebuild.

::: part
answer: 1/(1/a + 1/b + 1/c)
unit: h
tolerance: 0.5%

### Server MTTF?

::: misses
- [any] Add the rates, invert.
:::
:::

::: part
answer: c^2/(N*(N - 1)*R)/8766
unit: yr
tolerance: 0.5%

### RAID 5 MTTDL in years?

::: misses
- [any] $M^2/(N(N - 1)R)$.
:::
:::
:::

::: check
kind: parts
given: s = 5 | 9; R = 7200 | 15000; k = 8 | 128; B = 180 | 280

## A disk with a {s} ms seek, {R} RPM and {B} MB/s transfer reads {k} KB at random.

::: part
answer: 0.5*60/R*1000
unit: ms
tolerance: 0.5%

### Rotational latency?

::: misses
- [any] Half a revolution.
:::
:::

::: part
answer: 1000/(s + 0.5*60/R*1000 + k/1000/B*1000)
tolerance: 0.5%

### Random reads per second?

::: misses
- [any] One over the access time.
:::
:::
:::

::: check
kind: parts
given: S = 2 | 6; l = 50 | 120; T = 10 | 30

## A device with a {S} ms service time gets {l} random requests per second.

::: part
answer: S/(1 - l*S/1000)
unit: ms
tolerance: 0.5%

### Mean response time (M/M/1)?

::: misses
- [any] $S/(1 - \rho)$.
:::
:::

::: part
answer: l*S/(1000 - l*S)
tolerance: 0.5%

### Average number in the system?

::: misses
- [any] $\rho/(1 - \rho)$.
:::
:::

::: part
answer: (1 - S/T)/(S/1000)
tolerance: 0.5%

### Highest rate for a {T} ms mean response?

::: misses
- [any] $(1 - S/T)/S$.
:::
:::
:::

::: check
kind: parts
given: C = 1 | 4; P = 1000 | 3000; W = 1.5 | 3.5; D = 80 | 400; A = 0.995 | 0.9995

## An SSD of {C} TB, {P} P/E cycles, write amplification {W}, with {D} GB of host writes a day; a service available {A} of the time.

::: part
answer: C*1000*P/(D*W)/365
unit: yr
tolerance: 0.5%

### SSD lifetime?

::: misses
- [any] Capacity × cycles ÷ (daily writes × WA).
:::
:::

::: part
answer: (1 - A)*525600
unit: min
tolerance: 0.5%

### Service downtime per year?

::: misses
- [any] $(1 - A) \times 525{,}600$.
:::
:::
:::

::: check
kind: parts
given: c = 0.4 | 1; z = 1.96 | 3; e = 0.01 | 0.03; N = 10 | 200; k = 50 | 500

## Sampling a CPI with coefficient of variation {c} at z = {z}; separately, {N} billion instructions on a {k} thousand instruction per second simulator.

::: part
answer: (z*c/e)^2
tolerance: 1%

### Samples for ±{e}?

::: misses
- [any] $(z\,\text{CoV}/\varepsilon)^2$.
:::
:::

::: part
answer: N*1e9/(k*1000)/3600
unit: h
tolerance: 0.5%

### Full detailed simulation time?

::: misses
- [any] Instructions ÷ rate, in hours.
:::
:::
:::

::: check
kind: parts
given: b = 0.55 | 0.75; r = 0.08 | 0.2; l = 0.1 | 0.25; m = 0.6 | 1.4; f = 0.5 | 0.7; a = 60 | 120; d = 300 | 700

## A CPI stack of base {b}, branches {r}, L2 {l}, memory {m}; and two equal-work programs at {a} and {d} MFLOPS.

::: part
answer: (b + r + l + m)/(b + r + l + m*f)
tolerance: 0.5%

### Speedup if memory stalls shrink to {f} of their size?

::: misses
- [any] Ratio of total CPI.
:::
:::

::: part
answer: 2/(1/a + 1/d)
tolerance: 0.5%

### Overall rate of the two programs?

::: misses
- [any] Harmonic mean.
:::
:::
:::

::: check
kind: parts
given: f = 2 | 4; c = 1000 | 3000; e = 0.05 | 0.15

## A cache timing channel sends one symbol per {c} cycles at {f} GHz and misreads {e} of them.

::: part
answer: f*1e9/c*(1 + e*log(e)/log(2) + (1 - e)*log(1 - e)/log(2))
unit: bits/s
tolerance: 0.5%

### What information rate can it reach?

::: misses
- [any] Symbol rate × $(1 - H(e))$.
:::
:::
:::

::: check
kind: parts
given: m = 0.6 | 0.85; s = 8 | 25; o = 0.02 | 0.06

## A kernel spends {m} of its time moving data; offloading makes that {s} times faster at an overhead of {o}.

::: part
answer: 1/((1 - m) + m/s + o)
tolerance: 0.5%

### What speedup results?

::: misses
- [any] $1/((1 - m) + m/s + o)$.
:::
:::
:::

::: check
kind: parts
given: n = 64 | 256; t = 100 | 400

## A crossbar of {n} × {n} resistive cells completes one matrix-vector product every {t} ns.

::: part
answer: n^2/(t*1e-9)/1e9
unit: GMAC/s
tolerance: 0.5%

### What multiply-accumulate rate is that?

::: misses
- [any] $n^2/t$.
:::
:::
:::

::: check
kind: parts
given: r = 8 | 16 | 32; n = 4 | 8 | 16; R = 0.2 | 1; L = 50 | 100

## An SSD on a PCIe link of {n} lanes at {r} GT/s (128b/130b) has {L} µs of read latency.

::: part
answer: r*128/130*n/8
unit: GB/s
tolerance: 0.5%

### What is the link's per-direction bandwidth?

::: misses
- [r*n/8] Include the encoding efficiency.
- [any] Not yet. $r \times 128/130 \times n/8$.
:::
:::

::: part
answer: R*1e6*L*1e-6
tolerance: 0.5%

### How many reads must be in flight for {R} million reads per second?

::: misses
- [R*1e6/(L*1e-6)] Little's law multiplies rate by latency.
- [any] Not yet. $\lambda L$.
:::
:::

::: right
Right. Bandwidth comes from lanes; throughput from queue depth.
:::
:::
:::
