You can merge or split resource pools to manage them.
Merge resource pools
To facilitate management, you can merge multiple resource pools that have the same configurations into one resource pool.
Limitations
There are limitations on merging resource pools:
The
unit_numof the resource pools to be merged must be equal.The configurations of the resource pools to be merged must be the same.
The zones where the resource pools to be merged do not overlap.
Example
Log in to the
systenant of the cluster as therootuser.Merge the resource pools by executing the following statement:
The sample statement is as follows:
ALTER RESOURCE POOL MERGE ('pool_name'[, 'pool_name' ...]) INTO ('merge_pool_name')In this statement,
pool_nameis the name of the resource pools to be merged, andmerge_pool_nameis the name of the merged resource pool.Note
When you merge resource pools, the tenant can still use the resources in the pools. From the perspective of the Root Service, multiple resource pools are merged into one resource pool. This makes it convenient to perform unified maintenance.
Here is an example:
obclient>ALTER RESOURCE POOL MERGE ('pool0','pool1','pool2') INTO ('pool3');
Split a resource pool
To make full use of resources in daily operations, you can split a multi-zone resource pool into multiple single-zone resource pools and then configure different resource pool specifications for each zone.
Limitations
Only the sys tenant is allowed to split resource pools.
Background information
Generally, resource pools are created as follows in daily scenarios:
obclient>CREATE RESOURCE POOL pool1 UNIT='uc0', UNIT_NUM=1, ZONE_LIST=('z1','z2','z3');
The current usage scope of the pool1 resource pool is z1, z2, and z3, and the configuration of the resource pool is uc0. Physical machine specifications can differ significantly among the zones. To make full use of the resources of each zone, the same resource configuration uc0 cannot be used in multiple zones. Therefore, the resource pool needs to be split into multiple resource pools, and different resource configurations need to be specified for each zone.
The SQL statement for splitting a resource pool is as follows:
ALTER RESOURCE POOL pool_name SPLIT INTO ('pool_name' [, 'pool_name' ...]) ON ('zone' [, 'zone' ...])
Procedure
Log in to the
systenant of the cluster as therootuser.Split the
pool1resource pool into thepool10,pool11, andpool12resource pools and specify different configurations for the new resource pools.obclient>ALTER RESOURCE POOL pool1 SPLIT INTO ('pool10','pool11','pool12') ON ('z1','z2','z3'); ALTER RESOURCE POOL pool10 UNIT='uc1'; ALTER RESOURCE POOL pool11 UNIT='uc2'; ALTER RESOURCE POOL pool12 UNIT='uc3';After the split is completed, the default configurations of the new resource pools are the same as the configuration of the original resource pool. You can modify the configurations of the resource pools based on the resource usage in each zone.
