Rhel/centos introduced a new set of system tuning tools Tuned/tuned-adm after version 6.3, in which tuned is a server-side program, which is used to monitor and collect data from various components of the system, and dynamically adjust the system settings according to the information provided by the data, to achieve the goal of dynamic optimization system; Tuned-adm is a client program that is used to deal with tuned, manage and configure tuned,tuned-adm in a command-line manner, providing some preconfigured optimizations for direct use, such as notebooks, virtual machines, storage servers, and so on.
If you are using a notebook (battery power), you want to optimize the system, save power and do not want to know too much detail of this, you can use tuned/tuned-adm this set of tools and apply the Laptop-battery-powersave scheme to adjust and optimize the system. Of course, different systems and scenarios have different optimization scenarios, TUNED-ADM optimization strategy does not always meet the requirements, this time the need for customization, TUNED-ADM allows users to create and customize their own new tuning program.
Install and start tuned:
The code is as follows:
# Yum Update
# yum Install tuned
# Service Tuned start
# Chkconfig tuned on
# service Ktune Start
# Chkconfig Ktune on
To view the current optimization scenario:
The code is as follows:
# Tuned-adm Active
Current Active Profile:default
Service tuned:enabled, running
Service ktune:enabled, running
To view preconfigured optimization scenarios:
The code is as follows:
# TUNED-ADM List
Available Profiles:
-Laptop-battery-powersave
-Virtual-guest
-Desktop-powersave
-SAP
-Server-powersave
-Virtual-host
-Throughput-performance
-Enterprise-storage
-Laptop-ac-powersave
-Latency-performance
-Spindown-disk
-Default
Current Active Profile:default
If the server is the virtual machine tool, you can choose Virtual-host Scheme optimization. If the error "Kernel.sched_migration_cost" is a unknown key can be resolved by editing Sysctl.ktune this file.
The code is as follows:
# Tuned-adm Profile Virtual-host
Reverting to saved sysctl settings: [OK]
Calling '/etc/ktune.d/tunedadm.sh stop ': [OK]
Reverting to CFQ ELEVATOR:SDA sdb SDC SDD sde SDF SDG [OK]
Stopping tuned: [OK]
Switching to profile ' Virtual-host '
Applying deadline ELEVATOR:SDA SDB SDC SDD sde SDF SDG [OK]
Applying Ktune sysctl settings:
/ETC/KTUNE.D/TUNEDADM.CONF: [FAILED]
Error: "Kernel.sched_migration_cost" is an unknown key
Calling '/etc/ktune.d/tunedadm.sh start ': [OK]
Applying SYSCTL settings from/etc/sysctl.conf
Starting tuned: [OK]
# Vi/etc/tune-profiles/virtual-host/sysctl.ktune
...
#kernel. Sched_migration_cost = 5000000
...
# Tuned-adm Profile Virtual-host
If you are an enterprise storage server, you can use the Enterprise-storage scheme:
The code is as follows:
# Tuned-adm Profile Enterprise-storage
Stopping tuned: [OK]
Switching to profile ' Enterprise-storage '
Applying deadline elevator:dm-0 SDA SDB SDC SDD [OK]
Applying Ktune sysctl settings:
/ETC/KTUNE.D/TUNEDADM.CONF: [OK]
Calling '/etc/ktune.d/tunedadm.sh start ': [OK]
Applying SYSCTL settings from/etc/sysctl.conf
Starting tuned: [OK]
The plan above is not always meet the requirements, if you have their own needs can be customized their own solutions. Customization is easy, switch to the configuration directory of the optimization scheme, copy an example, and then edit the relevant parameters inside, use the Tuned-adm List command to see the new scheme just created My-virtual-host:
The code is as follows:
# cd/etc/tune-profiles/
# cp-r Virtual-host My-virtual-host
# VI my-virtual-host/*
# TUNED-ADM List
Available Profiles:
-Laptop-battery-powersave
-Virtual-guest
-Desktop-powersave
-SAP
-Server-powersave
-Virtual-host
-Throughput-performance
-Enterprise-storage
-Laptop-ac-powersave
-Latency-performance
-Spindown-disk
-Default
-My-virtual-host
Current Active Profile:virtual-host