性能优化

A-Tune

A-Tune 是一款基于AI的操作系统性能调优引擎。A-Tune 利用 AI 技术,使操作系统“懂”业务,简化 IT 系统调优工作的同时,让应用程序发挥出色性能。

安装

# dnf -y install atune
# systemctl start atuned

快速使用指南

目前 Atune 已经内置了几个针对不同应用场景的优化方案,可以通过命令直接激活优化。

主要使用以下两个命令:

命令 说明
atune-adm list 查询现有优化配置方案。
atune-adm profile 激活优化配置方案。

更多参数说明:

[root@localhost ~]# atune-adm
NAME:
   atune-adm - atune-adm is a command line client for atuned AI tuning system

USAGE:
   atune-adm [global options] command [command options] [arguments...]

VERSION:
   0.2

COMMANDS:
     analysis    analysis system workload type
     check       check system basic information
     collection  collect the system data for training
     define      create a new workload type
     info        display profile info corresponding to specified workload type
     list        list support workload type
     profile     active the specified workload type and check the actived workload type
     rollback    rollback to the system init state
     train       train a new model with self collected data
     tuning      dynamic bayes search optimal parameter sets
     undefine    delete the specified workload type
     update      update the optimization content of the specified workload type and profile name
     upgrade     upgrade the database
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --address value, -a value  atuned address (default: "/var/run/atuned/atuned.sock")
   --port value, -p value     atuned port
   --help, -h                 show help
   --version, -v              print the version

1. 查看目前支持的优化方案

[root@localhost ~]# atune-adm list

Support WorkloadTypes:
+-----------------------------------+------------------------+-----------+
| WorkloadType                      | ProfileName            | Active    |
+===================================+========================+===========+
| default                           | default                | true      |
+-----------------------------------+------------------------+-----------+
| webserver                         | ssl_webserver          | false     |
+-----------------------------------+------------------------+-----------+
| big_database                      | database               | false     |
+-----------------------------------+------------------------+-----------+
| big_data                          | big_data               | false     |
+-----------------------------------+------------------------+-----------+
| in-memory_computing               | in-memory_computing    | false     |
+-----------------------------------+------------------------+-----------+
| in-memory_database                | in-memory_database     | false     |
+-----------------------------------+------------------------+-----------+
| single_computer_intensive_jobs    | compute-intensive      | false     |
+-----------------------------------+------------------------+-----------+
| communication                     | rpc_communication      | false     |
+-----------------------------------+------------------------+-----------+
| idle                              | default                | false     |
+-----------------------------------+------------------------+-----------+

2. 激活优化方案

命令 优化方案
atune-adm profile big_database
[root@localhost ~]# atune-adm profile big_database
 [ SUCCESS] Bootloader                               iommu.passthrough
 [ FAILED ] Chip                                     Command '['/usr/libexec/atuned/scripts/prefetch/set.sh', 'off']' returned non-zero exit status 3.
 [ SUGGEST] OS                                       relogin into the system to enable limits setting
 [ SUCCESS] OS                                       vm.swappiness,kernel.sched_cfs_bandwidth_slice_us,kernel.sched_migration_cost_ns,kernel.sched_latency_ns,kernel.sched_min_granularity_ns,kernel.sched_nr_migrate,kernel.sched_wakeup_granularity_ns,net.core.rmem_default,net.core.rmem_max,net.core.wmem_default,net.core.wmem_max,net.ipv4.tcp_rmem,net.ipv4.tcp_wmem,net.core.dev_weight,net.ipv4.tcp_max_syn_backlog,net.core.somaxconn
 [ SUCCESS] OS                                       kernel/mm/transparent_hugepage/defrag,kernel/mm/transparent_hugepage/enabled,block/sda/queue/read_ahead_kb,block/sda/queue/scheduler
 [ SUCCESS] OS                                       root.hard.nofile,root.soft.nofile
 [ SUCCESS] Service                                  sysmonitor,irqbalance
 [ SUGGEST] affinity                                 bind network interrupts to its affinity numa node
 [ SUGGEST] filesystem                               use xfs as filesystem and mount-option using noatime and nobarrier

3. 查看激活状态

[root@localhost ~]# atune-adm list

Support WorkloadTypes:
+-----------------------------------+------------------------+-----------+
| WorkloadType                      | ProfileName            | Active    |
+===================================+========================+===========+
| default                           | default                | false     |
+-----------------------------------+------------------------+-----------+
| webserver                         | ssl_webserver          | false     |
+-----------------------------------+------------------------+-----------+
| big_database                      | database               | true      |
+-----------------------------------+------------------------+-----------+
| big_data                          | big_data               | false     |
+-----------------------------------+------------------------+-----------+
| in-memory_computing               | in-memory_computing    | false     |
+-----------------------------------+------------------------+-----------+
| in-memory_database                | in-memory_database     | false     |
+-----------------------------------+------------------------+-----------+
| single_computer_intensive_jobs    | compute-intensive      | false     |
+-----------------------------------+------------------------+-----------+
| communication                     | rpc_communication      | false     |
+-----------------------------------+------------------------+-----------+
| idle                              | default                | false     |
+-----------------------------------+------------------------+-----------+

FAQ

  1. systemctl start atuned 启动失败

    运行命令 mkdir -p /var/run/atuned/ 创建将要使用的目录。

用户指南

A-Tune 用户指南

官方链接

官方链接

results matching ""

    No results matching ""