OceanBase AI Database is a new-generation distributed database with a storage-compute separation architecture, designed for AI-era workloads. The AI cluster uses object storage (such as S3) as the primary medium for data persistence, while compute nodes keep only local cache disks, achieving storage-compute separation and offering advantages such as elastic scaling and low-cost storage.
This topic describes how to create an OceanBase AI Database cluster.
Memory planning
When the OBServer cluster and the LogService cluster are deployed on the same machine (mixed deployment scenario), you must plan their memory usage in advance to avoid insufficient memory. The recommended configuration is as follows:
LogService cluster: When creating the LogService cluster, set the
memory_limitparameter to limit its memory usage. It is recommended to set LogService memory within a reasonable range based on the log volume and business requirements.OBServer cluster: When creating the OBServer cluster, you should also set the
memory_limitparameter to limit its memory usage. Allocate OBServer memory resources reasonably based on business load and concurrency requirements.
Prerequisites
You have deployed OCP V4.5.0 or later. For more information, see Deploy OCP.
You have added the servers used to deploy the OceanBase AI Database cluster to the OCP resource pool. For more information, see Add a server.
The user currently logged in to OCP has the
CREATE CLUSTERprivilege. For more information, see Role overview and Default OCP roles.You have obtained the OceanBase AI Database RPM package. For more information, see Prepare installation packages.
Object storage has been configured. For details, see Create an object storage configuration. A bucket has already been created and is accessible.
Notice
It is recommended to configure different buckets for OBServer and LogService in the OceanBase AI Database cluster.
The LogService cluster has been created. For details, see Deploy a LogService cluster by using OCP.
Procedure
Log in to OCP.
In the left-side navigation pane, click Clusters.
On the Clusters overview page, locate the entry for creating a new cluster based on your actual business scenario.
- If you do not have any manageable clusters, the system will prompt you to create a new cluster on the Cluster List tab. Click Create Cluster directly in the prompt message.
- If you already have manageable clusters, click Create Cluster in the upper-right corner of the Cluster List tab.
On the Create Cluster page, select AI Cluster in the upper-right corner.
On the Create Cluster page, configure the basic information for the cluster.
The Basic Settings are shown in the following table.
ParameterDescriptionCluster Name Customize a name for the cluster to be managed. The name must start with an English letter, can contain uppercase and lowercase letters, numbers, and underscores, and must be 2 to 48 characters long. root@sys Password You can set it manually or have it generated randomly. The password must meet the following complexity requirements:
- Length: 8 to 32 characters.
- Must contain at least 2 digits, 2 uppercase letters, 2 lowercase letters, and 2 special characters.
Supported special characters:~!@#%^&*_-+=`|(){}[]:;',.?/
Additionally, you can click Copy Password to copy the customized or randomly generated password to the clipboard.OceanBase Version You can select an existing OceanBase AI Database version from the list, or click Add Version below the list to upload an OceanBase AI Database RPM package. Associate OBProxy Cluster This option is used to associate an existing OBProxy cluster. In this example, this option is disabled. On the Create Cluster page, configure the deployment mode information for the cluster.
By default, information for 2 zones is added. If you want to deploy a cluster with more than 2 zones, click Add Zone below to add more zone information. If you want fewer than 2 zones, click the delete icon next to a zone.
Note
OceanBase AI Database clusters are recommended to use two replicas, that is, 2 zones.
The required settings for each zone are shown in the following table:
ParameterDescriptionZone Name Usually a default name is provided. You can customize it as needed. The zone name must start with an English letter, can contain uppercase and lowercase letters, numbers, and underscores, and must be 2 to 48 characters long. Data Center The data center where the zone is located. Hosts in the same zone can only be deployed in the same IDC. Host Type (Optional) Optional. If you select a host type, the host list below will be filtered accordingly. CPU Architecture Automatically identified after you select OceanBase Version in Basic Information. Host The IP address of the machine. Multiple IPs can be selected. Root Server Location You need to select an IP address for the machine where the Root Service resides. For a multi-replica OceanBase AI Database cluster, each zone must have a Root Service specified. Zone Priority Ranking Zone Priority Ordering The priority order for the primary and standby replicas of the cluster sys tenant. Optional. If not specified, the first zone is used as the highest priority. The highest-priority zone is treated as the Primary Zone, and only one Primary Zone is allowed.
You can enable this option to customize the zone priority order as follows:- Select one or more zones from the left list. The left list displays all available zones in the current cluster.
- Click the > button in the middle. The selected zones will then be moved to the Priority Ranking list. Multiple selected zones share the same priority.
- Repeat steps a and b to add zones with lower priorities.
- To adjust priorities, drag items in the Priority Ranking list to reorder them. Priority decreases from top to bottom..
On the Create Cluster page, configure the data storage parameters.
Notice
It is recommended to configure different buckets for OBServer and LogService in the OceanBase AI Database cluster.
OceanBase AI Database uses a storage-compute separation architecture, where data is mainly stored in object storage. This module is used to configure the AI cluster’s data storage-related parameters.
ParameterDescriptionObject Storage Configuration Select an existing object storage configuration. Storage Directory Specify the storage path for data in object storage, in the format s3://my-bucket/my-data.Logservice Cluster Select an existing Logservice cluster to provide log services for the AI cluster. Note
Before creating an OceanBase AI Database cluster, you must create an object storage configuration and a Logservice cluster in OCP.
Cgroup Configuration
This is mainly used for CPU resource isolation between tenants and within a tenant in the OceanBase AI Database cluster. It is enabled by default. Enabling Cgroup causes about 7% performance degradation. It is not recommended for single-tenant, small-scale scenarios. Enable it as needed based on your cluster workload type.
Set CPU Oversubscription
When workloads from different business scenarios overlap, the OceanBase AI Database cluster may become overloaded during operation, resulting in thread contention for CPU resources among different tenants and slowing down actual business workloads. To ensure that tenant workloads can be interleaved in a controlled manner, you can configure CPU Oversubscription to improve resource utilization.
In the CPU Oversubscription module, you can configure the oversubscription ratio using the slider or the input box. The default value is 120%, and the valid range is 101% to 200%.
Configure JVM Environment Dependency Service
Enable JVM Environment Dependency Service, and OBServer can integrate with external tables, Java UDFs, ODPS remote access, and other features through the JNI (Java Native Interface) framework.
Notice
- OceanBase AI Database supports configuring the JVM environment dependency service.
- Refer to Deploy the Java SDK environment and upload the required JAR package dependencies in advance using the package upload feature to ensure that OBServer can load and use them properly.
- This service depends on a Java environment. If some machines in the cluster have not yet been configured with Java, please configure it yourself:
- For hosts with the arrch64 architecture, ensure that OpenJDK is version 15 or later.
- For hosts with other architectures, ensure that 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.
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.
A reasonable JVM memory configuration has a direct impact on the stability and performance of Java applications. By setting JVM memory appropriately, you can ensure the basic runtime needs of Java applications in the OceanBase AI Database cluster. Based on different memory specifications of OBServer nodes, the predefined JVM memory configuration options are as follows:
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 Parameter to add startup parameter items one by one and configure their values.
Configure the
memory_limitparameter for OBServer. For specific parameter values and ranges, see memory_limit.Click Select Template to Auto-Fill to select a parameter template from the drop-down list. The system will automatically populate the parameters from the template here.
The system provides the following three built-in templates, which contain common parameter settings. You can directly apply these templates for initial cluster configuration. Details about the system-built-in templates are as follows.
TemplateDescriptionOLAP Parameter Template The default template, corresponding to the OLAP workload type. EXPRESS_OLTP Parameter Template Recommended for AI workloads such as vector hybrid search and historical database workloads. KV Parameter Template Corresponds to the OBKV workload type. You can also click Create Cluster Parameter Template to create a custom parameter template for the cluster.
Custom configuration
In the Custom Settings section, you can perform cluster-level user configurations (such as the operating system owner user), path settings (such as software installation paths and cache disk paths), and port settings (such as SQL ports and RPC ports).
Configure related paths:
Configure the operating system owner user:
This is the operating system user used for installing and running OBServer and cannot be edited. You can modify this user by adjusting the default configuration of the
ocp.operation.default.os.userparameter.Configure related paths:
ConfigurationDescriptionSoftware Installation Path - When the Operating System Owner User is admin, the Software Installation Path defaults to
/home/admin/oceanbaseand supports customization. - When the Operating System Owner User is not admin, the Software Installation Path defaults to
/opt/oceanbase/oceanbaseand supports customization.
Cache Disk Path Defaults to /data/1and supports customization. In an OceanBase AI Database cluster, local disks are used as cache disks to cache hot baseline data and minor compaction data, rather than persistently storing all data.- When the Operating System Owner User is admin, the Software Installation Path defaults to
Configure related ports:
ConfigurationDescriptionSQL Port Defaults to 2881 and supports customization. RPC Port Defaults to 2882 and supports customization. After configuration, click Test to verify if the entered paths and ports are available.
- If the test passes, click Create.
- If the test fails, troubleshoot according to the prompted information.
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 take the following actions as prompted:
- Upload: Appears only when specific check items fail. Click Upload as prompted to manually upload the required software package.
- Skip: This skips the current check item. It is designed for special scenarios. Make sure the relevant requirement is actually met; otherwise, subsequent steps may fail. After skipping, the status of the check item changes to Warning.
- Retry: Troubleshoot and fix the issue based on the failure reason and optimization suggestions. After fixing it, click Retry to rerun the failed check item.
- All Retry: After all issues are troubleshooted and fixed, click All Retry to rerun all failed check items.
When no check items fail, click Create.
After submitting the new cluster task, you can view its execution progress in the Task Center.
What to do next
After the cluster is created, you can create user tenants based on your business requirements.
- For details on creating a user tenant in OCP, see Create a primary tenant.
- For details on creating a user tenant using the command line, see the relevant documentation on tenant management in the OceanBase AI Database documentation.