This topic describes how to create a OceanBase cluster to be managed by OceanBase Cloud Platform (OCP).
Applicability
OceanBase Cloud Platform (OCP) Community Edition supports creating only a primary cluster.
Background information
- A cluster deployed on multiple hosts in a single zone can be scaled up only in terms of computing capabilities. The cluster does not support high availability and applies only to a development or test environment.
- A cluster with an even number of zones cannot meet the high availability requirements and has data security risks. We recommend that you adjust the configurations to ensure an odd number of zones or enable the arbitration service for the cluster or tenant.
Prerequisites
You have logged in to the OceanBase Cloud Platform (OCP) console and been assigned the ADMIN or ORG_ADMIN role.
(Optional) An OBProxy cluster exists in OCP. This is required if you want to create a multi-replica OceanBase cluster. For more information about how to create an OBProxy cluster, see the following topics:
Procedure
Log on to the OCP console, click
Clusters in the left-side navigation pane to go to theClusters page. Find the entry to cluster creation based on the actual business scenario.If you do not have a manageable cluster, the system displays a message on the
Clusters tab, prompting you to create one. ClickCreate Cluster in the message.If you already have a manageable cluster, go to the
Clusters tab and then clickCreate Cluster in the upper-right corner.
In the
Create Cluster dialog box, selectDistributed Cluster .Set the basic information of the cluster.
The following table describes the parameters in the
Basic Settings section when you selectPrimary Cluster forCluster Type .Parameter Description Cluster Type Select Primary Cluster .Cluster Name The name of the cluster to be created. The cluster name must be 2 to 48 characters in length and can contain uppercase and lowercase letters, digits, and underscores (_). The cluster name must start with letters. root@sys Password This password can be customized or randomly generated. The password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are:
~!@#%^&*_-+=|(){}[]:;,.?/
OceanBase Database Version You can select an OceanBase Database version from the drop-down list or click Add Version at the bottom of the list to upload an OceanBase Database version. Associate OBProxy Cluster You can associate the cluster with an OBProxy cluster. If you want to create a multi-replica OceanBase cluster, we recommend that you enable this option and select an existing OBProxy cluster to associate with the OceanBase cluster. After the association, the SQL requests of your business will be accurately forwarded to a replica. This ensures good experience that can rival access to a standalone database when you access an OceanBase database.
1. By default, the proxyro user is used for association. You do not need to enter a username or password.
2. Select the OBProxy cluster for association from the drop-down list. If no OBProxy cluster is available in the drop-down list, create an OBProxy cluster. For more information, see the Prerequisites section of this topic.
The limitations on the OBProxy cluster to be associated are as follows:- You can select only a non-empty OBProxy cluster on the same network as the OceanBase cluster.
- If the version of the OceanBase cluster is V4.0 or later, you can select only an OBProxy cluster of V4.0.0 or later.

Set the deployment mode of the cluster.
By default, three zones are added for a cluster. To deploy more than three zones for the cluster, click
Add . To deploy less than three zones for the cluster, click theDelete icon after the zone to be deleted.
The following table describes the settings for each zone.
Parameter Description Zone Name You can retain the default name or define a custom name. A zone name must consist of 2 to 48 characters, including uppercase and lowercase letters, digits, and underscores (_), and start with a letter. In an OceanBase cluster that consists of multiple zones, the cluster must have a zone that shares the same region as that of the primary zone. IDC The IDC of the zone. Each zone can be deployed in only one IDC. Host Type Optional. If you select a host type, the host list is filtered based on the host type. CPU Architecture If multiple installation packages for different architectures are available for the selected OceanBase Database version, you must specify a host hardware architecture that matches the installation package to use. Notice
- By default, the architecture of the first installation package is used. You can change the architecture. After you change the architecture, you can select a host of the selected architecture from the
Host drop-down list. - You can set different architectures for the zones. However, the deployment mode with a hybrid architecture may have stability and performance issues. Proceed with caution.
Host You can select or add hosts. Root Service Select an IP address as the host for the RootService. If you want to create a multi-replica OceanBase cluster, you must specify this parameter for each zone. Zone Priority Rankings (This parameter is not required when you create a standby cluster)Choose whether to specify priorities for the zones in which the leader and follower replicas of the sys tenant in the cluster are located. - When you specify the priorities, the zone with the top priority is treated as the only primary zone. Perform the following steps to specify zone priorities:
1. Select one or more zones in the left-side list that The left-side list shows all zones available in the cluster.
2. Click the closing angle bracket (>) in the middle. The selected zones are added to theZone Priority Rankings list on the right. The zones that are selected at the same time have the same priority.
3. Repeat the preceding two steps to add zones of a lower priority.
4. You can drag a zone in theZone Priority Rankings list to adjust its priority. The priorities in the list are sorted in descending order. - If you do not specify the priorities, the first zone takes the top priority.
Add Arbitration Service Select whether to add an arbitration service for the cluster. You can select a service from the Services drop-down list or clickCreate Service to create an arbitration service for the cluster. For more information, see Add an arbitration service.Note
You can add an arbitration service only for a primary cluster of OceanBase Database V4.1.0 or later.- By default, the architecture of the first installation package is used. You can change the architecture. After you change the architecture, you can select a host of the selected architecture from the
Enable
CPU Overallocation Settings and configure a CPU overprovisioning quota. You can configure the overprovisioning quota by dragging the slider or specifying a value ranging from 101 to 200 in the textbox. The default value is 120.Loads of different tenants in the system can be alternately processed in a controlled manner. This allows you to improve resource utilization by overprovisioning CPU resources. An OceanBase cluster may be overloaded if the loads for different business scenarios are processed at the same time. This results in CPU contention among threads of different tenants and degrades business performance.
Note
CPU overprovisioning is supported only in OceanBase Database V4.0 and later. You can configure an appropriate overprovisioning quota to make full use of the hardware resources.
Enable
Parameter Settings and specify related cluster parameters.You can adjust the CPU, memory, data disk, and log disk capacities at the cluster level by specifying the following parameters:
cpu_count,memory_limit_percentage,system_memory,data_disk_usage_limit_percentage,datafile_size,clog_disk_usage_limit_percentage, andlog_disk_size. For more information about the parameters, see Overview.- You can click the button in section ① of the following figure to add startup parameters one by one and set their values.
- You can also click
Select Parameter Template as shown in section ② of the following figure and select a parameter template. The system will automatically populate parameters in this section by using the template. If no cluster parameter template is available, you can click Create Cluster Template to create one. For more information, see Manage cluster parameter templates.

The system provides five built-in templates that contain general parameters. You can use a template for cluster configuration. The following table describes the built-in templates.
Template Parameter settings Description Default Parameter Template for HTAP large_query_threshold:600sSuitable for hybrid transactional and analytical processing (HTAP) workloads. You can use it to quickly get insights from campaign operation data, fraud detection, and scenario-specific recommendations.
This template applies to OceanBase Database V4.3.0 and later.Default Parameter Template for OLAP enable_record_trace_log:false
large_query_threshold:0ms
trance_log_slow_query_watermark:7dSuitable for real-time data warehouse analytics.
This template applies to OceanBase Database V4.3.0 and later.Default Parameter Template for COMPLEX_OLTP large_query_threshold:600sSuitable for workloads such as banking and insurance systems. These workloads often involve complex join operations, complex subqueries, batch processing jobs compiled in PL, long-running transactions, and large transactions. Short-running queries are sometimes executed in parallel.
This template applies to OceanBase Database V4.3.0 and later.Default Parameter Template for KV large_query_threshold:0msSuitable for workloads involving a high throughput and are sensitive to latency, such as key-value workloads and wide-column workloads of an HBase database.
This template applies to OceanBase Database V4.3.0 and later.Default Parameter Template for OceanBase Database V2.2.77 clog_sync_time_warn_threshold:1s
enable_merge_by_turn:FALSE
enable_one_phase_commit:FALSE
freeze_trigger_percentage:50
max_kept_major_version_number:1
minor_freeze_times:150
resource_soft_limit:100We recommend that you use this template for a production cluster of OceanBase Database V2.2.77. Enable
Custom Settings and specify custom cluster-level parameters for users (such as the OS user), paths (such as software installation paths, data disk paths, log disk paths), and ports (such as SQL ports and RPC ports).Configure the OS user:
The OS user is used to install, configure, and run the OBServer node, and cannot be edited after being set. You can change the OS user by changing the default value of the
ocp.operation.default.os.userparameter. The modification of the OS user has impact only when you create a distributed cluster, create an OBProxy cluster, and create an arbitration service, and does not affect other parameters of existing clusters.Configure the paths. The following table describes the path parameters.
Parameter Description Software Installation Path - If the OS user is admin, the default software installation path is
/home/admin/oceanbase. You can change the path. - If the OS user is not admin, the default software installation path is
/opt/oceanbase/oceanbase. You can change the path.
Data Disk Path The default value is /data/1. You can change the path.Log Disk Path The default value is /data/log1. You can change the path. In a production environment, we recommend that the size of the log disk be at least three times that of the memory size of the host. To avoid performance issues, we recommend that you do not create the data directory and the log directory on the same disk.Click
Test to check whether the paths can be used. If a path cannot be used, you can perform troubleshooting based on the test results, or use another path.- If the OS user is admin, the default software installation path is
Configure the ports. The following table describes the port parameters.
Parameter Description SQL Port The default value is 2881. You can change the port.RPC Port The default value is 2882. You can change the port.Click
Test to check whether the ports are occupied. If a port is occupied, you must use another port.

After the test succeeds, click
Submit .In the
Confirm Information dialog box, confirm the information and then clickOK .You can view the task progress in
Task Center .