Linux Disable Hyper Threading for Pentium 4 server GRUB boot loader

Q. I am using GRUB boot loader. How do I disable Hyper Threading for Pentium 4 server? I am using CentOS.

ADVERTISEMENTS

A. To improve performance in the past, threading was enabled in the software by splitting instructions into multiple streams so that multiple processors could act upon them. Hyper-Threading Technology (HT Technology) provides thread-level parallelism on each processor, resulting in more efficient use of processor resources, higher processing throughput, and improved performance on today’s multithreaded software.

If you disable HT you may notice performance problem. To disable edit grub.conf file:
# vi /etc/grub.conf
OR
# vi /boot/grub/menu.lst

Locate the kernel line that you want to modify and append noht at the end:
kernel /boot/vmlinuz-2.6.8-2-686 root=/dev/hdb1 ro single noht

Save and close the file.

You can also disable HT during booting CentOS Linux. You need to pass an option to kernel.

  1. At GRUB menu
  2. Select the kernel to boot into.
  3. Type ‘e‘ to modify the kernel
  4. Append ‘noht‘ at the end of the line.
  5. Press return key to boot with this options.
  6. Type ‘b‘ to boot to this kernel.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
5 comments… add one
  • concept10 Nov 23, 2006 @ 18:34

    What are the pros/cons of disabling HT on P4 CPUs? I currently run Ubuntu 6.10 (Edgy) and the stock config/kernel has Hyper-Threading disabled. How do I enable this? May I enable this in GRUB or do I have to compile another kernel? uname -a > Linux ubuntu 2.6.17-10-generic #2 SMP

  • 🐧 nixCraft Nov 23, 2006 @ 18:50

    uname -a clearly indicates that you are running SMP kernel. SMP kernel enables HT and dual core support. So you don’t have to do anything.

    To be frank enabling HT will increase your performance. However some application may not work (especially old apps). Those are rare cases and you need to disable HT.

  • bull Jan 27, 2007 @ 4:03

    For any type of server environment HT is beyond worthless. It will degrade your server application performance. HT is meant for interactive DESKTOP applications not DEADLINE based scheduling required by servers.

  • Bill Broadley Dec 20, 2008 @ 2:04

    Depends on the workload, for some server workloads it helps, for others it doesn’t. The new core i7 seems to have done this pretty well and I’m seeing a wider range of workloads where it helps.

  • Wojciech Apr 10, 2011 @ 14:35

    Well in my case HT does quite a lot of harm. An automatic test suite for an application I’m working detects number of processes and splits work load among them. Each test process spins its own application instance which is resource consuming. Even if HT gives some performance increase overall test time suffers.

    I could hack test suite to detect HT and reduce number of processes by a factor of two. I’ll try to disable HT first.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.