[20230227]tuned-adm简单介绍.txt
# man tuned-adm
TUNED_ADM(8) tuned TUNED_ADM(8)
NAME
tuned-adm - command line tool for switching between different tuning profiles
SYNOPSIS
tuned-adm [list | active | profile [profile] | off | verify | recommend]
DESCRIPTION
This command line utility allows you to switch between user definable tuning profiles. Several predefined
profiles are already included. You can even create your own profile, either based on one of the existing ones by
copy-ing it or make a completely new one. The distribution provided profiles are stored in subdirectories below
/usr/lib/tuned and the user defined profiles in subdirectories below /etc/tuned. If there are profiles with the
same name in both places, user defined profiles have precedence.
# tuned-adm list
Available profiles:
- balanced - General non-specialized tuned profile
- desktop - Optimize for the desktop use-case
- latency-performance - Optimize for deterministic performance at the cost of increased power consumption
- network-latency - Optimize for deterministic performance at the cost of increased power consumption,
focused on low latency network performance
- network-throughput - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave - Optimize for low power consumption
- throughput-performance - Broadly applicable tuning that provides excellent performance across a variety of common
server workloads
- virtual-guest - Optimize for running inside a virtual guest
- virtual-host - Optimize for running KVM guests
Current active profile: virtual-guest
--//简单一点就是修改服务器配置修改一些内核参数.当前选择的是virtual-guest.
--//可以根据需要自己修改,例子:
# tuned-adm profile balanced
# tuned-adm active
# ll /usr/lib/tuned/
total 16
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 balanced
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 desktop
-rw-r--r--. 1 root root 13963 2017-10-30 03:57:37 functions
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 latency-performance
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 network-latency
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 network-throughput
drwxr-xr-x. 2 root root 41 2020-11-10 19:43:31 powersave
drwxr-xr-x. 2 root root 27 2020-11-10 19:43:31 recommend.d
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 throughput-performance
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 virtual-guest
drwxr-xr-x. 2 root root 24 2020-11-10 19:43:31 virtual-host
--//查看其中virtual-guest的配置情况:
# cat /usr/lib/tuned/virtual-guest/tuned.conf
#
# tuned configuration
#
[main]
summary=Optimize for running inside a virtual guest
include=throughput-performance
[sysctl]
# If a workload mostly uses anonymous memory and it hits this limit, the entire
# working set is buffered for I/O, and any more write buffering would require
# swapping, so it's time to throttle writes until I/O can catch up. Workloads
# that mostly use file mappings may be able to use even higher values.
#
# The generator of dirty data starts writeback at this percentage (system default
# is 20%)
vm.dirty_ratio = 30
# Filesystem I/O is usually much more efficient than swapping, so try to keep
# swapping low. It's usually safe to go even lower than this on systems with
# server-grade storage.
vm.swappiness = 30
--//实际上查看配置文件就是以throughput-performance的配置为蓝本,再改动一些内核参数.
# sysctl vm.dirty_ratio
vm.dirty_ratio = 30
# sysctl vm.swappiness
vm.swappiness = 30
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2937259/ ,如需转载,请注明出处,否则将追究法律责任。