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:
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)
kernel /boot/vmlinuz-2.6.18-164.el5debug ro root=LABEL=/ rhgb quiet
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
kernel /boot/vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet hpet=enable
5. Once the change is completed, the system should be rebooted in order for the high precision timer to take effect.
16 June 2018