Help Center/ Huawei Cloud EulerOS/ User Guide/ Tools/ A-Tune/ Installation and Deployment
Updated on 2025-09-19 GMT+08:00

Installation and Deployment

Installing A-Tune

This section describes how to install A-Tune.

Installation modes

A-Tune can be installed in single-node, distributed, or cluster mode.

  • Single-node

    The client and server are installed on the same node.

  • Distributed

    The client and server are installed on different nodes.

  • Cluster

    A cluster consists of one client and more than one server.

Installation operations

To install A-Tune, perform the following steps:

  1. Install the A-Tune server.
    # yum install atune -y 
    # yum install atune-engine -y
  2. In distributed mode, you also need to install the A-Tune client.
    # yum install atune-client -y
  3. Check whether the installation is successful. If the following information is displayed, A-Tune is installed successfully:
    # rpm -qa | grep atune 
    atune-client-xxx 
    atune-db-xxx 
    atune-xxx 
    atune-engine-xxx

Deploying A-Tune

This section describes how to deploy A-Tune.

Configuration

The A-Tune configuration file /etc/atuned/atuned.cnf contains the following items:

  • A-Tune startup (the values can be changed as needed)
    • protocol: protocol used by the system service gRPC. The value can be unix or tcp. unix indicates local socket communications and tcp indicates communications through socket listening ports. The default value is unix.
    • address: listening address of gRPC. The default value is unix socket. If A-Tune is deployed in distributed mode, change the value to the listening IP address.
    • port: listening port of gRPC. The value must be an idle port ranging from 0 to 65535. If protocol is set to unix, this parameter does not need to be configured.
    • connect: IP address list of the nodes where A-Tune is deployed in a cluster. Separate the IP addresses by commas (,).
    • rest_host: listening address of the system service REST. The default value is localhost.
    • rest_port: listening port of the system service REST. The value must be an idle port ranging from 0 to 65535. The default value is 8383.
    • engine_host: address for connecting to the system service A-Tune engine.
    • engine_port: port for connecting to the system service A-Tune engine.
    • sample_num: number of samples collected by the system for data analysis. The default value is 20.
    • interval: interval for the system to collect samples. The default value is 5s.
    • grpc_tls: whether to enable SSL/TLS certificate verification for gRPC. By default, it is disabled. If grpc_tls is enabled, the following environment variables need to be set before atune-adm is run to communicate with the server:
      • export ATUNE_TLS=yes
      • export ATUNED_CACERT=<CA-certificate-path-of-the-client>
      • export ATUNED_CLIENTCERT=<client-certificate-path>
      • export ATUNED_CLIENTKEY=<client-key-path>
      • export ATUNED_SERVERCN=server
    • tlsservercafile: CA certificate path of the gRPC server.
    • tlsservercertfile: certificate path of the gRPC server.
    • tlsserverkeyfile: key path of the gRPC server.
    • rest_tls: whether to enable SSL/TLS certificate verification for REST. By default, it is enabled.
    • tlsrestcacertfile: CA certificate path of the REST server.
    • tlsrestservercertfile: certificate path of the REST server.
    • tlsrestserverkeyfile: key path of the REST server.
    • engine_tls: whether to enable SSL/TLS certificate verification for A-Tune engine. By default, it is enabled.
    • tlsenginecacertfile: CA certificate path of the A-Tune engine client.
    • tlsengineclientcertfile: certificate path of the A-Tune engine client.
    • tlsengineclientkeyfile: key path of the A-Tune engine client.
  • System information

    These are parameters required for system optimization. Configure these parameters based on your system requirements.

    • disk: disk whose information is to be collected for analysis or who is to be optimized.
    • network: NIC whose information is to be collected for analysis or who is to be optimized.
    • user: username used for ulimit optimization. Currently, only root is available.
  • Log information

    You can change the log level as needed. The default value is info. Logs are recorded in the /var/log/messages file.

  • Monitoring information

    These are system hardware information collected by default during system startup.

  • Tuning information

    These parameters are used for offline tuning.

    • noise: estimated value of Gaussian noise.
    • sel_feature: whether to output the ranking of offline tuning parameter importance. It is disabled by default.

Configuration example

#################################### 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 

The configuration file /etc/atuned/engine.cnf of A-Tune engine contains the following items:

  • A-Tune engine startup (the values can be changed as needed)
    • engine_host: listening address of the system service A-Tune engine. The default value is localhost.
    • engine_port: listening port of the system service A-Tune engine. The value must be an idle port ranging from 0 to 65535. The default value is 3838.
    • engine_tls: whether to enable SSL/TLS certificate verification for A-Tune engine. By default, it is enabled.
    • tlsenginecacertfile: CA certificate path of the A-Tune engine server.
    • tlsengineservercertfile: certificate path of the A-Tune engine server.
    • tlsengineserverkeyfile: key path of the A-Tune engine server.
  • Log information

    You can change the log level as needed. The default value is info. Logs are recorded in the /var/log/messages file.

Configuration example

 #################################### 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

Starting A-Tune

After A-Tune is installed, configure and start it.

  • Configuring the A-Tune service: Modify the NIC and disk information in the atuned.cnf configuration file.

    Set network in /etc/atuned/atuned.cnf to the NIC whose information needs to be collected or the NIC to be optimized. You can run the following command to query the NIC:

    ip addr

    Set disk in /etc/atuned/atuned.cnf to the disk whose information needs to be collected or the disk to be optimized. You can run the following command to query the disk:

    fdisk -l | grep dev
  • Certificate: The A-Tune engine and client use the gRPC protocol for communication. To ensure system security, you need to configure certificates. For information security purposes, A-Tune does not provide the method for generating a certificate. You need to configure system certificates by yourself. If security is not considered, set rest_tls and engine_tls in /etc/atuned/atuned.cnf to false, and engine_tls in /etc/atuned/engine.cnf to false. A-Tune is not responsible for any consequences caused by the lack of security certificates.
  • Start the atuned service.
    # systemctl start atuned
  • Check the atuned status.
    # systemctl status atuned

    If the following information is displayed, the service is started successfully.

Starting A-Tune engine

To use AI functions, start the A-Tune engine service.

  • Start the atune-engine service.
    # systemctl start atune-engine
  • Check the atune-engine status.
    # systemctl status atune-engine

    If the following information is displayed, the service is started successfully.

Distributed Deployment

Purpose

Distributed deployment allows A-Tune to be deployed on demand and run in a distributed architecture. Three components can be deployed separately. The lightweight deployment has little impacts on services and prevents too much software dependency, reducing the system load.

There is more than one method of distributed deployment. This section only describes the common one. That is, deploy the server and client on the same node and the engine on another node. For other deployment methods, contact technical support.

Deployment relationships

Configuration files

In distributed deployment, you need to write the IP address and port of the engine into configuration files so that other components can access the engine over the IP address.

  1. Modify the /etc/atuned/atuned.cnf file on the A-Tune server node.
    • Change the values of engine_host and engine_port in line 34 to the IP address and port of the engine node. As shown in the figure above, change the values to engine_host = 192.168.0.1 and engine_port = 3838.
    • Change the values of rest_tls and engine_tls in lines 49 and 55 to false. Otherwise, you will be required to apply for and configure certificates. In a testing environment, you do not need to configure the SSL certificate. In a production environment, you need to configure it to prevent security risks.
  2. Modify the /etc/atuned/engine.cnf file on the engine node.
    • Change the values of engine_host and engine_port in lines 17 and 18 to the IP address and port of the engine node. As shown in the figure above, change the values to engine_host = 192.168.0.1 and engine_port = 3838.
    • Change the value of engine_tls in line 22 to false.
  3. Restart A-Tune and the engine to make the configurations take effect.
    • Run systemctl restart atuned on the A-Tune server node.
    • Run systemctl restart atune-engine on the engine node.
  4. (Optional) Run a tuning command in the A-Tune/examples/tuning/compress directory to check whether the distributed deployment is successful.
    1. Perform a preprocess by referring to A-Tune/examples/tuning/compress/README.
    2. Run atune-adm tuning --project compress --detail compress_client.yaml.

Precautions

  1. Details about how to configure an authentication certificate is not provided here. If necessary, you can set rest_tls/engine_tls in atuned.cnf and engine.cnf to false.
  2. After modifying the configuration files, restart A-Tune and the engine. Otherwise, the modifications will not be valid.
  3. Do not enable the network proxy when using the A-Tune service.
  4. In the atuned.cnf file, set disk and network in [system] to the actual disk and network interface.

Example

atuned.cnf

#...

# 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 = 192.168.0.1 
engine_port = 3838 

#...

engine.cnf

[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 = 192.168.0.1 
engine_port = 3838

Cluster Deployment

Purpose

In an A-Tune cluster, parameters of multiple nodes can be dynamically tuned at the same time. This avoids repeated tunning on each node and improves tunning efficiency.

Method

An A-Tune cluster consists of one primary node and multiple secondary nodes. The client and server are deployed on the primary node to receive commands and interact with the engine. Other nodes receive instructions from the primary node to tune their parameters.

Deployment relationships

As shown in the figure above, the A-Tune server and client are deployed on the same node (IP address: 192.168.0.0). Project files are stored on this node and do not need to be stored on other nodes. The primary node and secondary nodes communicate with each other through TCP. You need to modify the configuration file for each node.

Modifying atuned.cnf

  1. Set protocol to tcp.
  2. Set address to the IP address of the current node.
  3. Set connect to the IP addresses of all nodes. The first is the IP address of the primary node and the others are IP addresses of secondary nodes. Use commas (,) to separate the IP addresses.
  4. During debugging, you can set rest_tls and engine_tls to false.
  5. Repeat the steps to modify the atuned.cnf file of all primary and secondary nodes.

Precautions

  1. Set engine_host and engine_port in engine.cnf to the same values of engine_host and engine_port in atuned.cnf.
  2. Details about how to configure an authentication certificate is not provided here. If necessary, you can set rest_tls/engine_tls in atuned.cnf and engine.cnf to false.
  3. After modifying the configuration files, restart A-Tune and the engine. Otherwise, the modifications will not be valid.
  4. Do not enable the network proxy when using the A-Tune service.

Example

atuned.cnf

#...
 
[server] 
# the protocol grpc server running on
# ranges: unix or tcp
protocol = tcp  

# 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 = 192.168.0.0  

# the atune nodes in cluster mode, separated by commas
# it is valid when protocol is tcp
connect = 192.168.0.0,192.168.0.1,192.168.0.2,192.168.0.3  

# 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 = 192.168.1.1 
engine_port = 3838  

#...

engine.cnf

[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 = 192.168.1.1 
engine_port = 3838 

Note: Configure engine.cnf by referring the configuration for distributed deployment.