Configuring FDO Parameters
Before performing automatic FDO, modify the configuration file of the GCC FDO component and adjust the running parameters to meet compilation requirements.
- Open the configuration file.
1vi A-FOT/a-fot.ini - Press i to enter the insert mode and modify the configuration file as follows. For details about the parameters, see Table 1.
1 2 3 4 5 6 7 8 9 10 11
application_name=mysqld bin_file=/usr/local/mysql-gcc/bin/mysqld work_path=/tmp build_script=/root/build.sh run_script=/root/run.sh max_waiting_time=600 opt_mode=AutoBOLT perf_time=600 gcc_path=/usr/ check_success=1 build_mode=Wrapper
Table 1 FDO parameters Parameter
Description
application_name=mysqld
Application name.
bin_file=/usr/local/mysql-gcc/bin/mysqld
Path to the binary file of the application.
work_path=/tmp
Application working path, which is used to compile the application or store the profile.
build_script=/root/build.sh
Path to the application build script.
run_script=/root/run.sh
Path to the script for running the application. /root/run.sh is used as an example.
max_waiting_time=600
Maximum waiting time for the application to start, in seconds.
opt_mode=AutoBOLT
Optimization mode. The options are as follows:
- AutoFDO: automatic feedback-directed optimization.
- AutoPrefetch: automatic prefetch.
- AutoBOLT: automatic binary optimization.
- Auto_kernel_PGO: automatic kernel profile-guided optimization.
The AutoBOLT mode is used in the MySQL database scenario.
perf_time=600
Perf sampling duration, in seconds.
NOTICE:Set this parameter to a value less than or equal to the test execution duration.
gcc_path=/usr/
Path to the GCC compiler.
check_success=1
Checks whether the optimization is enabled. The value 1 indicates that this check is enabled, and the value 0 indicates that this check is disabled.
build_mode=Wrapper
Build mode, which can be set to Bear or Wrapper.
The Wrapper mode is used in the MySQL database scenario.
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.