Cache Optimizations
Reducing Miss Rate
- Larger Block size
- Larger Caches
- Higher Associativity
Reducing Miss Penalty
- multi-level Caches
- Victim caches
number of cache line = cache size / block size
Reduce number of compulsory misses
But


Both has optimal region.
Overall: Increasing block size initially helps through spatial locality. Excessively large blocks can waste cache space and take longer to fetch, making AMAT worse. The block size with the lowest miss rate does not necessarily give the lowest AMAT.
Memory system takes 80 clock cycles of overhead and then delivers 16 bytes every 2 clock cycles. Miss rates for various block sizes are as follows.

Which block size gives us the smallest average memory access time?


Why doesn’t the lowest miss rate always win?
For the 64 KB cache, increasing the block from 64 B to 128 B lowers the miss rate from 1.06% to 1.02%, but increases the miss penalty from 88 to 96 cycles. The longer penalty outweighs the small miss-rate improvement.
If you can choose both cache size and block size, the smallest AMAT in this table is cycles, using a 256 KB cache with 64 B blocks.
Memory:
Low latency + low bandwith : small
Hight latency + hight bandwith: large
Reduce number of capacity misses
But increase hit time and have higher cost
Experiments show that:
Greater associativity can come at the cost of increased hit time

Remember: Larger blocks help spatial locality;
larger caches reduce capacity misses;
higher associativity reduces conflict misses.
