measuring L3cache misses
Hi,
I'm measuring L1-L2-L3 cache misses on AMD Magnycours server.
I'm getting very high numbers for L3-miss numbers in comparison to L2-misses. In some cases L3misses are 30times higher than L2misses. Theoretically L1miss>L2miss>L3miss.
Anyone have any idea what might be the reason for this?
thanks
Quoted 5 lines · Hank
I'm measuring L1-L2-L3 cache misses on AMD Magnycours server.
I'm getting very high numbers for L3-miss numbers in comparison to L2-misses. In some cases L3misses are 30times higher than L2misses.Theoretically L1miss>L2miss>L3miss.
That's not always true, for a variety of boring computer architecture reasons.
Is your system idle? L3 cache is a shared resource so you'll be seeing L3 misses from all cores running on your CPU. It's not really possible to know what's going on without knowing more about your workload.
The other thing you can do is find out what event your kernel is using for L3 cache misses, and then look up the event in the appropriate AMD BKDG and see what it says about the event.
Vince
A message that is not in the archive (sent off-list or not yet received): CAMmbtvK-78Xgvby-VOyVHEf7LbRD8=vw5b7ziOvpn2KUrZm+BQ@mail.gmail.com
Quoted 4 lines · Can Hankendi
i'm running benchmarks from PARSEC suite. The event I'm using is f74e1, which basically collects cache misses for any of the 6 cores, although there are 12 cores on my system. So, collecting per-core cache-misses doesn't mean anything for that specific event?
You should check out the "Revision Guide for AMD Family 10h Processors". The one that most likely applies is #437:
L3 Cache Performance Events May Not Reliably Track Processor Core
#387 might be relevant too.
Quoted 1 line
Can you elaborate on some of those 'boring' computer architecture reasons?
Besides the problem of chip errata, cache events are notoriously bad at giving "expected" results.
Caches being include/exclusive can mean that cache levels are skipped when doing lookups.
Victim caches can also change the results.
Some caches include cache coherency requests in their miss rates even if no actual miss happens.
Some events include results from prefetching as hits or misses. It's not always clear from the documentation.
Most companies do not provide detailed enough descriptions of their cache infrastructures to generate accurate models of what the expected cache behavior should be.
Vince
Quoted 4 lines · Can Hankendi
i'm running benchmarks from PARSEC suite. The event I'm using is f74e1, which basically collects cache misses for any of the 6 cores, although there are 12 cores on my system. So, collecting per-core cache-misses doesn't mean anything for that specific event?
also, how are you specifying event f74e1?
I assume you know the 4 goes at the top, so that the event you pass to perf would look somehing like this:
r40053f7e1
Vince
A message that is not in the archive (sent off-list or not yet received): CAMmbtvJ0iijBkF58+qJ_UBHDOQ4YNRW2Gc7xE=rvR1qXxfweBg@mail.gmail.com
Quoted 3 lines · Can Hankendi
I'm not aware of that coding, can you explain more? However if check Basic Performance Measurements for AMD Athlon ... - AMD Developer, f74e1 seems to be the correct register. What do you think?
how exactly are you calling perf? What command line are you using?
I'd reccommend you use libpfm4 to create your perf_event raw event values, otherwise you are just measuring arbitrary values. There's no error checking in the perf raw event case.
Vince