Rate This Document
Findability
Accuracy
Completeness
Readability

Modifying a Custom Template

The tool provides custom tuning template files. You can directly modify a template file for specific tuning or create other custom template files for other scenarios based on these existing template files.

Custom templates for three scenarios

The tool provides custom template files for three scenarios: using memtier_benchmark to perform pressure tests on Redis, using HiBench to perform pressure tests on Spark, and using BenchmarkSQL to perform pressure tests on GoldenDB.

Table 1 Kunpeng AutoTuner application scenarios

Scenario

Application Startup Method

Pressure Test Method

Description

Redis

Using the data directory specified by redis-server

Using memtier_benchmark

  • If the tool is installed using an RPM package, the template file is stored in the /usr/local/devkit/kat/template_extend folder.
  • If the tool is installed using a compressed package, the template file is stored in the ./kat/template_extend folder in the directory where the CLI tool is decompressed.

Spark

Automatically loading the configuration file

  • on yarn mode: Use yarn-session.sh to submit a task for tuning.
  • standalone mode: Use start-all.sh to start.

Using HiBench

GoldenDB

Starting the database using the dbmoni -start command

Using BenchmarkSQL

Template File Modification and Reference

Obtain the application configuration file and task configuration file from the template_extend directory based on your application scenario. The following procedure describes how to modify and use a template file, using memtier_benchmark as an example.

  • Application parameter configuration file: param_Redis--memtier_benchmark_custom.yaml
  • Task parameter configuration file: task_Redis--memtier_benchmark_custom.yaml

You are advised to copy the application and task parameter configuration files to the custom directory for modification.

  1. Open the task_Redis--memtier_benchmark_custom.yaml configuration file. At the beginning of the file, pay attention to the version information of the pressure test tool and application, key replacement operations, and how to use the template file after the modification.
    Figure 1 Comment information
  2. Modify the application configuration file path, executable file path, data file storage path, and executable file path of the pressure test tool based on your specific scenario.
    • Replace CONFIG with the path to the Redis configuration file.
    • Replace REDIS with the path to the folder where the redis-cli executable file is located.
    • Replace DATA with the path to Redis database files. Select an empty folder.
    • Replace MEMTIER with the path to the folder where the memtier_benchmark executable file is located.
    Figure 2 Modifying the path
  3. Modify the content in the hosts_list, configs, and assign_params fields, understand the command functions based on the comments, and then replace the corresponding commands.
    Figure 3 Modifying the commands
  4. If you have a specific memtier_benchmark parameter test requirement, modify the memtier_benchmark pressure test parameter in the run_test field. The template file contains pressure test parameters, which can be applied based on your scenario.
    Figure 4 Pressure test parameters of memtier_benchmark
  5. You can run the devkit kat use -i /Configuration_file_directory/ command to automatically tune the template.