Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: dumpling如何限速,减少对生产上的影响
There is a requirement to export a large table on TiDB using dumpling. During the operation, slow queries and response times increased, which also triggered alarms. Is there any way to limit the export speed of dumpling?
How do you write dumping?
Try adjusting these parameters.
-t default is 64, you can change it to 4…
Okay, I’ll give it a try.
tiup dumpling -u xxx -P 4000 -h xxx -p ‘xxx’ --filetype csv -o /data/ -F 100MiB -t 2 -T xxx.xxx --tidb-mem-quota-query=1073741824 --consistency=auto
Changing to -t 1 still results in excessive traffic.
-t write 1
-r write 0
Give it a try
300 MB is okay, it’s just over 100 megabytes per second.
If it still doesn’t work, post some logs for us to check.
You can choose not to set -t.
If you still want to limit the speed, there is another way. Set the session parameters in dumpling to adjust the table scan operator and index scan operator to 1.
–params dumpling parameters can be found on the official website: 使用 Dumpling 导出数据 | PingCAP 文档中心
The scan operator is: 系统变量 | PingCAP 文档中心
Adding these parameters, tidb_distsql_scan_concurrency=1 and tidb_mem_quota_query=209715200, along with -T, can be considered as implementing rate limiting. Beyond this, there’s not much more that can be done.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.