Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the tuned/tuned-adm tool for dynamic Optimization of Linux system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to use the tuned/tuned-adm tool of dynamic optimization of Linux system". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use the tuned/tuned-adm tool of dynamic optimization of Linux system".

RHEL/CentOS introduces a new set of system tuning tool tuned/tuned-adm after version 6.3, in which tuned is a server program, which is used to monitor and collect data from various components of the system, and dynamically adjust system settings according to the information provided by the data, so as to achieve the purpose of dynamic optimization of the system. Tuned-adm is a client program used to deal with tuned. Managing and configuring tuned,tuned-adm in a command-line way provides some pre-configured optimization solutions for direct use, such as notebooks, virtual machines, storage servers, and so on.

If you are using a laptop (battery power) and want to optimize the system and save power without knowing too many details, you can use tuned/tuned-adm as a tool and apply laptop-battery-powersave to adjust and optimize the system. Of course, different systems and application scenarios have different optimization solutions. The pre-configured optimization strategy of tuned-adm does not always meet the requirements, so customization is needed. Tuned-adm allows users to create and customize new tuning solutions.

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

View the current optimization plan:

The code is as follows:

# tuned-adm active

Current active profile: default

Service tuned: enabled, running

Service ktune: enabled, running

Check out the pre-configured optimization:

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 a virtual machine parent, you can choose virtual-host scheme optimization. If you report an error, "kernel.sched_migration_cost" is an unknown key can be solved by editing the sysctl.ktune 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 it is 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 above predetermined scheme can not always meet the requirements, if you have your own needs, you can customize your own plan. It's easy to customize by yourself. Switch to the configuration directory of the optimization solution, copy an example, and then edit the relevant parameters in it. You can see the new solution my-virtual-host you just created using the tuned-adm list command:

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

Thank you for reading, the above is the content of "how to use the tuned/tuned-adm tool of dynamic optimization of Linux system". After the study of this article, I believe you have a deeper understanding of how to use the tuned/tuned-adm tool of dynamic optimization of Linux system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report