This topic describes the rules for automatically generating configurations when you deploy an OceanBase cluster in the graphical interface.
CPU
You can run the following command to obtain the CPU resource metrics.
grep -e 'processor\s*:' /proc/cpuinfo | wc -l
In the minimum available mode, the value is fixed at 16. In the maximum occupied mode, cpu_count is set to the maximum of 16 and the total number of CPU cores minus 2.
Memory
You can run the following command to obtain the memory resource metrics.
# Total memory
grep MemTotal /proc/meminfo
# Available memory
grep MemAvailable /proc/meminfo
The calculation rules for the memory-related configuration items are as follows.
memory_limit
In the minimum available mode, the value is fixed at 6 GB.
In the maximum occupied mode,
memory_limitis set to the maximum of 6 GB and 90% of the available memory. If the available disk space is insufficient, the value will be adjusted, with a minimum value of 6 GB.
system_memory
In the minimum available mode, the value is fixed at 1 GB.
In the maximum occupied mode, the value is adjusted based on the
memory_limitconfiguration. The corresponding relationships are as follows:memory_limit[6G, 8G)[8G, 16G)[16G, 32G)[32G,48G)[48G, 64G](64G, +∞)system_memory 2G 3G 5G 7G 10G 
Disk
You can run the following command to obtain the total disk size, used disk size, and available disk size.
df --output=size,avail,target
The calculation rules for the disk-related configuration items are as follows:
Configuration Item |
Minimum Available Mode |
Maximum Occupied Mode |
|---|---|---|
| datafile_size | Fixed at 2G | Adjusted based on the memory_limit configuration. The corresponding relationship is: datafile_size = memory_limit*3 |
| log_disk_size | Fixed at 13G | Adjusted based on the memory_limit configuration. The corresponding relationship is: log_disk_size = memory_limit*3 |
Note the following three points:
If the disk space is insufficient, the
memory_limitwill be adjusted to ensure storage safety.In the maximum occupied mode, if the disk space is sufficient, the OceanBase cluster will fill the disk as much as possible while ensuring that the disk usage does not exceed
memory_limit*3.OBServer logs also occupy a certain amount of disk space. Before calculation, the disk space occupied by the mounted logs will be deducted.
If log rotation is not enabled, 1 GB of disk space will be reserved.
If log rotation is enabled, the total disk space occupied by the retained logs will be deducted.
