You can modify resource units to adjust the size of a resource unit allocated to a tenant for dynamic scale-out or scale-in.
When you increase resources for a tenant, ensure that available resources on OBServer are sufficient. You can query the internal table _all_virtual_server_stat for total resources and allocated resources on an OBServer node and calculate available resources to determine whether resource units can be modified.
The following is the syntax for modifying resource units:
ALTER RESOURCE UNIT unitname
MAX_CPU [=] cpunum,
MAX_MEMORY [=] memsize,
MAX_IOPS [=] iopsnum,
MAX_DISK_SIZE [=] disksize,
MAX_SESSION_NUM [=] sessionnum,
[MIN_CPU [=] cpunum,]
[MIN_MEMORY [=] memsize,]
[MIN_IOPS [=] iopsnum] ;
Example:
obclient> ALTER RESOURCE UNIT unit1 max_cpu 15, max_memory '20G', max_iops 128,max_disk_size '100G', max_session_num 64, MIN_CPU=10, MIN_MEMORY='10G', MIN_IOPS=128;