OceanBase Database is a distributed database management system that requires at least three machines for production environments, while a standalone version is available for learning purposes. Although deploying OceanBase is similar in many ways to traditional databases, there are several best practices for configuring hardware and software on the operating system. Following these recommendations is essential for achieving stable, high-performance operation with OceanBase Database.
Software resources
The following table lists the installation packages suitable for different operating system versions:
| Operating system | Installation package |
|---|---|
| Alibaba Cloud Linux 2, CentOS 7, Red Hat 7, Ubuntu 16.X, Debian 9.X | el7 download |
| Alibaba Cloud Linux 3, CentOS 8, Red Hat 8, Debian 10, Anolis OS 8.X | el8 download |
Server configuration requirements
Deploy OceanBase cluster with OceanBase Deployer (obd)
The minimum available configuration requirements for servers are as follows:
| Item | Description |
|---|---|
| Deployment product | OceanBase cluster and obd |
| Server count |
|
| Minimum configuration for test and development |
|
| Minimum configuration for production |
|
| Disk configuration | Use SSD storage, minimum 20 GB.
NoteThe log disk must be at least three times the memory size. The data disk must meet the storage requirements for target data volume. |
| File system | ext4 or xfs. Only xfs is supported when data exceeds 16 TB. |
Deploy OceanBase cluster with OceanBase Cloud Platform (OCP)
The minimum available configuration requirements for servers are as follows:
| Deployment product | Server count | Minimum configuration for test and development | Minimum configuration for production | Disk configuration |
|---|---|---|---|---|
| OCP and MetaDB | 1 server | CPU: 16 cores Memory: 32 GB Disk: 1.5 TB storage NoteThe 16C32G configuration cannot guarantee OCP stability. We recommend it for verification only. |
CPU: 32 cores Memory: 128 GB Disk: 1.5 TB, 10 GbE NIC |
Use SSD storage. |
| OceanBase cluster |
|
|
|
Use SSD storage, minimum 20 GB.
NoteThe log disk must be at least three times the memory size. The data disk must meet the storage requirements for target data volume. |
| (Optional) ODP | Can reuse 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
OCP operating system
OCP can be deployed on the operating systems shown in the following table. You can check your machine's operating system by referring to the instructions below.
| Operating system | Supported version | Server type |
|---|---|---|
| RHEL (and compatible Rocky Linux, CentOS, etc.) | 7.2 or later | x86_64/ARM aarch64 |
| Anolis (and compatible Alibaba Cloud Linux, Kylin V10, Uniontech UOS, China Mobile BC-Linux, Lingmo OS, NFSChina, etc.) | 8.4 or later | x86_64/ARM aarch64 |
| Debian (and compatible Ubuntu, etc.) | 11 or later | x86_64/ARM aarch64 |
| openSUSE | 12SP3 or later | x86_64/ARM aarch64 |
OceanBase Database operating system
OceanBase Database can be installed on the Linux operating systems shown in the following table. You can check your machine's operating system by referring to the instructions below.
| Linux operating system | Version | Server architecture |
|---|---|---|
| AnolisOS | 8.x | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| Alibaba Cloud Linux | 2, 3 | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| CentOS/Red Hat Enterprise Linux | 7.x, 8.x | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| Rocky Linux | 9 | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| KylinOS | V10 | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| Uniontech UOS | V20 | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| NFSChina | 4.0 or later | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| Inspur KOS | 5.8 | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| SUSE/OpenSUSE | 15.X or later | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| Debian | 9.x or later | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
| Ubuntu | 16.X or later | x86_64 (including Hygon), ARM_64 (including Kunpeng, Phytium) |
Note
The operating system must be configured with network and software manager (yum or zypper source).
OceanBase Database requires the operating system kernel to be 4.19 or later. Run
uname -rto view kernel information.
Check the operating system
Run the following command to view operating system information:
cat /etc/os-release
Expected output:
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 operating system information:
cat /etc/redhat-release
Expected output:
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Run the following command to view operating system information:
cat /etc/redhat-release
Expected output:
CentOS Linux release 7.2.1511 (Core)
Run the following command to view operating system information:
cat /etc/os-release
Expected output:
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 operating system information:
cat /etc/os-release
Expected output:
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
Different servers use different methods to modify BIOS settings. For specific operations, see the server operation manual.
BIOS options to disable
Cstate
Pstate
EIST
Power saving
BIOS options to configure
Automatic Power on After Power Loss: Always on
Intel Virtualization Technology: Enable
Hyper-threading: Enable
Hardware prefetcher: Enable
VT-d: Enable
SR-IOV: Enable
Turbo Mode: Enable
Energy performance: Set to maximum performance
Disable transparent huge pages
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 Red Hat operating system RHEL 9 or CentOS, run the following command to manually disable transparent huge pages:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Hardware environment requirements
CPU
If the machines to deploy OceanBase Database use the x86 architecture, the CPU must support AVX.
Run the following command to check whether the CPU supports AVX:
lscpu | grep Flags | grep avx
If the output does not contain avx, the CPU does not support AVX and the machine must be replaced. If the output contains avx, the CPU supports AVX.
Memory
Run the following command to view memory:
free -g
Expected output:
total used free shared buff/cache available
Mem: 174 38 6 0 129 123
Swap: 0 0 0
Ensure that the free value under Mem is sufficient to meet the configuration requirements in Server configuration requirements. 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 configuring two 10 GbE NICs:
For bond mode, name it bond0. The binding mode can be mode1 or mode4. We recommend mode4. For mode4, the switch must be configured with the 802.3ad protocol.