OceanBase Database is a distributed cluster product. In a production environment, at least three machines are required. For learning purposes, the standalone version can be deployed. The deployment of OceanBase Database shares many similarities with that of traditional databases. However, there are some best practice recommendations for operating system hardware and software configurations, which are fundamental for ensuring high performance and stable operation.
Software resources
The following table lists the installation packages applicable to different operating system versions:
Operating system |
Download the installation package |
|---|---|
| Alibaba Cloud Linux 2、CentOS 7、RedHat 7、Ubuntu 16.X、Debian 9.X | Download el7 |
| Alibaba Cloud Linux 3、CentOS 8、RedHat 8、Debian 10 、Anolis OS 8.X | Download el8 |
Server configuration requirements
Deploy an OceanBase cluster using OBD
The minimum available configuration requirements for the server are listed in the following table.
Project |
Description |
|---|---|
| Deploy the product | OceanBase cluster and OBD |
| Number of Servers |
|
| Minimum configuration for test development |
|
| Minimum configuration for production environment |
|
| Disk Configuration | Use SSD storage, with a minimum of 20 GB.
NoteThe log disk requires more than three times the memory size, and the data disk must be sufficient to store the target data volume. |
| File system | ext4 or xfs. When the data exceeds 16 TB, only xfs is supported. |
Deploy an OceanBase cluster using OCP
The minimum available configuration requirements for the server are listed in the following table.
Deploy the product |
Number of Servers |
Minimum configuration for test development |
Minimum configuration for production environment |
Disk Configuration |
|---|---|---|---|---|
| OCP and MetaDB | 1 | CPU: 16-core Memory: 32 GB Disk: 1.5 TB storage NoteThe 16C32G configuration cannot guarantee the stability of OCP. It is recommended to use it only for verification purposes. |
CPU: 32-core Memory: 128 GB Disk: 1.5 TB, 10 Gbit/s NIC |
Use SSD storage. |
| OceanBase cluster |
|
|
|
Use SSD storage, with a minimum of 20 GB.
NoteThe log disk requires more than three times the memory size, and the data disk must be sufficient to store the target data volume. |
| (Optional) ODP | Reusable OBServer Node Server | CPU: 4-core Memory: 8 GB Disk: 200 GB |
CPU: 4-core Memory: 8 GB Disk: 200 GB |
N/A |
Software environment requirements
Operating system
OCP operating system
OCP can be deployed on the operating systems listed in the following table. You can refer to the description below to check your machine's operating system.
Operating system |
Supported Versions |
Server Type |
|---|---|---|
| RHEL (and compatible distributions such as Rocky Linux and CentOS) | 7.2 and later | x86_64/ARM aarch64 |
| Anolis (and compatible versions of Alibaba Cloud Linux, Kylin V10, Unity Operating System, China Mobile BC-Linux, Neusys OS, and NeoDee OS) | 8.4 and later | x86_64/ARM aarch64 |
| Debian (and compatible Ubuntu derivatives) | 11 and later | x86_64/ARM aarch64 |
| openSUSE | 12 SP3 and later | x86_64/ARM aarch64 |
OceanBase Database operating system
OceanBase Database can be installed on the Linux operating systems listed in the following table. You can refer to the description below to check your machine's operating system.
Linux operating system |
Version |
Server Architecture |
|---|---|---|
| Anolis OS | 8.x | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| Alibaba Cloud Linux | 2、3 | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| CentOS / Red Hat Enterprise Linux | 7.x、8.x | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| Rocky Linux | 9 | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| KylinOS | V10 | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| Unity Operating System | V20 | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| NFSChina | 4.0 and later | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| Inspur KOS | 5.8 | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| SUSE / OpenSUSE | 15.X and later | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| Debian | 9.x and later | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
| Ubuntu | 16.X and later | x86_64 (including HiSilicon), ARM_64 (including Kunpeng and Phytium) |
Note
The operating system must have networking and a software manager (yum or zypper repository) configured.
OceanBase Database requires an operating system version of 4.19 or later. You can run the
uname -rcommand to view kernel information.
View the operating system
Run the following command to view the operating system information:
cat /etc/os-release
The 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 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 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 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 return 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 method for modifying the BIOS varies by server. For specific operations, refer to the server's 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
Note
If the machine restarts, to ensure the configuration persists, it is recommended to add the following command to your rc.local or systemd configuration.
For Red Hat operating systems prior to RHEL 9, run the following command to manually disable transparent huge pages:
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
For Red Hat Enterprise Linux (RHEL) 9 or CentOS, you must run the following command to manually disable transparent large pages:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Hardware requirements
CPU
If the server where OceanBase Database is to be deployed is x86 architecture, the CPU must support AVX.
Run the following command to check if the CPU supports AVX.
lscpu | grep Flags | grep avx
If the query result does not contain the avx field, it means the current machine's CPU does not support AVX, and you need to replace the machine. If the query result contains the avx field, it means the current machine's CPU supports AVX.
Memory
Run the following command to check the memory:
free -g
The return result is as follows:
total used free shared buff/cache available
Mem: 174 38 6 0 129 123
Swap: 0 0 0
Here, you need to ensure that the Mem value of free is sufficient to meet the configuration requirements specified in the Server configuration requirements section above. If it does not meet the requirements, please 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
It is recommended to configure two 10 Gbit/s NICs:
Name the bond mode bond0. You can choose the bonding mode mode1 or mode4, with mode4 being recommended. For mode4, the switch must be configured with the 802.3ad protocol.
