[转]如何关闭Linux环境下的超线程

今天同事遇到了这问题来问俺,给出了下面的参考资料,分享大家。

 

转自:http://www.cyberciti.biz/faq/linux-disable-hyper-threading-for-pentium-4-server-grub-boot-loader/

 

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.

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.

 

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值