Command Reference
Table 1 Command-line parameters
Parameter | Description | Value Range |
---|
mode | Specifies the running mode of the tuning program. | train, tune, and recommend |
--tuner-config-file, -x | Path of the core parameter configuration file of X-Tuner. The default path is xtuner.conf under the installation directory. | N/A |
--db-config-file, -f | Path of the connection information configuration file used by the optimization program to log in to the database host. If the database connection information is configured in this file, the following database connection information can be omitted. | N/A |
--db-name | Specifies the name of a database to be tuned. | N/A |
--db-user | Specifies the user account used to log in to the tuned database. | N/A |
--port, --db-port | Specifies the database listening port. | 0-65535 |
--host, --db-host | Specifies the host IP address of the database instance. | 0-65535 |
--host-user | Specifies the username for logging in to the host where the database instance is located. The database O&M tools, such as gsql and gs_ctl, can be found in the environment variables of the username. | N/A |
--host-ssh-port | Specifies the SSH port number of the host where the database instance is located. This parameter is optional. The default value is 22. | 0-65535 |
--help, -h | Returns the help information. | N/A |
--version, -v | Returns the current tool version. | N/A |
Table 2 Parameters in the configuration file
Parameter | Description | Value Range |
---|
logfile | Path for storing generated logs. | N/A |
output_tuning_result | (Optional) Specifies the path for saving the tuning result. | N/A |
verbose | Whether to print details. | on and off |
recorder_file | Path for storing logs that record intermediate tuning information. | N/A |
tune_strategy | Strategy used in tune mode. | rl, gop, and auto |
drop_cache | Whether to perform drop cache in each iteration. Drop cache can make the benchmark score more stable. If this parameter is enabled, add the login system user to the /etc/sudoers list and grant the NOPASSWD permission to the user. (You are advised to enable the NOPASSWD permission temporarily and disable it after the tuning is complete.) | on and off |
used_mem_penalty_term | Penalty coefficient of the total memory used by the database. This parameter is used to prevent performance deterioration caused by unlimited memory usage. The greater the value is, the greater the penalty is. | Recommended value: 0–1 |
rl_algorithm | Specifies the RL algorithm. | ddpg |
rl_model_path | Path for saving or reading the RL model, including the save directory name and file name prefix. In train mode, this path is used to save the model. In tune mode, this path is used to read the model file. | N/A |
rl_steps | Number of training steps of the deep reinforcement learning algorithm | N/A |
max_episode_steps | Maximum number of training steps in each episode. | N/A |
test_episode | Number of episodes when the RL algorithm is used for optimization. | N/A |
gop_algorithm | Global search algorithm. | bayes and pso |
max_iterations | Maximum number of iterations of the global search algorithm. (The value is not fixed. Multiple iterations may be performed based on the actual requirements.) | N/A |
particle_nums | Number of particles when the PSO algorithm is used. | N/A |
benchmark_script | Benchmark driver script. This parameter specifies the file with the same name in the benchmark path to be loaded. Typical benchmarks, such as TPC-C and TPC-H, are supported by default. | tpcc, tpch, tpcds, sysbench, and others |
benchmark_path | Path for saving the benchmark script. If this parameter is not configured, the configuration in the benchmark drive script is used. | N/A |
benchmark_cmd | Command for starting the benchmark script. If this parameter is not configured, the configuration in the benchmark drive script is used. | N/A |
benchmark_period | This parameter is valid only for period benchmark. It indicates the test period of the entire benchmark. The unit is second. | N/A |
scenario | Type of the workload specified by the user. | tp, ap, and htap |
tuning_list | List of parameters to be tuned. For details, see the share/knobs.json.template file. | N/A |
openGauss 2025-04-27 22:51:57