To avoid resource contention between tenants and ensure stable business operation, OceanBase Database isolates resources between tenants and restricts the resource usage of tenants by using resource groups. You can first create a resource group and then create a resource management plan for the resource group.
Prerequisites
- Resource isolation depends on the cgroup configuration. Make sure that you have enabled the cgroup feature for the cluster to which the target tenant belongs.
- Only OceanBase Database V4.1 and later support resource groups.
- We recommend that you do not perform resource isolation for the sys tenant.
Procedure
Log in to the OceanBase Cloud Platform (OCP) console.
In the left-side navigation pane, select Tenants. The Tenants page automatically appears.
On the Tenants page, find the target tenant and click its name to go to the Overview page of the tenant.
In the left-side navigation pane, click Resource Isolation to go to the isolation plan page of the tenant.
Click Create Resource Group. In the dialog box that appears, specify the following information.
Parameter Description Resource Group Name Enter the name of the resource group. The name can contain letters, digits, and underscores (_), and must be 2 to 24 characters in length. Remarks Optional. Enter the remarks of the resource group. The remarks support any characters and must be within 1,000 characters in length. Resource Isolation Method Select a resource isolation type. Valid values: User Resource Isolation, Background Task Isolation, and SQL Resource Isolation. You can select multiple resource isolation types. The detailed configuration parameters are displayed based on the selected types. User Resource Isolation Select a user for resource isolation from the drop-down list to specify the mapping between the user and the resource group. The SQL statements executed by using this user can use only resources allocated to the current resource group. Notice
A user can be mapped to only one resource group. If a user has been mapped to another resource group, you cannot select the user here.
Background Task Resource Isolation Select a supported function from the drop-down list to specify the mapping between background tasks and the resource group, thereby isolating the resources available to background tasks. At present, resource isolation is supported for eight types of background tasks. For more information, see the Resource isolation types section in the Overview topic. Notice
A function can be mapped to only one resource group. If a function has been mapped to another resource group, you cannot select it here.
SQL Resource Isolation You can bind business traffic to different resource groups from the SQL statement dimension. For example, you can specify the WHERE clause to enable SQL statements of different orders to use resources of different resource groups.
You can enter one or more column expressions. You can click View Example to view the considerations and example.Notice
If the specified SQL expression is duplicated with an existing SQL expression configured for the resource group, the new SQL expression prevails.

Click Submit.