Rate This Document
Findability
Accuracy
Completeness
Readability

Incremental Verification

Configure the BenchMarkSQL test environment, and run the test script to perform a pressure test, including adding, deleting, and modifying data, on the primary database to evaluate its performance.

  1. Ensure that data has been imported by following the procedure described in Importing Data and the data required for the test has been prepared on the primary database server.
  2. Configure the BenchMarkSQL test environment.
    1. Go to the BenchMarkSQL configuration directory and open the BenchMarkSQL configuration file.
      cd /home/benchmarksql5.0-for-mysql/run/
      vi ./my_mysql.properties
    2. Press i to enter the insert mode and modify the following configurations as required:
      db=mysql
      driver=com.mysql.cj.jdbc.Driver
      conn=jdbc:mysql://192.168.0.1:3306/tpcc?useSSL=false&useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=true&serverTimezone=UTC # 192.168.0.1 is the IP address of the primary database server. Change it based on the real IP address.
      user=root # User name for login
      password=123456 # MySQL login password
      profile=/etc/my.cnf # MySQL configuration file path
      data=/data/mysql/data # MySQL data file path
      backup=/data/mysql/backup
      
      warehouses=1000 # The value of warehouses is less than or equal to the value of it when data is imported.
      loadWorkers=100
      terminals=150
      
      runTxnsPerTerminal=0 # Number of transactions that can be executed on each terminal. The value 0 indicates that the number of transactions is not limited. Terminals will run until the running time reaches the value of runMins.
      runMins=10 # Maximum running time of each terminal, in minutes. The running time can be reduced.
      limitTxnsPerMin=1000000000 # Maximum number of transactions that can be executed per minute.
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Run the BenchMarkSQL test script to start the pressure test.
    ./runBenchmark.sh my_mysql.properties

    After the test is complete, the system outputs the test result, including key metrics such as the transaction processing rate and response time. Use these metrics to evaluate the primary database performance in data operations such as adding, deleting, and modifying data. Execution result:

  4. Verify the primary/secondary consistency again.
    pt-table-checksum h=192.168.0.1,u=checksums,p=123456,P=3306 --databases=tpcc --no-check-binlog-format --replicate=pt.checksums --max-lag=3 --recursion-method=hosts

    192.168.0.1 is the IP address of the primary database server. Change it based on the actual IP address.

    After confirming the consistency of the primary/secondary data, perform the primary/secondary switchover.