You can view all replicas of a tenant and the replica details on the Overview page of the tenant. The Replica Details page displays the distribution information of the replicas in each zone, including the zone name, unit configs, and the number of units. This topic describes how to edit a tenant replica in a zone.
SQL syntax for modifying the number of units in a resource pool
Note
Since OceanBase Database V4.0, the number of units must be the same for all resource pools of a tenant. After a resource pool is allocated to a tenant, you can only increase the value of the UNIT_NUM parameter for all resource pools of the tenant.
ALTER RESOURCE TENANT tenant_name UNIT_NUM [=] unit_num;
SQL syntax for modifying the unit configs
ALTER RESOURCE UNIT unit_name
MAX_CPU [=] cpunum,
[MIN_CPU [=] cpunum,]
MEMORY_SIZE [=] memsize,
[MAX_IOPS [=] iopsnum, MIN_IOPS [=] iopsnum,IOPS_WEIGHT [=]iopsweight,]
[LOG_DISK_SIZE [=] logdisksize];
Examples
Change the number of resource units in the pool3 resource pool to 2.
obclient> ALTER RESOURCE TENANT UNIT_NUM = 2;Change the maximum number of CPUs to 2 and the maximum memory size to 5 GB for resource unit
unit1.obclient> ALTER RESOURCE UNIT unit1 MAX_CPU 2, MEMORY_SIZE '5G';