A standalone deployment is a database system where OceanBase Database is deployed 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 is tailored for small and medium-sized workloads, and offers high compatibility with the MySQL and Oracle protocols, enabling seamless migration of existing applications. Its native multi-tenant architecture allows multiple businesses to share a single standalone instance, ensuring resource isolation and usage on demand, while delivering exceptional standalone performance.
Prerequisites
The current login user in OCP is the ADMIN or ORG_ADMIN role.
Only standalone versions V4.1.0 and later are supported.
Procedure
Step 1: Go to the Create Cluster page
Log in to the OCP console. In the left-side navigation pane, click Cluster to go to the Cluster page. Find the option to create a new cluster based on your business scenario.
If you don't have any clusters that you can manage, the system will prompt you to create a cluster on the Clusters tab. Click Create Cluster in the prompt.
If you already have clusters that you can manage, click Create Cluster in the upper-right corner of the Clusters tab.
On the Create Cluster page, select Standalone.
Step 2: Configure the basic information of the cluster
The following table describes the basic information required for creating a standalone cluster.
| Parameter | Description |
|---|---|
| Cluster Name | The name of the cluster to be managed. The cluster name must start with an English letter and end with an English letter or a number. The name can contain English letters, numbers, and underscores, and must be 2 to 32 characters long. |
| Root@sys Password | You can specify a custom password or generate a random password. The password must meet the following complexity requirements:
|
| OceanBase version | Select an existing OceanBase cluster version from the list. If the required version is not available, click Add Version at the bottom of the list to upload it. |
| Zone Name | You can keep the default value or specify a custom value. The zone name must start with an English letter and end with an English letter or a number. The name can contain English letters, numbers, and underscores, and must be 2 to 32 characters long. |
| Host | Select a host that is consistent with the architecture of OceanBase version. Only one host can be selected as the OBServer & rootserver. If no host is available in the drop-down list, you can click Add Host. |
| Load Type | You can select a load type for the cluster. The load type mainly affects the judgment time of SQL queries (parameter: large_query_threshold). It can significantly affect the response time (RT) for OLTP-type loads. Therefore, you must select a load type carefully. OCP supports five cluster load types. The specific descriptions are as follows.
|
Step 3: Enable Cgroup
Cgroup is used to isolate CPU resources among tenants in an OceanBase cluster and within a tenant. You can choose whether to enable Cgroup for the cluster based on your business requirements to achieve stronger CPU/IOPS isolation.
- Enabling Cgroup may result in a 7% performance drop. If your business scenario involves a single tenant, small-scale servers (<14C), or requires higher database performance, we recommend that you disable Cgroup.
- If the kernel version of the host operating system is below 5.1.0, we recommend that you disable Cgroup for the cluster. Otherwise, it may lead to a decline in system performance or instability.
- If the kernel version of the host operating system is below 4.1.9, tenants cannot be created in the cluster. In this case, Cgroup is disabled by default and the Cgroup switch is not displayed.
Step 4: Set the CPU overcommit ratio
When different business scenarios have overlapping workloads, OceanBase clusters may experience overload during operation, leading to thread competition among tenants for CPU resources and slowing down actual business scenarios. To ensure that different tenant workloads can run in a controlled manner, you can set the CPU resource overcommit ratio to improve resource utilization.
In the CPU Overcommit Ratio section, you can configure the overcommit ratio using a slider or an input field. The default value is 120%, with a range of 101% to 200%.
Note
The CPU overcommit feature relies on Cgroup. Before configuring the CPU overcommit ratio, make sure that Cgroup is enabled for the cluster.
Step 5: Configure cluster parameters
In the Parameter Settings module, you can customize the cluster parameters.
Click Add Startup Parameters to add startup parameters one by one and configure their values.
Click Auto-populate by Selecting a Template to select a parameter template from the drop-down list, and the system will automatically populate the template parameters to this section.
The system provides the following 6 built-in templates, each containing common parameter settings. You can directly apply these templates for cluster initialization. For more information about the built-in templates, see the following table.
Template Description COMPLEX_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. Default Parameter Template for OceanBase Database V2.2.77 Recommends parameter settings for OceanBase clusters of V2.2.77 for production environments. You can also click Create Cluster Parameter Template to create a custom parameter template for the cluster. For more information, see Manage cluster parameter templates.
Note
If you have specific customization requirements for the CPU, memory, data disk, and log disk usage at the cluster level, set the following parameters: cpu_count, memory_limit_percentage, system_memory, data_disk_usage_limit_percentage, datafile_size, clog_disk_usage_limit_percentage, and log_disk_size. For more information about these parameters, refer to the Overview of Cluster Parameters on the OceanBase official website.
Step 6: Configure users, paths, and ports
In the Custom Settings section, you can configure users, paths, and ports for the cluster, such as the operating system user and paths for software installation, data disk, and log disk, and the SQL and RPC ports.
Configure the operating system user:
This user is used to install and run the OBServer. It cannot be modified. You can change this user by adjusting the default value of the
ocp.operation.default.os.userparameter. This change only affects the creation of distributed clusters, standalone clusters, OBProxy clusters, and arbitration services. It does not affect the configurations of existing clusters.Configure the paths:
Configuration Description Software Installation Path - When Operating System User is admin, the default value is
/home/admin/oceanbase, which can be customized. - When Operating System User is not admin, the default value is
/opt/oceanbase/oceanbase, which can be customized.
Data Disk Path The default value is /data/1, which can be customized.Log Disk Path The default value is /data/log1, which can be customized. In a production environment, OceanBase Database recommends that the log disk space be at least three times the host memory space. To avoid performance issues, we recommend that you do not mount the data directory and log directory to the same disk.Note
Starting from OCP 4.3.0 BP1, when the OceanBase cluster created is of the [V4.2.4.0, V4.3.0.0) or [V4.3.1.0, +∞) version, the slog directory is placed on the log disk and is no longer bound to the data disk. If you setlog_disk_size=0, it will be considered as exclusive use for clogs, with the default value oflog_disk_percentagebeing 90%. If the size of the disk that contains both slog and clogs is less than 40 GiB, the reserved space for slog will be less than 4 GiB, which may affect the writing of slog. For more information about slog, see Directory structure for installing OBServer nodes.- When Operating System User is admin, the default value is
Configure the ports:
Configuration Description SQL Port The default value is 2881, which can be customized. RPC Port The default value is 2882, which can be customized. After the configurations are complete, click Test to verify whether the specified paths and ports are available.
- If the test succeeds, click Submit.
- If the test fails, perform troubleshooting based on the error message.
Step 7: Verify the configuration information
In the right-side panel, check whether the configuration information is correct. If yes, click OK.
Step 8: Create a tenant
In the Note dialog box, specify whether to create a tenant.
If you do not want to create a tenant, click Skip. In this case, only the cluster is created, and no tenant is created. You can create a tenant later by referring to Create a tenant.
If you want to create a tenant, you need to specify the tenant mode and tenant name. After you configure the information, click Create and Submit. You can view the task progress in Task Center.
The following table describes the related parameters.
Parameter Description Tenant Mode Specifies the tenant mode. You can switch the tenant mode. Valid values: Oracle and MySQL. The default value is MySQL. Tenant Name The name is the same as the tenant mode by default. You can specify a custom name.