You can merge multiple resource pools or split a resource pool as needed.
Merge resource pools
For ease of management, you can merge multiple resource pools with the same resource configurations under a tenant into one resource pool.
Limitations
When you merge resource pools, take note of the following limitations:
The
unit_numsettings of the resource pools to be merged must be the same.The resource configurations of the resource pools to be merged must be the same.
Sample procedure
Log on to the
systenant of the cluster as therootuser.Execute the following statement to merge the resource pools.
The syntax is as follows:
ALTER RESOURCE POOL MERGE ('pool_name'[, 'pool_name' ...]) INTO ('merge_pool_name')Here,
pool_namespecifies the names of multiple resource pools to be merged.merge_pool_namespecifies the name of the new resource pool after the merge.Note
The resource pools can still be used by the tenant when they are being merged. They are merged into one resource pool only from the perspective of the management layer in which the RootService is located, to facilitate unified maintenance.
Here is an example:
obclient>ALTER RESOURCE POOL MERGE ('pool0','pool1','pool2') INTO ('pool3');
Split a resource pool
To fully utilize resources in daily scenarios, you can split a multi-zone resource pool of a tenant into multiple single-zone resource pools and reconfigure the resources for each zone.
Limitations
Only the sys tenant can split a resource pool.
Background information
In daily scenarios, you can execute the following statement to create a resource pool:
obclient>CREATE RESOURCE POOL pool1 UNIT='uc0', UNIT_NUM=1, ZONE_LIST=('z1','z2','z3');
Resource pool pool1 is applied to zones z1, z2, and z3 that use the same unit config uc0. However, the available resources of the physical servers in zones z1, z2, and z3 may vary greatly. Therefore, if the three zones use the same unit config uc0, resources of physical servers in each zone cannot be fully utilized. In this case, you can split a multi-zone resource pool into multiple single-zone resource pools and configure resources for each single-zone resource pool.
The syntax is as follows:
ALTER RESOURCE POOL pool_name SPLIT INTO ('pool_name' [, 'pool_name' ...]) ON ('zone' [, 'zone' ...])
Sample procedure
Log on to the
systenant of the cluster as therootuser.Split the resource pool
pool1intopool10,pool11, andpool12, and specify new resource unit 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 resource pool is split into multiple resource pools, the new resource pools still use the original resource specification by default. You can adjust the resource configurations of the new resource pools based on the resource usage in each zone.