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
After resource pools are merged, they can still be used by tenants, but the Root Service views the merged resource pool as a single resource pool 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 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 range of the pool1 resource pool is z1, z2, and z3, and the configuration of the resource pool is uc0. However, the physical machine specifications in the z1, z2, and z3 zones may differ greatly. If the same resource configuration uc0 is used in these three zones, the resources of physical machines in each zone cannot be fully utilized. Therefore, the resource pool can be split into multiple single-zone resource pools, and different resource configurations can be configured for each single-zone resource pool.
The SQL syntax 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 unit specifications 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 resource pools that are split remain unchanged. You can modify the configurations of the resource pools according to the resource usage in each zone.