You can merge or split resource pools to manage them.
Merge resource pools
You can merge multiple resource pools with the same configuration into one resource pool for easier management.
Limitations
To merge resource pools, the following conditions must be met:
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 resource pools to be merged must not overlap in zone.
Example
Log in to the
systenant of the cluster as therootuser.Run the following statement to merge resource pools.
The sample statement is as follows:
ALTER RESOURCE POOL MERGE ('pool_name'[, 'pool_name' ...]) INTO ('merge_pool_name')In this statement,
pool_namerepresents the names of multiple resource pools to be merged, andmerge_pool_namerepresents the name of the merged resource pool.Note
When you merge resource pools, the tenant can still use the resources in the merged resource pool. From the perspective of the Root Service, multiple resource pools are merged into one resource pool, making it easier to maintain them.
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. Physical machine specifications can differ substantially among the three zones. To make full use of the resources of each zone, the same resource configuration uc0 cannot be used in all zones. You can split the multi-zone resource pool into single-zone resource pools and configure different resource pool specifications for each zone.
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' ...])
Example
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, you can modify the configurations of the resource pools based on the resource usage of each zone.