GBase 8a
安装配置
文章

GBase 8a 资源管理相关命令和系统视图

发表于2024-09-12 14:35:3035次浏览2个评论

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';

评论

登录后才可以发表评论
用户头像
levvel发表于 6个月前
太赞了!
崔哥发表于 4个月前
世味年来薄似纱,谁令骑马客京华。小楼一夜听春雨,深巷明朝卖杏花。矮纸斜行闲作草,晴窗细乳戏分茶。素衣莫起风尘叹,犹及清明可到家。