OceanBase Database AI is a new generation of distributed database with a storage-and-compute separation architecture, designed for workloads in the AI era. An AI cluster uses object storage (such as S3) as the primary medium for data persistence, while compute nodes retain only local cache disks. This achieves storage-and-compute separation and offers advantages such as elastic scaling and low-cost storage.
This topic describes how to create an AI cluster.
Note
OCP also supports creating other types of clusters:
- Create a distributed cluster: An enterprise-level native distributed database architecture with financial-grade high availability and smooth scaling capabilities.
- Create a centralized cluster: Based on a centralized and distributed integrated architecture, suitable for small and medium-scale business scenarios.
Background information
The AI cluster adopts a storage-compute separation architecture. Before creating it, you must prepare the following dependent components in advance:
Object storage: The data persistence medium for the AI cluster, used to store all business data. You must create an object storage configuration in advance under System Management > External Integration in OCP. For details, see Object storage overview.
Logservice cluster: Provides log service capabilities for the AI cluster, with a one-to-one relationship. It must be created in advance. For details, see Create a Logservice cluster.
Comparison with shared-nothing distributed clusters
The AI cluster adopts a shared storage architecture, which differs from traditional shared-nothing distributed clusters in the following main aspects:
- Data storage: Baseline data and metadata are stored on object storage, not on local data disks. Local disks are used only as cache disks to cache hot data.
- Object storage: When creating a cluster, you must specify the connection information for object storage (such as Bucket name, Endpoint, access key, etc.). The kernel injects the object storage information into the cluster during the Bootstrap phase.
- Cache disk management: The space for local cache disks is controlled by the
datafile_sizeanddatafile_disk_percentageparameters, rather than by the size of data files as in the traditional mode. - Tenant resources: When creating a tenant, fields such as
DATA_DISK_SIZE(cache disk space) andMAX_NET_BANDWIDTH(maximum network bandwidth) are added to allocate tenant cache space in shared storage mode.
Memory planning
When the AI cluster and the Logservice cluster are deployed on the same machine (in a hybrid deployment scenario), you must plan their memory usage in advance to avoid insufficient memory. It is recommended to configure them as follows:
Logservice cluster: When creating a Logservice cluster, set the
memory_limitparameter to limit its memory usage. It is recommended to keep the memory usage of Logservice within a reasonable range based on the volume of logs and business requirements.AI cluster: When creating an AI cluster, also set the
memory_limitparameter to limit its memory usage. Allocate memory resources for the AI cluster reasonably based on business load and concurrency requirements.
Prerequisites
The current OCP user is in the ADMIN or ORG_ADMIN role.
You have prepared an available object storage service (such as Alibaba Cloud OSS, AWS S3, Tencent Cloud COS, Huawei Cloud OBS, etc.) and obtained the corresponding access credentials.
You have configured the object storage. The object storage service must meet the following requirements. For details, see Create an object storage configuration:
- You have obtained the AccessKey ID and AccessKey Secret for accessing the object storage.
- You have created a Bucket, and the Bucket is accessible.
- You have obtained the Endpoint address of the object storage.
You have created a Logservice cluster. For details, see Create a Logservice cluster.
(Optional) If the AI cluster you create needs to be accessed through OBProxy, there must already be an available OBProxy cluster in the current OCP. You can refer to the following links to add an OBProxy cluster.
Procedure
Go to the Create Cluster 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 AI Cluster.
Configure basic cluster information
The basic information required for creating an AI cluster is as follows:
Parameter |
Description |
|
|---|---|---|
| Cluster Name | The custom 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 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.
NoteAI clusters support only OceanBase AI cluster versions. Please select a version that supports the shared_storage mode. |
|
| Associate OBProxy Cluster | If you need to access the AI cluster through OBProxy, you can turn on the switch to associate this OceanBase cluster with an OBProxy cluster.
|
Configure the cluster's deployment mode
By default, information for 2 zones is added. If you want to deploy the cluster with more than 2 zones, you can click Add Zone below to add zone information. If you want to deploy the cluster with fewer than 2 zones, you can click the delete icon behind a zone.
The information that needs to be set for each zone and its description are shown in the following table.
Configuration |
Description |
|---|---|
| Zone Name | You can keep the default or customize it. The zone name must start with a letter, support uppercase and lowercase letters, numbers, and underscores, and be 2 to 32 characters long. |
| Data Center | The IDC where the zone is located. A zone can exist only in one IDC. |
| Instance Type | Optional. If you select a host type, the host list will be filtered accordingly. |
| CPU Architecture | If multiple installation packages of different architectures are available for the selected OceanBase version, you must choose a host hardware architecture that matches this package.
NoticeIf you set different architectures for different zones, the hybrid architecture deployment mode may experience stability and performance issues. Proceed with caution. |
| Host | You can select multiple hosts or add a host. |
| Root Service Location | You need to select an IP address for the server hosting the Root Service. In a multi-replica OceanBase cluster, you must specify a Root Service for each zone. |
| Zone priority ranking | Specify whether to prioritize the distribution of primary replicas for the cluster's sys tenant.
|
Data storage
AI clusters adopt a storage-compute separation architecture, where data is primarily stored in object storage. This module is used to configure data storage-related parameters for the AI cluster.
Configuration |
Description |
|---|---|
| Object Storage Configuration | Select the created object storage configuration, including connection information such as the Access Key, Secret Key, and Endpoint. |
| Storage Directory | Specify the storage path of the data in object storage. The format iss3://my-bucket/my-data. |
| LogService cluster | Select the created LogService cluster to provide log service for the AI cluster. |
Note
Before creating an AI cluster, you must create an object storage configuration and a Logservice cluster in OCP in advance.
Configure CPU overprovisioning
When loads 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 loads of different tenants in the system can run in an orderly manner, you can configure CPU resource 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%, and the valid range is 101% to 200%.
Note
CPU overprovisioning is only supported in OceanBase Database V4.0 and later.
Configure the JVM environment dependency service
Enable JVM Environment Dependency Service so that 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 the JVM environment dependency service.
- Refer to Deploy the OceanBase Database Java SDK environment. In advance, use the Upload a software package feature to upload the JAR package library required by the service dependency, ensuring that 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 of the 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 plugin. Different services have different requirements for the OceanBase cluster version. For details, see 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, the first 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 the basic operational needs of Java applications in the OceanBase cluster. The following table provides predefined JVM memory configuration options based on the 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.
Configure cluster parameters
In the Parameter Settings section, you can customize cluster parameters.
Click Add Startup Parameters to add startup parameters one by one and configure their values.
Configure the
memory_limitparameter. For specific values and ranges, refer to the kernel documentation.Notice
The `memory_limit` parameter must be configured when creating a cluster and cannot be modified after creation. Set this parameter appropriately based on the available host memory resources during planning.
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 Parameter Template Corresponds to the Complex OLTP workload type. This template is only applicable to OceanBase Database V4.2.5 and later. KV Parameter Template Corresponds to the OBKV workload type. This template is only applicable to OceanBase Database V4.2.5 and later. OLAP Parameter Template Default template, corresponding to the OLAP workload type. This template is only applicable to OceanBase Database V4.3.0 and later. You can also click Create Cluster Parameter Template to create a custom parameter template for your cluster. For details, see Manage cluster parameter templates.
Note
In an AI cluster (in shared-storage mode), the semantics of the following parameters differ from those in a traditional cluster (in shared-nothing mode):
datafile_size: Sets the server-level cache size, not the data file size.datafile_disk_percentage: Sets the percentage of the total disk space available for server-level cache, with a range of [0, 99].datafile_next,datafile_maxsize,_datafile_usage_upper_bound_percentage, and_datafile_usage_lower_bound_percentage: Not supported in shared-storage mode.
cpu_count,memory_limit_percentage,system_memory,datafile_size, anddatafile_disk_percentage. For specific parameter descriptions, refer to the OceanBase official website Overview of cluster parameters.Custom configuration
In the Custom Settings section, you can perform user configuration at the cluster level (such as the operating system owner user), path configuration (such as software installation paths and cache disk paths), and port configuration (such as SQL ports and RPC ports).
Configure the operating system owner user:
This user is the one 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 creating a distributed cluster (100.create-a-distributed-cluster.md), a centralized cluster (200.create-a-standalone-centralized-cluster.md), an AI 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), and does not affect other configurations of existing clusters.Configure related paths:
ConfigurationDescriptionSoftware Path - When the Operating System Owner User is admin, the default value of Software Path is
/home/admin/oceanbase, which can be customized. - When the Operating System Owner User is not admin, the default value of Software Path is
/opt/oceanbase/oceanbase, which can be customized.
Cache Disk Path Default is /data/1, which can be customized. In an AI cluster, local disks are used as cache disks to cache hot baseline data and minor compaction data, rather than persisting all data.- When the Operating System Owner User is admin, the default value of Software Path is
Configure related ports:
ConfigurationDescriptionSQL Port Default is 2881, which can be customized. RPC Port Default is 2882, which can be customized. After configuration, click Test to verify that the entered path and port are available.
- If the test passes, click Create.
- If the test fails, troubleshoot the issue as prompted.
Confirm cluster information
In the right-side panel, confirm that the configured cluster information is correct, then click Next.
Perform a pre-check before creation. The system verifies whether your environment meets the minimum requirements for creating an AI cluster. If a check item fails, you can perform the following operations as prompted:
- Upload: Displayed only when specific check items fail. 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 related 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 cause and optimization suggestions. After fixing it, 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.
After submitting the new cluster task, you can view its execution progress in Task Center.
