Tuesday, February 15, 2011

Extrapolating Benchmark Scores Using MSRs on Intel CPUs

It turns out that you can get a very accurate estimate of Linpack benchmark scores by simply reading MSRs and comparing against a baseline score.  I have only tried it on Westmere and Nehalem so far but achieved a minimum of 98.9% accuracy using this method.  It's not good enough to submit to TOP500, but it can be useful when diagnosing problems on your systems.

I had hoped that this could be run in the background (properly niced) in a way that shouldn't impact any other users or processes on the system you are benchmarking.  However, the problem with this method is that it only seems to be valid for whatever benchmark you are using.  In this case I was using Linpack.  I had hoped to try spiking all CPUs with something else for a few minutes and have it return the same numbers.  Alas, it doesn't work as expected.  My guess is that the memory also needs to be hammered at the same time, but that is something that should probably not be done while legitimate processing is happening.