Manage resource isolation

更新时间:
复制 MD 格式

The tenant resource isolation feature in OceanBase prevents interference between different users within the same tenant. This feature allows users to run tasks independently, securely, and efficiently in an environment with shared compute resources.

Background information

The resource isolation feature partitions tenant resources into multiple logical units. This prevents one unit from over-consuming resources and affecting other units. Effective resource control can also reduce the number of clusters, which lowers O&M complexity and management costs.

OceanBase uses resource groups to implement resource isolation. Accounts are then assigned to these resource groups to use the allocated resources.

Prerequisites

  • You can enable the fencing optimization feature when purchasing an instance.

    Note

    The isolation optimization feature must be enabled through a whitelist. For more information, see Isolation optimization.

  • The database version must meet the following requirements:

    • For 3.x series databases, the version must be V3.2.4 or later, and the instance must have 14 or more CPU cores.

    • For 4.x series databases, the version must be V4.2.1 or later, and the instance must have 8 or more CPU cores.

Manage resource groups

  1. Log on to the OceanBase Management Console .

  2. In the navigation pane on the left, click Instance List.

  3. In the instance list, find the target cluster instance and click its name to open the Cluster Instance Workbench.

  4. (Optional) If you are using the resource isolation feature for the first time, you can enable it in the Cluster Instance Workbench.

    1. To the right of Tenant Resource Isolation, click Enable.

      image

    2. In the dialog box that appears, review the notes for enabling resource isolation, and then click OK.

      Important

      The instance restarts when you enable the resource isolation feature. Ensure that your application has a reconnection mechanism. Proceed with caution.

      image

  5. In the navigation pane on the left, click Tenant Management. In the tenant list, click the target tenant to open the Tenant Workbench page.

  6. In the navigation pane on the left, click Resource Management.

  7. On the Resource Management page, you can view the information about the resource groups.

Create a resource group

  1. On the Resource Management page, click Create Resource Group.

    image

  2. In the Create Resource Group dialog box, configure the resource group.

    image

    Parameter

    Description

    Resource Group Name

    The name of the resource group.

    Isolation Object

    Select to isolate by Database Account or Background Task. This creates a mapping that directs all SQL statements from the selected account or task to use the resources of this resource group.

    Database Account

    From the drop-down list, select the account to assign to the resource group.

    Background Task

    From the drop-down list, select the background task to assign to the resource group.

    CPU Usage Limit

    The maximum CPU resources that the resource group can use.

    Note

    The CPU limit for each resource group can be set to 100%. If resource contention occurs between groups, the system allocates resources based on the weight of each group.

    IOPS Usage Limit

    The maximum IOPS that the resource group can use.

    Note

    The IOPS limit for each resource group can be set to 100%. If resource contention occurs between groups, the system allocates resources based on the weight of each group.

    Remarks

    Enter remarks for the resource group.

  3. Click OK. Resource isolation takes effect after the resource group is created.

Edit a resource group

  1. On the Resource Management page, find the target resource group and click Edit in the Actions column.

    image

  2. On the Edit Resource Group page, modify the resource group configuration.

    Parameter

    Description

    Isolation Object

    Select to isolate by Database Account or Background Task. This creates a mapping that directs all SQL statements from the selected account or task to use the resources of this resource group.

    Database Account

    From the drop-down list, select the account to assign to the resource group.

    Background Task

    From the drop-down list, select the background task to assign to the resource group.

    CPU Usage Limit

    The maximum CPU resources that the resource group can use.

    Note

    The CPU limit for each resource group can be set to 100%. If resource contention occurs between groups, the system allocates resources based on the weight of each group.

    IOPS Usage Limit

    The maximum IOPS that the resource group can use.

    Note

    The IOPS limit for each resource group can be set to 100%. If resource contention occurs between groups, the system allocates resources based on the weight of each group.

  3. Click OK.

Delete a resource group

  1. On the Resource Management page, find the target resource group, click the More icon in the Actions column, and then click Delete.

    image

  2. In the dialog box that appears, confirm the information and click Delete.

    image