[转帖]Linux禁用CPU省电状态/Linux系统性能调优

linux,禁用,cpu,省电,状态,系统,性能 · 浏览次数 : 0

小编点评

## Summary of CPU Power Saving States Disablement **RedHat/Suse:** 1. Open `/etc/default/grub` using `sudo editor`. 2. Find and modify the `GRUB_CMDLINE_LINUX` line. 3. Save the file and exit. 4. Generate a new GRUB2 configuration using the edited file. 5. Apply the new configuration after reboot. **Debian:** 1. Edit `/etc/default/grub` and add the following line: ``` intel_idle.max_cstate=0processor.max_cstate=1 ``` 2. Run `sudo update-grub` to apply the changes. 3. Reboot the system for the changes to take effect. **Note:** * Disabling CPU power saving states may slightly impact performance. * Certain kernel parameters may be incompatible with specific configurations, so care should be taken. * Performance gains may vary depending on the specific configuration used.

正文

https://www.jianshu.com/p/945168b47487

 

How to Disable CPU Power Saving States on a Redhat or Suse Linux System

For RedHat Linux (release 7 and later)

  • Open the /etc/default/grub configuration file as root using a plain text editor such as vim or Gedit.
  • In this file, locate the line beginning with GRUB_CMDLINE_LINUX similar to the following:
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/swap crashkernel=auto rd.lvm.lv=rhel/root rhgb quiet"
  • Change the value of the required kernel command-line parameter. Then, save the file and exit the editor.
    intel_idle.max_cstate=0
    processor.max_cstate=1
  • Regenerate the GRUB2 configuration using the edited default file. If your system uses BIOS firmware, execute the following command:
# grub2-mkconfig -o /boot/grub2/grub.cfg

On a system with UEFI firmware, execute the following instead:

# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

After finishing the procedure above, the boot loader is reconfigured, and the kernel command-line parameter that you have specified in its configuration file is applied after the next reboot.

For RedHat Linux (releases prior to 7) or SuSE Linux

  • Add the following text to the kernel line in /boot/grub/menu.lst:
    intel_idle.max_cstate=0
    processor.max_cstate=1
  • Reboot the system for the change to take effect.

How to Disable CPU Power Saving States on a Debian Linux System

To disable CPU power saving states on a Debian Linux system, perform the following procedure:

  • Modify the GRUB_CMDLINE_LINUX string in /etc/default/grub so that it contains:
    intel_idle.max_cstate=0
    processor.max_cstate=1
  • Run "update-grub".
  • Reboot the system for the change to take effect.
    Note: Disabling CPU power saving states in the system BIOS has no effect on Linux.
    In some cases, performance can also be improved by adjusting the idle kernel parameter. However, care should be taken when using certain values. For example, idle=poll maximizes performance but is incompatible with hyperthreading (HT) and will lead to very high power consumption. For additional information, refer to the documentation for your version of Linux.
    On Windows, disable CPU power saving states by adjusting BIOS settings. Refer to system vendor documentation for additional information.

与[转帖]Linux禁用CPU省电状态/Linux系统性能调优相似的内容:

[转帖]Linux禁用CPU省电状态/Linux系统性能调优

https://www.jianshu.com/p/945168b47487 How to Disable CPU Power Saving States on a Redhat or Suse Linux System For RedHat Linux (release 7 and later)

[转帖]如何在 CentOS 中添加、启用和禁用一个仓库

https://linux.cn/article-10219-1.htmlyum repolistyum-config-manager --enable --disable 在基于 RPM 的系统上,例如 RHEL、CentOS 等,我们中的许多人使用 yum 包管理器来管理软件的安装、删除、更新、

[转帖]硬盘监控和分析工具:Smartctl

Smartctl(S.M.A.R.T自监控,分析和报告技术)是类Unix下实施SMART任务命令行套件或工具,它用于打印SMART自检和错误日志,启用并禁用SMRAT自动检测,以及初始化设备自检。 Smartctl对于Linux物理服务器非常有用,在这些服务器上,可以智能的对磁盘进行错误检查,并将硬

[转帖]Linux 启动或禁止用户或 IP 通过 SSH 登录

https://www.jianshu.com/p/495f2d34eec2 限制用户 SSH 登录 1.只允许指定用户进行登录(白名单):在 /etc/ssh/sshd_config 配置文件中设置 AllowUsers 选项,(配置完成需要重启 SSHD 服务)格式如下: AllowUsers

[转帖]软中断

https://www.jianshu.com/p/78f9dcd2a4b6 软中断:为了处理中断处理程序执行过长和中断丢失的问题,linux将中断处理过程分成两个阶段,也就是上半部和下半部: 上半部:用来快速处理中断,它在中断禁止模式下运行,主要处理跟硬件紧密相关的或跟时间敏感的工作,直接处理硬件

[转帖]Linux 磁盘I/O 调度算法 说明

2022-08-23 13:031361转载Linux 1 Linux 4.0 IO协议栈框架图 I/O 调度算法在各个进程竞争磁盘I/O的时候担当了裁判的角色。他要求请求的次序和时机做最优化的处理,以求得尽可能最好的整体I/O性能。 Linux 4.0 IO协议栈框架图 I/O调度程序的总结 当向

[转帖]Linux中常见IO调度器

https://www.jianshu.com/p/3c16e39a005a 单队列调度算法多队列调度算法 deadline mqdeadlines cfq bfq noop none kyber 对于磁盘I/O,Linux提供了cfq, deadline和noop三种调度策略 cfq: 这个名字是

[转帖]Linux 平台使用shc 工具加密shell 脚本

2021-08-03 20:4510030原创Linux 本文链接:https://www.cndba.cn/dave/article/4642 1 shc 工具说明 shell 脚本是常用脚本,运维中经常使用,但有时候在shell 脚本中会包含一些敏感的信息,比如密码或者特殊的参数,此时我们就可以

[转帖]Linux系统多网卡环境下的路由配置

https://www.cnblogs.com/connect/p/linux-static-route.html Linux下路由配置命令 1. 添加主机路由 route add -host 192.168.1.11 dev eth0 route add -host 192.168.1.12 gw

[转帖]linux命令行下如何格式化json并进行各种json处理操作

https://blog.csdn.net/penriver/article/details/122016563 有时需要在linux 的命令行下,需要查看json的内容或针对json进行各种操作,本文针对此进行梳理、总结。 在Linux系统下基于python json.tool可以格式化json,