You can merge or split a resource pool as needed.
Merge resource pools
You can merge multiple resource pools in the same tenant that have the same configurations into one resource pool for easier management.
Limitations
There are some limitations on merging resource pools:
The
unit_numvalues of the resource pools to be merged must be equal.The configurations of the resource pools to be merged must be the same.
The zones that the resource pools to be merged are distributed in must not overlap.
Examples
Log in to the
systenant of the cluster as therootuser.Merge the resource pools into one resource pool by using the following statement:
The statement is as follows:
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 you merge resource pools, the resources in the pools are still available to the tenants. The merging operation only combines multiple resource pools into one resource pool from the perspective of RootService for easier unified maintenance.
Example:
obclient>ALTER RESOURCE POOL MERGE ('pool0','pool1','pool2') INTO ('pool3');
Split a resource pool
In daily use, you can split a multi-zone resource pool into multiple single-zone resource pools, and then configure different resource configurations for each single-zone resource pool to fully utilize the resources in each zone.
Limitations
Only the sys tenant is allowed to split a resource pool.
Background information
In daily use, the following resource pools are usually created:
obclient>CREATE RESOURCE POOL pool1 UNIT='uc0', UNIT_NUM=1, ZONE_LIST=('z1','z2','z3');
The current usage scope of the resource pool pool1 is the z1, z2, and z3 zones, and the resource configuration for each zone is uc0. However, the physical server specifications in the three zones may differ greatly. If the same resource configuration uc0 is used in the three zones, the resources of the physical servers in each zone cannot be fully utilized. You can split the multi-zone resource pool into multiple single-zone resource pools, and then configure different resource configurations for each single-zone resource pool to fully utilize the resources of the physical servers in 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 intopool10,pool11, andpool12, and configure new 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, the default configurations of the new resource pools are the same as the original configurations of the resource pool. You can adjust the configurations of the new resource pools based on the resource usage in each zone.