Create a resource pool

2023-10-27 09:57:43  Updated

When you create a tenant, if the current resource pool is occupied by another tenant, you need to create a new resource pool.

Prerequisites

Before you create a resource pool by using an SQL statement, make sure that the resource units to be used have been created. For information about how to create a resource unit, see Create a resource unit.

Create a resource pool

Only the sys tenant can create resource pools. The syntax is as follows:

CREATE RESOURCE POOL poolname
UNIT [=] unitname,
UNIT_NUM [=] unitnum,
ZONE_LIST [=] ('zone' [, 'zone'...]);

The parameters are described as follows:

  • The UNIT_NUM parameter specifies the number of resource units contained in a zone in the cluster. The value must be smaller than or equal to the number of OBServer nodes in the zone.

  • The ZONE_LIST parameter specifies the zones that are allowed to use resources in the resource pool.

Here is an example:

  1. Log on to the sys tenant as the root user.

  2. Create a resource pool named pool1 and specify resource configurations for it.

    obclient> CREATE RESOURCE POOL pool1 UNIT='unit1',UNIT_NUM=1,ZONE_LIST=('zone1','zone2','zone3');
    

More information

After a resource pool is created, you can allocate it to a tenant or modify it based on your business needs. For more information about resource pool management, see Manage resource pools.

Contact Us