https://docs.openeuler.org/zh/docs/22.03_LTS_SP1/docs/A-Tune/%E5%AE%89%E8%A3%85%E4%B8%8E%E9%83%A8%E7%BD%B2.html
本章介绍如何安装和部署A-Tune。
安装openEuler系统,安装方法参考 《openEuler 22.03 LTS SP1安装指南》。
安装A-Tune需要使用root权限。
本节介绍A-Tune的安装模式和安装方法。
A-Tune支持单机模式和分布式模式安装:
单机模式
client和server安装到同一台机器上。
分布式模式
client和server分别安装在不同的机器上。
两种安装模式的简单图示如下:
安装A-Tune的操作步骤如下:
挂载openEuler的iso文件。
""# mount openEuler-22.03-LTS-SP1-aarch64-dvd.iso /mnt
配置本地yum源。
""# vim /etc/yum.repos.d/local.repo
配置内容如下所示:
""[local]
name=local
baseurl=file:///mnt
gpgcheck=1
enabled=1
将RPM数字签名的GPG公钥导入系统。
""# rpm --import /mnt/RPM-GPG-KEY-openEuler
安装A-Tune服务端。
说明:
本步骤会同时安装服务端和客户端软件包,对于单机部署模式,请跳过步骤5。
""# yum install atune -y
# yum install atune-engine -y
若为分布式部署,请安装A-Tune客户端。
""# yum install atune-client -y
验证是否安装成功。命令和回显如下表示安装成功。
""# rpm -qa | grep atune
atune-client-xxx
atune-db-xxx
atune-xxx
atune-engine-xxx
本节介绍A-Tune的配置部署。
A-Tune配置文件/etc/atuned/atuned.cnf的配置项说明如下:
A-Tune服务启动配置
可根据需要进行修改。
system信息
system为系统执行相关的优化需要用到的参数信息,必须根据系统实际情况进行修改。
disk:执行analysis流程时需要采集的对应磁盘的信息或执行磁盘相关优化时需要指定的磁盘。
network:执行analysis时需要采集的对应的网卡的信息或执行网卡相关优化时需要指定的网卡。
user:执行ulimit相关优化时用到的用户名。目前只支持root用户。
日志信息
根据情况修改日志的级别,默认为info级别,日志信息打印在/var/log/messages中。
monitor信息
为系统启动时默认采集的系统硬件信息。
tuning信息
tuning为系统进行离线调优时需要用到的参数信息。
""#################################### server ###############################
# atuned config
[server]
# the protocol grpc server running on
# ranges: unix or tcp
protocol = unix
# the address that the grpc server to bind to
# default is unix socket /var/run/atuned/atuned.sock
# ranges: /var/run/atuned/atuned.sock or ip address
address = /var/run/atuned/atuned.sock
# the atune nodes in cluster mode, separated by commas
# it is valid when protocol is tcp
# connect = ip01,ip02,ip03
# the atuned grpc listening port
# the port can be set between 0 to 65535 which not be used
# port = 60001
# the rest service listening port, default is 8383
# the port can be set between 0 to 65535 which not be used
rest_host = localhost
rest_port = 8383
# the tuning optimizer host and port, start by engine.service
# if engine_host is same as rest_host, two ports cannot be same
# the port can be set between 0 to 65535 which not be used
engine_host = localhost
engine_port = 3838
# when run analysis command, the numbers of collected data.
# default is 20
sample_num = 20
# interval for collecting data, default is 5s
interval = 5
# enable gRPC authentication SSL/TLS
# default is false
# grpc_tls = false
# tlsservercafile = /etc/atuned/grpc_certs/ca.crt
# tlsservercertfile = /etc/atuned/grpc_certs/server.crt
# tlsserverkeyfile = /etc/atuned/grpc_certs/server.key
# enable rest server authentication SSL/TLS
# default is true
rest_tls = true
tlsrestcacertfile = /etc/atuned/rest_certs/ca.crt
tlsrestservercertfile = /etc/atuned/rest_certs/server.crt
tlsrestserverkeyfile = /etc/atuned/rest_certs/server.key
# enable engine server authentication SSL/TLS
# default is true
engine_tls = true
tlsenginecacertfile = /etc/atuned/engine_certs/ca.crt
tlsengineclientcertfile = /etc/atuned/engine_certs/client.crt
tlsengineclientkeyfile = /etc/atuned/engine_certs/client.key
#################################### log ###############################
[log]
# either "debug", "info", "warn", "error", "critical", default is "info"
level = info
#################################### monitor ###############################
[monitor]
# with the module and format of the MPI, the format is {module}_{purpose}
# the module is Either "mem", "net", "cpu", "storage"
# the purpose is "topo"
module = mem_topo, cpu_topo
#################################### system ###############################
# you can add arbitrary key-value here, just like key = value
# you can use the key in the profile
[system]
# the disk to be analysis
disk = sda
# the network to be analysis
network = enp189s0f0
user = root
#################################### tuning ###############################
# tuning configs
[tuning]
noise = 0.000000001
sel_feature = false
A-Tune engine配置文件/etc/atuned/engine.cnf的配置项说明如下:
A-Tune engine服务启动配置
可根据需要进行修改。
日志信息
根据情况修改日志的级别,默认为info级别,日志信息打印在/var/log/messages中。
"" #################################### engine ###############################
[server]
# the tuning optimizer host and port, start by engine.service
# if engine_host is same as rest_host, two ports cannot be same
# the port can be set between 0 to 65535 which not be used
engine_host = localhost
engine_port = 3838
# enable engine server authentication SSL/TLS
# default is true
engine_tls = true
tlsenginecacertfile = /etc/atuned/engine_certs/ca.crt
tlsengineservercertfile = /etc/atuned/engine_certs/server.crt
tlsengineserverkeyfile = /etc/atuned/engine_certs/server.key
#################################### log ###############################
[log]
# either "debug", "info", "warn", "error", "critical", default is "info"
level = info
A-Tune安装完成后,需要启动A-Tune服务才能使用。
启动atuned服务:
""# systemctl start atuned
查询atuned服务状态:
""# systemctl status atuned
若回显为如下,则服务启动成功。
若需要使用AI相关的功能,需要启动A-Tune engine服务才能使用。
启动atune-engine服务:
""# systemctl start atune-engine
查询atune-engine服务状态:
""# systemctl status atune-engine
若回显为如下,则服务启动成功。