[转帖]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) 网络服务 --提供给网络中的其他 ...
随机推荐
- dart的语法
dart的语法 main方法 main(){ print("有返回值"); } void main() { print("没有返回值"); } 字符串的定义的方 ...
- 浅学GoF23种设计模式
long long ago 买了设计模式的书,一直没看,平常工作虽然涉及到,但是不够系统,工作之余抽空学习一下. 一.创建型模式 01.单例(Singleton) 02.工厂方法(Factory Me ...
- 第十三部分_awk
一.awk介绍 1. awk概述 awk是一种编程语言,主要用于在linux/unix下对文本和数据进行处理,是linux/unix下的一个工具.数据可以来自标准输入.一个或多个文件,或其它命令的输出 ...
- 【小白学YOLO】YOLOv3网络结构细致解析
摘要:本文将详细介绍Yolov3的网络结构相关内容. Yolov3 网络结构 在博客"Yolo发展历史及网络结构"中我们已经详细的解释了Yolov1的网络结构,并简要的提到了Yol ...
- 10个安全问题带你了解OWASP 定义的大模型应用
摘要:OWASP 的一群研究人员,总结目前大模型中可能存在的TOP10安全风险,很好的揭示了我们在大模型应用中需要防护的目标,以及如何采取相应的防护措施. 本文分享自华为云社区<OWASP 定义 ...
- GaussDB(DWS)字符串处理函数返回错误结果集排查
摘要:在使用字符串处理函数时,有时会出现非预期结果的场景.在排除使用问题后,应该从encoding和数据本身开始排查. 本文分享自华为云社区<GaussDB(DWS)字符串处理函数返回错误结果集 ...
- 详解GaussDB(DWS)的query_band负载识别与应用
摘要:query_band是一个会话级别(session)的GUC参数,本身是字符串类型,支持任意形式字符组合. 本文分享自华为云社区<GaussDB(DWS)的query_band负载识别与应 ...
- 经验说丨华为云视频Cloud Native架构下实践
摘要:来自华为云直播的段亮详细介绍华为云视频在Cloud Native的转型实践中遇到的问题.挑战以及解决之道. 随着云基础设施服务以及边缘计算技术的发展,Cloud Native,即云原生,架构理念 ...
- 开启一个 A/B 实验到底有多简单?
更多技术交流.求职机会,欢迎关注字节跳动数据平台微信公众号,回复[1]进入官方交流群 火山引擎 A/B 测试平台 DataTester 孵化于字节跳动业务内部,在字节跳动,"万事皆 A/B, ...
- PPT 提升素材搜索能力
https://cn.bing.com/images 高清透明 https://unsplash.com/ 更新快 https://pixabay.com/zh/ 免费高清图片 https://www ...