Create an SQL file replay task
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
AliyunOceanBaseFullAccesspermission 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
Create an SQL file replay task.
Log on to the OceanBase console .
In the navigation pane on the left, click Migration Evaluation > Performance Evaluation.
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.
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.
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.
After you complete the configuration, click Verify.
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.
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.
Click Next to run the precheck.
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.
ImportantWhen 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.