CentOS7「tuned」



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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值