The administrator can view tenants, resource distribution information of all tenants, and monitoring metrics of the top 5 tenants in the managed cluster in OceanBase Cloud Platform (OCP).
Query a view for the resource distribution of tenants in a cluster
You can query a view for the resource distribution of all tenants in a cluster.
Log on to the
systenant of the cluster as therootuser.Execute the following statement to go to the database named
oceanbase:Query a view for the resource distribution of the tenants.
obclient> SELECT * FROM oceanbase.GV$OB_UNITS\G *************************** 1. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1 TENANT_ID: 1 ZONE: zone1 MAX_CPU: 2.5 MIN_CPU: 2.5 MEMORY_SIZE: 17179869184 MAX_IOPS: 25000 MIN_IOPS: 25000 IOPS_WEIGHT: 2 LOG_DISK_SIZE: 17179869184 LOG_DISK_IN_USE: 191441460 DATA_DISK_IN_USE: 406847488 STATUS: NORMAL CREATE_TIME: 2022-07-19 11:04:39.226231 *************************** 2. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1001 TENANT_ID: 1001 ZONE: zone1 MAX_CPU: NULL MIN_CPU: NULL MEMORY_SIZE: 644245094 MAX_IOPS: NULL MIN_IOPS: NULL IOPS_WEIGHT: NULL LOG_DISK_SIZE: 1932735283 LOG_DISK_IN_USE: 155042605 DATA_DISK_IN_USE: 211812352 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:48:36.308843 *************************** 3. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1001 TENANT_ID: 1002 ZONE: zone1 MAX_CPU: 1 MIN_CPU: 1 MEMORY_SIZE: 5798205850 MAX_IOPS: 10000 MIN_IOPS: 10000 IOPS_WEIGHT: 1 LOG_DISK_SIZE: 17394617549 LOG_DISK_IN_USE: 154632504 DATA_DISK_IN_USE: 121634816 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:48:36.308843 *************************** 4. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1002 TENANT_ID: 1005 ZONE: zone1 MAX_CPU: NULL MIN_CPU: NULL MEMORY_SIZE: 644245094 MAX_IOPS: NULL MIN_IOPS: NULL IOPS_WEIGHT: NULL LOG_DISK_SIZE: 1932735283 LOG_DISK_IN_USE: 152132563 DATA_DISK_IN_USE: 211812352 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:51:56.627867 *************************** 5. row *************************** SVR_IP: xx.xx.xx.xx SVR_PORT: 2882 UNIT_ID: 1002 TENANT_ID: 1006 ZONE: zone1 MAX_CPU: 1 MIN_CPU: 1 MEMORY_SIZE: 5798205850 MAX_IOPS: 10000 MIN_IOPS: 10000 IOPS_WEIGHT: 1 LOG_DISK_SIZE: 17394617549 LOG_DISK_IN_USE: 158023991 DATA_DISK_IN_USE: 134217728 STATUS: NORMAL CREATE_TIME: 2022-07-19 13:51:56.627867 5 rows in setFor more information about the
oceanbase.GV$OB_UNITSview, see GV$OB_UNITS.
View the information related to tenants in OCP
Prerequisites
You have full privileges on the cluster and management privileges on its tenants. If you do not have the required privileges, obtain the required privileges. For more information, see the "Edit a user" topic in OCP User Guide of the corresponding version.
Procedure
Log on to the OCP console. The Clusters page automatically appears.
In the Clusters list on the Clusters page, find the target cluster and click its name.
In the left-side navigation pane of the page that appears, click Tenant Management.
On the Tenant Management page, view the following information:
Resource distribution information in the upper part of the Tenant Management page.
The resource distribution information includes the CPU utilization, memory usage, and disk usage of each tenant in percentage, as well as the remaining CPU, memory, and disk resources of the system in percentage.
When you move the pointer over the pie chart, the system displays the resource usage of the tenant.
In the Tenants section, you can view the basic information of all tenants, such as the tenant name, tenant mode, zone priority, and status.
In the Top 5 Tenants section, you can view the performance metrics of the top 5 tenants by workload, such as the TPS, QPS, SQL response time, transaction response time, number of active sessions, number of waits, wait time, capacity_number of tables, and capacity_number of partitions.
You can also view the monitoring information during the last hour, day, or week as needed.
The following table describes the performance monitoring metrics.
Metric Note Source QPS The average number of SQL statements processed per second. v$sysstatTPS The average number of transactions processed per second (transactions/second). v$sysstatSQL response time The SQL response time in the unit of µs. v$sysstatTransaction response time The average time taken by the server to process a transaction, in µs. v$sysstatSessions The number of active sessions and the number of current sessions. GV$OB_PROCESSLISTEvent waiting_count The average number of waiting events per second (events/second). v$system_eventEvent waiting_time The average wait time of each wait event, in μs. v$system_eventCapacity_tables The number of tables. CDB_TABLESCapacity_partitions The number of partitions. CDB_TAB_PARTITIONS