Linux服务器CPU性能模式
环境:
- 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.linux服务器的性能分析与优化
[教程主题]:1.linux服务器的性能分析与优化 [课程录制]: 创E [主要内容] [1]影响Linux服务器性能的因素 操作系统级 CPU 目前大部分CPU在同一时间只能运行一个线程,超线程的处 ...
- 高性能Linux服务器 第10章 基于Linux服务器的性能分析与优化
高性能Linux服务器 第10章 基于Linux服务器的性能分析与优化 作为一名Linux系统管理员,最主要的工作是优化系统配置,使应用在系统上以最优的状态运行.但硬件问题.软件问题.网络环境等 ...
- linux服务器的性能分析与优化(十三)
[教程主题]:1.linux服务器的性能分析与优化 [主要内容] [1]影响Linux服务器性能的因素 操作系统级 Ø CPU 目前大部分CPU在同一时间只能运行一个线程,超线程的处理器可以在同一时间 ...
- Linux服务器相关性能的命令
Linux服务器相关性能的命令 一.查看服务器性能信息的相关命令 1.cpu信息查看 cpu分为物理cpu和逻辑cpu 物理cpu:实际物理服务器插槽上cpu的个数,可以通过physical id不重 ...
- Linux服务器命令行模式安装Matlab2014a
Linux服务器命令行模式安装Matlab2014a,有需要的朋友可以参考下. 0.下载安装包 下载Matlab2014a for Linux安装包的ISO镜像文件(感谢万能的度娘)以及破解包(下载地 ...
- 查看linux服务器CPU相关
查看linux服务器CPU相关: 1.查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l 2.查看 ...
- Linux服务器CPU、内存、磁盘空间、负载情况查看python脚本
[本文出自天外归云的博客园] 网上搜,东拼西凑,组装了一个可以查Linux服务器CPU使用率.内存使用率.磁盘空间占用率.负载情况的python脚本. 脚本内容如下: # -*- coding:utf ...
- linux的cpu性能评估
linux的cpu性能评估 参考自:自学it网,http://www.zixue.it/. (1)利用vmstat命令监控系统CPU[test@localhost ~]$ vmstat 2 3 #每2 ...
- 查看Linux服务器CPU总核数
下面介绍查看Linux服务器CPU总核数的方法. 通过/proc/cpuinfo可查看CPU个数及总核数. [root@kevin ~]# grep processor /proc/cpuinfo | ...
随机推荐
- Linux--shel的if判断语句--05
if条件语句的使用格式: 1.单分支语句 if [ 条件 ];then 执行语句 fi 注意:[ 条件 ] :条件与中括号要用空格分割:下面的语句同理. 2.双分支语句 if [ 条件 ];then ...
- Tomcat源码分析 (五)----- Tomcat 类加载器
在研究tomcat 类加载之前,我们复习一下或者说巩固一下java 默认的类加载器.楼主以前对类加载也是懵懵懂懂,借此机会,也好好复习一下. 楼主翻开了神书<深入理解Java虚拟机>第二版 ...
- 洛谷 P2158 [SDOI2008]仪仗队
题意简述 给定一个n,求gcd(x, y) = 1(x, y <= n)的(x, y)个数 题解思路 欧拉函数, 则gcd(x, y) = 1(x <= y <= n)的个数 ans ...
- API开发之接口安全(二)-----sign校验
上一章 我们说了 sign的生成 那么 我们如何确定这个sign的准确性呢 下来 我们说说 校验sign的那些事 在拿到header里面的内容之后 我们首先需要对其内容的基本参数做一个校验 我们补充下 ...
- vscode 配置 nodejs 开发环境
1.配置 cnpm 镜像 (国内淘宝镜像网速更快) npm install -g cnpm --registry=https://registry.npm.taobao.org 2.配置智能提示 安装 ...
- python学习之并发编程(理论部分)
第一章 操作系统 管理控制协调计算机中硬件与软件的关系. 操作系统的作用? 第一个作用: 将一些对硬件操作的复杂丑陋的接口,变成简单美丽的接口. open函数. 第二个作用: 多个进程抢占一个(CPU ...
- spring-boot-plus V1.2.1 发布 文件上传下载和静态资源访问
[V1.2.1-RELEASE] 2019.08.21 ⭐️ New Features 文件上传保存到服务器指定目录 文件下载 访问上传的图片等资源 启用项目静态资源访问,可访问static/temp ...
- Java笔记(持续更新中)
Java语言的特点: 面向对象(封装,继承,多态) 平台无关性(JVM运行.class文件) 语言(泛型,Lambda) 类库(集合,并发,网络,IO/NIO) JRE(Java运行环境,JVM,类 ...
- python对接常用数据库,快速上手!
python对接常用数据库,快速上手! 很多同学在使用python进行自动化测试的时候,会涉及到数据库数据校验的问题,因为不知道如何在python中如何对数据库,这个时候会一脸茫然,今天在这里给大家汇 ...
- Spring-Boot:多种配置注入方式
package com.example.el; import org.springframework.beans.factory.annotation.Value; import org.spring ...