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, making it convenient for 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 several single-zone resource pools and then configure different resource configurations 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 same resource configuration uc0 is used in the three zones. However, the physical server specifications may differ significantly among the three zones. To make full use of the resources in each zone, you can split the multi-zone resource pool into single-zone resource pools and configure different resource configurations 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 configure different resource units 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 configurations of the original resource pool. You can modify the configurations of the resource pools according to the resource usage in each zone.