Create an SQL file replay task

Updated at:

An SQL file replay task evaluates performance by replaying analyzed traffic to a selected destination database. This topic describes how to create an SQL file replay task.

Limits

  • Only users with the AliyunOceanBaseFullAccess permission can create SQL file replay tasks. For more information about access policies, see AliyunOceanBaseFullAccess.

  • Migration evaluation can replay only files that have been parsed. For more information, see Create an SQL file parsing task.

Procedure

  1. Create an SQL file replay task.

    1. Log on to the OceanBase console .

    2. In the navigation pane on the left, click Migration Evaluation > Performance Evaluation.

    3. On the Performance Evaluation page, click Create Performance Evaluation > SQL File Replay in the upper-right corner.

      Alternatively, on the Performance Evaluation > Parsed File List page, you can click Start Replay in the row for the target parsed file.

  2. On the Select Destination Type page, configure the parameters.

    Parameter

    Description

    Evaluation task name

    A custom name for the evaluation task.

    Select parsed file

    Select a file that has been parsed from the drop-down list.

    If you create the SQL file replay task from the Parsed File List page, this parameter cannot be changed.

    Destination database instance

    Select a destination database instance from the drop-down list. Make sure that the table schema and data of the destination instance are consistent with the source instance. This ensures that the stress testing traffic runs correctly.

  3. Click Next. On the Replay Schema Configuration page, configure the parameters.

    Parameter

    Description

    Tenant

    From the drop-down list, select the ID of the tenant where the destination database instance resides.

    Destination privileged account

    The username of the destination database.

    Password

    The password for the destination database user.

  4. After you complete the configuration, click Verify.

  5. After the verification is successful, in the Replay Schema Configuration section, check the Parsed File Schema checkbox. Then, select a destination replay schema from the drop-down list.

    Alternatively, after you check the Parsed File Schema checkbox, you can click Batch Configure Destination Replay Schema in the upper-right corner. In the dialog box that appears, select a destination replay schema and click OK.

  6. Click Next. On the Destination Replay Configuration page, configure the parameters.

    Parameter

    Description

    Replay type

    Includes Read Traffic (DQL) and Write Traffic (DML).

    Replay speed

    Select a replay speed from the drop-down list. The maximum speed is 10x.

    Replay speed compresses the Queries Per Second (QPS) or Transactions Per Second (TPS) of the traffic into a shorter time frame. For example, a 2x speed means that traffic that originally took 4 hours to replay is completed in 2 hours.

    Sample rate

    Select a sample rate from the drop-down list. The maximum rate is 100%.

    Simulate concurrency

    Specify whether to simulate concurrency. If you select No, the replay speed slows down.

    Read/write splitting

    Specify whether to enable read/write splitting.

  7. Click Next to run the precheck.

  8. After the precheck is successful, click Start to begin the SQL file replay task.

    After the task starts, you can view the evaluation report on the Performance Evaluation Tasks page. For more information, see View a performance evaluation report.

    Important

    When you start the replay, migration evaluation automatically adds a whitelist group to your selected replay instance. The group is named in the omaxxx format. This ensures that the migration evaluation replay machine can connect to your database.