You can tune the performance of OBDUMPER from three aspects: command-line options, virtual machine (VM) parameters, and database kernel.
Command-line option-based performance tuning
You can tune the performance of OBDUMPER by adjusting the settings of the following options:
| VM parameter | Default value | Description |
|---|---|---|
| --thread | CPU * 2 Here, CPU refers to the number of logical cores, which is the number of available processors in the VM. |
The number of concurrent threads for data export. You can adjust the value of this option based on the resource utilization of the database system. |
| --page-size | 1000000 | The page size. You can adjust the value of this option based on the resource utilization of the database system. |
| --fetch-size | 1000 | The number of rows read from the database cursor at a time in the Oracle compatible mode of OceanBase Database. |
| --mem | 4G | This parameter is supported by OBDUMPER V4.3.2 and later versions, used to specify the VM memory size configuration. Supported units include K, M, G, or T. For more information, see the "VM parameter-based performance tuning" section. |
Note
During performance tuning, take into account the resource utilization on the server where OBDUMPER runs, on the OceanBase Database Proxy (ODP) service nodes, and on the nodes in the OceanBase cluster.
VM parameter-based performance tuning
Set the VM parameter in the export script to 60% of the available physical memory. The default value is -Xms4G -Xmx4G.
vim bin/obdumper
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
If you want to export consistent data, we recommend that you manually trigger a major compaction before the export and export data only after the major compaction is completed.
For more information about how to perform a major compaction, see Major compaction management.
Note
At present, the consistent export feature of OBDUMPER does not apply to OceanBase Database V4.0.0.