Software Tuning, Performance Optimization & Platform Monitoring
Discussion around monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform monitoring

Calculating memory stalls in second level cache


I am trying to calculate memory stall cycles per instructions when adding the second level cache.

I have the following given values:

Direct Mapped cache with 128 blocks
16 KB cache
2ns Cache access time
1Ghz Clock Rate
80 clock cycles Miss Penalty
5% Miss rate
1.8 Memory Accesses per instruction
16 bit memory address

L2 Cache
4% Miss Rate
6 clock cycles miss penalty

As I understand it, the way to calculate the Memory stall cycles is by using the following formula:

Memory stall cycles = Memory accesses x Miss rate x Miss penalty

Which can be simplified as:

Memory stall cycles = instructions per program x misses per instructions x miss penalty

What I did was to multiply 1.8 x (.05 +.04) x (80 + 6) = 13.932

Would this be correct or am I missing something?

0 Kudos
0 Replies