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
vim /etc/cpuspeed.conf 插入或修改: OPTS="$OPTS -n -C -S \\"0 1\\"" /etc/init.d/cpuspeed restart
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
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.oracle
/etc/init.d/cpuspeed stop # 开启性能模式 processor.max_cstate=1 intel_idle.max_cstate=0 idle=poll
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.app
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模式
它的目的是成为性能和功耗之间的折衷。它试图尽可能使用自动调节。它有好的结果对于大多数负载。惟一的缺点是增长了延迟。在当前调释放它使CPU、磁盘、音频和视频插件和激活ondemand调控器。radeon_powersave设置为自动。工具
低延迟的性能模式。它禁用电能节约机制,使sysctl设置提升延迟。CPU调节器将性能低的CPU锁定C状态(经过PM QoS)。性能
高吞吐量优化模式。它禁用电能节约机制,使sysctl设置提升吞吐量性能的磁盘、网络IO和转向最后期限的调度器。CPU调试器设置为性能模式。优化
基于企业存储配置文件,在其余任务,增长虚拟内存swappiness和减小磁盘预读值。它没有禁用磁盘屏障。ui
基于throughput-performance模式,它另外禁用透明的巨大的页面和修改内核参数相关的一些其余性能。这个配置文件是由tuned-profiles-oracle包。在6.8及之后版本可用。插件
tuned-adm active # 显示host的当前性能模式 - Current active profile: latency-performance tuned-adm profile latency-performance # 切换至性能模式 tuned-adm off