Rate This Document
Findability
Accuracy
Completeness
Readability

Database Tuning

  1. Click next to System Profiler.

    Choose AI Tuning. The page for creating a task is displayed.

  2. Set task parameters. See Figure 1. Table 1 describes the parameters.
    Figure 1 Creating an AI tuning analysis task (database)
    Table 1 Parameters for creating an AI tuning analysis task (database)

    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

    Application to be tuned. If the application type is Database, MySQL and openGauss are supported.

    Application Version

    Application version. MySQL supports 5.7.22-5.7.43, 8.0.11-8.0.28, and 8.0.30-8.0.34. openGauss supports 3.0.0, 3.0.3, 3.0.5, 5.0.0, and 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.

    MySQL Node

    Node where MySQL resides. Set this parameter when Application Type is Database and Application Name is MySQL.

    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.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    NOTE:

    You can click Verify Pressure Test Configuration to verify the configuration items of the pressure test tool.

    openGauss Node

    Node where openGauss resides. This parameter is available when Application Name is openGauss.

    NOTE:

    To ensure the performance, do not deploy the database on the same node as the Kunpeng DevKit.

    openGauss OS user

    OS user who uses openGauss. This parameter is available when Application Name is openGauss.

    openGauss Datanode Path

    Datanode path of openGauss. You can click Verify Application Configuration to obtain the path. This parameter is available when Application Name is openGauss.

    Application Executable File Path

    Path to the executable file of the to-be-tuned application. Example: /application/mysql/bin

    Set this parameter when Application Type is Database and Application Name is MySQL.

    Application User

    Execution user of the to-be-tuned application.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    NOTE:

    After configuring Application Executable File Path and Application User, you can click Verify Application Configuration to verify the configuration items of the application to be tuned.

    Configuration File Directory

    Path of the configuration file, for example, /etc/my.cnf.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    (Optional) 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 target application. MySQL supports Sysbench only and openGauss supports BenchmarkSQL only.

    Pressure Test Tool Version

    The Sysbench version is 0.5 or 1.0 and the BenchmarkSQL version is 5.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.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    oltp.lua Path

    Path of oltp.lua, for example, /opt/sysbench-0.5/tests/db.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    Database

    Database used by the pressure test tool.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    Pressure Test Tool Path

    Path to the pressure test tool, for example, /opt/sysbench-0.5/sysbench.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    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. The default value is 10. The value ranges from 1 to 8192.

    Set this parameter when Application Type is Database and Application Name is MySQL.

    Tuning Metric

    Metric for application tuning. The MySQL options are tps (default) and latency. The openGauss option is tpmC by default.

    Press Test Script Path

    Path of the pressure test script, for example, /home/benchmarksql-5.0/run.

    Set this parameter when Application Type is Database and Application Name is openGauss.

    Configuration File props Directory

    Path of the props configuration file, for example, /home/benchmarksql-5.0/run/props.openGauss.1000w.

    Set this parameter when Application Type is Database and Application Name is openGauss.

    Core Binding on Pressure Test Client

    Core binding of the pressure test client, for example, 1,2-5.

    Set this parameter when Application Type is Database and Application Name is openGauss.

    Tuning Iterations

    Number of iterations for application tuning. The options are 20, 50, 100, 150 (default), and 200.

  3. Click Verify and Create.
  4. Click the task name to view the tuning statistics.

    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.

    Figure 2 MySQL AI tuning analysis
  5. Click Download Tuned Parameter Set to obtain the tuned database configuration.