Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memory Bandwidth Usage

How do you calculate memory (RAM) bandwidth used? Which performance counters are required?

I came across a tool that was able to do it, the "Rightmark multi-threaded memory test". But unlike the rest of Rightmark's tests, I haven't found the source code for it, just the binaries

like image 813
Tom De Bie Avatar asked Nov 06 '22 21:11

Tom De Bie


1 Answers

If your code can run on Linux, use Cachegrind:

Cachegrind is a cache profiler. It performs detailed simulation of the I1, D1 and L2 caches in your CPU and so can accurately pinpoint the sources of cache misses in your code. It identifies the number of cache misses, memory references and instructions executed for each line of source code, with per-function, per-module and whole-program summaries. It is useful with programs written in any language. Cachegrind runs programs about 20--100x slower than normal.

You may want to use the KCacheGrind GUI.

like image 79
user9876 Avatar answered Nov 15 '22 08:11

user9876