Database Tuning
- Click
next to System Profiler.Choose AI Tuning. The page for creating a task is displayed.
- Set task parameters, as shown in Figure 1. Table 1, Table 2, Table 3, and Table 4 describe the parameters.
- AI tuning analysis is available only on CentOS 7.6, openEuler 22.03, and openEuler 20.03.
- For details about how to configure password-free authentication for the MySQL database, see Configuring Password-Free Authentication for MySQL.
Table 1 Parameters for creating an AI tuning analysis task (database-MySQL) Parameter
Description
Task Name
Name of the task. The name must meet the following requirements:
- Contain only letters, digits, and underscores (_).
- Contain 1 to 64 characters.
Application Type
Type of the application to be tuned. Select Database.
Application Name
Name of the application to be tuned. Select MySQL.
Application Version
Application version, which can be MySQL 5.7.22-5.7.43, 8.0.11-8.0.28, or 8.0.30-8.0.34.
Root Password
Password of the root user for the DevKit node. Ensure that you have root permissions for AI tuning.
You can select Remember Password when using the VS Code plugin.
Pressure Test Tool Node
Node where the pressure test tool resides.
MySQL Node
Node where MySQL resides.
NOTE:To ensure the performance, do not deploy the database on the same node as the Kunpeng DevKit.
libmysqlclinet.so Path
Path of libmysqlclinet.so, for example, /app/mysql/lib.
NOTE:You can click Verify Pressure Test Configuration to verify the configuration items of the pressure test tool.
mysql Executable File Path
Path to the executable file of the MySQL application, for example, /application/mysql/bin. Associated MySQL executable file paths can be automatically displayed. To display more path options, see Configuring the Application Path.
mysqld Executable File Path
Path to the executable file of the mysqld application, for example, /application/mysqld/bin. Associated mysqld executable file paths can be automatically displayed. To display more path options, see Configuring the Application Path.
Application User
MySQL execution user.
Configuration File Directory
Path of the configuration file, for example, /etc/my.cnf.
Application Configuration Parameter
Select the application parameters that you want to configure. You can click Add Parameter to add parameters or click Restore to restore configuration parameters to the original ones.
Pressure Test Tool
Tool used to perform a pressure test on the application. It can be sysbench.
Pressure Test Tool Version
Pressure test tool version, which is sysbench 0.5 or sysbench 1.0.
Test Case
Test case used by the pressure test tool. The options are oltp_mix (default), oltp_distinct, oltp_index, oltp_nonindex, oltp_order, oltp_point, oltp_simple, oltp_sum, and oltp_delete.
oltp.lua Path
Path of oltp.lua, for example, /opt/sysbench-0.5/tests/db. Associated oltp.lua paths can be automatically displayed. To display more path options, see Configuring the Application Path.
Database
Database used by the pressure test tool.
Pressure Test Tool Path
Path to the pressure test tool, for example, /opt/sysbench-0.5/sysbench.
NOTE:You are advised to set the application path to a path such as /home or /opt. Do not set the application path to a system directory such as /, /dev, /sys, or /boot. Otherwise, system exceptions may occur.
Threads
Number of threads used in the pressure test, which defaults to 10. The value ranges from 1 to 8192.
Tuning Metric
Metric for application tuning. The MySQL options are tps (default) and latency.
Tuning Iterations
Number of iterations for application tuning. The options are 20, 50, 100, 150 (default), and 200.
Table 2 Parameters for creating an AI tuning analysis task (database-openGauss) Parameter
Description
Task Name
Name of the task. The name must meet the following requirements:
- Contain only letters, digits, and underscores (_).
- Contain 1 to 64 characters.
Application Type
Type of the application to be tuned. Select Database.
Application Name
Name of the application to be tuned. Select openGauss.
Application Version
Application version, which can be 3.0.0, 3.0.3, 3.0.5, 5.0.0, or 5.0.1.
Root Password
Password of the root user for the DevKit node. Ensure that you have root permissions for AI tuning.
You can select Remember Password when using the VS Code plugin.
Pressure Test Tool Node
Node where the pressure test tool resides.
openGauss Node
Node where openGauss resides.
NOTE:To ensure the performance, do not deploy the database on the same node as the Kunpeng DevKit.
Application Configuration Parameter
Select the application parameters that you want to configure. You can click Add Parameter to add parameters or click Restore to restore configuration parameters to the original ones.
openGauss OS user
OS user who uses openGauss.
openGauss Datanode Path
Datanode path of openGauss. You can click Verify Application Configuration to obtain the path.
Pressure Test Tool
Tool used to perform a pressure test on the application. It can be benchmarksql.
Pressure Test Tool Version
Pressure test tool version, which can be benchmarksql 5.0.
Tuning Metric
Metric for application tuning, which defaults to tpmC.
Press Test Script Path
Path of the pressure test script, for example, /home/benchmarksql-5.0/run. Associated script directories can be automatically displayed. To display more directory options, see Configuring the Application Path.
Configuration File props Directory
Path of the props configuration file, for example, /home/benchmarksql-5.0/run/props.openGauss.1000w. Associated props executable file paths can be automatically displayed. To display more path options, see Configuring the Application Path.
Core Binding on Pressure Test Client
Core binding of the pressure test client, for example, 1,2-5.
Tuning Iterations
Number of iterations for application tuning. The options are 20, 50, 100, 150 (default), and 200.
Table 3 Parameters for creating an AI tuning analysis task (database-Vastbase) Parameter
Description
Task Name
Name of the task. The name must meet the following requirements:
- Contain only letters, digits, and underscores (_).
- Contain 1 to 64 characters.
Application Type
Type of the application to be tuned. Select Database.
Application Name
Name of the application to be tuned. Select Vastbase.
Application Version
Application version, which can be G100.
Root Password
Password of the root user for the DevKit node. Ensure that you have root permissions for AI tuning.
You can select Remember Password when using the VS Code plugin.
Pressure Test Tool Node
Node where the pressure test tool resides.
Vastbase Node
Node where Vastbase resides.
NOTE:To ensure the performance, do not deploy the database on the same node as the Kunpeng DevKit.
Application Configuration Parameter
Select the application parameters that you want to configure. You can click Add Parameter to add parameters or click Restore to restore configuration parameters to the original ones.
Vastbase OS user
OS user who uses Vastbase.
Vastbase Datanode Path
Datanode path of Vastbase. You can click Verify Application Configuration to obtain the path.
Pressure Test Tool
Tool used to perform a pressure test on the application. It can be benchmarksql.
Pressure Test Tool Version
Pressure test tool version, which can be benchmarksql 5.0.
Tuning Metric
Metric for application tuning, which defaults to tpmC.
Press Test Script Path
Path of the pressure test script, for example, /home/benchmarksql-5.0/run.
Configuration File props Directory
Path of the props configuration file, for example, /home/benchmarksql-5.0/run/props.openGauss.1000w.
Core Binding on Pressure Test Client
Core binding of the pressure test client, for example, 1,2-5.
Tuning Iterations
Number of iterations for application tuning. The options are 20, 50, 100, 150 (default), and 200.
Table 4 Parameters for creating an AI tuning analysis task (database-RocksDB) Parameter
Description
Task Name
Name of the task. The name must meet the following requirements:
- Contain only letters, digits, and underscores (_).
- Contain 1 to 64 characters.
Application Type
Type of the application to be tuned. Select Database.
Application Name
Name of the application to be tuned. Select RocksDB.
Application Version
Application version, which can be 7.0.4, 7.1.1, 7.1.2, 7.2.0, 7.2.2, 7.3.1, 7.4.3-7.4.5, 7.5.3, 7.6.0, 7.7.2, 7.7.3, 7.7.8, 7.8.3, or 7.9.2.
Root Password
Password of the root user for the DevKit node. Ensure that you have root permissions for AI tuning.
You can select Remember Password when using the VS Code plugin.
RocksDB Node
Node where RocksDB resides.
NOTE:To ensure the performance, do not deploy the database on the same node as the Kunpeng DevKit.
RocksDB Path
RocksDB database path, for example, /data/rocksdb/db1.
Application Configuration Parameter
Select the application parameters that you want to configure. You can click Add Parameter to add parameters or click Restore to restore configuration parameters to the original ones.
Pressure Test Tool
Tool used to perform a pressure test on the application. It can be db_bench.
Pressure Test Tool Version
Pressure test tool version, which automatically matches the database version and cannot be selected by users.
Test Case
Test case used by the pressure test tool, which defaults to fillseq. The options are fillseq, fillsync, fillrandom, overwrite, readrandom, newiterator, newiteratorwhilewriting, seekrandom, seekrandomwhilewriting, readseq, readreverse, multireadrandom, mixgraph, readwhilewriting, readwhilescanning, readrandomwriterandom, updaterandom, xorupdaterandom, randomwithverify, fill 100K, crc32c, xxhash, compress, uncompress, acquireload, fillseekseq, randomtransaction, randomreplacekeys, timeseries, and readtocache.
Tuning Metric
Metric for application tuning, which defaults to IOPS.
Pressure Test Tool Path
Path to the pressure test tool, for example, /data/rocksdb/tools.
NOTE:You are advised to set the application path to a path such as /home or /opt. Do not set the application path to a system directory such as /, /dev, /sys, or /boot. Otherwise, system exceptions may occur.
db_bench Parameter
db_bench pressure test parameters. Click Modify to set the parameters.
Tuning Iterations
Number of iterations for application tuning. The options are 20, 50, 100, 150 (default), and 200.
- Click Verify and Create.
- Click the task name to view the tuning information (using RocksDB 7.1.2 as an example).
Each row indicates one iteration of tuning. You can click Stop to stop the tuning.
- If the test case cannot be executed, the task fails. You can click AI Tuning Run Log to download the log and view the failure cause and case information.
- The
icon indicates the invalid status, which may be caused by parameter conflicts or environment abnormalities. A small number of invalid rounds do not affect the final tuning result. However, a relatively large number of invalid rounds may terminate the tuning process. - The
icon indicates the reference value for starting tuning, and the
icon indicates that the current round of tuning is successful.
Figure 2 AI-based database tuning analysis
- Click Download Tuned Parameter Set to obtain the tuned database configuration.
