A brief introduction of TUNED/TUNED-ADM tools for dynamically optimizing Linux systems

Source: Internet
Author: User
Tags new set

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

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.