Bug 440321
Summary: | noht kernel parm to disable hyperthreading doesn't work on RHEL5 | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Jack Perdue <ss> | ||||
Component: | doc-Installation_Guide | Assignee: | Ruediger Landmann <rlandman+disabled> | ||||
Status: | CLOSED NEXTRELEASE | QA Contact: | Content Services Development <ecs-dev-list> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 5.0 | CC: | anton, dzickus, paul-redhat, prarit, qcai, syeghiay | ||||
Target Milestone: | rc | Keywords: | Documentation | ||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
URL: | https://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Installation_Guide/ch-bootopts-x86.html | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-03-30 23:54:48 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jack Perdue
2008-04-02 19:34:11 UTC
Jack, Are you actually seeing a problem because hyperthreading is enabled? P. Only in that I can't disable it (as documented) without manually resetting the BIOS. In particular, we have a ROCKS cluster here with Intel Xeon's that we use for parallel research. Part of that research involves running parallel benchmarks and collecting timing profiles. There are times during such studies to see the impact of hyperthreading and so it would nice to be able to disable it. When the "noht" option existed, I could enable two lines of code and reboot the cluster and all nodes would come up without hyperthreading. That option no longer exists AFICT and if we want to do such studies, I have to reset the BIOS on the 20+ compute nodes, which takes quite a bit longer. Jack, The reference to "noht" in our documentation is an *install* option, however I can certainly understand why you could read that as a run-time option. The documentation, however, states " This appendix discusses additional boot and kernel boot options available for the Red Hat Enterprise Linux installation program. To use any of the boot options presented here, type the command you wish to invoke at the installation boot: prompt. " RHEL5 ships with CPU_HOTPLUG enabled. This option allows a user to disable and enable HW or HT cores. For example, I have a 4 cpu system with two HT processors. To disable the HT processors one can do: echo 0 > /sys/devices/system/node/node0/cpu1/online echo 0 > /sys/devices/system/node/node0/cpu3/online You could write a system service script that does something similar to (please note that this code is untested and is just a suggestion): grep noht /proc/cmdline if [ $? -eq 0 ]; then # noht specified on the command line, disabling HT cpus echo 0 > /sys/devices/system/node/node0/cpu1/online echo 0 > /sys/devices/system/node/node0/cpu3/online fi As you will note this has a small drawback: You must boot the system at least once to determine how the CPUs are enumerated. However if you have a large cluster of identical systems the same script will work everywhere. Pulling in the "noht" option is not something we were planning on doing in RHEL5 -- it is a remnant of the RHEL4 install. I will change this BZ to reflect that there are obsolete installation options specified in the Installation Guide. Hope this helps, P. Fixed in RHEL5 and Fed11 guides. Created attachment 550995 [details]
Script to disable hyperthreading if "noht" is on kernel boot line
Thanks Prarit for the clarification and pointers. Attached is what I came up with for my most recent cluster (given your, and others, input) that tries to determine which CPUs to disable using the thread_siblings_list file in /sys and then disables them.
Let me know if you see a problem with it (if you don't mind).
Seems to work well here for detecting the 2nd thread for each CPU (Nehalem and Sandy Bridge). Might be a useful utility to have (if it works right).
YMMV / FWIW
This hacky one-liner disables the 2nd thread in each cpu pair, much like Jack Perdue's script cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | awk -F, '{print $2}' | sort -n | uniq | ( while read X ; do echo $X ; echo 0 > /sys/devices/system/cpu/cpu$X/online ; done ) |