Purpose
You can use this statement to modify a resource unit.
Syntax
ALTER RESOURCE UNIT unit_name
MEMORY_SIZE [=] 'size_value',
MAX_CPU [=] cpu_num,
[MIN_CPU [=] cpu_num,]
[MAX_IOPS [=] iops_num,]
[MIN_IOPS [=] iops_num,]
[LOG_DISK_SIZE [=] 'size_value'];
Parameters
| Parameter | Description |
|---|---|
| unit_name | The name of the resource unit. |
| MEMORY_SIZE | The memory size for the resource unit. Minimum value: 1G. |
| MAX_CPU | The maximum number of CPU cores for the resource unit. Minimum value: 1C. |
| MIN_CPU | The minimum number of CPU cores for the resource unit. This parameter is optional. By default, the value of the MIN_CPU parameter is equal to that of the MAX_CPU parameter. Minimum value: 1C. |
| MAX_IOPS | The maximum number of input/output operations per second (IOPS). This parameter is optional. Minimum value: 1024. |
| MIN_IOPS | The minimum number of IOPS. This parameter is optional. Minimum value: 1024. |
| LOG_DISK_SIZE | The log disk size for the resource unit. This parameter is optional. The default value is three times the specified memory size. Minimum value: 2G. |
Examples
Change the maximum number of CPU cores to 20 and maximum memory size to 5 GB for resource unit unit1.
obclient> ALTER RESOURCE UNIT unit1 MAX_CPU 20, MEMORY_SIZE '5G';
Query OK, 0 rows affected