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 resource units 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 resource units 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.
Example Background
Assume the current tenant has a resource pool named pool0. Its current usage zone is z1, and its corresponding resource unit is uc0. Another resource pool named pool1 has its current usage zone z2, also using resource unit uc0. A third resource pool named pool2 has its current usage zone z3, also using resource unit uc0.
Since resource pools pool0, pool1, and pool2 all use the same resource unit, they can be merged into one resource pool to reduce the management and operational costs associated with multiple resource pools.
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 its corresponding resource unit is uc0. However, the physical server specifications in the three zones may differ greatly. If the same resource configuration 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 unit configurations of the new resource pools are the same as the original unit configuration of the resource pool. You can adjust the unit configurations of the new resource pools based on the resource usage in each zone.
