Database changed
MySQL [oceanbase]> select zone,cpu_total,cpu_assigned,round(mem_total/1024/1024/1024,2) MEM_TOTAL_GB,round(mem_assigned/1024/1024/1024,2) MEM_ASSIGNED_GB FROM __ALL_VIRTUAL_SERVER_STAT;
±------±----------±-------------±-------------±----------------+
| zone | cpu_total | cpu_assigned | MEM_TOTAL_GB | MEM_ASSIGNED_GB |
±------±----------±-------------±-------------±----------------+
| zone1 | 14 | 2.5 | 16.00 | 4.00 |
±------±----------±-------------±-------------±----------------+
1 row in set (0.003 sec)
MySQL [oceanbase]> CREATE RESOURCE UNIT unit1 MAX_CPU 2, MAX_MEMORY ‘2G’, MAX_IOPS 10000,MAX_DISK_SIZE ‘500G’, MAX_SESSION_NUM 1000, MIN_CPU=2, MIN_MEMORY=‘2G’,MIN_IOPS=1000;
Query OK, 0 rows affected (0.009 sec)
MySQL [oceanbase]> SELECT * FROM oceanbase.__all_unit_config\G;
*************************** 1. row ***************************
gmt_create: 2023-09-27 17:17:13.230572
gmt_modified: 2023-09-27 17:17:13.230572
unit_config_id: 1
name: sys_unit_config
max_cpu: 5
min_cpu: 2.5
max_memory: 5153960755
min_memory: 4294967296
max_iops: 10000
min_iops: 5000
max_disk_size: 53659828224
max_session_num: 9223372036854775807
*************************** 2. row ***************************
gmt_create: 2023-09-27 17:51:53.055953
gmt_modified: 2023-09-27 17:51:53.055953
unit_config_id: 1001
name: unit1
max_cpu: 2
min_cpu: 2
max_memory: 2147483648
min_memory: 2147483648
max_iops: 10000
min_iops: 1000
max_disk_size: 536870912000
max_session_num: 1000
2 rows in set (0.002 sec)
ERROR: No query specified
MySQL [oceanbase]> ALTER RESOURCE UNIT unit1 MAX_CPU 10, MAX_MEMORY ‘16G’, MAX_IOPS 128,max_disk_size ‘100G’, MAX_SESSION_NUM 64, MIN_CPU=10, MIN_MEMORY=‘8G’,MIN_IOPS=128;
Query OK, 0 rows affected (0.002 sec)
MySQL [oceanbase]> CREATE RESOURCE POOL pool1 UNIT=‘unit1’,UNIT_NUM=1,ZONE_LIST=(‘zone1’);
ERROR 4624 (HY000): machine resource ‘zone1’ is not enough to hold a new unit
MySQL [oceanbase]> ALTER RESOURCE UNIT unit1 MAX_CPU 10, MAX_MEMORY ‘8G’, MAX_IOPS 128,max_disk_size ‘100G’, MAX_SESSION_NUM 64, MIN_CPU=10, MIN_MEMORY=‘8G’,MIN_IOPS=128;
Query OK, 0 rows affected (0.002 sec)
MySQL [oceanbase]> CREATE RESOURCE POOL pool1 UNIT=‘unit1’,UNIT_NUM=1,ZONE_LIST=(‘zone1’); ERROR 4624 (HY000): machine resource ‘zone1’ is not enough to hold a new unit
MySQL [oceanbase]>