# Use of DM - Performance Optimization

__*Using DM*__
__*DM performance optimization*__

+ in full volume export
  + rows
  + chunk-filesize
+ Full import
  + pool-size
+ Incremental copy
  + worker-count
  + Batch

-------------------------------------------------------------
in full volume export
The configuration item related to in full volume export is mydumpers. The following describes how to configure performance-related parameters.

rows
Set the rows option to enable multi-threaded concurrent export of a single table. The value is the maximum number of rows contained in each chunk exported. When enabled, DM will prioritize selecting a column as the split base when exporting a single table in MySQL. The priority of the selection is primary key > unique index > normal index. After selecting the target column, ensure that the column is an integer type (such as INT, MEDIUMINT, BIGINT, etc.).
The value of rows can be set to 10000. The specific value can be adjusted according to the total number of rows of data in the table and the performance of the database. You also need to set threads to control the number of concurrent threads. The default value is 4, so you can adjust it appropriately.

chunk-filesize
DM Full Backup divides the data of each table into chunks according to the value of the chunk-filesize parameter. Each chunk is saved in a file with a size of about chunk-filesize. The data is split into multiple files according to this parameter, so that the parallel processing logic of the DM Load processing unit can be used to improve the import speed. The default value of this parameter is 64 (MB). Normally, you do not need to set it, and you can adjust it appropriately according to the size of the in full volume data.

Full import
The configuration item related to full import are loaders. The following describes how to configure performance-related parameters.
pool-size
The pool-size is the setting for the number of threads in the DM Load stage. The default value is 16. Under normal circumstances, it is not necessary to set it, and it can be adjusted appropriately according to the size of the in full volume data and the performance of the database.

Incremental copy
The configuration related to incremental replication is syncers. The following describes how to configure performance-related parameters.
worker-count
The worker-count is set to the number of threads for concurrent DML migration in the DM Sync phase. The default value is 16. If you have high requirements for migration speed, you can increase the value of the change parameter appropriately.
Batch
When batch is the DM Sync phase to migrate data to the downstream database, the default value is 100, and no adjustment is required under normal circumstances.