Note
- This view is available starting with V4.3.0 for V4.3.x.
- This view is available starting with V4.2.1 BP2 for V4.2.1 and V4.2.2 for other V4.2.x versions.
Purpose
The V$OB_CGROUP_CONFIG view is used to quickly query the cgroup configuration of the current OBServer node. The field information of this view comes from the cgroup directory under the installation directory of the OBServer node (for example, /home/admin/oceanbase/cgroup).
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| CFS_QUOTA_US | bigint(20) | NO | The CPU time slice of the thread, in microseconds. The information of this field comes from the cpu.cfs_quota_us file in the path directory. |
| CFS_PERIOD_US | bigint(20) | NO | The control cycle time of the cgroup, in microseconds. This field is used in conjunction with Quota. The information of this field comes from the cpu.cfs_period_us file in the path directory. |
| SHARES | bigint(20) | NO | The CPU usage ratio of the thread (only effective when the CPU is fully loaded). The information of this field comes from the cpu.shares file in the path directory. |
| CGROUP_PATH | varchar(256) | NO | The path of the cgroup directory configured for the OBServer node. |
Sample query
Query the cgroup configuration of the current OBServer node in the user tenant.
obclient(root@mysql001)[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 |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_LQ |
| xx.xx.xx.xx | 30701 | -1 | 100000 | 1024 | /oceanbase/tenant_0001/OBCG_STORAGE_HA_LEVEL2 |
+-------------+----------+--------------+---------------+--------+----------------------------------------------------+
9 rows in set
References
For more information about cgroup configurations, see Configure cgroups.