views:

135

answers:

3

I have a highly threaded program but I believe it is not able to scale well across multiple cores because it is already saturating all the memory bandwidth.

Is there any tool out there which allows to measure how much of the memory bandwidth is being used?

Edit: Please note that typical profilers show things like memory leaks and memory allocation, which I am not interested in. I am only whether the memory bandwidth is being saturated or not.

+1  A: 

it would be hard to find a tool that measured memory bandwidth utilization for your application.

But since the issue you face is a suspected memory bandwidth problem, you could try and measure if your application is generating a lot of page faults / sec, which would definitely mean that you are no where near the theoretical memory bandwidth.

You should also measure how cache friendly your algorithms are. If they are thrashing the cache, your memory bandwidth utilization will be severely hampered. Google "measuring cache misses" on good sources that tells you how to do this.

A: 

I'd recommend the Visual Studio Sample Profiler which can collect sample events on specific hardware counters. For example, you can choose to sample on cache misses. Here's an article explaining how to choose the CPU counter, though there are other counters you can play with as well.

Matt
+1  A: 

If you have a recent Intel processor, you might try to use Intel(r) Performance Counter Monitor: http://software.intel.com/en-us/articles/intel-performance-counter-monitor/ It can directly measure consumed memory bandwidth from the memory controllers.

Roman Dementiev