Mode configuration rules

2025-11-28 05:58:27  Updated

This topic describes the rules for OceanBase Deployer (obd) to automatically generate configurations when you deploy an OceanBase cluster on the GUI.

CPU

You can obtain the CPU resource metrics by running the following command:

grep -e 'processor\s*:' /proc/cpuinfo | wc -l

The value of the cpu_count parameter is fixed at 16 in Minimum Required mode, and is equal to max(16, number of CPU cores - 2) in Maximum Utilization mode.

Memory

You can obtain the memory resource metrics by running the following command:

# Total memory
grep MemTotal /proc/meminfo
# Available memory
grep MemAvailable /proc/meminfo

Specify the following memory parameters based on the corresponding rules.

memory_limit

  • In Minimum Required mode, the value is fixed at 6G.

  • In Maximum Utilization mode, the value of the memory_limit parameter is equal to max(6G, available memory × 0.9). If the available disk space is insufficient, the value will be automatically adjusted. The minimum value is 6G.

system_memory

  • In Minimum Required mode, the value is fixed at 1G.

  • In Maximum Utilization mode, the value of this parameter varies with that of the memory_limit parameter based on the rules described in the following table.

    memory_limit [6G, 8G) [8G, 16G) [16G, 32G) [32G, 48G) [48G, 64G] (64G, +∞)
    system_memory 2G 3G 5G 7G 10G 1

Disk

You can obtain the total disk size, occupied disk size, and available disk size by running the following command:

df --output=size,avail,target

The following table describes the rules for specifying disk parameters.

Parameter Minimum Required mode Maximum Utilization mode
datafile_size The value is fixed at 2G. The value varies with the value of the memory_limit parameter based on this rule: datafile_size = memory_limit × 3.
log_disk_size The value is fixed at 13G. The value varies with the value of the memory_limit parameter based on this rule: log_disk_size = memory_limit × 3.

Note the following:

  • When the disk space is insufficient, the value of the memory_limit parameter is adjusted to ensure storage security.

  • In Maximum Utilization mode, if the disk space is sufficient, the OceanBase cluster keeps occupying the disk space in a secure manner as long as the occupied disk space does not exceed memory_limit × 3.

  • A certain amount of disk space must be reserved on a mounted disk for OBServer logs.

    • If log rotation is disabled, 1 GB is reserved.

    • If log rotation is enabled, the space to be reserved is calculated based on the total number of log files that can be retained.

Contact Us