[转帖]linux服务之tuned
https://www.cnblogs.com/createyuan/p/5701650.html
RHEL/CentOS 在 6.3 版本以后引入了一套新的系统调优工具 tuned/tuned-adm,其中 tuned 是服务端程序,用来监控和收集系统各个组件的数据,并依据数据提供的信息动态调整系统设置,达到动态优化系统的目的;tuned-adm 是客户端程序,用来和 tuned 打交道,用命令行的方式管理和配置 tuned,tuned-adm 提供了一些预先配置的优化方案可供直接使用,比如:笔记本、虚拟机、存储服务器等。
如果你正在使用笔记本(电池电源),想优化系统、节约电源又不想知道太多这方面的细节,就可以用 tuned/tuned-adm 这套工具并应用 laptop-battery-powersave 方案来调整和优化系统。当然不同的系统和应用场景有不同的优化方案,tuned-adm 预先配置的优化策略不是总能满足要求,这时候就需要定制,tuned-adm 允许用户自己创建和定制新的调优方案。
[root@1st-kvm tuned]# rpm -qa|grep tun
tuned-2.5.1-4.el7.noarch
[root@1st-kvm tuned]# less /var/log/tuned/tuned.log
[root@1st-kvm ~]# tuned-adm list
Available profiles:
- balanced
- desktop
- latency-performance
- network-latency
- network-throughput
- powersave
- throughput-performance
- virtual-guest
- virtual-host
Current active profile: balanced
[root@1st-kvm ~]# tuned-adm active
Current active profile: balanced
[root@1st-kvm ~]# tuned-adm profile virtual-host
[root@1st-kvm ~]# tuned-adm active
Current active profile: virtual-host
如果是企业存储服务器的话,可以用 enterprise-storage 方案:
tuned-adm profile enterprise-storage
上面预定的方案不是总能满足要求,如果有自己的需求可以定制自己的方案。自己定制很容易,切换到优化方案的配置目录,拷贝一个例子,然后编辑里面的相关参数就可以了,使用 tuned-adm list 命令会看到刚创建的新方案 my-virtual-host:
[root@1st-kvm tuned]# ll
total 16
drwxr-xr-x. 2 root root 23 Jul 24 14:59 balanced
drwxr-xr-x. 2 root root 23 Jul 24 14:59 desktop
-rw-r--r--. 1 root root 12260 May 19 2015 functions
drwxr-xr-x. 2 root root 23 Jul 24 14:59 latency-performance
drwxr-xr-x. 2 root root 23 Jul 24 14:59 network-latency
drwxr-xr-x. 2 root root 23 Jul 24 14:59 network-throughput
drwxr-xr-x. 2 root root 39 Jul 24 14:59 powersave
-rw-r--r--. 1 root root 1288 Aug 1 2015 recommend.conf
drwxr-xr-x. 2 root root 23 Jul 24 14:59 throughput-performance
drwxr-xr-x. 2 root root 23 Jul 24 14:59 virtual-guest
drwxr-xr-x. 2 root root 23 Jul 24 14:59 virtual-host
[root@1st-kvm tuned]# pwd
/usr/lib/tuned
在这个目录下,新建一个目录,修改里面的tuned.conf来配置参数,最后用tuned-adm active来选择这个定制的方案

[root@test tuned]# ls -R
.:
balanced desktop functions latency-performance network-latency network-throughput powersave recommend.d throughput-performance virtual-guest virtual-host ./balanced:
tuned.conf ./desktop:
tuned.conf ./latency-performance:
tuned.conf ./network-latency:
tuned.conf ./network-throughput:
tuned.conf ./powersave:
script.sh tuned.conf ./recommend.d:
50-tuned.conf ./throughput-performance:
tuned.conf ./virtual-guest:
tuned.conf ./virtual-host:
tuned.conf
[root@test tuned]# pwd
/usr/lib/tuned


[root@test tuned]# cd network-throughput/
[root@test network-throughput]# cat tuned.conf
#
# tuned configuration
# [main]
summary=Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
include=throughput-performance [sysctl]
# Increase kernel buffer size maximums. Currently this seems only necessary at 40Gb speeds.
#
# The buffer tuning values below do not account for any potential hugepage allocation.
# Ensure that you do not oversubscribe system memory.
net.ipv4.tcp_rmem="4096 87380 16777216"
net.ipv4.tcp_wmem="4096 16384 16777216"
net.ipv4.udp_mem="3145728 4194304 16777216"
[转帖]linux服务之tuned的更多相关文章
- linux服务之tuned
RHEL/CentOS 在 6.3 版本以后引入了一套新的系统调优工具 tuned/tuned-adm,其中 tuned 是服务端程序,用来监控和收集系统各个组件的数据,并依据数据提供的信息动态调整系 ...
- 第11章 Linux服务管理
1. 服务分类 (1)Linux的服务 ①Linux中绝大多数的服务都是独立的,直接运行于内存中.当用户访问时,该服务直接响应用户,其好处是服务访问响应速度快.但不利之处是系统中服务越多,消耗的资源越 ...
- 在 CentOS7 上将自定义的 jar 包注册为 linux 服务 service
在 CentOS7 上将自定义的 jar 包注册为 linux 服务 service 1.在 /etc/rc.d/init.d/ 目录下创建一个名字和服务名完全相同的 shell 脚本文件 joyup ...
- linux笔记:linux服务管理
linux服务的分类: 启动和自启动: 查询已经安装的服务: RPM包的默认安装路径: 独立服务的启动: 独立服务的自启动: 基于xinetd的服务的管理: xinetd服务的自启动: 源码包安装服务 ...
- Linux学习笔记(19) Linux服务管理
1. 服务的分类 Linux服务可分为RPM包默认安装的服务和源码包安装的服务.前者可细分为独立的服务(直接作用于内存中)和基于xinetd服务.xinetd本身是独立的服务,其唯一的功能是管理其他服 ...
- [Linux]服务管理:rpm包, 源码包
--------------------------------------------------------------------------------------------------- ...
- linux服务器之LVS、Nginx和HAProxy负载均衡器对比
linux服务器之LVS.Nginx和HAProxy负载均衡器对比. LVS特点: 1.抗负载能力强,使用IP负载均衡技术,只做分发,所以LVS本身并没有多少流量产生: 2.稳定性.可靠性好,自身 ...
- 《如何将windows上的软件包或文件上传到linux服务上》
昨天晚上朋友让我帮他简单的搭建个环境,他公司让他做款软件测试温度的,他自己搞的是嵌入式,在公司担任的是软件工程师,应届毕业生.也可能他们搞嵌入式的对这个linux系统不太熟,不会把windows上的软 ...
- linux服务端的网络编程
常见的Linux服务端的开发模型有多进程.多线程和IO复用,即select.poll和epoll三种方式,其中现在广泛使用的IO模型主要epoll,关于该模型的性能相较于select和poll要好不少 ...
- Linux服务的管理
1.Linux服务的介绍 系统服务 --某些服务的服务的对象是Linux系统本身,或者Linux系统系统用户,这类服务我们称为系统服务(System Service) 网络服务 --提供给网络中的其他 ...
随机推荐
- 文心一言 VS 讯飞星火 VS chatgpt (178)-- 算法导论13.4 1题
一.用go语言,在执行 RB-DELETE-FIXUP 之后,证明:树根一定是黑色的. 文心一言: 在证明 RB-DELETE-FIXUP 之后,树根一定是黑色的的过程中,我们首先需要理解红黑树的性质 ...
- Spark Core快速入门
Spark-core快速入门 一.简介 Apache spark是专门为大规模数据处理而设计的快速通用的计算模型,是一种类似于Mapreduce通用并行计算框架,与mapreduce不同的是,spar ...
- 【Pandas】groupby连用的count()和size()的区别
groupby连用的count()和size()的区别 count() 计算的是 value(数值): size() 计算的是 size(个数) 我们有以下表: size() age = df.gro ...
- 鸿蒙开发丨设备内UIAbility的几种交互方式
本文分享自华为云社区<设备内UIAbility交互:无缝体验与高级技巧>,作者: 柠檬味拥抱. UIAbility组件间交互(设备内) 在设备内,UIAbility(用户界面能力)是系统调 ...
- 遥居前列!华为云GaussDB再获行业权威验证
摘要:北京国家金融科技认证中心正式公布了2022年通过"分布式数据库金融标准验证"的数据库产品名单.华为云GaussDB金融级分布式数据库以突出的技术优势通过验证,跃然榜上,且测试 ...
- PyCharm View as Array 查看数组
代码中设置断点. 在Debug Variables 里面,点击 View as Array 如下图所示:
- Hadoop面试题(一)
1.集群的最主要瓶颈 磁盘IO 2.Hadoop运行模式 单机版.伪分布式模式.完全分布式模式 3.Hadoop生态圈的组件并做简要描述 1)Zookeeper:是一个开源的分布式应用程序协调服务,基 ...
- SE11/SE16N修改表数据
1.SE11修改方法 首先修改显示格式 选择SE16标准列表 双击这条数据 输入/H,回车,再回车 修改CODE为EDIT,F8 此时,数据已经可以修改了 2.SE16N修改方法 2.1断点修改 输入 ...
- Python使用pandas库读取txt文件中的Json数据,并导出到csv文件
使用的是 Python 3 代码: #!/usr/bin/python # -*- coding: gbk -*- # JSON数据导出到csv文件 import json import pandas ...
- Spark Final-Examination Note
重点 4567,Special 4,5 3道编程题,分值 35(基本书上,不超纲) 选填各 20分,简答 5 题/25分,编程题 3题/35分. 简答题参考每章课后习题 第 1 章简答题 1. 请阐述 ...