OceanBase Cloud Platform (OCP) allows the administrator to manage resources. For example, the administrator can view the resource unit distribution and resource usage in a cluster. The Unit Distribution tab displays the physical distribution and resource usage of each tenant in the OceanBase cluster. The Resource Usage tab displays the resource usage trends of the cluster.
Log on to the OCP console. In the left-side navigation pane, click Clusters. On the Clusters page, click the target cluster to go to its overview page. In the left-side navigation pane, click Resource Management. The Resource Management page appears.
Unit Distribution
You can click the Unit Distribution tab to view the distribution of resource units.
Click Tenant in the upper-right corner of the tab to select a tenant.
Click Region in the upper-right corner of the tab to select the physical region where the current cluster is located.
Click Zone in the upper-right corner of the tab to select Zone1, Zone2, or Zone3.
Click Type in the upper-right corner of the tab to select the host type.
Enable Real-time Refresh. The unit view refreshes every second so that you can view the latest unit distribution.
Check load balancing of the cluster:
You can view the values of Allocated Memory, Allocated CPU, and Used Disks of each zone to check whether the usage of the same type of resource is balanced across the servers in the zone. If not, you can modify the load balancing parameters of the OceanBase cluster to implement load balancing.
Evaluate whether the cluster needs to scale out:
You may consider a cluster scale-out when the value of Used Disks reaches 80%.
View the resource distribution of a tenant:
You can click Tenant in the upper-right corner of the tab, select the target tenant from the drop-down list, and then click OK to view the resource distribution of the tenant.
Manually implement load balancing:
If the built-in load balancing algorithms of the OceanBase cluster cannot meet your needs, you can double-click a unit config next to the tenant to manually migrate resources, but only within a single zone.
Note
We recommend that you disable the automatic load balancing feature of the OceanBase cluster before you manually implement load balancing, because the feature may migrate the unit back to the original locality.
Note
The Number of Units row displays the number of units in the cluster. If the number of units is greater than the number of tenants, units that are not associated with a tenant exist. You can delete or compact the units that have been idle for more than one hour.
Resource Usage
In the Resource Usage Tendency section, you can view the Disk, CPU, and Memory trend charts. The CPU and Memory trend charts display the trend of resource allocation, and the Disk trend chart displays the trend of resource usage. You can move the pointer over a resource change point in time on the CPU utilization or memory usage curve to view the resource change event of resource allocation at the current point in time relative to the previous point in time. The event information is generated based on the value differences between the two resource allocations and may not include all associated events.
Note
Resource usage trend data is collected once every day to display trends of resource allocation and usage. It is not suitable for observing the real-time changes in resources.
Click All in the upper-right corner, and choose All, Zone1, Zone2, or Zone3 from the drop-down list to view the resource usage trends in different scopes.
Click Last 7 Days in the upper-right corner, and choose Last 7 Days, Last Month, Last Six Months, or Last Year to view the resource usage trends in different periods.
Click Percentage or Absolute Value to switch the mode of the trend charts.
Click the filter icon in the upper-right corner of each trend chart to view the resource usage of different zones.
The table in the Allocated Resources section has the following columns: Tenant Name, Used Disks, Allocated CPU (Core), and Allocated Memory (G). Click the name of a tenant to go to the overview page of the tenant.
Note
Due to high query costs, the query results of tenant resource allocation statistics are returned based on cached data. This may result in a 2-minute lag with the real-time condition. In this case, for the allocated resources that do not belong to any tenant, N/A is displayed in the Tenant Name column, indicating that such resources can be released.
More information
For more information about the resource distribution of tenants in a cluster, see the following topics: