创建资源池报 CPU resource not enough

1、docker 部署 oceanbase-ce,docker 启动命令:docker run -p 2881:2881 --name obstandalone -d --cpuset-cpus ‘0,1,2,3,4,5’ oceanbase/oceanbase-ce
2、创建资源规格:CREATE RESOURCE UNIT S1_unit_config MEMORY_SIZE = ‘3G’, MAX_CPU = 1, MIN_CPU = 1, LOG_DISK_SIZE = ‘3G’, MAX_IOPS = 10000, MIN_IOPS = 10000, IOPS_WEIGHT=1;
3、创建资源池:CREATE RESOURCE POOL mq_pool_01 UNIT=‘S1_unit_config’, UNIT_NUM=1, ZONE_LIST=(‘zone1’);
【报错】ERROR 4733 (HY000): zone ‘zone1’ resource not enough to hold 1 unit. You can check resource info by views: DBA_OB_UNITS, GV$OB_UNITS, GV$OB_SERVERS.
server ‘“127.0.0.1:2882”’ CPU resource not enough
4、查看oceabase 在docker 下资源使用情况,cpu一直超200%

在sys租户下统计一下当前资源使用情况:
select zone,svr_ip,svr_port,
cpu_capacity,cpu_assigned_max,cpu_capacity-cpu_assigned_max as cpu_free,
round(memory_limit/1024/1024/1024,2) as memory_total_gb,
round((memory_limit-mem_capacity)/1024/1024/1024,2) as system_memory_gb,
round(mem_assigned/1024/1024/1024,2) as mem_assigned_gb,
round((mem_capacity-mem_assigned)/1024/1024/1024,2) as memory_free_gb,
round(log_disk_capacity/1024/1024/1024,2) as log_disk_capacity_gb,
round(log_disk_assigned/1024/1024/1024,2) as log_disk_assigned_gb,
round((log_disk_capacity-log_disk_assigned)/1024/1024/1024,2) as log_disk_free_gb,
round((data_disk_capacity/1024/1024/1024),2) as data_disk_gb,
round((data_disk_in_use/1024/1024/1024),2) as data_disk_used_gb,
round((data_disk_capacity-data_disk_in_use)/1024/1024/1024,2) as data_disk_free_gb
from gv$ob_servers;


环境刚搭建,搭建的部署,在上面,现在的资源使用情况,就这样了;不知道哪里的问题

修改过资源规格后,现在cpu资源下来,在创建资源池的时候,报,内存不足 ERROR 4733 (HY000): zone ‘zone1’ resource not enough to hold 1 unit. You can check resource info by views: DBA_OB_UNITS, GV$OB_UNITS, GV$OB_SERVERS.
server ‘“127.0.0.1:2882”’ MEMORY resource not enough

cpu free/memory_free 都是0了,创建不出来新的resource pool符合预期。

怎样才能将 memory_free 降低呢

是不是集群创建后 资源就不多了

你看一下gv$ob_units 里已经分配出去的5G内存都哪些租户呢

1 个赞

是的


现在cpu 和 memory_free 都有空闲了,还是创建不了pool

上面截图的这个cpu_free和memory_free 是最新值吗?cpu_free=12,memory_free=1G

看创建帖子的时候提到的资源unit规格 cpu需要1(是够用的),memory_size的规格需要3G(内存不足)。

参考这个,https://ask.oceanbase.com/t/topic/35602836,问题可以解决