You can tune the performance of OBDUMPER from three aspects: command-line options, VM memory, and database kernel.
Command-line options-based performance tuning
You can tune the performance of OBDUMPER by adjusting the settings of options in the following table.
| Option | Default value | Description |
|---|---|---|
| --thread | Number of CPU cores × 2 | 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. |
Note
During performance tuning, take into account the resource utilization on the server where OBDUMPER runs, on the ODP service nodes, and on the nodes in the OceanBase cluster, especially the network of the ODP nodes.
VM parameter-based performance tuning
Set the VM parameter in the export script to 60% of the available physical memory. Default value:-Xms4G -Xmx4G.
vim bin/obdumper
JAVA_OPTS="$JAVA_OPTS -server -Xms4G -Xmx4G -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=256M -Xss352K"
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 implement a major compaction, see the "Major compaction management" topic in Administrator Guide on the official website of OceanBase Database.