Skip to main content
This topic lists all environment and system configuration items that you must check and set before deploying the database. Setting these configuration items properly allows your cluster to work with high availability and performance.

Ports

The database uses specific ports for different services. Check whether these ports are occupied on each instance if you have deployed other services on these instances.

FE ports

On the instances used for the FE deployment, you need to check the following ports:
  • 8030: FE HTTP server port (http_port)
  • 9020: FE Thrift server port (rpc_port)
  • 9030: FE MySQL server port (query_port)
  • 9010: FE internal communication port (edit_log_port)
  • 6090: FE cloud-native metadata server RPC listen port (cloud_native_meta_port)
Run the following commands on the FE instances to check whether these ports are occupied:
If any of the above ports are occupied, you must find alternatives and specify them later when you deploy FE nodes. For detailed instructions, see Deploy the database - Start the Leader FE node.

BE ports

On the instances used for the BE deployment, you need to check the following ports:
  • 9060: BE Thrift server port (be_port)
  • 8040: BE HTTP server port (be_http_port)
  • 9050: BE heartbeat service port (heartbeat_service_port)
  • 8060: BE bRPC port (brpc_port)
  • 9070: An extra agent service port for BE and CN (starlet_port)
Run the following commands on the BE instances to check whether these ports are occupied:
If any of the above ports are occupied, you must find alternatives and specify them later when you deploy BE nodes. For detailed instructions, see Deploy the database - Start the BE service.

CN ports

On the instances used for the CN deployment, you need to check the following ports:
  • 9060: CN Thrift server port (be_port)
  • 8040: CN HTTP server port (be_http_port)
  • 9050: CN heartbeat service port (heartbeat_service_port)
  • 8060: CN bRPC port (brpc_port)
  • 9070: An extra agent service port for BE and CN (starlet_port)
Run the following commands on the CN instances to check whether these ports are occupied:
If any of the above ports are occupied, you must find alternatives and specify them later when you deploy CN nodes. For detailed instructions, see Deploy the database - Start the CN service.

Hostnames

If you want to enable FQDN access for your cluster, you must assign a hostname to each instance. In the file /etc/hosts on each instance, you must specify the IP addresses and corresponding hostnames of all the other instances in the cluster. Important All IP addresses in the file /etc/hosts must be unique.

JDK configuration

The database runs its Java-based components on a JDK. The Java-based components are:
  • The FE
  • The Java UDF, connector, and Java Extensions features on the BE and CN
Install the JDK version required by your version before deployment, and then point JAVA_HOME to it.

JDK version by version

The minimum and recommended JDK versions depend on your version: Additional notes:
  • For v2.5, v3.0, v3.1, and v3.2, deployments on Ubuntu 22.04 require JDK 11.
  • The FE compile target was raised from Java 11 to Java 17 in v3.5.0, which is why v3.5 and later require JDK 17 or later at runtime.
  • As of v3.5.0, the database no longer ships JVM presets for specific JDK versions; all JDK versions share a single JAVA_OPTS. When upgrading to v3.5 or later from v3.4 or earlier, remove any JAVA_OPTS options in fe.conf that are incompatible with JDK 17 (for example, CMS-related options), and use the default JAVA_OPTS shipped with v3.5 and later.
  • Starting with v4.2, JDK 21 is recommended. The minimum runtime version remains JDK 17 (the FE compile target is Java 17), and JDK 21 is backward-compatible with the JDK 17 runtime target.
  • The minimum and recommended JDK follow the Java LTS calendar. The next change is scheduled for the first minor version released after October 2027, when the minimum JDK becomes JDK 21 and the recommended JDK becomes JDK 25. For details, see JDK Support Policy.
Note The database does not support JRE. You must install a full JDK.

Set JAVA_HOME

The database relies on the environment variable JAVA_HOME to locate the Java dependency on the instance. Run the following command to check the environment variable JAVA_HOME:
Follow these steps to set JAVA_HOME:
  1. Set JAVA_HOME in the file /etc/profile:
  2. Bring the change into effect:
Run the following command to verify the change:

CPU scaling governor

This configuration item is optional. You can skip it if your CPU does not support the scaling governor. The CPU scaling governor controls the CPU power mode. If your CPU supports it, we recommend you set it to performance for better CPU performance:

Memory configurations

Memory Overcommit

Memory Overcommit allows the operating system to overcommit memory resources to processes. We recommend you enable Memory Overcommit.

Transparent Huge Pages

Transparent Huge Pages are enabled by default. We recommend you disable this feature because it can interfere with the memory allocator, and thereby lead to a drop in performance.

Swap Space

We recommend you disable Swap Space. Follow these steps to check and disable Swap Space:
  1. Disable Swap Space.
  2. Delete the Swap Space information from the configuration file /etc/fstab.
  3. Verify that Swap Space is disabled.

Swappiness

We recommend you disable swappiness to eliminate its impact on performance.

Storage configurations

We recommend that you choose your suitable scheduler algorithm in accordance with the storage medium you use. You can run the following command to check the scheduler algorithm that you are using:
We recommend you use the mq-deadline scheduler for SATA disks and the kyber scheduler algorithm for SSD and NVMe disks.

SATA

The mq-deadline scheduler algorithm suits SATA disks.

SSD and NVMe

  • If your NVMe or SSD disks support the kyber scheduler algorithm:
  • If your NVMe or SSD disks support the none (or noop) scheduler.

SELinux

We recommend you disable SELinux.

Firewall

Open the internal ports for FE nodes, BE nodes, and Broker if your firewall is enabled.

LANG variable

Run the following command to check and configure the LANG variable manually:

Time zone

Set this item in accordance with your actual time zone. The following example sets the time zone to /Asia/Shanghai.

ulimit configurations

Problems can occur with the database if the values of max file descriptors and max user processes are abnormally small. We recommend you enlarge these values.

File system configuration

We recommend you use the ext4 or xfs journaling file system. You can run the following command to check the mount type:

Network configuration

tcp_abort_on_overflow

Allow the system to reset new connections if the system is currently overflowed with new connection attempts that the daemon(s) can not handle:

somaxconn

Specify the maximum number of connection requests queued for any listening socket to 1024:

NTP configuration

You must configure time synchronization between nodes within your cluster to ensure linear consistency of transactions. You can either use the internet time service provided by pool.ntp.org, or use the NTP service built in an offline environment. For example, you can use the NTP service provided by your cloud service provider.
  1. Check if the NTP time server or Chrony service exists.
  2. Install the NTP service if there is not one.
  3. Check the NTP service.
  4. Check the connectivity and monitoring status of the NTP service.
  5. Check if your application is synchronized with the NTP server.
  6. Check the state of all the configured NTP servers in your network.

High concurrency configurations

If your cluster has a high load concurrency, we recommend you set the following configurations.

max_map_count

Specify the maximum number of memory map areas a process may have as 262144:

Other