All Products
Search
Document Center

ApsaraDB for OceanBase:Create an SQL file replay task

Last Updated:Aug 21, 2024

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. This topic describes how to create an SQL file replay task.

Limitations

The migration assessment feature supports replay of only parsed files. For more information, see Create an SQL file parsing task.

Procedure

  1. Create an SQL file replay 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 > SQL File Replay in the upper-right corner.

      You can also choose Performance Assessment > Parsed Files, and click Start Replay in the Actions column of a parsed file to replay it.

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

    Parameter

    Description

    Assessment Task Name

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

    Select Parsed File

    Select a parsed file from the drop-down list.

    If you create an SQL file replay task on the Parsed Files page, you cannot modify this parameter.

    Destination Database Instance

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

    Baseline Data Migration

    Valid values: Data Migration Completed and Use Backup Data for Initialization.

    Note

    If you select Use Backup Data for Initialization, a new instance is created for data 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.

  3. 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.

  4. Click Next to perform a precheck.

  5. After the precheck succeeds, click Start to execute the SQL file replay task.

    After the task starts, you can view information such as the progress of the task on the Performance Assessment Tasks page. For more information, see View details of a performance assessment task.

    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.