IBM Support

Enabling the HPET Linux kernel setting can significantly improve the performance of a DB2 OLTP workload running on an AMD platform using Opteron processors



While testing an OLTP workload, it was found that when migrating from DB2 V9.1 FP8 to DB2 V9.7 FP1, there was a significant performance regression observed in its runtime. This regression applies to subsequent DB2 9.7 fixpacks as well. The tests were executed on an AMD Opteron machine running Linux RHEL 5.4. When analyzing the profile of the workload via oprofile, we notice a 5x increase in the amount of CPU samples accounted to the kernel /boot/vmlinux*, particularly on do_gettimeoffset_pm().


Slower OLTP workload performance running on Linux RHEL on AMD, when HPET (high precision event timer) is disabled in the operating system


Implementation of timing functions on DB2


Linux 2.6+ kernel on AMD Opteron

Resolving The Problem

1. Check if the model-processor matches AMD Opteron by executing the command:
"cat /proc/cpuinfo | grep -E "model name"

2. Check if you are using the 2.6+ kernel by executing the command:
"uname -a"

3a. For linux kernels 2.6.24 and above, it is possible to detect if HPET is available by executing the command:

If HPET is available, check if it is used as the current clocksource by executing the command:

- Unfortunately, for earlier linux kernels, it is not possible to accurately determine if clocksources like HPET are available. However, it may be possible to enable HPET (2.16+)

4. The following is one way on how to enable HPET. You will need root access and add the line "hpet=enable" in the /boot/grub/grub.conf file for the line containing the current kernel. An example is provided below:

title Red Hat Enterprise Linux Server (2.6.18-164.el5debug)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-164.el5debug ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-164.el5debug.img
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet hpet=enable
initrd /boot/initrd-2.6.18-164.el5.img

5. Once the change is completed, the system should be rebooted in order for the high precision timer to take effect.

[{"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Business Unit":{"code":"BU001","label":"Analytics Private Cloud"},"Component":"Performance - General\/Tuning","Platform":[{"code":"PF016","label":"Linux"}],"Version":"9.7","Edition":"Enterprise Server"}]

Document Information

Modified date:
16 June 2018