环境:

  • 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

最新文章

  1. 4-Server安全配置
  2. javascript编程习惯总结
  3. 利用Ant脚本生成war包的详细步骤
  4. Java SE 第十六讲----方法重载
  5. apache config directive – order, allow, deny
  6. JavaScript权威指南学习笔记6
  7. DDMS files not found: tools\hprof-conv.exe
  8. 触动精灵远程Log模块
  9. eclipse清除运行Maven build...后积累的配置项
  10. 微信小程序初探【类微信UI聊天简单实现】
  11. IntelliJ IDEA设置统一编码utf-8
  12. COMS3200 The RUSH protocol
  13. 【pygame游戏编程】第一篇-----创建一个窗口
  14. koa2 入门(1)koa-generator 脚手架和 mongoose 使用
  15. [Windows Azure] Load Testing in Windows Azure
  16. jQuery内部原理和实现方式浅析
  17. 【Spring学习笔记-MVC-15】Spring MVC之异常处理
  18. html5 canvas类库 实例
  19. 阿里云服务器安装https证书 centos + httpd + Symantec
  20. 第19章 通讯的基本概念—零死角玩转STM32-F429系列

热门文章

  1. web面试
  2. Python+Selenium - Web自动化测试(一):环境搭建
  3. Java请求Http
  4. HTTP请求包和响应包
  5. CSS动效集锦,视觉魔法的碰撞与融合(一)
  6. springboot中springAOP的使用
  7. 简单架构:反射实现抽象工厂+IDAL接口完全独立DAL
  8. 再见 Spring Boot 1.X ,Spring Boot 2.X 走向舞台中心
  9. CSS 锚点 :target属性 制作选项卡
  10. MySQL之修改默认引擎和字符集