ysoren 发表于 2017-6-24 18:05:27

linux服务之tuned

  RHEL/CentOS 在 6.3 版本以后引入了一套新的系统调优工具 tuned/tuned-adm,其中 tuned 是服务端程序,用来监控和收集系统各个组件的数据,并依据数据提供的信息动态调整系统设置,达到动态优化系统的目的;tuned-adm 是客户端程序,用来和 tuned 打交道,用命令行的方式管理和配置 tuned,tuned-adm 提供了一些预先配置的优化方案可供直接使用,比如:笔记本、虚拟机、存储服务器等。
如果你正在使用笔记本(电池电源),想优化系统、节约电源又不想知道太多这方面的细节,就可以用 tuned/tuned-adm 这套工具并应用 laptop-battery-powersave 方案来调整和优化系统。当然不同的系统和应用场景有不同的优化方案,tuned-adm 预先配置的优化策略不是总能满足要求,这时候就需要定制,tuned-adm 允许用户自己创建和定制新的调优方案。

  # rpm -qa|grep tun
tuned-2.5.1-4.el7.noarch
  # less /var/log/tuned/tuned.log
  # tuned-adm list
Available profiles:
- balanced
- desktop
- latency-performance
- network-latency
- network-throughput
- powersave
- throughput-performance
- virtual-guest
- virtual-host
Current active profile: balanced
# tuned-adm active
Current active profile: balanced
# tuned-adm profile virtual-host
# tuned-adm active
Current active profile: virtual-host
  如果是企业存储服务器的话,可以用 enterprise-storage 方案:
tuned-adm profile enterprise-storage
上面预定的方案不是总能满足要求,如果有自己的需求可以定制自己的方案。自己定制很容易,切换到优化方案的配置目录,拷贝一个例子,然后编辑里面的相关参数就可以了,使用 tuned-adm list 命令会看到刚创建的新方案 my-virtual-host:
# 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 192015 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 root1288 Aug12015 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
# pwd
/usr/lib/tuned
页: [1]
查看完整版本: linux服务之tuned