OceanBase Database is a distributed cluster product. At least three servers are required for a production environment, while a single server is sufficient for a learning environment. Compared with traditional databases, OceanBase Database has many similarities in deployment. However, there are some best practices for operating system, hardware, and software settings. These best practices are the foundation for ensuring the high performance and stability of OceanBase Database.
Overview
The following table lists the installation packages for different operating systems.
Operating system |
Download address |
|---|---|
| Alibaba Cloud Linux 2, CentOS 7, Red Hat 7, Ubuntu 16.X, and Debian 9.X | Download el7 packages |
| Alibaba Cloud Linux 3, CentOS 8, Red Hat 8, Debian 10, and Anolis OS 8.X | Download el8 packages |
Server requirements
Deploy an OceanBase cluster by using obd
The following table describes the minimum available configurations for the server.
Item |
Description |
|---|---|
| Deployed service | OceanBase cluster and obd |
| Number of servers |
|
| Minimum configurations for testing and development |
|
| Minimum configurations for production |
|
| Disk configuration | Use SSDs. At least 20 GB is required.
NoteThe log disk must be at least three times the size of the memory. The data disk must be large enough to store the target data. |
| File system | ext4 or xfs. If the data volume exceeds 16 TB, only xfs is supported. |
Deploy an OceanBase cluster by using OCP
The following table describes the minimum available configurations for the server.
Deployed service |
Number of servers |
Minimum configurations for testing and development |
Minimum configurations for production |
Disk configuration |
|---|---|---|---|---|
| OCP and MetaDB | 1 server | CPU: 16 cores Memory: 32 GB Disk: 1.5 TB storage Note16C32G cannot guarantee the stability of OCP. We recommend that you use this configuration only for verification. |
CPU: 32 cores Memory: 128 GB Disk: 1.5 TB, 10 GbE network card |
Use SSDs. |
| OceanBase cluster |
|
|
|
Use SSDs. At least 20 GB is required.
NoteThe log disk must be at least three times the size of the memory. The data disk must be large enough to store the target data. |
| (Optional) ODP | Reuse the server of the OBServer node | CPU: 4 cores Memory: 8 GB Disk: 200 GB |
CPU: 4 cores Memory: 8 GB Disk: 200 GB |
N/A |
Software environment requirements
Operating system
Operating system for OCP
You can deploy OCP on the operating systems listed in the following table. You can check the operating system of your server by referring to the following instructions.
Operating system |
Supported version |
Server type |
|---|---|---|
| RHEL (RockyLinux, CentOS, and other compatible operating systems) | 7.2 and later | x86_64/ARM aarch64 |
| Anolis (Alibaba Cloud Linux, Kylin V10, UOS, BC-Linux, NeoKylin, and other compatible operating systems) | 8.4 and later | x86_64/ARM aarch64 |
| Debian (Ubuntu and other compatible operating systems) | 11 and later | x86_64/ARM aarch64 |
| openSUSE | 12SP3 and later | x86_64/ARM aarch64 |
Operating system for OceanBase Database
You can install OceanBase Database on the Linux operating systems listed in the following table. You can check the operating system of your server by referring to the following instructions.
Linux operating system |
Version |
Server architecture |
|---|---|---|
| AnolisOS | 8.x | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Alibaba Cloud Linux | 2, 3 | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| CentOS / Red Hat Enterprise Linux | 7.x, 8.x | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Rocky Linux | 9 | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| KylinOS | V10 | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| UOS | V20 | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| NFSChina | 4.0 and later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Inspur kos | 5.8 | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| SUSE / OpenSUSE | 15.X and later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Debian | 9.x and later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Ubuntu | 16.X and later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
Note
The operating system must be configured with a network and a software manager (yum or zypper source).
OceanBase Database requires an operating system with kernel version 4.19 or later. You can run the
uname -rcommand to view the kernel information.
Check the operating system
Run the following command to view the operating system information:
cat /etc/os-release
The returned result is as follows:
NAME="Anolis OS"
VERSION="8.2"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.2"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.2"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
Run the following command to view the operating system information:
cat /etc/redhat-release
The returned result is as follows:
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Run the following command to view the operating system information:
cat /etc/redhat-release
The returned result is as follows:
CentOS Linux release 7.2.1511 (Core)
Run the following command to view the operating system information:
cat /etc/os-release
The returned result is as follows:
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Run the following command to view the operating system information:
cat /etc/os-release
The returned result is as follows:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
BIOS settings
Note
Different servers require different BIOS settings. For more information, see the server operation manual.
Disable the following options in BIOS
Cstate
Pstate
EIST
Power saving
Enable the following options in BIOS
Automatic Power on After Power Loss: Always on
Intel Virtualization Technology: Enabled
Hyper-threading: Enabled
Hardware prefetcher: Enabled
VT-d: Enabled
SR-IOV: Enabled
Turbo Mode: Enabled
Energy performance: Maximum performance
Disable transparent huge pages
Note
If the server is restarted, we recommend that you add the following command to the rc.local or systemd configuration file to ensure that the configuration is persistent.
For RHEL 9 and earlier versions, run the following command to disable transparent huge pages:
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
For RHEL 9 and CentOS, run the following command to disable transparent huge pages:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Hardware requirements
CPU
If the server where you want to deploy OceanBase Database is an x86 server, the CPU must support AVX instructions.
Run the following command to check whether the CPU supports AVX instructions.
lscpu | grep Flags | grep avx
If the avx field is not returned, the CPU does not support AVX instructions. In this case, you need to replace the server. If the avx field is returned, the CPU supports AVX instructions.
Note
Starting from the following versions, OceanBase Database no longer requires AVX instructions to be supported by the CPU:
- V4.3.5 BP4 and later versions of V4.3.5 do not require AVX instructions to be supported by the CPU.
- V4.2.5 BP6 and later versions of V4.2.5 do not require AVX instructions to be supported by the CPU.
- V4.4.1 and later versions of V4.4.x do not require AVX instructions to be supported by the CPU.
Memory
Run the following command to check the memory.
free -g
The returned result is as follows:
total used free shared buff/cache available
Mem: 174 38 6 0 129 123
Swap: 0 0 0
Make sure that the free value of Mem is sufficient to meet the requirements specified in Server configuration requirements. If not, clear the cache or replace the server.
You can run the following commands to clear the cache:
sudo sysctl -w vm.drop_caches=3
# or
sudo echo 3 > /proc/sys/vm/drop_caches
Network card settings
We recommend that you configure two 10-GbE network cards.
Set the bonding mode to bond0 and specify mode1 or mode4 as the bonding mode. We recommend that you use mode4. For the mode4 bonding mode, the switch must be configured with the 802.3ad protocol.
