Rate This Document
Findability
Accuracy
Completeness
Readability

Installing and Using the Feature

The CRC32 instruction optimization feature is provided as a patch file for MySQL. After applying the patch file to the MySQL source code, compile and install MySQL to use this feature. The patch is developed for MySQL 8.0.25.

  1. Download and decompress the MySQL installation package mysql-boost-8.0.25.tar.gz and decompress it.

    To obtain the package, see Table 2.

  2. Download the 0001-CRC32-AARCH64.patch package of the CRC32 instruction optimization feature and decompress it. Extract and upload the patch file to the MySQL installation directory.

    To obtain the package, see Table 2.

  3. In the root directory of the source code, run the git init command to create Git management information.
    git init
    git add -A
    git commit -m "Initial commit"
    • Generally, Git is provided by the system. If not, configure the Yum source by following instructions in MySQL Porting Guide and then install Git.
      1
      yum install git
      
    • If the Git commit user information is not configured, configure the user email and user name before running the git commit command.
      1
      2
      git config user.email "123@example.com"
      git config user.name "123"
      
  4. Run the following command in the MySQL installation directory to apply the patch file of the CRC32 instruction optimization feature:
    # Display patch file statistics.
    git apply --stat 0001-CRC32-AARCH64.patch
    # Check whether the patch file can be successfully applied to the current code repository.
    git apply --check 0001-CRC32-AARCH64.patch
    # Apply the patch file to the current code repository, modify relevant files, and generate a new commit.
    git apply 0001-CRC32-AARCH64.patch

  5. Compile and install MySQL. See MySQL Porting Guide.
  6. Run the following command. If crc32cb dissembling information in the figure is displayed, the CRC32 instruction optimization feature is successfully enabled.
    objdump -d ./bin/mysqld | grep crc32cb

  7. Optional: Perform a TPC-C test to obtain the performance improvement data after the CRC32 instruction optimization feature is used. For details about the test, refer to Sysbench 0.5 & 1.0 Test Guide.
    The CRC32 instruction optimization feature improves the sysbench write performance by 5%. Figure 1 shows the effect before and after the optimization.
    Figure 1 Performance comparison