You can manage resource pools by merging or splitting them.
Merge resource pools
For easier management, you can merge multiple resource pools with the same resource configuration within a tenant into a single resource pool.
Limitations
There are the following limitations for merging resource pools:
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.
Procedure
Log in to the
systenant of the cluster using therootuser.Execute the following statement to merge the resource pools:
ALTER RESOURCE POOL MERGE ('pool_name'[, 'pool_name' ...]) INTO ('merge_pool_name')where
pool_namespecifies the names of the resource pools to be merged, andmerge_pool_namespecifies the name of the merged resource pool.Note
When resource pools are being merged, it does not affect the usage of the resource pools by tenants. It is only seen as multiple resource pools merged into one resource pool at the management level of the Root Service for easier maintenance.
Here is an example:
obclient>ALTER RESOURCE POOL MERGE ('pool0','pool1','pool2') INTO ('pool3');
Split resource pools
In daily usage, to fully utilize resources, you can split a multi-zone resource pool of a tenant into multiple single-zone resource pools and then configure each zone with its own resource configuration.
Limitations
Only the sys tenant is allowed to split resource pools.
Example
In typical daily usage scenarios, resource pools are usually created as follows:
obclient>CREATE RESOURCE POOL pool1 UNIT='uc0', UNIT_NUM=1, ZONE_LIST=('z1','z2','z3');
The current scope of resource pool pool1 is z1, z2, and z3, and the resource configuration is uc0 for all zones. However, because the physical servers specifications may differ significantly among the zones z1, z2, z3, if the same resource configuration uc0 is used for all three zones, it is not possible to fully utilize the resources of each physical server in each zone. Splitting resource pools allows you to split a multi-zone resource pool into multiple single-zone resource pools and configure each single-zone resource pool with its own resource configuration.
The SQL syntax for splitting resource pools 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 using 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 split, the default resource configurations of the split resource pools remain the same as the original resource specification. You can adjust the resource configurations of the new resource pools based on the resource usage in each zone.