After data migration is complete, you can evaluate performance before you switch to an OceanBase database. This topic describes how to create a full performance evaluation task.
Background information
Performance evaluation tasks include three types: Full performance evaluation, SQL file parsing, and SQL file replay. A full performance evaluation task automatically schedules parsing and replay tasks. When a parsing task is complete, the replay task starts automatically. You can run the full evaluation process, or you can parse files and replay workloads independently. To create a standalone SQL file replay task, you must have a complete file parsing result.
Migration Evaluation supports replaying traffic from non-OceanBase source databases to OB_MySQL. Supported sources include RDS_MySQL, PolarDB-X 1.0, PolarDB-X 2.0, TiDB, and POLARMYSQL. It also supports upgrade replays between OceanBase databases of the same mode, such as from OB_MySQL to OB_MySQL and from OB_Oracle to OB_Oracle.
Limits
Only users with the AliyunOceanBaseFullAccess permission can create full performance evaluation tasks. For more information about the access policy, see AliyunOceanBaseFullAccess.
Source is not an OceanBase database
Create a full performance evaluation task.
Log on to the OceanBase Management Console .
In the navigation pane on the left, click Migration Evaluation > Performance Evaluation.
On the Performance Evaluation page, click Create Performance Evaluation > Full Performance Evaluation in the upper-right corner.
On the Select Source Type page, configure the parameters.
Parameter
Description
Evaluation task name
Enter a custom name for the evaluation task.
Instance source
Select Alibaba Cloud Database from the drop-down list.
Source database type
Select the required database type from the drop-down list. Select RDS_MySQL, PolarDB-X 1.0, PolarDB-X 2.0, TiDB, or POLARMYSQL.
Click Next. On the Traffic Parsing Configuration page, configure the parameters.
Traffic Collection Method supports OSS Import and Upload File. Before a performance evaluation, you need to obtain the traffic file of an RDS_MySQL, PolarDB-X, or POLARMYSQL instance and export it to OSS or save it locally. For more information, see Obtain the traffic file of an instance.
NoteCreate a dedicated user for the Migration Evaluation service and grant permissions only on the relevant buckets. For more information about the Alibaba Cloud account system, see Resource Access Management.
If you set Database Type to TiDB, only Upload File is supported for Traffic Collection Method.
If you saved the traffic files from Simple Log Service (SLS) to OSS, select Import from OSS to import the traffic files for evaluation.
Parameter
Description
AccessKey account
The AccessKey ID of your Alibaba Cloud account.
AccessKey password
The AccessKey secret of your Alibaba Cloud account.
OSS Bucket for log import
Enter the name of the OSS bucket for log import.
File delivery directory
Enter the directory where the traffic files are delivered.
Traffic collection scope
Select the time range for evaluation. The maximum time range is 24 hours.
If no data is obtained, no log files were generated within the selected time range.
After you configure the parameters, click Verify. After the verification is successful, the Valid File List displays the files that can be parsed.
If you saved the traffic files from SLS to your local computer, select Upload File to manually import the files in the required format for evaluation. The maximum file size is 5 GB. You can upload only one file.
If the source database type is RDS_MySQL or PolarDB-X 2.0, File Type includes SLS File and SQL Insights File.
You can upload SLS files in JSON, CSV, or ZIP format, and SQL Insights files in CSV or ZIP format for evaluation.
If the source database type is PolarDB-X 1.0, you can upload files in CSV or ZIP format.
If the source database type is TiDB, you can upload files in JSON, CSV, LOG, or ZIP format.
If the source database type is POLARMYSQL, you can upload files in JSON, CSV, or ZIP format.
From the Source Database Instance drop-down list, select the created instance, and then click Next.
On the Select Target Type page, configure the parameters.
Parameter
Description
Target database instance
Select the target database instance from the drop-down list. Make sure that the table schema and data of the target instance are consistent with the source instance to ensure that the stress testing traffic is executed as expected.
Tenant
Select the ID of the tenant where the target database instance resides from the drop-down list.
Target privileged account
The username of the target database.
Password
The password of the target database user.
After you configure the parameters, click Verify. After the verification is successful, the Target Database List displays the databases that can be replayed. Select the database for the replay and click > to add it to the Target List on the right.
Click Next. On the Target Replay Configuration page, configure the parameters.
Parameter
Description
Replay type
Includes Read Traffic (DQL) and Write Traffic (DML).
Replay speed
Select the target replay speed from the drop-down list. The maximum speed is 10×.
Replay speed compresses the QPS or TPS of the traffic into a shorter time range. For example, a speed of 2× means that traffic that originally took 4 hours to replay is completed in 2 hours.
Sample rate
Select the target 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.
Click Next to perform a precheck.
After the precheck is successful, click Start to run the performance evaluation task.
After the task starts, you can view the evaluation report on the Performance Evaluation Task page. For more information, see View a performance evaluation report. The parsed files are saved to the Performance Evaluation > Parsed File List page.
ImportantWhen you start the replay, Migration Evaluation automatically adds a whitelist group to the selected replay instance. The group name is in the omaxxx format. This ensures that the Migration Evaluation replay machine can connect to your database.
Source is an OceanBase database
On the Performance Evaluation page, click Create Performance Evaluation > Full Performance Evaluation in the upper-right corner.
On the Select Source Type page, configure the parameters.
Parameter
Description
Evaluation task name
Enter a custom name for the evaluation task.
Instance source
Select Alibaba Cloud Database from the drop-down list.
Source database type
Select the required database type from the drop-down list. In this example, select OB_MySQL or OB_Oracle.
Source database instance
Select the created database instance from the drop-down list.
Tenant
Select the ID of the tenant where the target database instance resides from the drop-down list.
Click Next. On the Traffic Parsing Configuration page, configure the parameters.
ImportantIf SQL Audit is not enabled for the source tenant, traffic collection is not supported. Click Enable to go to the SQL Audit page, and then click Enable SQL Audit.
Parameter
Description
Traffic collection method
If the source type is OB_MySQL or OB_Oracle, you can select Collect from Audit View.
NoteThis collection method is free for a limited time.
Traffic collection time range
You can select the start time and end time for traffic collection. The supported time span is 30 days, and the maximum duration for a single parsing task is 24 hours.
The time range is accurate to the hour. You can only select a time after SQL Audit was enabled.
Click Next. On the Select Target Type page, configure the parameters.
Parameter
Description
Database type
OceanBase Database supports upgrade replay only between databases of the same mode.
Target database instance
Select the target database instance from the drop-down list. Make sure that the table schema and data of the target instance are consistent with the source instance to ensure that the stress testing traffic is executed as expected.
Use backup data for data initialization
If you select this parameter, a new instance is created for backup and recovery. For more information about the configuration, see the following table.
Tenant
If you do not select Use backup data for data initialization, select the ID of the tenant where the target database instance resides from the drop-down list.
If you select Use backup data for data initialization, configure the following parameters.
ImportantMigration Evaluation supports restoration only from an earlier version to a later version. OceanBase Database V4.x does not support restoration from a version earlier than V4.x.
Parameter
Description
Recovery object
The default value is Tenant.
Source cluster
Select the source cluster from which you want to recover data from the drop-down list.
Source tenant
Select the tenant whose data you want to recover from the drop-down list.
Recovery time point
Select the point in time to which you want to recover data. The page displays the latest recoverable time. Select a time point as needed.
Target instance
Select the instance to which you want to restore data from the drop-down list.
Target tenant name
Select the tenant to which you want to restore data from the drop-down list.
Number of resource distribution nodes
A larger number of distribution nodes provides higher reliability and availability, but also increases the overall overhead of the distributed system. Select the number of nodes as needed.
Resource allocated to a single node
Select the CPU specifications and memory size for a single node. After you click View Resource Distribution, you can view the resource allocation of each node.
NoteThe total CPU and memory size of all tenants cannot exceed the specifications of the cluster.
Total available resources for a tenant = Resources allocated to a single node × Number of resource distribution nodes × Number of replicas.
Access VPC
Select the ID of the VPC where the ECS instance resides.
If no suitable VPC is available, create one as prompted on the page. For more information, see Create a VPC.
Primary zone
Select the primary zone for the target tenant.
Access VSwitch
Select the ID of the vSwitch where the ECS instance resides.
If no suitable vSwitch is available, create one as prompted on the page. For more information, see Create a vSwitch.
Remarks (Optional)
Remarks about the backup and recovery.
Click Next. On the Target Replay Configuration page, configure the parameters.
Parameter
Description
Replay account/password
Enter the replay account and password, and then click Verify.
Replay database
Select a file from the Parsable File List and click > to add it to the Target List on the right.
Replay type
Includes Read Traffic (DQL) and Write Traffic (DML).
Replay speed
Select the target replay speed from the drop-down list. The maximum speed is 10×.
Sample rate
Select the target 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 perform a precheck.
After the precheck is successful, click Start to run the performance evaluation task.
After the task starts, you can view the evaluation report on the Performance Evaluation Task page. For more information, see View a performance evaluation report. The parsed files are saved to the Performance Evaluation > Parsed File List page.
ImportantWhen you start the replay, Migration Evaluation automatically adds a whitelist group to the selected replay instance. The group name is in the omaxxx format. This ensures that the Migration Evaluation replay machine can connect to your database.