OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Loader and Dumper

V5.0.0
  • Document Overview
  • Introduction
  • Technical Mechanism
  • Preparations
    • Prepare the environment
    • Prepare data
    • Download OBLOADER & OBDUMPER
    • Startup parameters
  • User Guide (OBLOADER)
    • Quick start
    • Command-line options
    • Multi-database import
    • Direct load
    • Data processing
      • Define a control file
      • Preprocessing functions
      • Case expressions
    • Use cases of command-line options
    • Performance tuning
    • Error handling
    • FAQ
  • User Guide (OBDUMPER)
    • Quick start
    • Command-line options
    • Multi-database export
    • Data processing
      • Define a control file
      • Preprocessing functions
      • Case expressions
    • Performance tuning
    • FAQ
  • Control file guide
  • Security Features
  • Connection configuration
  • Self-service Troubleshooting
  • Release Note
    • Release Note
      • 5.x
        • OBLOADER & OBDUMPER V5.0.0
      • 4.x
        • OBLOADER & OBDUMPER V4.3.7
        • OBLOADER & OBDUMPER V4.3.6
        • OBLOADER & OBDUMPER V4.3.5
        • OBLOADER & OBDUMPER V4.3.4.1
        • OBLOADER & OBDUMPER V4.3.4
        • OBLOADER & OBDUMPER V4.3.3.1
        • OBLOADER & OBDUMPER V4.3.3
        • OBLOADER & OBDUMPER V4.3.2.1
        • OBLOADER & OBDUMPER V4.3.2
        • OBLOADER & OBDUMPER V4.3.1.1
        • OBLOADER & OBDUMPER V4.3.1
        • OBLOADER & OBDUMPER V4.3.0
        • OBLOADER & OBDUMPER V4.2.8.2
        • OBLOADER & OBDUMPER V4.2.8.1
        • OBLOADER & OBDUMPER V4.2.8
        • OBLOADER & OBDUMPER V4.2.7
        • OBLOADER & OBDUMPER V4.2.6
        • OBLOADER & OBDUMPER V4.2.5
        • OBLOADER & OBDUMPER V4.2.4
        • OBLOADER & OBDUMPER V4.2.1
        • OBLOADER & OBDUMPER V4.2.0
        • OBLOADER & OBDUMPER V4.1.0
        • OBLOADER & OBDUMPER V4.0.0
      • 3.x
        • OBLOADER & OBDUMPER V3.3.2
        • OBLOADER \& OBDUMPER V3.1.0
        • OBLOADER \& OBDUMPER V3.0.0
    • Versioning rules

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Loader and Dumper
  3. V5.0.0

Performance tuning

Last Updated:2026-11-10 11:21:27

Command-line options-based performance tuning
VM parameter-based performance tuning
Database kernel-based performance tuning

You can tune the performance of OBLOADER from three aspects: command-line options, virtual machine (VM) parameters, and database kernel.

V5.0.0 enables adaptive Reader/Writer scheduling by default. We recommend starting with the default configuration, then adjusting parameters based on observed bottlenecks. For more information about scheduling, see Technical Mechanism.

Command-line options-based performance tuning

  • To limit client concurrency, use --thread to set the Writer limit and --rw to limit Reader concurrency as needed.

  • To disable automatic throughput tuning, use --dynamic=false. Memory protection can still reduce concurrency.

  • For wide tables or columns with long values, you can reduce --batch to lower memory usage per batch. Explicitly setting --batch to a positive value for standard INSERT disables the default 1 MiB batching threshold, so assess actual memory requirements.

  • Indexes affect the performance of data import. We recommend that you set only the primary key and unique key and create common indexes after data is imported.

  • OBLOADER V4.3.2 and later versions support the --mem parameter for specifying the VM memory size. Valid units are K, M, G, and T. The default value is 4G.

To identify bottlenecks, consider client CPU utilization, heap memory usage, and GC activity alongside resource utilization on ODP and OceanBase nodes. A mostly empty queue can also result from memory protection reducing reads. Do not increase Reader concurrency based on queue occupancy alone. For more information about parameter defaults and limits, see Command-line options.

VM parameter-based performance tuning

Set the VM parameter in the import script to 60% of the available physical memory. Default value: -Xms4G -Xmx4G.

vim bin/obloader

JAVA_OPTS="$JAVA_OPTS -server -Xms4G -Xmx4G -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=128M -Xss352K"

You can also use the --mem parameter to specify the VM memory size instead of modifying the VM parameter. For example, --mem 4G.

Database kernel-based performance tuning

The data import performance is subject to the speed of writing incremental data to the memory of the tenant.

  • Insufficient incremental memory may trigger a major or minor compaction. Prevent major compaction because it greatly affects import performance. You can enable minor compaction for memory and set the number of minor compactions to more than 100.

  • If the incremental memory usage reaches the throttling threshold specified for the tenant, the import performance falls.

  • If the incremental memory usage reaches the upper limit, data import may fail. We recommend that you set the tenant throttling threshold to a value higher than 90. As the parameters of minor compaction are related to the size and write speed of the tenant memory, you need to optimize the parameters as needed. The following table describes the parameters for tuning the database kernel.

Parameter
Default value
Description
set global ob_sql_work_area_percentage=20; 5 The memory usage during the execution of SQL statements.
Value range: [0,100].
set global max_allowed_packet=1073741824; 130023424 The maximum size of network data packets that can be received by the server.
alter system set freeze_trigger_percentage=30; 70 The threshold of memory used by tenants for triggering a global freeze. major_freeze_trigger_percent = major_freeze trigger threshold/MemStore capacity. The MemStore capacity is calculated based on the value of memstore_lmt_percent by using the following formula: memstore_lmt_percent = memstore_limit/min_memory.
Value range: [1,99].
alter system set minor_freeze_times=500; 5 The number of minor compactions for triggering a global major compaction. If the value is 0, minor compaction is disabled. If the memory usage reaches a predefined threshold, a minor freeze or a major freeze will be triggered. This parameter specifies the number of minor freezes triggered between two consecutive major freezes. If you set this parameter to 0, automatic triggering of minor freezes is disabled.
Value range: [0,65536).
alter system set minor_compact_trigger=16; - The threshold for triggering the next-level compaction in hierarchical minor compactions. When the total number of mini SSTables in the current level reaches this threshold, all SSTables are compacted to the next level to form a new minor SSTable.
alter system set merge_thread_count=32; 0 The number of worker threads for daily major compactions. If the value of this parameter is 0, the formula for calculating the number of worker threads for a compaction is min{10,cpu_cnt}, where cpu_cnt indicates the number of CPU cores in the system. This parameter takes effect immediately after modification and does not require a restart.
Value range: [0,256].

Notice

This parameter has been deprecated in OceanBase V4.0.0 and later versions.

alter system set minor_merge_concurrency=48; 0 The number of concurrent threads in a minor compaction.
Value range: [0,64].

Notice

This parameter has been deprecated in OceanBase V4.0.0 and later versions.

alter system set writing_throttling_trigger_percentage=100; 100 The threshold of server memory usage that triggers write throttling. We recommend that you disable throttling for the server.

Notice

This parameter is supported in OceanBase V2.2.30 and later versions. The tool must have the memory exhaustion prevention capability.

Previous topic

Use cases of command-line options
Last

Next topic

Error handling
Next
on this page
Command-line options-based performance tuning
VM parameter-based performance tuning
Database kernel-based performance tuning