Linux menu

Tuesday, September 23, 2014

How to tune Linux Servers Redhat 6

tuned is a great system performance tuning tool shipped with RHEL6 (in the repository on RHEL6 media, but not installed by default). It comes with 9 different system tuning profiles for different scenarios. Each profile implements different tunables for different system resources such as cpu, network, ATA disk. tuned also provides the flexibility to create your own profile and change the performance tuning parameters as per your own requirement. tunedcollects usage data from different system resources periodically and use this data for tuning the system settings to lower or higher power saving modes. Below is how we can install and use different tuned profiles.
NOTE: I assume that you have got yum configured to use the repository on RHEL6 installation disc/media. If not, please read:
How to use packages on RHEL 5/RHEL 6 or CentOS 5 DVD to create a yum repository
To install tuned:
[root@switchroot ~]# yum install tuned -y
Now start the services provided by tuned:
[root@switchroot ~]# service tuned start
[root@switchroot ~]# chkconfig tuned on

[root@switchroot ~]# service ktune start
[root@switchroot ~]# chkconfig ktune on
To find the current active profile and state of service:
[root@switchroot ~]# tuned-adm active
Current active profile: default
Service tuned: enabled, running
Service ktune: enabled, running
To list all the available profiles:
[root@switchroot ~]# tuned-adm list
Available profiles:
- default
- throughput-performance
- laptop-ac-powersave
- spindown-disk
- desktop-powersave
- laptop-battery-powersave
- latency-performance
- server-powersave
- enterprise-storage
Current active profile: default
To switch to a different profile:
[root@switchroot ~]# tuned-adm profile spindown-disk
NOTE: spindown-disk is one of the profiles

Each profile has 4 configuration file under /etc/tune-profiles/<profile-name>. If you want to create a profile of your own, simply copy one of the profile directory with a different name, change the config files inside it according to your own requirement and activate it.
[root@switchroot ~]# cd /etc/tune-profiles/
[root@switchroot ~]# cp -a default myprofile
[root@switchroot ~]# cd myprofile
[root@switchroot ~]# ls
ktune.sh  ktune.sysconfig  sysctl.ktune  tuned.conf

[root@switchroot ~]# tuned-adm list
Available profiles:
- default
- throughput-performance
- myprofile
- laptop-ac-powersave
- spindown-disk
- desktop-powersave
- laptop-battery-powersave
- latency-performance
- server-powersave
- enterprise-storage
Current active profile: default

[root@switchroot ~]# tuned-adm profile myprofile
In case if you want to disable all tuning, then run:
[root@switchroot ~]# tuned-adm off

No comments: