从创建资源消费组到激活资源队列,上图是v95版本的创建流程v86版本的gbase已下列流程为准。
上图是对应关系
1)创建资源消费组
CREATE CONSUMER GROUP xrgroup COMMENT = 'xrgroup';
2)创建用户
CREATE USER xruser;
3)资源消费组新增用户
ALTER CONSUMER GROUP xrgroup ADD USER xruser;
4)创建静态资源池
create resource pool xr_static_pool(
priority=1,
cpu_percent=50,
max_memory=1000,
max_temp_diskspace= 2000,
max_disk_space= 2000,
max_disk_writeio=1000,
max_disk_readio=1000) type static;
5)创建动态资源池
create resource pool xr_dynamic_pool(
priority=1,
cpu_percent=20,
max_memory=1000,
max_temp_diskspace=2000,
max_disk_space=2000,
max_disk_writeio=1000,
max_disk_readio=1000,
max_activetask=20) TYPE dynamic BASE ON xr_static_pool;
6)创建资源计划
CREATE RESOURCE PLAN xrplan COMMENT = 'xrplan';
7)创建资源指令
CREATE RESOURCE DIRECTIVE xr_directive(
PLAN_NAME = 'xrplan',
GROUP_NAME = 'xrgroup',
POOL_NAME = 'xr_dynamic_pool',
COMMENT = 'test');
8)创建default consumer group 必须关联动态资源池
CREATE RESOURCE DIRECTIVE xr_directive_default
(PLAN_NAME = 'xrplan',
GROUP_NAME = 'default_consumer_group',
POOL_NAME='xr_dynamic_pool',
COMMENT = 'test');
9)激活resource plan
SET GLOBAL ACTIVE_RESOURCE_PLAN ='xrplan';
遇到问题激活资源计划时如果有其他的用户,在其他的资源消费组中 必须将其移除。才可以激活
标签:NAME,队列,max,资源,xr,disk,gbase,pool,1000 From: https://www.cnblogs.com/xurui96/p/17085133.html