Archive

Monthly Archives: May 2013

Recently, we were looking for a server for a CPU intensive, single-threaded website. We needed lots of cores, for simultaneous load (traffic spikes), but also fast CPUs if possible.

We had to choose between a faster machine with 16 cores, or a slower one with 32 cores. The latter machine was marginally slower per core than our existing server; however, we learnt that the Opteron CPUs it used had AMD “Turbo core” support.

Turbo core is a technology whereby the CPU, if it detects that there is high load on some cores, will shut down unused cores and boost the ones in use, provided the temperature of the CPU remains within tolerance. This requires OS support, and the Linux kernel has had support since early 2010. Phoronix has some Linux benchmarks if you’re interested.

That tipped it for us, because with Turbo Core enabled, the 32-way machine would be faster under light load than our existing server, while also providing breadth for spikes.

However, once we’d commissioned the machine, our tests didn’t show turbo core being used. (We tested by monitoring CPU status files in /proc/ while simulating high web load using wget.) After some head scratching, poking around in dmesg, checking the BIOS settings etc, we discovered that CentOS 6.4, released in February 2013, uses a kernel from late 2009 (2.6.32) which would suggest it doesn’t support turbo core (available from 2.6.35).

However, that didn’t necessarily mean Turbo Core wasn’t supported – the version of the 2.6.32 kernel CentOS 6.4 uses has had many revisions (358 according to Wikipedia).

The way to check definitively is firstly to look in /var/log/dmesg for this boot message:

powernow-k8: Core Performance Boosting: on

Secondly, install the cpufrequtils package and run cpufreq-aperf, which monitors core speeds more accurately. When you then put the system under load, you’ll see whether CPU frequency goes above the rated speed of the CPU, i.e. into turbo mode. In our case, with CPUs rated at 2.1 GHz, we saw speeds in the region of 2.8 GHz:

CPU   Average freq(KHz)   Time in C0      Time in Cx              C0 percentage 

021   2835000             01 sec 000 ms   8784163844 sec 623 ms   100
%d bloggers like this: