All Products
Search
Document Center

ApsaraDB for OceanBase:Create a full performance assessment task

Last Updated:Aug 21, 2024

After the data migration is completed, you must assess the performance of the destination OceanBase database before business switchover. This topic describes how to create a performance assessment task.

Background

You can select any of the following three modes for a performance assessment task as needed: Full Performance Assessment, SQL File Parsing, and SQL File Replay. A full performance assessment task includes the parsing and replay of SQL files. You can specify to run the complete process or perform only the file parsing or the load replay. To create an SQL file replay task, you must specify a complete parsed file.

Currently, the migration assessment feature supports replay for migration from a non-OceanBase data source, such as RDS_MySQL, PolarDB-X 1.0, or PolarDB-X 2.0, to OB_MySQL. The migration assessment feature also supports replay for OceanBase upgrades in the same mode, that is, upgrades from OB_MySQL to OB_MySQL and from OB_Oracle to OB_Oracle.

Non-OceanBase database as the source

  1. Create a full performance assessment task

    1. Log on to the ApsaraDB for OceanBase console.

    2. In the left-side navigation pane, choose Migration Assessment > Performance Assessment.

    3. On the Performance Assessment page, choose Create Performance Assessment Task > Full Performance Assessment in the upper-right corner.

  2. On the Select Source Type page, specify related parameters.

    Parameter

    Description

    Assessment Task Name

    The name of the assessment task. You can specify a custom task name.

    Instance Source

    Select Alibaba Cloud Database from the drop-down list.

    Database Type

    The database type. Select RDS_MySQL, PolarDB-X 1.0, or PolarDB-X 2.0 from the drop-down list.

    Database Instance

    Select a created database instance from the drop-down list.

  3. Click Next. Configure the parameters on the Traffic Analysis Settings page.

    Traffic Collection Mode can be set to Import File from OSS or Upload File. Before performance assessment, obtain the traffic files of the RDS_MySQL instance or PolarDB-X instance and upload the files to an OSS bucket. For more information, see Prerequisite operations.

    • If you store SLS traffic files in an Object Storage Service (OSS) bucket, select Import File from OSS to import traffic files for the performance assessment.

      Parameter

      Description

      AccessKey Account

      The AccessKey ID of your Alibaba Cloud account.

      AccessKey Password

      The AccessKey Secret of your Alibaba Cloud account.

      Source OSS Bucket

      The name of the OSS bucket from which the logs are imported.

      File Delivery Directory

      The directory to which the traffic files are delivered.

      Traffic Collection Range

      Data generated in the specified time range will be assessed. The time span cannot exceed 24 hours.

      If no data is obtained, no log files were generated within the specified time range.

      Click Verify. After the verification succeeds, the Valid Files list shows the parsable files.

    • If you store SLS traffic files in the local storage, select Upload File and manually import files in the CSV or JSON format for assessment.

  4. Click Next. On the Select Destination Type page, specify related parameters.

    Parameter

    Description

    Destination Database Instance

    The destination database instance. Check that the table schema and data in the destination instance are consistent with those in the source instance to make sure that the stress testing is executed normally.

    Tenant

    The ID of the tenant where the destination database instance resides from the drop-down list.

    Privileged Account at Destination

    The username of the destination database.

    Password

    The password of the destination database.

    Click Verify. After the verification succeeds, you can view the list of schemas to which the SQL file can be replayed on the Logged-on Schemas page. Select the schema to which you want to replay the SQL file, and click > to add it to the Destinations list on the right.

  5. Click Next. Configure the parameters on the Replay Destination Settings page.

    Parameter

    Description

    Replay Type

    The replay type. Valid values: Read Traffic (DQL) and Write Traffic (DML).

    Replay Speed

    Select the replay speed from the drop-down list. Maximum replay speed: 10x.

    Sampling Rate

    Select the sampling rate from the drop-down list. Maximum sampling rate: 100%.

    Concurrency Simulation

    Specify whether to enable concurrency simulation. If you set the parameter to No, the replay speed will be slow.

  6. Click Next to perform a precheck.

  7. After the precheck succeeds, click Start to launch the performance assessment task.

    After the task is completed, you can view the assessment report on the Performance Assessment Tasks page. For more information, see View the assessment report.

    Important

    When you start replay, the migration assessment feature automatically adds a whitelist group named in the omaxxx format to the replay destination instance that you selected. This whitelist group ensures that the replay server can normally connect to your database.

OceanBase database as the source

  1. On the Performance Assessment page, choose Create Performance Assessment Task > Full Performance Assessment in the upper-right corner.

  2. On the Select Source Type page, specify related parameters.

    Parameter

    Description

    Assessment Task Name

    The name of the assessment task. You can specify a custom task name.

    Instance Source

    Select Alibaba Cloud Database from the drop-down list.

    Database Type

    The database type. Select OB_MySQL or OB_Oracle from the drop-down list.

    Database Instance

    Select a created database instance from the drop-down list.

    Tenant

    Select a tenant from the drop-down list.

  3. Click Next. Configure the parameters on the Traffic Analysis Settings page.

    Parameter

    Description

    Traffic Collection Mode

    If the source type is OB_MySQL or OB_Oracle, you can select Collect from Audit Views.

    Note

    This collection method is available for limited-time free trial.

    Traffic Collection Range

    You can select a start time and end time for traffic collection. A maximum span of 30 days is supported.

  4. Click Next. On the Select Destination Type page, specify related parameters.

    Parameter

    Description

    Database Type

    OceanBase Database supports replay of upgrades in the same mode.

    Destination Database Instance

    The destination database instance. Check that the table schema and data in the destination instance are consistent with those in the source instance to make sure that the stress testing is executed normally.

    Use Backup Data for Initialization

    If you select this option, a new instance is created for backup and restore. For more information, see the following table.

    Tenant

    This parameter is displayed only when you select Data Migration Completed for Baseline Data Migration.

    If you select Use Backup Data for Initialization, you need to configure the following parameters.

    Important

    The migration assessment feature supports data restore only from an earlier version to a later version. In addition, the migration assessment feature of V4.0.0 is not compatible with its earlier versions.

    Parameter

    Description

    Object to Restore

    The default value is Tenant.

    Source Cluster

    Select the source cluster for data restore from the drop-down list.

    Source Tenant

    Select the source tenant for data restore from the drop-down list.

    Restore Point in Time

    The point in time to which data is restored. The latest point in time to which data can be restored is displayed. You can select a point in time as needed.

    Destination Instance

    Select from the drop-down list the instance to which the data is to be restored.

    Destination Tenant Name

    Select from the drop-down list the tenant to which the data is to be restored.

    Resource Distribution Nodes

    The number of nodes for resource distribution. More nodes means higher reliability and availability. However, more nodes also require more overall distribution overheads. Select the number of nodes as needed.

    Single-node Resources

    The number of CPU cores and memory size allocated to a single node. You can click View Resource Distribution to view the resource distribution among the nodes.

    Note
    • The total CPU and memory capacities of all tenants cannot exceed the specifications of the cluster to which they belong.

    • Total resources available to a tenant = Single-node resources x Number of resource distribution nodes × Number of replicas

    VPC

    The ID of the virtual private cloud (VPC) to which the Elastic Compute Service (ECS) instance belongs.

    If no suitable VPC is available, create a VPC as prompted. For more information, see Create a VPC.

    Primary Zone

    The primary zone of the destination tenant.

    vSwitch

    The ID of the vSwitch on the network to which the ECS instance belongs.

    If no suitable vSwitch is available, create a vSwitch as prompted. For more information, see Create a vSwitch.

    Remarks (optional)

    The remarks information about data backup and restore.

  5. Click Next. Configure the parameters on the Replay Destination Settings page.

    Parameter

    Description

    Replay Account/Password

    After you enter the replay account and password, click Verify.

    Replay Library

    Select a file from the Parsable Files list and click > to add it to the Destinations list on the right.

    Replay Type

    The replay type. Valid values: Read Traffic (DQL) and Write Traffic (DML).

    Replay Speed

    Select the replay speed from the drop-down list. Maximum replay speed: 10x.

    Sampling Rate

    Select the sampling rate from the drop-down list. Maximum sampling rate: 100%.

    Concurrency Simulation

    Specify whether to enable concurrency simulation. If you set the parameter to No, the replay speed will be slow.

  6. Click Next to perform a precheck.

  7. After the precheck succeeds, click Start to launch the performance assessment task.

    After the task is completed, you can view the assessment report on the Performance Assessment Tasks page. For more information, see View the assessment report.

    Important

    When you start replay, the migration assessment feature automatically adds a whitelist group named in the omaxxx format to the replay destination instance that you selected. This whitelist group ensures that the replay server can normally connect to your database.