This article walks you through deploying OceanBase Community Edition on a cloud server with OceanBase Deployer (obd), creating and managing tenants, and running benchmarks such as Sysbench and TPC-H. By the end, you’ll have a working test environment and a repeatable way to evaluate OceanBase performance across different workloads and scenarios.
Warning
Test environment only—don't use this in production. For production, follow the high-availability cluster configuration.
| Term | Description |
| obd | OceanBase Deployer—the OceanBase installation and deployment tool. |
| OBServer node | The host where the OceanBase database server process runs. |
| OBClient | The OceanBase command-line client. |
| Tenant | OceanBase's unit of resource and access isolation. Use a dedicated user tenant for load testing. All workloads must run under a user tenant. The sys tenant must not be used for workload—it is for system management only. |
To run OceanBase stably and obtain effective performance data, use cloud instances that meet the following specifications:
Note:
Use separate disks for the installation directory, log directory, and data directory when possible.
To get reliable benchmark results, deploy OceanBase on a dedicated node. This guide uses two machines: 10.10.10.1 (benchmark client—obd and benchmark tools) and 10.10.10.2 (single-node OceanBase).
Benchmark client requirements depend on total OceanBase CPU cores:
| OceanBase total cores | Benchmark client |
| ≤ 47 cores | 8 cores, 64 GB RAM |
| 48–72 cores | 16 cores, 128 GB RAM |
| ≥ 73 cores | 32 cores, 128 GB RAM |
Note:
- All commands in this guide are run on the benchmark client (10.10.10.1).
- For TPC-C or sysbench, the client needs more resources to drive enough concurrent requests. For TPC-H only, 8 cores and 64 GB on the client are sufficient.
Install the OceanBase All-in-One package. It includes all components required for deployment (except obbinlog), is tested for compatibility, and is the recommended distribution.
Online installation
If the machine has network access, run:
bash -c "$(curl -s https://obportal.s3.ap-southeast-1.amazonaws.com/download-center/opensource/sh/installer.sh)"
source ~/.oceanbase-all-in-one/bin/env.shAfter installation, a new directory such as tmp.jvzpVREAs9 is created under /tmp.
Offline installation
If the machine has no network access:
1. Download the latest OceanBase All-in-One package from the OceanBase Software Center and copy it to the benchmark client. Use the latest version when possible.
Note
The procedures below use obd V4.2.0. Install an OceanBase All-in-One package that includes obd V4.2.0 (for example, V4.5.0).
2. In the directory containing the package, extract and install:
tar -xzf oceanbase-all-in-one-*.tar.gz
cd oceanbase-all-in-one/bin/
./install.sh
source ~/.oceanbase-all-in-one/bin/env.shRun the following to replace the user, host, and password with your values. The user must be able to connect to the target host and have sudo privileges.
obd host init root 10.10.10.2 -p ***** -u adminExpected output:
get system config ok
+-------------------------------------------------------------------------------------------------+
| System Parameter Change List |
+---------------+-------------------------------------------+---------------+---------------------+
| ip | name | current_value | expected_value |
+---------------+-------------------------------------------+---------------+---------------------+
| 10.10.10.2 | fs.aio-max-nr | 65536 | 1048576 |
| 10.10.10.2 | net.core.somaxconn | 128 | 2048 |
| 10.10.10.2 | net.core.netdev_max_backlog | 1000 | 10000 |
| 10.10.10.2 | net.core.rmem_default | 212992 | 16777216 |
| 10.10.10.2 | net.core.wmem_default | 212992 | 16777216 |
| 10.10.10.2 | net.core.rmem_max | 212992 | 16777216 |
| 10.10.10.2 | net.core.wmem_max | 212992 | 16777216 |
| 10.10.10.2 | net.ipv4.conf.default.rp_filter | 0 | 1 |
| 10.10.10.2 | net.ipv4.tcp_rmem | 6291456 | 4096 87380 16777216 |
| 10.10.10.2 | net.ipv4.tcp_wmem | 16384 | 4096 65536 16777216 |
| 10.10.10.2 | net.ipv4.tcp_max_syn_backlog | 1024 | 16384 |
| 10.10.10.2 | net.ipv4.tcp_fin_timeout | 60 | 15 |
| 10.10.10.2 | vm.min_free_kbytes | 67584 | 2097152 |
| 10.10.10.2 | fs.file-max | 3205772 | 6573688 |
| 10.10.10.2 | fs.pipe-user-pages-soft | 16384 | 0 |
| 10.10.10.2 | vm.max_map_count | 65530 | 655360 |
| 10.10.10.2 | nofile | 65535 | 655350 |
+---------------+-------------------------------------------+---------------+---------------------+
disable transparent_hugepage ok
modify system parameters
10.10.10.2: ( fs.aio-max-nr,net.core.somaxconn,net.core.netdev_max_backlog,net.core.rmem_default,net.core.wmem_default... ) have been successfully modified!
You must reboot the following servers to ensure the ulimit parameters take effect: (10.10.10.2).
Trace ID: f9491158-71db-11f0-81f0-00163e513302
If you want to view detailed obd logs, please run: obd display-trace f9491158-71db-11f0-81f0-00163e513302obd perf -c oceanbase-ce --server=10.10.10.2 --username=admin --password=****** \
--oceanbase-ce.home_path=/home/admin/perf \
--oceanbase-ce.data_dir=/data \
--oceanbase-ce.redo_dir=/redoThis deploys an OceanBase cluster named perf on 10.10.10.2 under user admin, with installation directory /home/admin/perf, data directory /data, and redo log directory /redo. Adjust these to match your environment. The user must be able to connect to the target host and have read/write access to the specified directories.
Parameters:
| Parameter | Description |
| -c | Component(s) to deploy; use a comma to list multiple. |
| --server | IP of the host where the cluster will run. Defaults to the current host if omitted. |
| --username | SSH user name. Defaults to the current user if omitted. |
| --password | Login password for the SSH user. If using key-based SSH, you can omit this and use --key-file instead. |
| --key-file | Absolute path to the SSH private key for passwordless authentication. |
| --oceanbase-ce.<parameter> | Custom OceanBase database configuration. |
Note
- The parameters --server, --username, --password, and --key-file are available in obd V4.2.0 and later. Confirm your obd version before running the command.
- Use either --password or --key-file for authentication, not both.
When prompted Scenario not specified, please specify the scenario you want, choose the workload type that matches your test:
Expected output:
cluster scenario: express_oltp
Start observer ok
observer program health check ok
Connect to observer 10.10.10.2:2881 ok
oceanbase bootstrap ok
obshell start ok
obshell program health check ok
obshell bootstrap ok
Connect to observer 10.10.10.2:2881 ok
Wait for observer init ok
+------------------------------------------------+
| oceanbase-ce |
+--------------+---------+------+-------+--------+
| ip | version | port | zone | status |
+--------------+---------+------+-------+--------+
| 10.10.10.2 | 4.5.0.0 | 2881 | zone1 | ACTIVE |
+--------------+---------+------+-------+--------+
obclient -h10.10.10.2 -P2881 -uroot@sys -p'********' -Doceanbase -A
cluster unique id: f9c65fef-c988-508f-8e8f-a6e23719a8ac-19bf9b6c2b4-00000504
obshell program health check ok
display obshell dashboard ok
+---------------------------------------------------------+
| obshell Dashboard |
+--------------------------+------+--------------+--------+
| url | user | password | status |
+--------------------------+------+--------------+--------+
| http://10.10.10.2:2886 | root | '********' | active |
+--------------------------+------+--------------+--------+
perf running
Trace ID: 7e194d14-fa9c-11f0-8937-00163e36e6b6
If you want to view detailed obd logs, please run: obd display-trace 7e194d14-fa9c-11f0-8937-00163e36e6b6After the cluster is created, only the sys tenant exists. The sys tenant is for cluster administration only; do not use it for benchmarks. Create a dedicated tenant for load testing.
Create a sysbench tenant
obd cluster tenant create perf -n sysbench_tenant -o express_oltpExpected output:
Get local repositories ok
Open ssh connection ok
Connect to observer 10.10.10.2:2881 ok
Create tenant sysbench_tenant ok
obclient -h10.10.10.2 -P'2881' -p'' -uroot@sysbench_tenant -Doceanbase -A
optimize tenant with scenario: express_oltp ok
Set tenant whitelist ok
Trace ID: f5851a12-fa9d-11f0-8143-00163e36e6b6
If you want to view detailed obd logs, please run: obd display-trace f5851a12-fa9d-11f0-8143-00163e36e6b6obd test sysbench perf \
--tenant=sysbench_tenant \
--script-name=oltp_point_select.lua,oltp_read_only.lua,oltp_write_only.lua,oltp_read_write.lua \
--table-size=1000000 \
--tables=30 \
--threads=32,64,128,256,512,1024 \
--rand-type=uniform \
--time=60
Note
Running sysbench through obd requires OBClient and ob-sysbench. The command installs them automatically if they are not present.
Parameters:
| Parameter | Description |
| --tenant | Tenant used for the test. |
| --script-name | Sysbench script(s); comma-separated for multiple. |
| --table-size | Number of rows initialized per table. |
| --tables | Number of tables initialized. |
| --threads | Concurrent thread counts; comma-separated list. |
| --rand-type=uniform | Uniform random distribution to avoid hot spots and balance load. |
| --time | Duration in seconds for each phase. |
After sysbench is done, you can destroy the cluster before running other tests.
Warning
This action is irreversible. It stops the observer process and removes database files.
obd cluster destroy perfDeploy an OceanBase cluster for TPC-H by following Step 3: Deploy an OceanBase cluster in the above section Deploy the test environment. When prompted for scenario, choose olap. Then use the steps below to create a tenant and run TPC-H.
Create a TPC-H tenant
obd cluster tenant create perf -n tpch_tenant -o olapExpected output
Output is similar to the sysbench tenant creation; omitted here.
obd test tpch perf \
--tenant=tpch_tenant \
--scale-factor=10 \
--remote-tbl-dir=/tmp/tpch10
Note
Running TPC-H through obd requires OBClient and obtpch. The command installs them automatically if they are not present.
Parameters:
| Parameter | Description |
| --tenant | Tenant used for the test. |
| --scale-factor | Test data size in GiB (e.g. 10 for about 10 GiB). |
| --remote-tbl-dir | Directory to store .tbl files. It must be set to an absolute path, and the user who started the OBServer node must have read and write permissions to this directory. |