CentOS7「tuned」

来源:互联网 发布:json文件注释报错 编辑:程序博客网 时间:2024/06/06 04:19


CentOS7の「tuned」を使って、パフォーマンス・チューニングをおこなう。
チューニングの目的には、省電力モードの設定やディスクI/Oの性能向上などがある
tunedは、Linuxの代表的なカーネルパラメータに関してチューニングを行ってくれるデーモンのこと。
OSを稼働したままで動的に変更することができる


1、修正前  

[root@RHEL71-otameshi ~]# sysctl -a > /tmp/sysctl.bak

使用可能なプロファイルと現在使用されているプロファイルを確認できる。
[root@RHEL71-otameshi ~]# tuned-adm list

一度load profile
[root@RHEL71-otameshi ~]# tuned-adm profile gne
Cannot load profile 'gne'.


2 元のパラメータ値、例えばvm.swappiness
[root@RHEL71-otameshi tuned]# sysctl -a |grep vm.swappiness
vm.swappiness = 60


tuned.confのinclude変更
[root@RHEL71-otameshi ~]# cd /etc/tuned/
[root@RHEL71-otameshi ~]# cp -r gne gne.bak
[root@RHEL71-otameshi ~]# vi /etc/tuned/gne.bak/tuned.conf
----------------------------------------------------------
#include=base
include=desktop;performance
----------------------------------------------------------
throughput-performanceのtuned.confのvm.swappinessは10
[root@RHEL71-otameshi tuned]#vi /usr/lib/tuned/throughput-performance/tuned.conf

vm.swappiness = 10

3. 一度load profile

[root@RHEL71-otameshi ~]# tuned-adm profile gne.bak

vm.swappinessの値が変更されました
[root@RHEL71-otameshi tuned]# sysctl -a |grep vm.swappiness
vm.swappiness = 10

4. 設定戻る
[root@RHEL71-otameshi tuned]# vi /etc/tuned/gne.bak/tuned.conf
-------------------------------------------------------------------------
[main]
include=base
#throughput-performance
----------------------------------------------------------------------------

[root@RHEL71-otameshi tuned]# tuned-adm profile gne.bak
Cannot load profile 'gne.bak'.


[root@RHEL71-otameshi tuned]# tuned-adm list
Available profiles:
- balanced
- desktop
- gne
- gne.bak
- latency-performance
- network-latency
- network-throughput
- powersave
- throughput-performance
- virtual-guest
- virtual-host
No current active profile.
[root@RHEL71-otameshi tuned]#

参考URL
https://runble1.com/centos7-wordpress-tuned/
https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Power_Management_Guide/index.html 2.5
https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Power_Management_Guide/Tuned.html#tuned-plugins

0 0
原创粉丝点击