Unexpectedly, spent quite a time to get damn thing working, so here's short howto/note to self. Post is in (poor) english for obvious reasons.
As those who keep an eye on modern CPUs already know, Nehalem has Turbo Mode/Boost that if enabled and if cooling/power conditions are OK allows processor to overclock itself staying within specified TDP envelope. Separate multipliers available for overclocking 1, 2 or 4 cores. While this may help certain workloads, performance of others may degrade. Supposedly, among the latest are workloads that greatly depend on memory bandwidth: increasing core frequency only increases contention in load/store pipeline as uncore and memory controller frequencies stay the same. Also, there may be complex interdependency with SMT (aka HyperThreading): my test program did have a boost with Turbo=on and SMT=off but there was performance degradation when both Turbo and SMT were on.
- Obviously, Turbo Mode and SpeedStep must be enabled in BIOS. Idle power mode of the processor must be set to "Low Power" (or similar). Otherwise, required ACPI kernel modules won't load.
Actually, BIOS defaults on the box I experimented with had all these options set right.Upd: not really: it was crucial to disable C and C1E states. - Recent kernel is required. I had no luck with stock kernels from RHEL 5.2 and RHEL 5.3 alpha, but YMMV. Finally, I built 2.6.28 myself. Also, I had to add
noapicto kernel boot line, as otherwise kernel panicked while going from one P-state to another. Although, this effect may be attributed to the fact that I used beta-quality hardware (there were quite a few complaints about APIC in dmesg). - Turbo Mode is enabled via ACPI, so
acpi_freqmodule must be loaded. Under RHEL, this module is loaded ifcpuspeedsystem service is started. Scaling governor must be set toperformance. Therefore, to disable Turbo Mode (esp. handy in cluster setting), one only needs to set governor to e.g.userspaceand set current frequencyto maximal available (maximal frequency available corresponds to nominal CPU frequency; to my best knowledge, turbo-overclocked frequencies are not exposed via ACPI)upd: to one before the maximal frequency (it is just a bit lower). The maximal one corresponds to Turbo mode enabled.
It might just work
Anonymous
January 20 2010, 18:04:38 UTC 7 years ago
http://code.google.com/p/i7z/
cpufrequtils are not required, /proc/cpuinfo will not report correct freq, its all done by the chipset.
Re: It might just work
August 13 2011, 16:15:15 UTC 6 years ago
I was wondering about this; where I work the apps are single threaded the vast majority of the time and so one core tends to get most of the work. I was testing this and noticed proc/cpuinfo only read out 2.93 GHz on a core i7 when i know turbo can boost it to 3.6 GHz under some circumstances.
So when the cpuinfo is reading out 2.93 on one core, the CPU IS actually at 3.6?
Anonymous
September 20 2012, 14:46:18 UTC 5 years ago
I've programmed it in C using ArchLinux 64
code.cyring.fr/FTS