1 2 3 |
yum install tuned chkconfig tuned |ktune on service tuned|ktune start |
1 2 3 4 5 |
tuned-admin active(查看当前状态) tuned-adm list(查看所有系统已经存在的profile) tuned-admin profile profilename(切换到指定) |
1 |
/etc/tune-profiles |
尝试创建自己的 profle
1 |
mkdir /etc/tuned/virt-guest-alternative |
1 2 3 4 5 6 7 8 9 10 |
cat /etc/tuned/virt-guest-alternative/tuned.conf [main] include=virtual-guest [sysctl] vm.swappiness=10 [disk] devices=!vda readahead=4096 |
解释一下:
include 表明是继承virtual-guest的模版
剩下的常用模块为: cpu,disk,mount,net,vm,sysctl
我们还可以调用script模块:
1 2 |
[script] script=script.sh |
常用的函数可以通过如下命令查找:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#grep '^[^_].*()' /usr/lib/tuned/functions save_value() { parse_sys() { save_sys() { set_sys() { save_set_sys() { get_stored_sys() { restore_value() { restore_sys() { set_elevator() { restore_elevator() { set_disk_alpm() { set_disk_apm() { set_disk_spindown() { multiply_disk_readahead() { remount_partitions() { remount_all_no_rootboot_partitions() { set_disk_scheduler_quantum() { restore_disk_scheduler_quantum() { set_cpu_governor() { restore_cpu_governor() { enable_cpu_multicore_powersave() { disable_cpu_multicore_powersave() { enable_transparent_hugepages() { restore_transparent_hugepages() { enable_wifi_powersave() { disable_wifi_powersave() { disable_bluetooth() { enable_bluetooth() { enable_usb_autosuspend() { disable_usb_autosuspend() { enable_snd_ac97_powersave() { disable_snd_ac97_powersave() { restore_snd_ac97_powersave() { set_hda_intel_powersave() { restore_hda_intel_powersave() { set_radeon_powersave () { restore_radeon_powersave () { disable_logs_syncing() { restore_logs_syncing() { eee_set_reduced_fsb() { eee_set_normal_fsb() { error_not_implemented() { start() { stop() { process() { |
切换到新的profile
1 |
tuned-adm profile virt-guest-alternative |
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021