OceanBase Database is a distributed cluster product that requires at least three servers in the production environment. In a learning environment, you can deploy a standalone instance. The deployment of OceanBase Database has much in common with the deployment of conventional databases. Best practices are provided for the hardware and software settings of the operating system, which are the basis for OceanBase Database to achieve high performance and run stably.
Software resources
The following table lists the installation packages that are suitable for different operating system versions.
Operating system |
Download link |
|---|---|
| Alibaba Cloud Linux 2, CentOS 7, RedHat 7, Ubuntu 16.X, and Debian 9.X | Download link for el7 |
| Alibaba Cloud Linux 3, CentOS 8, RedHat 8, Debian 10, and Anolis OS 8.X | Download link for el8 |
Server configuration requirements
Deploy an OceanBase cluster by using obd
The following table lists the minimum available configurations that servers must meet.
Item |
Description |
|---|---|
| Deployed products | OceanBase cluster and obd |
| Number of servers |
|
| Minimum configurations for test and development |
|
| Minimum configurations for the production environment |
|
| Disk configuration | SSD storage is used, with at least 20 GB required.
NoteThe log disk must be at least three times the memory size, and the data disk must meet the storage requirements of the target data volume. |
| File system | ext4 or xfs. When the data size exceeds 16 TB, only the xfs file system is supported. |
Deploy an OceanBase cluster by using OCP
The following table lists the minimum available configurations that servers must meet.
Deployed product |
Number of servers |
Minimum configurations for test and development |
Minimum configurations for the production environment |
Disk configuration |
|---|---|---|---|---|
| OCP and MetaDB | 1 server | CPU: 16 cores Memory: 32 GB Disk: 1.5 TB storage NoteThe configuration of 16 cores and 32 GB of memory cannot guarantee the stability of OCP. It is recommended for verification purposes only. |
CPU: 32 cores Memory: 128 GB Disk: 1.5 TB, 10 Gigabit NIC |
SSD storage is used. |
| OceanBase cluster |
|
|
|
SSD storage is used, with at least 20 GB required.
NoteThe log disk must be at least three times the memory size, and the data disk must meet the storage requirements of the target data volume. |
| (Optional) ODP | Can reuse the OBServer node servers | 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 systems for OCP
OCP can be deployed in the operating systems listed in the following table. You can check the operating system of your machine by referring to the following content.
Operating system |
Supported version |
Server type |
|---|---|---|
| RHEL (and compatible operating systems such as RockyLinux and CentOS) | 7.2 or later | x86_64/ARM aarch64 |
| Anolis (and compatible operating systems such as Alibaba Cloud Linux, KylinOS V10, UOS, China Mobile BC-Linux, Linx OS, and NFSChina) | 8.4 or later | x86_64/ARM aarch64 |
| Debian (and compatible operating systems such as Ubuntu) | 11 or later | x86_64/ARM aarch64 |
| openSUSE | 12SP3 or later | x86_64/ARM aarch64 |
Operating systems for OceanBase Database
OceanBase Database can be installed in the Linux operating systems listed in the following table. You can check the operating system of your machine by referring to the following content.
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 or 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 or later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Debian | 9.x or later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
| Ubuntu | 16.X or later | x86_64 (including Hygon), ARM_64 (including Kunpeng and Phytium) |
Note
The operating system must be configured with the network and a software manager (yum or zypper source).
OceanBase Database requires an operating system kernel version 4.19 or later. You can run the
uname -rcommand to view the kernel information.
View 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/"
Server BIOS settings
Note
The way to modify the BIOS varies with different servers. For specific operations, see the server operation manual.
Disable the following options in the BIOS
Cstate
Pstate
EIST
Power saving
Configure the following options in the BIOS
Automatic Power on After Power Loss: Always on
Intel Virtualization Technology: enabled in virtualization scenarios and disabled in non-virtualization scenarios
Hyper-threading: enabled
Hardware prefetcher: disabled
VT-d: enabled in virtualization scenarios and disabled in non-virtualization scenarios
SR-IOV: enabled in virtualization scenarios and disabled in non-virtualization scenarios
SMMU / IOMMU (IOMMU for AMD architecture and SMMU for ARM architecture): enabled in virtualization scenarios and disabled in non-virtualization scenarios
Turbo Mode: disabled
Energy performance: enable maximum performance
Disable transparent huge pages
Note
If the machine is restarted, to make the configuration persistent, we recommend that you add the following command to the rc.local or systemd configuration.
For Red Hat operating systems earlier than RHEL 9, run the following command to manually disable transparent huge pages:
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
For the Red Hat operating system RHEL 9 or the CentOS operating system, run the following command to manually disable transparent huge pages:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Hardware environment requirements
CPU
If the machine where OceanBase Database is to be deployed uses the x86 architecture, the CPU of the machine must support AVX.
Run the following command to check whether the CPU supports AVX:
lscpu | grep Flags | grep avx
If the query result does not contain the avx field, the CPU of the current machine does not support AVX, and you need to replace the machine. If the query result contains the avx field, the CPU of the current machine supports AVX.
Memory
Run the following command to view 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 Mem value of free meets the configuration requirements described in the preceding Server configuration requirements section. If not, clear the cache or replace the server.
You can run the following command to clear the cache:
sudo sysctl -w vm.drop_caches=3
#Or
sudo echo 3 > /proc/sys/vm/drop_caches
NIC settings
We recommend that you configure two 10 Gigabit NICs:
Name the bond mode bond0, and select mode1 or mode4 as the bonding mode. mode4 is recommended. For the mode4 mode, the switch must be configured with the 802.3ad protocol.
