Wednesday, January 7, 2015

Checking for Constant Time Stamp Counter

A Constant Time Stamp Counter is included in more recent Intel Processors (TSC) to reads at the processor's maximum rate regardless of the actual CPU running rate. While this makes time keeping more consistent, but it can skew benchmarks, where a certain amount of spin-up time is spent at a lower clock rate before the OS switches the processor to the higher rate. For more information on Time Stamp Counter, do look at Time Stamp Counter (wikipedia)

To check whether your CPU support TSC, you can issue the command
# grep -q constant_tsc /proc/cpuinfo && echo "Constant TSC detected" || echo "No Constant TSC Detected"

No comments: