Overview
The GV$OB_CGROUP_CONFIG view is used to quickly query the cgroup configuration of all OBServer nodes. The view fields are derived from the cgroup directory in the OBServer node's installation directory (for example, /home/admin/oceanbase/cgroup).
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | IP Address of OBServer |
| SVR_PORT | bigint(20) | NO | OBServer Port Number |
| CFS_QUOTA_US | bigint(20) | NO | The CPU time slice of the thread, in microseconds. This field is from the file located in the path directory. cpu.cfs_quota_us |
| CFS_PERIOD_US | bigint(20) | NO | The control cycle time of cgroup, in microseconds. Used together with Quota. This field is obtained from the file under the path directory. cpu.cfs_period_us |
| SHARES | bigint(20) | NO | The CPU usage percentage of the thread (only effective when the CPU is at full load). This field is derived from the file located in the path directory. cpu.shares |
| CGROUP_PATH | varchar(256) | NO | Configure a path in the cgroup directory of the OBServer node. |
Sample query
Query the cgroup configuration of all OBServer nodes in the sys tenant.
obclient(root@sys)[oceanbase]> SELECT * FROM oceanbase.GV$OB_CGROUP_CONFIG;
The query result is as follows:
+-------------+----------+--------------+---------------+--------+----------------------------------------------------+
| SVR_IP | SVR_PORT | CFS_QUOTA_US | CFS_PERIOD_US | SHARES | CGROUP_PATH |
+-------------+----------+--------------+---------------+--------+----------------------------------------------------+
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 3072 | /oceanbase/tenant_0001 |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_MYSQL_LOGIN |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_DETECT_RS |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_ELECTION |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_WR |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_STORAGE |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_CLOG |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_DEFAULT |
+-------------+----------+--------------+---------------+--------+----------------------------------------------------+
9 rows in set
References
For more information about cgroup configuration, see Configure cgroup.