During the host standardization process, the system will perform checks on the host. This topic describes the checks performed during the host standardization process.
Note
Check the file system type
The file system type supports EXT4 and XFS. When the disk capacity exceeds 16 TB, check whether the file system type is XFS. If not, we recommend that you reconfigure the disk.
Check the kernel parameters
Check whether the kernel parameters meet the requirements:
Kernel parameter |
Default value range |
Description |
|---|---|---|
| net.core.somaxconn | 2048 ≤ value ≤ 16384 | The maximum length of the listening queue for each port. This is a global parameter. |
| net.core.netdev_max_backlog | 500 ≤ value ≤ 10000 | The maximum number of data packets that can be sent to the queue when the rate at which data packets are received by each network interface exceeds the rate at which the kernel processes these packets. |
| net.core.rmem_default | 65536 ≤ value ≤ 16777216 | The default size of the TCP receive window (in bytes). |
| net.core.wmem_default | 65536 ≤ value ≤ 16777216 | The default size of the TCP send window (in bytes). |
| net.core.rmem_max | 8388608 ≤ value ≤ 16777216 | The maximum size of the TCP receive window (in bytes). |
| net.core.wmem_max | 8388608 ≤ value ≤ 16777216 | The maximum size of the TCP send window (in bytes). |
| net.ipv4.conf.default.rp_filter | == 1 | Defines the rules for reverse route verification performed by the network card on received data packets. |
| net.ipv4.conf.default.accept_source_route | ==0 | accept_source_route specifies whether the sender of a data packet can specify the path for sending the data packet and the path for returning the data packet to the sender. br0 disables this feature. |
| net.ipv4.tcp_syncookies | ==1 | When the SYN queue overflows, send syncookies to the other party to prevent SYN flood attacks. |
| net.ipv4.tcp_rmem | The three values 4096, 87380, and 16777216 are min, default, and max, respectively, and are divided into three parts: |
Defines the memory used by sockets for automatic tuning. The first value is the minimum number of bytes allocated to the socket receive buffer; The second value is the default value (which will be overridden by rmem_default), and the buffer can grow to this value when the system load is not high; The third value is the maximum number of bytes for the receive buffer (which will be overridden by rmem_max). |
| net.ipv4.tcp_wmem | The three values 4096, 65536, and 16777216 are divided into three parts: |
Defines the memory used by sockets for automatic tuning. The first value is the minimum number of bytes allocated to the socket send buffer; The second value is the default value (which will be overridden by wmem_default), and the buffer can grow to this value when the system load is not high; The third value is the maximum number of bytes for the send buffer (which will be overridden by wmem_max). |
| net.ipv4.tcp_max_syn_backlog | 1024 ≤ value ≤ 16384 | The maximum number of connection requests that can be saved in the queue before they receive confirmation from the other party. If the server frequently overloads, we recommend that you increase this value. The default value is 1024. |
| net.ipv4.tcp_fin_timeout | 15 ≤ value ≤ 60 | The time (in seconds) that a socket connection remains in the FIN-WAIT-2 state after the local end disconnects. The other party may disconnect the connection, or the connection may remain open indefinitely, or the process may unexpectedly terminate. |
| net.ipv4.tcp_tw_reuse | ==1 | Specifies whether to allow sockets in the TIME-WAIT state (with TIME-WAIT ports) to be used for new TCP connections. |
| net.ipv4.tcp_slow_start_after_idle | ==0 | Specifies whether to enable slow start after TCP is idle. 0 indicates that slow start is disabled. |
| net.ipv4.ip_local_port_range | 3500 ≤ value ≤ 65535 | This parameter specifies the range of local port numbers that can be used. We recommend that you set the value to 3500~65535. |
| net.ipv4.ip_local_reserved_ports | 62881 ≤ value ≤ 63881 | This parameter specifies the port numbers that are reserved and will not be automatically assigned by the system. Check whether ports in the 62881~63881 range are reserved to ensure that the ocp-agent can use these port numbers to provide O&M and monitoring services. |
| vm.swappiness | ==0 | Specifies the relative weight of memory pages to be swapped out. |
| vm.min_free_kbytes | 32768 ≤ value ≤ 2097152 | Specifies the size of the reserved idle page pool. We recommend that you set the value to 2097152. |
| vm.max_map_count | 327680 ≤ value ≤ 1000000 | Specifies the maximum number of memory-mapped areas that a process can use. The default value is 65536. If your application requires more memory-mapped areas, we recommend that you increase this value to 655360. |
| vm.overcommit_memory | ==0 | Specifies the condition for accepting or rejecting large memory requests. The default value is 0. |
| vm.nr_hugepages | ==0 | If the value of the nr_hugepages parameter is 0, HugePages is not enabled. |
| fs.aio-max-nr | ≥ 1048576 | The maximum number of asynchronous I/O operations that can be supported. |
| kernel.numa_balancing | ==0 | Disables automatic NUMA balancing to avoid performance jitter caused by memory node data migration. |
| vm.zone_reclaim_mode | ==0 | Disables the memory zone reclaim mode. This way, memory can be reclaimed from other zones or NUMA nodes, avoiding performance jitter caused by memory reclaim. |
| fs.file-max | ≥ 6573688 | The maximum number of files that can be opened in the entire system. This is a system-level limit. We recommend that you set the value to a value greater than the default value to avoid restrictions. |
| fs.pipe-user-pages-soft | == 0 | The soft limit on the total size (in pages) of all pipes created or set by a non-privileged user (a user without the CAP_SYS_RESOURCE or CAP_SYS_ADMIN capability). We recommend that you set this parameter to 0 to disable the soft limit. |
Manual modification method: Take the net.core.somaxconn parameter as an example. You can write net.core.somaxconn = 128 to the custom configuration file /etc/sysctl.d/oceanbase.conf by using the echo command. To delete the parameter, delete the corresponding line from the file.
Check services
Check the crond, sshd, and firewalld services. Specifically, ensure that crond and sshd are enabled, and firewalld is disabled.
Service |
Description |
|---|---|
| crond | Recommended to be enabled. It is mainly used for setting up scheduled tasks and provides related O&M capabilities. |
| sshd | Recommended to be enabled. It is mainly used for encrypted login or data transmission and provides basic O&M capabilities. |
| firewalld | Recommended to be disabled, or add allow rules for each service in the OceanBase cluster to avoid firewall interception. |
Manual modification method:
- To enable a service:
systemctl enable {serviceName} && systemctl start {serviceName} - To disable a service:
systemctl stop {serviceName} && systemctl disable {serviceName}
Check Transparent Huge Pages (THP)
Check whether THP is disabled to ensure system performance stability.
Manual modification method: Set THP to never by running the command echo never > /sys/kernel/mm/transparent_hugepage/enabled. Additionally, to ensure the configuration persists after a reboot, add this command to the rc.local or systemd configuration.
Check Python version
OceanBase-related scripts depend on Python 2.7.x. Ensure that the Python version is compatible to guarantee the normal operation of the scripts.
Manual modification method: Install Python 2.7 using the package manager and verify that the version returned by the python -V command is 2.7.
Check if Swap is enabled
Check whether the Swap partition is enabled on the deployment machine. It is recommended to disable the Swap partition to avoid performance fluctuations.
Manual modification method: Execute swapoff/swapon -a and remove any Swap-related entries from /etc/fstab for persistence.
Check if the required commands exist
Ensure that the necessary toolkits for the operation and maintenance of OceanBase and OCP are available.
RPM package |
Corresponding command |
Description |
|---|---|---|
| net-tools | netstat, arp, ether-wake, ifconfig, ipmaddr, iptunnel, mii-diag, mii-tool, nameif, plipconfig, route, slattach |
Check if the network-related command package is installed. These commands are essential for O&M and are recommended for installation. |
| mtr | mtr |
A network testing tool essential for O&M. Recommended for installation. |
| tar | tar |
A Linux packaging tool essential for O&M. Recommended for installation. |
| binutils | addr2line, ar, as, c++filt, dwp, elfedit, gprof, ld, ld.bfd, ld.gold, nm, objcopy, objdump, ranlib, readelf, size, strings, strip |
A Linux binary toolset essential for O&M. Recommended for installation. |
| bind-utils | delv, dig, host, mdig, nslookup, nsupdate |
A Linux DNS toolset. Recommended for installation. |
| curl | curl |
A command-line text transfer tool essential for O&M. Recommended for installation. |
| nc | nc |
A netcat network tool essential for O&M. Recommended for installation. |
| iproute | arpd, bridge, cbq, ctstat, devlink, genl, ifcfg, ifstat, ip, lnstat, nstat, rdma, routef, routel, rtacct, rtmon, rtpr, rtstat, ss, tc |
A network management toolkit essential for O&M. Recommended for installation. |
Manual modification method: Ensure that the network is functioning properly and the relevant software repositories are configured. Then, install the required packages using commands like yum/apt-get/zypper install.
Check if the required shared object (so) files exist
Check whether the following so files exist:
RPM package |
Description |
|---|---|
| libaio | A dependency package for program execution |
| libatomic | A dependency package for program execution |
Manual modification method: Ensure that the network is functioning properly and the relevant software repositories are configured. Then, install the required packages using commands like yum/apt-get/zypper install.
Check if the admin user exists
Check whether the admin user is used to run OCP or OceanBase services.
Manual repair method: Use the useradd and groupadd commands to create an admin user with uid=500 and gid=500.
Check if SELinux is enabled
Check whether SELinux is enabled. SELinux uses Mandatory Access Control (MAC) to manage permissions for specific programs and resources. It is recommended to disable SELinux.
Manual repair method: Use the /usr/sbin/setenforce command to disable SELinux (set to 0) and modify the configuration in /etc/selinux/config to disabled.
Check the operating system version
Check whether the operating system version meets the following requirements:
Linux Operating System |
Version |
Server Architecture |
|---|---|---|
| Alibaba Cloud Linux | 7.2 and above | x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| Anolis OS | 8.6 and above | x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| KylinOS | V10 | x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| UOS | V20 | x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| NFSChina | 4.0 and above | x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| Inspur KOS | 5.8 | x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| CentOS/Red Hat Enterprise Linux | 7.2 and above
NoticeCentOS 8.X is not supported. |
x86_64 (including Hygon), ARM_64 (Kunpeng, Phytium) |
| SUSE Enterprise Linux | 12SP3 and above | x86_64 (including Hygon), ARM_64 (only Kunpeng and Phytium) |
| Debian | 8.3 and above | x86_64 (including Hygon), ARM_64 (only Kunpeng and Phytium) |
Manual repair method: Update the system version to meet the requirements.
Check ulimit information
ulimit is used to limit the resources consumed by processes started in the shell. The OBServer process involves several limits, including the maximum thread stack size (stack), the maximum number of file handles (open files), and the core file size (core file size). To avoid system limitations affecting the service, it is recommended to set the ulimit parameters to the following required configurations:
root soft nofile 655350
root hard nofile 655350
admin soft nofile 655350
admin hard nofile 655350
admin soft stack 10240
admin hard stack 10240
admin soft nproc 655360
admin hard nproc 655360
admin soft core unlimited
admin hard core unlimited
Manual fix: Create the /etc/security/limits.d/99-oceanbase_limits.conf file and write the above configuration into it, ensuring that this file has the highest priority.
Check clocksource information
Check whether the system configuration item clocksource meets the requirements. The recommended value is tsc. Other values may trigger performance issues.
Manual fix: Execute the echo tsc > /sys/devices/system/clocksource/clocksource0/current_clocksource command to set the clocksource value to tsc.
Check the default MTU value of the network card
Check the default MTU value of the network card. The recommended value is 1500. While excessively large or small MTU values will not affect system operation, they can impact network transmission efficiency and performance.
Manual fix:
Temporary solution
- Using the IP command:
sudo ip link set dev eth0 mtu 1500. - Using the ifconfig command:
sudo ifconfig eth0 mtu 1500.
- Using the IP command:
Permanent solution
For Debian/Ubuntu: Edit the
/etc/network/interfacesfile and add the following content.auto eth0 iface eth0 inet dhcp mtu 1500For CentOS/RHEL: Edit the
/etc/sysconfig/network-scripts/ifcfg-eth0file and add or modify the following content.MTU=1500
Check the NTP/Chrony time synchronization service
Check whether the host is synchronized with the time source. It is recommended to enable the NTP or Chrony service.
Manual fix:
Install the NTP software package. If it is already installed, you can skip this step.
sudo apt update sudo apt install ntp # For Debian/Ubuntu # or sudo yum install ntp # For CentOS/RHELStart the NTP service.
sudo systemctl start ntpSet the NTP service to start automatically at boot.
sudo systemctl enable ntpCheck the status of the NTP service.
sudo systemctl status ntp
