A standalone deployment refers to a database system where OceanBase Database is installed on a single server or computer. All core components, such as the database engine, storage, and transaction processing, run on the same physical or virtual host. This topic describes how to create a standalone deployment.
Background information
OceanBase Database Standalone Edition is designed for small and medium-scale business scenarios. It is highly compatible with MySQL and Oracle protocols, enabling seamless migration of existing applications. Its native multi-tenancy feature allows multiple businesses to share the same standalone instance, achieving on-demand resource isolation while delivering outstanding standalone performance.
Prerequisites
The current user logged in to OCP has the ADMIN or ORG_ADMIN role.
Only standalone instances of version V4.1.0 and later are supported.
Procedure
Step 1: Go to the cluster creation page
After logging in to OCP, click Cluster in the left navigation bar to go to the Cluster overview page. Locate the entry for creating a new cluster based on your actual business scenario.
If you have no manageable clusters, the system will prompt you to create a new cluster on the Clusters tab. Click Create Cluster directly in the prompt.
If you already have manageable clusters, click Create Cluster in the upper-right corner of the Clusters tab.
On the Create Cluster page, select Centralized.
Step 2: Configure basic cluster information
The following is the basic information required when creating a standalone cluster:
Parameter |
Description |
|
|---|---|---|
| Cluster Name | The name of the cluster to be managed. The cluster name must start with a letter and end with a letter or number, can contain letters, numbers, and underscores, and be 2 to 32 characters long. | |
| root@sys password | Supports custom or randomly generated passwords. The password must meet the following complexity requirements:
|
(){}[]:;,.?/. |
| OceanBase Database version | Select an existing OceanBase cluster version from the list. If the required version is missing, you can click Add Version at the bottom of the list to upload it. | |
| Zone Name | You can keep the default value or customize it. The zone name must start with a letter and end with a letter or number, can contain letters, numbers, and underscores, and be 2 to 32 characters long. | |
| Host | Select a host with an architecture consistent with the OceanBase version. Only one host can be selected to serve as both the OBServer and rootserver. If no host is available in the drop-down list, you can perform the Add Host operation. | |
| Load Type | You can select a load type for a cluster. The load type primarily affects the judgment time for SQL queries (parameter: large_query_threshold) and may significantly impact the response time (RT) for OLTP workloads. Therefore, you must choose carefully. OCP supports five cluster load types, which are described as follows.
|
Step 3: Enable Cgroup
Cgroup is primarily used for CPU resource isolation between tenants and within tenants in an OceanBase cluster. You can choose whether to enable Cgroup for the cluster based on your actual business type to achieve stronger CPU/IOPS isolation.
- Enabling Cgroup will result in a performance drop of about 7%. If your business scenario involves single tenants, small specifications (<14C), and requires higher database performance, it is recommended that you disable Cgroup.
- If the host's operating system kernel version is lower than 5.1.0, it is recommended to disable Cgroup for the cluster, as this may cause system performance degradation or instability.
- If the host's operating system kernel version is lower than 4.1.9, the cluster will not be able to create tenants. In this case, Cgroup is disabled by default and the Cgroup switch is not displayed.
Step 4: Configure CPU overprovisioning
When workloads from different business scenarios overlap, an OceanBase cluster may experience overload during operation, leading to thread competition for CPU resources among different tenants and consequently slowing down the actual business scenarios. To ensure that the workloads of different tenants in the system can run in an orderly manner, you can configure CPU overprovisioning when configuring CPU resources to improve resource utilization.
In the CPU Overprovisioning Settings section, you can configure the overprovisioning ratio using the slider or the input box. The default value is 120%, with a range of 101% to 200%.
Note
The CPU overprovisioning feature depends on Cgroup. Before configuring the CPU overprovisioning ratio, please enable Cgroup for the cluster.
Step 5: Configure JVM environment dependency services
By enabling JVM Environment Dependency Services, OBServer can interface with external tables, Java UDFs, ODPS remote access, and other features through the JNI (Java Native Interface) framework.
Notice
- Only OceanBase Database V4.3.5.1 and later support configuring JVM environment dependency services.
- Refer to Deploy the OceanBase Database Java SDK environment. Use the Upload software package feature to upload the service-dependent JAR package library in advance, ensuring OBServer can load and use it properly.
- This service depends on a Java environment. If any machines in the cluster have not yet been configured with a Java environment, please configure it yourself:
- If the host is an x86_64 architecture, ensure OpenJDK is version 15 or later;
- If the host is of another architecture, ensure OpenJDK is version 11 or later.
Configure the service type.
OCP supports five service types: ODPS external table, HDFS external table, Java UDF, ODPS Catalog, and MySQL external table plugins. Different services have different requirements for the OceanBase cluster version. For details, refer to the following table.
Service TypeOceanBase Version RequirementODPS External Table [V4.3.5.1, +∞) HDFS External Table [V4.3.5.1, +∞) Java UDF [V4.3.5.1, +∞) ODPS Catalog [V4.4.0, +∞) MySQL External Table Plugin [V4.4.1, +∞) Note
When configuring the service type, all four service types—ODPS external table, HDFS external table, Java UDF, and ODPS catalog—are enabled by default and cannot be disabled.
Configure JVM memory.
Proper JVM memory configuration directly affects the stability and performance of Java applications. By setting the JVM memory, you can ensure that Java applications meet their basic operational requirements within the OceanBase cluster. The following table provides predefined JVM memory configuration options based on different memory specifications of OBServer nodes:
OBServer Memory Node-Xmx/-Xms-Dio.netty.maxDirectMemoryTotal JVM Memory16 GiB 512 MiB 512 MiB 1 GiB 32 GiB 1 GiB 1 GiB 2 GiB 70 GiB 3 GiB 3 GiB 6 GiB Configure the JAVA_HOME path.
After enabling the JVM environment dependency service, you need to manually specify the JAVA_HOME path. Ensure that the JAVA_HOME paths for all OBServer nodes in the cluster are identical.
Step 6: Configure cluster parameters
In the Parameter Settings section, you can customize cluster parameters.
Click Add Startup Parameters to add startup parameter items one by one and configure their values.
Click Select Template to Auto-Fill to select a parameter template from the drop-down list. The system will automatically fill in the parameter configurations from the template here.
The system provides the following six built-in templates, which contain common parameter settings. You can directly apply these templates for initial cluster configuration. Details about the built-in templates are as follows.
TemplateDescriptionCOMPLEX_OLTP Default Parameter Template Corresponds to the Complex OLTP workload type. This template is applicable only to OceanBase Database V4.2.5 and later. HTAP Default Parameter Template Corresponds to the HTAP workload type. This template is applicable only to OceanBase Database V4.2.5 and later. KV Default Parameter Template Corresponds to the OBKV workload type. This template is applicable only to OceanBase Database V4.2.5 and later. EXPRESS_OLAP Default Parameter Template Corresponds to the Express OLAP workload type. This template is applicable only to OceanBase Database V4.2.5 and later. OLAP Default Parameter Template Corresponds to the OLAP workload type. This template is applicable only to OceanBase Database V4.3.0 and later. 2.2.77 Default Parameter Template Recommended parameter settings for OceanBase clusters of version V2.2.77, intended for production environments. You can also click Create Cluster Parameter Template to create a custom parameter template for the cluster. For details, see Manage cluster parameter templates.
Note
If you have customized requirements for CPU, memory, data disk, and log disk usage at the cluster level, set the parameters:
cpu_count,memory_limit_percentage,system_memory,data_disk_usage_limit_percentage,datafile_size,clog_disk_usage_limit_percentage, andlog_disk_size. For specific parameter descriptions, refer to the OceanBase official website Overview of cluster parameters.Step 7: Configure users, paths, and ports
In the Custom Settings section, you can configure cluster-level settings such as the operating system owner user, paths (such as software installation path, data disk path, and log disk path), and ports (such as SQL port and RPC port).
Configure the operating system owner user:
This user is used to install and run OBServer and cannot be edited. You can modify this user by adjusting the default configuration of the
ocp.operation.default.os.userparameter. This parameter takes effect only when you create a distributed cluster (100.create-a-distributed-cluster.md), a standalone cluster, an OBProxy cluster (../../800.obproxy-functions/200.create-an-obproxy-cluster.md), or an arbitration service (../1350.manage-arbitration-services/200.create-arbitration-services.md), but does not affect other configurations of existing clusters.Configure related paths:
ConfigurationDescriptionSoftware Path - When the Operating System Owner User is admin, the Software Path defaults to
/home/admin/oceanbaseand can be customized. - When the Operating System Owner User is not admin, the Software Path defaults to
/opt/oceanbase/oceanbaseand can be customized.
Data Disk Path Defaults to /data/1and can be customized.Log Disk Path Defaults to /data/log1and can be customized. In a production environment, it is recommended that the log disk space be at least three times the host's memory size. Additionally, to avoid performance issues, it is not recommended to mount the data directory and log directory on the same disk.Note
Starting from OCP 4.3.0 BP1, when creating an OceanBase cluster of versions [V4.2.4.0, V4.3.0.0), [V4.3.1.0, +∞), the slog directory is placed on the log disk and is no longer bound to the data disk. Iflog_disk_size=0is configured, it will be interpreted as exclusive for clogs, meaning the defaultlog_disk_percentageis 90%. If the disk space for slog and clogs is less than 40 GiB, leaving less than 4 GiB reserved for slog, slog writes may be affected. For more information about slog, see OBServer node installation directory structure.- When the Operating System Owner User is admin, the Software Path defaults to
Configure related ports:
ConfigurationDescriptionSQL Port Defaults to 2881 and can be customized. RPC Port Defaults to 2882 and can be customized. After configuration, click Test to verify if the specified paths and ports are available.
- If the test passes, click Create.
- If the test fails, troubleshoot and resolve the issue as prompted.
Step 8: Confirm cluster information
In the right-side panel, confirm that the configured cluster information is correct, then click Next.
Step 9: Perform pre-check before creation
Perform a pre-check before creation. The system verifies whether your environment meets the minimum requirements for creating a standalone cluster. If a check item fails, you can perform the following operations as prompted:
- Upload: Displayed only when a specific check item fails. Please follow the prompts and click Upload to manually upload the required software package.
- Skip: This operation skips the current check item (designed for special scenarios). Ensure the relevant check item meets product specification requirements; otherwise, subsequent process execution may fail. After skipping, the status of that check item changes to Warning.
- Retry: Troubleshoot and fix the issue based on the failure reason and optimization suggestions. After fixing, click Retry to rerun the failed check item.
- Retry All: After all issues are troubleshooted and fixed, click Retry All to rerun all failed check items.
Once no check items fail, click Create.
Step 10: Create a tenant
In the pop-up Tenant Creation Reminder dialog box, choose whether to create a user tenant.
If you do not need to create a tenant, click Skip. In this case, only the cluster is created without a tenant. You can later create a user tenant by referring to Create a tenant.
If you need to create a tenant, configure the tenant mode and name. After configuration, click Create and Submit. You can view the execution progress of the related task in Task Center.
The relevant configuration information is as follows:
ParameterDescriptionTenant Mode Allows you to switch the tenant mode. Valid values: Oracle and MySQL. The default value is MySQL. Tenant Name By default, it is the same as the tenant mode. You can customize it.
