当 OceanBase 集群部署完成后,整个服务器的 CPU、内存会分配给操作系统和 OceanBase 系统租户,其余的 CPU 和内存资源才是业务租户可以分配的。
业务租户可用资源的大小,可通过连接系统租户,查询 __all_virtual_server_stat
表来获取。
例如:
MySQL [oceanbase]> select zone, sum(cpu_total) - sum(cpu_max_assigned) as 'CPU remaining C', (sum(mem_total) - sum(mem_max_assigned))/1024/1024/1024 as 'Memory remaining G' from __all_virtual_server_stat group by zone;
+--------+-----------------+--------------------+
| zone | CPU remaining C | Memory remaining G |
+--------+-----------------+--------------------+
| eu95_1 | 25 | 35.393653869629 |
| eu95_2 | 25 | 35.108988951892 |
| eu95_3 | 25 | 35.108988951892 |
+--------+-----------------+--------------------+
根据查询结果可知,剩余可用 CPU 为 25C,剩余内存为 35 GB。