环境:

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

On RHEL4:

configure the cpu speed to run at MAX speed all the time by adding the following parameter into the file /etc/cpuspeed.conf and restart the cpuspeed service:

vim /etc/cpuspeed.conf
插入或修改:
OPTS="$OPTS -n -C -S \\"0 1\\""
/etc/init.d/cpuspeed restart

On RHEL 5:

add the above parameters to /etc/sysconfig/cpuspeed or use the performance governor by adding the following parameter to the /etc/sysconfig/cpuspeed file and restart the cpuspeed service:

vim /etc/sysconfig/cpuspeed
插入或修改:
GOVERNOR=performance
/etc/init.d/cpuspeed restart

On RHEL 6:

configure the performance cpuspeed governor as above for RHEL 5 and add the following kernel boot options and restart the server. More information available in the Low Latency Performance Tuning for Red Hat Enterprise Linux 6 article.

/etc/init.d/cpuspeed stop		# 开启性能模式
processor.max_cstate=1 intel_idle.max_cstate=0 idle=poll

On RHEL 7:

Red Hat recommends tuned profiles (which use the /dev/cpu_dma_latency interface) as they achieve measured equivalent performance without reboot requirement. More information available in the Low Latency Performance Tuning for Red Hat Enterprise Linux 7article.

yum install -y tuned  # 安装tuned工具

systemctl start/stop tuned  # 启动/停止tuned服务

systemctl enable/disable tuned  # 自启动/禁止自启动

tuned服务的相关配置目录:
/usr/lib/tuned/ # 原生的性能模式
├── balanced
│   └── tuned.conf
├── desktop
│   └── tuned.conf
├── functions
├── latency-performance
│   └── tuned.conf
├── network-latency
│   └── tuned.conf
├── network-throughput
│   └── tuned.conf
├── powersave
│   ├── script.sh
│   └── tuned.conf
├── recommend.conf
├── throughput-performance
│   └── tuned.conf
├── virtual-guest
│   └── tuned.conf
└── virtual-host
└── tuned.conf /etc/tuned # DIY的性能模式
├── active_profile # 当前的性能模式
├── bootcmdline
└── tuned-main.conf tuned-adm list # 显示host上能运行的性能模式 Available profiles:
- balanced # 平衡模式
- desktop
- latency-performance # 低延迟的性能模式
- network-latency
- network-throughput
- powersave # 节能模式
- throughput-performance # 高吞吐量优化模式
- virtual-guest # 虚拟客人模式
- virtual-host
- oracle # oracle模式

常用模式介绍:

balanced

它的目的是成为性能和功耗之间的折衷。它试图尽量使用自动调节。它有好的结果对于大多数负载。唯一的缺点是增加了延迟。在当前调释放它使CPU、磁盘、音频和视频插件和激活ondemand调控器。radeon_powersave设置为自动。

latency-performance

低延迟的性能模式。它禁用电能节约机制,使sysctl设置提高延迟。CPU调节器将性能低的CPU锁定C状态(通过PM QoS)。

throughput-performance

高吞吐量优化模式。它禁用电能节约机制,使sysctl设置提高吞吐量性能的磁盘、网络IO和转向最后期限的调度器。CPU调试器设置为性能模式。

virtual-guest

基于企业存储配置文件,在其他任务,增加虚拟内存swappiness和减少磁盘预读值。它没有禁用磁盘屏障。

oracle

基于throughput-performance模式,它另外禁用透明的巨大的页面和修改内核参数相关的一些其他性能。这个配置文件是由tuned-profiles-oracle包。在6.8及以后版本可用。

tuned-adm active  # 显示host的当前性能模式
- Current active profile: latency-performance tuned-adm profile latency-performance # 切换至性能模式 tuned-adm off

Linux服务器CPU性能模式的更多相关文章

  1. 1.linux服务器的性能分析与优化

    [教程主题]:1.linux服务器的性能分析与优化 [课程录制]: 创E [主要内容] [1]影响Linux服务器性能的因素 操作系统级 CPU 目前大部分CPU在同一时间只能运行一个线程,超线程的处 ...

  2. 高性能Linux服务器 第10章 基于Linux服务器的性能分析与优化

    高性能Linux服务器 第10章    基于Linux服务器的性能分析与优化 作为一名Linux系统管理员,最主要的工作是优化系统配置,使应用在系统上以最优的状态运行.但硬件问题.软件问题.网络环境等 ...

  3. linux服务器的性能分析与优化(十三)

    [教程主题]:1.linux服务器的性能分析与优化 [主要内容] [1]影响Linux服务器性能的因素 操作系统级 Ø CPU 目前大部分CPU在同一时间只能运行一个线程,超线程的处理器可以在同一时间 ...

  4. Linux服务器相关性能的命令

    Linux服务器相关性能的命令 一.查看服务器性能信息的相关命令 1.cpu信息查看 cpu分为物理cpu和逻辑cpu 物理cpu:实际物理服务器插槽上cpu的个数,可以通过physical id不重 ...

  5. Linux服务器命令行模式安装Matlab2014a

    Linux服务器命令行模式安装Matlab2014a,有需要的朋友可以参考下. 0.下载安装包 下载Matlab2014a for Linux安装包的ISO镜像文件(感谢万能的度娘)以及破解包(下载地 ...

  6. 查看linux服务器CPU相关

    查看linux服务器CPU相关: 1.查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l 2.查看 ...

  7. Linux服务器CPU、内存、磁盘空间、负载情况查看python脚本

    [本文出自天外归云的博客园] 网上搜,东拼西凑,组装了一个可以查Linux服务器CPU使用率.内存使用率.磁盘空间占用率.负载情况的python脚本. 脚本内容如下: # -*- coding:utf ...

  8. linux的cpu性能评估

    linux的cpu性能评估 参考自:自学it网,http://www.zixue.it/. (1)利用vmstat命令监控系统CPU[test@localhost ~]$ vmstat 2 3 #每2 ...

  9. 查看Linux服务器CPU总核数

    下面介绍查看Linux服务器CPU总核数的方法. 通过/proc/cpuinfo可查看CPU个数及总核数. [root@kevin ~]# grep processor /proc/cpuinfo | ...

随机推荐

  1. MQ 服务器错误代码2035

    MQ 服务器错误代码20352013-06-12 19:29:39 搭建一个MQ7.1服务器,用了一个小的demo测试程序,结果报错, 测试代码: import com.ibm.mq.MQC; imp ...

  2. 【0805 | Day 8】Python进阶(二)

    列表类型内置方法 一.列表类型内置方法(list) 用途:多个爱好.多个武器.多种化妆品 定义:[ ]内可以有多个任意类型的值,逗号分隔元素 # my_boy_friend = list(['jaso ...

  3. 体验使用MUI上手练习app页面开发

    因为公司安排需要先学习一点app开发,而安排学习的框架就是MUI,上手两天体验还算可以(来自后端人员的懵逼),靠着MUI的快捷键可以快速的完成自己想要的样式模板,更多的交互性的内容则需要使用js来完成 ...

  4. 最新 Flutter 团队工程师中文演讲 | Flutter 的性能测试和理论

    本视频为 Google Flutter 团队的软件工程师 Xiao Yu 在 2018 谷歌开发者大会做的演讲,演讲题目是<Flutter 的性能测试和理论>. 这个视频里将会通过近半个小 ...

  5. Ubuntu安装时出现“failed to load ldlinux.c32”

    Ubuntu安装时出现“failed to load ldlinux.c32” 利用UltraISO制作了ubuntu 18.04的U盘启动,开机F12键USB启动时出现 1 2 Failed to ...

  6. 小白学Python(2)——常用Python编程工具,Python IDE

    下载好Python,但是如何开始编程呢? 有几种方法, 1.第一个就是command lind 即为命令行的方式,也就是我们常说的cmd. 输入 win+ cmd 在命令行中再输入 python,即可 ...

  7. 从零开始实现ASP.NET Core MVC的插件式开发(五) - 插件的删除和升级

    标题:从零开始实现ASP.NET Core MVC的插件式开发(五) - 使用AssemblyLoadContext实现插件的升级和删除 作者:Lamond Lu 地址:https://www.cnb ...

  8. 如何实现QQ附件在线预览功能

    方法一:使用 openoffice 的接口把文档转换成html (linux主机或者windows主机): 方法二:使用 一个叫 jacob.jar 的工具,在安装了 office 的windows主 ...

  9. Ansible实践总结

    Ansible playbook 根据条件动态设置变量 首先新建 inventory,主机列表如下: node-01 ansible_host=192.168.64.30 node-02 ansibl ...

  10. CAP 2.6 版本发布通告

    前言 今天,我们很高兴宣布 CAP 发布 2.6 版本正式版.同时我们也很高兴的告诉你 CAP 在 GitHub 已经突破了3000 Star. 自从上次 CAP 2.5 版本发布 以来,已经过去了几 ...