首批通过分布式安全可靠测评,为关键业务系统打造
小规格租户资源池 (1C2G) 创建失败
更新时间:2026-06-10 01:56
适用版本
OceanBase 数据库所有版本。
问题现象
小规格资源池(1C2G)创建失败,具体如下。
创建 1C2G 的资源单元。
obclient [oceanbase]> create resource unit mqt max_cpu 1,min_cpu 1,max_memory '2G',min_memory '2G',MAX_IOPS 128, MIN_IOPS 128, MAX_DISK_SIZE 536870912, MAX_SESSION_NUM 64; Query OK, 0 rows affected (0.00 sec)创建 1C2G 的资源池报错。
obclient [oceanbase]> create resource pool p1 unit 'mqt',unit_num 1,zone_list('zone1','zone2','zone3');返回结果如下:
ERROR 1235 (0A000): unit min memory less than __min_full_resource_pool_memory not supported
问题原因
OceanBase 创建资源池默认只允许大于 5G(包括 5G)内存规格。
可以查看隐藏参数 __min_full_resource_pool_memory 参数值是 5G,所以创建资源池失败,具体语句如下:
obclient [oceanbase]> select * from __all_virtual_sys_parameter_stat where name='__min_full_resource_pool_memory';
返回结果如下。
+-------+----------+-------------+----------+---------------------------------+-----------+------------+--------------+-------------------------------------------------------------------+-------------+--------------+---------------+---------+---------+-------------------+
| zone | svr_type | svr_ip | svr_port | name | data_type | value | value_strict | info | need_reboot | section | visible_level | scope | source | edit_level |
+-------+----------+-------------+----------+---------------------------------+-----------+------------+--------------+-------------------------------------------------------------------+-------------+--------------+---------------+---------+---------+-------------------+
| zone1 | observer | xx.xx.xx.xx | 2882 | __min_full_resource_pool_memory | NULL | 5368709120 | NULL | the min memory value which is specified for a full resource pool. | NULL | LOAD_BALANCE | NULL | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone3 | observer | xx.xx.xx.xx | 2882 | __min_full_resource_pool_memory | NULL | 5368709120 | NULL | the min memory value which is specified for a full resource pool. | NULL | LOAD_BALANCE | NULL | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone2 | observer | xx.xx.xx.xx | 2882 | __min_full_resource_pool_memory | NULL | 5368709120 | NULL | the min memory value which is specified for a full resource pool. | NULL | LOAD_BALANCE | NULL | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+-------+----------+-------------+----------+---------------------------------+-----------+------------+--------------+-------------------------------------------------------------------+-------------+--------------+---------------+---------+---------+-------------------+
3 rows in set (0.03 sec)
解决方法
将 OceanBase 集群隐藏参数 __min_full_resource_pool_memory 修改成 1G。
具体操作如下。
修改隐藏参数
__min_full_resource_pool_memory为 1G。obclient [oceanbase]> alter system set __min_full_resource_pool_memory=1073741824; Query OK, 0 rows affected (0.03 sec)查询内部表
__all_virtual_sys_parameter_stat中 value 是否为 1G。obclient [oceanbase]> select * from __all_virtual_sys_parameter_stat where name='__min_full_resource_pool_memory';返回结果如下。
+-------+----------+-------------+----------+---------------------------------+-----------+------------+--------------+-------------------------------------------------------------------+-------------+--------------+---------------+---------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | value_strict | info | need_reboot | section | visible_level | scope | source | edit_level | +-------+----------+-------------+----------+---------------------------------+-----------+------------+--------------+-------------------------------------------------------------------+-------------+--------------+---------------+---------+---------+-------------------+ | zone1 | observer | xx.xx.xx.xx | 2882 | __min_full_resource_pool_memory | NULL | 1073741824 | NULL | the min memory value which is specified for a full resource pool. | NULL | LOAD_BALANCE | NULL | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone3 | observer | xx.xx.xx.xx | 2882 | __min_full_resource_pool_memory | NULL | 1073741824 | NULL | the min memory value which is specified for a full resource pool. | NULL | LOAD_BALANCE | NULL | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone2 | observer | xx.xx.xx.xx | 2882 | __min_full_resource_pool_memory | NULL | 1073741824 | NULL | the min memory value which is specified for a full resource pool. | NULL | LOAD_BALANCE | NULL | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+-------------+----------+---------------------------------+-----------+------------+--------------+-------------------------------------------------------------------+-------------+--------------+---------------+---------+---------+-------------------+ 3 rows in set (0.02 sec)修改完成之后,1C2G 小规格资源池创建成功。
obclient [oceanbase]> create resource pool p1 unit 'mqt',unit_num 1,zone_list('zone1','zone2','zone3'); Query OK, 0 rows affected (0.01 sec)