运用训练结果
命令功能
运用自动调优后的报告结果。
命令格式
1 | devkit kat use [-h] -i <dir> [-l {0,1,2,3}] |
参数说明
参数 |
参数选项 |
说明 |
---|---|---|
-h/--help |
- |
获取帮助信息。 |
-l/--log-level |
0/1/2/3 |
设置日志级别,默认为2。
|
-i/--input |
- |
配置已自动调优后得到的结果目录。 |
子命令 |
选项 |
说明 |
---|---|---|
example |
- |
展示使用示例。 |
exit |
- |
退出交互界面。 |
help |
- |
获取帮助信息。 |
log |
0/1/2/3 |
设置日志级别,默认为2。
|
reset |
- |
将应用参数和系统参数恢复赋值前。 |
set |
- |
将某轮次运行的参数值设置到应用和系统中。 |
show |
- |
展示某些轮次的性能测试数据。 |
test |
- |
让某些轮次按其参数再次进行测试。 |
top |
- |
展示性能指标最好的前N个轮次的数据。 |
使用示例
对已自动调优的结果报告(结果目录可在开启自动调优最后输出回显中获取)查看:
1 | devkit kat use -i /opt/template/template_xxxx/train-20241219-215721 |
进入交互界面。
- 查看使用示例。
返回信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
Welcome to KAT examples. Here is a simple case help you get quick start of "KAT use". Following are some conceptions you should know. [STEPS] "Use" runs the original training steps Which means it will reuse the steps of "train". Please ensure the cmds is still OK (1),At beginning, Case will be load the same as train. It will cost some time If it is a remote case. (2),If you use "set" or "test" for the first time. Next steps will be called: "initialize" --> "assign_params.backup_cmd" (3),If "set", next steps will be called: "assign_params.assign_cmd" (4),If "test", next steps will be called repeatedly: "assign_params.assign_cmd" --> "round_prepare" --> "run_test" --> "round_cleanup" (5),If "initialize" called , "finalize" will be called when "exit" (6),If you do not want to set a group parameter, please confirm "no" when "exit" to call "assign_params.recover" These are simple principle of invoking the command here. Details refer to "README path and chapter" [ROUND] To make this clear, Here are a trained case with the following data. Total round : 10 Baseline performance: 5.0 -------------------------------------------------------------------------------- | Rank | Round | Performance | Improvement %) | -------------------------------------------------------------------------------- | 1 | round 5 | 10.0 | 100.00 | | 2 | round 3 | 9.0 | 80.00 | | 3 | round 2 | 8.0 | 60.00 | | 4 | round 4 | 7.0 | 40.00 | | 5 | round 1 | 6.0 | 20.00 | -------------------------------------------------------------------------------- Brief: The train result consisted of rounds. Parameters used in the train process corresponding to each round. Selecting rounds is selecting parameters. Usage: Here are some simple usage of round: (1), Use a single number to represent a round, such as "5" represent line 1 in table above, following command you can use: show 5 # show the information of round 5 set 5 # assign the parameters of round 5 test 5 # retest the performance of round 5 (2), Use r/rank prefix to specify the round ranked by performance. Such as r1 represent line 1 in table above.Follow command you can try: show r1 # show the information of round 5 which ranks 1 set r1 # assign the parameters of round which ranks 1 test r1 # retest the performance of round 5 which ranks 1 Specially, you can specify sequence when use "test". (1), single numbers or rank numbers separated by "," test 1,2,r1,r2 # test sequence: round 1, 2, 5 ,3 (2), Use top or "-" to specify consecutive rounds or ranks: test 1-3,r1-2,top3 # test sequence: round 1, 2, 3, 5, 3, 5, 3, 2 (3), Specify repetitions using an additional number: test 1,2 3 # test sequence: round 1, 2, 1, 2, 1, 2
- 获取帮助信息。
键入“help”,按下“Enter”;可在help后键入需要查看的子命令获取对应子命令的帮助详情。
1 2 3 4 5 6 7 8 9 10 11 12 13
Available Commands: example - Show examples for use exit - Exit the program help - Show this help message log - change the log level reset - reset params set - set the config of round n. show - show round <n> information. test - Retest round sequence. test <n> times. top - show top N performance For more usage, please refer to "help <command>". e.g., help test
- 查看性能测试数据。
键入“show 1”,按下“Enter”;可查看自动调优第一轮详细任务参数和性能数据;直接键入“show”并按下“Enter”可查看全部轮次性能数据。
返回信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[2024-12-31 07:54:51 UTC] [KAT] [message] - ======================== info of Round 1 =================================== [2024-12-31 07:54:51 UTC] [KAT] [message] - # Performance: 144.9 [2024-12-31 07:54:51 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 07:54:51 UTC] [KAT] [message] - ---------------------- Params --------------------------------- [2024-12-31 07:54:51 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 07:54:51 UTC] [KAT] [message] - Postgresql: [2024-12-31 07:54:51 UTC] [KAT] [message] - autovacuum_vacuum_cost_delay = 96 [2024-12-31 07:54:51 UTC] [KAT] [message] - autovacuum_vacuum_cost_limit = 1994 [2024-12-31 07:54:51 UTC] [KAT] [message] - autovacuum_vacuum_scale_factor = 0.07744139964226633 [2024-12-31 07:54:51 UTC] [KAT] [message] - autovacuum_vacuum_threshold = 714 [2024-12-31 07:54:51 UTC] [KAT] [message] - bgwriter_delay = 2215 ... ... ... [2024-12-31 07:54:51 UTC] [KAT] [message] - parallel_leader_participation = on [2024-12-31 07:54:51 UTC] [KAT] [message] - vacuum_cleanup_index_scale_factor = 0.8960460592061281 [2024-12-31 07:54:51 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 07:54:51 UTC] [KAT] [message] - ---------------------- Run Info -------------------------------- [2024-12-31 07:54:51 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 07:54:51 UTC] [KAT] [message] - Run record: 1 [2024-12-31 07:54:51 UTC] [KAT] [message] - Result: success [2024-12-31 07:54:51 UTC] [KAT] [message] - Performance: 144.9 [2024-12-31 07:54:51 UTC] [KAT] [message] - Run time: 2024-12-31 07:36:24.048227 [2024-12-31 07:54:51 UTC] [KAT] [message] - Finish time: P2024-12-31 07:36:24.048238 [2024-12-31 07:54:51 UTC] [KAT] [message] - [2024-12-31 07:54:51 UTC] [KAT] [message] - ================================================================================
- 查看性能前二的数据。
返回信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[2024-12-31 08:27:59 UTC] [KAT] [message] - ============================== Auto Tuning Report ============================== [2024-12-31 08:27:59 UTC] [KAT] [message] - Total round : 5 [2024-12-31 08:27:59 UTC] [KAT] [message] - Total run : 6 [2024-12-31 08:27:59 UTC] [KAT] [message] - Fail times : 0 [2024-12-31 08:27:59 UTC] [KAT] [message] - Tuning Direction : high [2024-12-31 08:27:59 UTC] [KAT] [message] - Performance description: tpmC, transactions per minute [2024-12-31 08:27:59 UTC] [KAT] [message] - Baseline performance : 141.87 [2024-12-31 08:27:59 UTC] [KAT] [message] - Top 2 performance: [2024-12-31 08:27:59 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:27:59 UTC] [KAT] [message] - | Rank | Round | Performance | Improvement (%) | [2024-12-31 08:27:59 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:27:59 UTC] [KAT] [message] - | 1 | round 5 | 174.94 | 23.31 | [2024-12-31 08:27:59 UTC] [KAT] [message] - | 2 | round 1 | 159.93 | 12.73 | [2024-12-31 08:27:59 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:27:59 UTC] [KAT] [message] - Note: [2024-12-31 08:27:59 UTC] [KAT] [message] - The performance value is the return value of the run test step, [2024-12-31 08:27:59 UTC] [KAT] [message] - Performance improvement (%) = [2024-12-31 08:27:59 UTC] [KAT] [message] - (round performance - baseline performance) / baseline performance * 100 [2024-12-31 08:27:59 UTC] [KAT] [message] - Case package locate: /home/kat_show/DevKit-CLI-24.0.T50-Linux-Kunpeng/train-20241231-161557 [2024-12-31 08:27:59 UTC] [KAT] [message] - ================================================================================
- 对指定轮次再次进行性能测试。
返回信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
[2024-12-31 08:28:35 UTC] [KAT] [message] - ================================================================================ [2024-12-31 08:28:35 UTC] [KAT] [message] - Kunpeng Auto Tuner - task set up [2024-12-31 08:28:35 UTC] [KAT] [message] - start time: 2024-12-31 08:28:35 [2024-12-31 08:28:35 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:28:48 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <params prepare> start ----------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - ======================== info of Round 1 =================================== [2024-12-31 08:29:47 UTC] [KAT] [message] - # Performance: 159.93 [2024-12-31 08:29:47 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - ---------------------- Params --------------------------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - Postgresql: [2024-12-31 08:29:47 UTC] [KAT] [message] - autovacuum_vacuum_cost_delay = 96 [2024-12-31 08:29:47 UTC] [KAT] [message] - autovacuum_vacuum_cost_limit = 1994 [2024-12-31 08:29:47 UTC] [KAT] [message] - autovacuum_vacuum_scale_factor = 0.07744139964226633 [2024-12-31 08:29:47 UTC] [KAT] [message] - autovacuum_vacuum_threshold = 714 ... ... ... [2024-12-31 08:29:47 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - ---------------------- Run Info -------------------------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - Run record: 1 [2024-12-31 08:29:47 UTC] [KAT] [message] - Result: success [2024-12-31 08:29:47 UTC] [KAT] [message] - Performance: 159.93 [2024-12-31 08:29:47 UTC] [KAT] [message] - Run time: 2024-12-31 08:19:20.023751 [2024-12-31 08:29:47 UTC] [KAT] [message] - Finish time: P2024-12-31 08:19:20.023762 [2024-12-31 08:29:47 UTC] [KAT] [message] - [2024-12-31 08:29:47 UTC] [KAT] [message] - ================================================================================ [2024-12-31 08:29:47 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <round set up> start ----------------- [2024-12-31 08:29:47 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <assign params> start ----------------- [2024-12-31 08:30:20 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <run test> start ----------------- [2024-12-31 08:30:41 UTC] [KAT] [message] - ### Run test successfully. Performance of this round is [127.89] ### [2024-12-31 08:30:41 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <round tear down> start ----------------- [2024-12-31 08:30:43 UTC] [KAT] [message] - ================================================================================
- 调整输出日志等级。
- 将第一轮自动调优的参数设置到应用和系统中。
返回信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
[2024-12-31 08:31:37 UTC] [KAT] [message] - ======================== info of Round 1 =================================== [2024-12-31 08:31:37 UTC] [KAT] [message] - # Performance: 127.89 [2024-12-31 08:31:37 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:31:37 UTC] [KAT] [message] - ---------------------- Params --------------------------------- [2024-12-31 08:31:37 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:31:37 UTC] [KAT] [message] - Postgresql: [2024-12-31 08:31:37 UTC] [KAT] [message] - autovacuum_vacuum_cost_delay = 96 [2024-12-31 08:31:37 UTC] [KAT] [message] - autovacuum_vacuum_cost_limit = 1994 ... ... ... [2024-12-19 13:46:17 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-19 13:46:17 UTC] [KAT] [message] - ---------------------- Run Info -------------------------------- [2024-12-19 13:46:17 UTC] [KAT] [message] - -------------------------------------------------------------------------------- ... ... ... [2024-12-31 08:31:37 UTC] [KAT] [message] - ================================================================================ [2024-12-31 08:31:37 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <assign params> start ----------------- [2024-12-31 08:32:10 UTC] [KAT] [message] - set params of 1 success!
- 重置任务参数。
返回信息:
1
[2024-12-31 08:33:11 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <params recover> start -----------------
- 退出交互界面。
返回信息:
1 2 3 4 5 6 7 8
[2024-12-31 08:35:02 UTC] [KAT] [message] - Finish using /home/kat_show/DevKit-CLI-24.0.T50-Linux-Kunpeng/train-20241231-161557, goodbye! [2024-12-31 08:35:02 UTC] [KAT] [message] - ================================================================================ [2024-12-31 08:35:02 UTC] [KAT] [message] - Kunpeng Auto Tuner - task tear down [2024-12-31 08:35:02 UTC] [KAT] [message] - start time: 2024-12-31 08:35:02 [2024-12-31 08:35:02 UTC] [KAT] [message] - -------------------------------------------------------------------------------- [2024-12-31 08:35:02 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <params recover> start ----------------- [2024-12-31 08:35:06 UTC] [KAT] [message] - --------- Kunpeng Auto Tuner - Step <tear down> start ----------------- [2024-12-31 08:35:07 UTC] [KAT] [message] - ================================================================================
父主题: 自动调优