GBase 8a 资源管理相关命令和系统视图
1.Consumer Group
create consumer group [vc_name.]<group_name> [comment='comment'];
drop consumer group [vc_name.]<group_name>;
alter consumer group [vc_name.]<group_name> rename [to] <new_name>;
alter consumer group [vc_name.]<group_name> comment='comment';
成员管理
alter consumer group [vc_name.]<group_name> add user <user_name>;
alter consumer group [vc_name.]<group_name> remove user <user_name>;
2.Resource Pool(静态下管理动态)
create resource pool [vc_name.]<resource_pool_name> (pool_attribute=value [, ...]) type {static|dynamic} [base on <parent_pool_name>];
drop resource pool [vc_name.]<resource_pool_name>;
pool_attribute is:
[ priority={1|2|3|4|5|6|7|8 } ]
< cpu_percent=integer >
< max_memory=integer >
< max_temp_diskspace=integer >
< max_disk_space=integer >
< max_disk_writeio=integer >
< max_disk_readio=integer >
[ max_activetask=integer ]
[ task_max_parallel_degree=integer ]
[ task_waiting_timeout=integer ]
[ task_running_timeout=integer ]
alter resource pool [vc_name.]<resource_pool_name> rename [to] <new_resource_pool_name>;
alter resource pool [vc_name.]<resource_pool_name> SET (pool_attribute=value[, ...]);
3.Resource Plan
create resource plan [vc_name.]<plan_name> [comment='comment'];
drop resource plan [vc_name.]<plan_name>;
alter resource plan [vc_name.]<plan_name> rename [to] <new_name>;
alter resource plan [vc_name.]<plan_name> comment='comment';
4.Resource Directive
create resource directive [vc_name.]<directive_name> (
plan_name='plan_name',
group_name='group_name',
pool_name='resource_pool_name',
[comment='comment'] );
drop resource directive [vc_name.]<directive_name>;
5.启动/关闭资源管理
active resource plan <resource_plan_name> on vc <vc_name>;
deactive resource plan on vc <vc_name>;
相关信息查询
consumer group 与 user 关联定义
select * from gbase.consumer_group_user;
resource pool 定义
select * from gbase.resource_pool;
resource plan 定义
select * from gbase.resource_plan;
resource directive 定义
select * from gbase.resource_plan_directive;
active plan 设置
select * from gbase.resource_config;
动态资源池中任务
select * from information_schema.PROCESSLIST where resource_pool_name='pool_name' and vc='vc_name';
Resource Pool 的资源使用情况
show resource pool usage on {coordinators | nodes} where resource_pool_name='pool_name' and vc_name='xxxx';
动态资源池任务运行的资源使用历史信息
show resource pool status on {coordinators | nodes} where resource_pool_name='pool_name' and vc_name='xxxx';
动态资源池资源管控事件
show resource pool events where resource_pool_name='pool_name' and vc_name='xxxx';
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25051
- 42023-09-25浏览数:18521
- 52020-05-11浏览数:17526