Fix now available for RHEL 6.3 CPU utilization
jhopper 270000YPM8 Visits (4360)
By: Jenifer Hopper.
Fixing CPU utilization metrics on RHEL 6.3
As reported earlier in a blog post, the standard RHEL 6.3 kernel has issues with correctly calculating CPU utilization values.
(For more insights into the fix below, see a different blog post )
** Note: The specific zstream kernel version mentioned in this article was the most recent at the time of publication. Newer RHEL 6.3 zstream kernel releases should contain this bug fix as well.
Red Hat recently released a service stream fix via their "zstream" process. You will need two packages:
To upgrade to the new kernel version, install these two rpms:
(Note: using -U with the rpm tool will replace the existing kernel images.)
This will create a new entry in /etc/yaboot.conf. You can set the "default" parameter in yaboot.conf to the image name for this new kernel so it is booted by default.
Before updating to the new kernel, top showed incorrect output on an idle system:
The "bad kernel":
# uname -r
Cpu(s): 33.3%us, 66.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Note the high "sy" (system mode) and "us" (user mode) percentages, this is obviously incorrect since the system is idle. This bug effects all tools that use /proc/stat values.
After installing and booting to the new zstream kernel, top now correctly shows 100% idle time for an idle system:
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
If you are experiencing issues with top, vmstat, mpstat, sar reporting correct CPU utilization values, you are encouraged to obtain these fixes for your RHEL 6.3 system. Please note that the tools are fine, they are simply reporting values from the kernel. The updated kernel fixes an earlier bad fix/feature added to the kernel.