I want to measure the CPU memory traffic of a C++ program running on a Linux server. Because I know the the theoretical maximum memory bandwidth of the server and I want to know how much memory bandwidth my program uses. It is regarding to memory traffic between DDR RAM and CPU. I have checked this post which suggest to use intel_gpu_top
. But the remote server doesn't have intel_gpu_tools
and I don't have sudo
permission. So I am wondering if there is any other suggestions to help me measure the CPU memory traffic. Thank you.
Asked
Active
Viewed 110 times
1

jasmine
- 64
- 5
-
1`which is denoted as the number of bytes of memory transfers incurred during the execution of the C++ program.` From where to where? Ram<->GPU? Network? RAM to cache? – tkausl Aug 17 '21 at 04:01
-
Run your program with `time`. `$ time ./program` – Ghasem Ramezani Aug 17 '21 at 04:01
-
@tkausl, I have edited the post. it is about RAM and CPU. I know from Intel that my CPU has a theoretical maximum memory bandwidth of over 50 GB/s and I just want to know how much memory bandwidth my program uses. – jasmine Aug 17 '21 at 04:22
-
I'm not sure you can even measure this. The problem is shared L3 cache. Bandwidth used between L3 cache and main memory is not tagged with process IDs, AFAICT. – MSalters Aug 17 '21 at 08:03
-
Depending on your CPU, there may be hardware performance counters that measure this. – stark Aug 17 '21 at 11:23