Intel Xeon Processors - Hyper-Threading and Turbo Boost

Over the past few yeats I have been running a standard CPU performance test on every system I encounter. The test measures the time taken by a single core to process a block of anonymous PL/SQL code. This takes anything from around six seconds to six minutes to run depending on the CPU type. I include some of the fastest results in live presentations in order to introduce topics of interest concerning processor technology. The test results are like Top Gear Fastest Laps; they measure how fast the CPU can go, but not necessarily any other desirable features such as scalability. However the test can be run on production systems without risk and hence I have collected in excess of 200 results.

During my presentation to the UKOUG RAC & HA SIG I observed that the fastest result seen to date on any platform was 8.92 seconds on an Intel Xeon X5670 six-core 2.93GHz processor. My friend and former colleague Steve Shaw from Intel Corporation was in the audience and suggested it may be possible to improve on these times using some relatively recent processor enhancements. We agreed to spend a day at the Intel lab in Winnersh testing the latest hardware.

The system we tested had two Intel Xeon X5680 3.33GHz six-core Westmere EP processors. The operating system was Oracle Enterprise Linux 5 Update 6. We tested with both the Red Hat Kernel (2.6-18.238.el5) and Oracle Unbreakable Linux kernel (2.6-32-100.26.2.el5).

The test script was as follows:


  n NUMBER := 0;
  FOR f IN 1..10000000
    n := MOD (n,999999) + SQRT (f);
  DBMS_OUTPUT.PUT_LINE ('Res = '||TO_CHAR (n,'999999.99'));

When executed successfully this script should produce the following output:

Res = 873729.72

For each test we executed the script at least 10 times and took the time of the fastest execution.

We tested the impact of configuring Hyper-Threading and Turbo Boost. For the Red Hat (2.6-18.238.el5) kernel the results (in seconds) were as follows:

|             |         |    Hyper-Threading  |
|             |         |----------|----------|
|             |         |    Off   |    On    |
|Turbo Boost  |   Off   |   8.98   |   8.89   |
|             |---------|----------|----------|
|             |   On    |   8.24   |   8.38   |

So for the Red Hat kernel, performance was significantly improved by enabling Turbo Boost. Hyper-Threading appeared to have less impact.

We had problems booting the Oracle Unbreakable Linux kernel (2.6-32-100.26.2.el5) when Turbo Boost was disabled. We think this may be a timing issue during the boot process as opposed to a specific problem with the kernel itself. However, we did perform some tests with Turbo Boost enabled and the results (in seconds) were as follows:

|             |         |    Hyper-Threading  |
|             |         |----------|----------|
|             |         |    Off   |    On    |
|Turbo Boost  |   On    |   8.33   |  8.21    |

Unfortunately we do not have any results for the Oracle Unbreakable kernel with Turbo Boost disabled. However, the result of 8.21 seconds with both Hyper-Threading and Turbo Boost enabled is the fastest this test has ever run.

Although the results for the Red Hat kernel contradict this, in our opinion Hyper-Threading often has a positive impact on system throughput for more representative tests; it rarely has a negative impact and therefore on balance we would generally recommend enabling Hyper-Threading on all Xeon processors.

However these results also suggest that the Turbo Boost feature should also be enabled. For the Red Hat kernel enabling Turbo Boost improved performance by 6% to 9%. As the Turbo Boost feature is rarely enabled in production environments, it may be worth investigating for CPU-bound systems.

Thanks to Steve Shaw of Intel Corporation for his assistance in this research.