Cache Performance

Some calculations which are important on exam for ECE222.

Number of words per block (Block Size): (note from page 412)

  • To take advantage of spatial locality, a cache must have a block size larger than one word. The use of a bigger block decreases the miss rate and improves the efficiency of the cache hardware by reducing the amount of tag storage relative to the amount of data storage in the cache.
  • However, Although a larger block size decreases the miss rate, it can also increase the miss penalty. If the miss penalty increased linearly with the block size, larger blocks could easily lead to lower performance.
\times \text{Clock cycle time}\end{aligned}$$ $$\text{Memory-stall clock cycles = (Read-stall cycles + Write-stall cycles)}$$ $$\text{Read-stall cycles }= \frac{\text{Reads}}{\text{Program}} \times \text{Read Miss Rate} \times \text{Read Miss Penalty}$$ $$\begin{aligned}\text{Write-stall cycles }&= \frac{\text{Writes}}{\text{Program}} \times \text{Write Miss Rate} \times \text{Write Miss Penalty}\\ [3pt] &+ \text{Write buffer stalls}\end{aligned}$$