当前位置:网站首页>Tiflash performance tuning

Tiflash performance tuning

2022-07-19 11:41:00 Tianxiang shop

This article introduces how to make TiFlash Several ways to achieve optimal performance , Including planning machine resources 、TiDB Parameter tuning 、 To configure TiKV Region Size, etc .

Resource Planning

For those who want to save machine resources , And there is no isolation requirement at all , have access to TiKV and TiFlash Joint deployment . The suggestion is TiKV And TiFlash Leave enough resources separately , And don't share disks .

  1. about OLAP/TiFlash exclusive TiDB node , It is recommended to increase the number of read concurrency  tidb_distsql_scan_concurrency  To 80:

    set @@tidb_distsql_scan_concurrency = 80;

  2. Turn on Super batch function :

    tidb_allow_batch_cop  Variable is used to set from TiFlash When reading , Whether to put Region Request to merge . When the query involves Region The quantity is relatively large , You can try to set this variable to  1( Contraband  aggregation  Push down to TiFlash Coprocessor Your request is valid ), Or set the variable to  2( Push all down to TiFlash Coprocessor The request is effective ).

    set @@tidb_allow_batch_cop = 1;

  3. Try to turn on aggregation push  Join / Union  etc. TiDB Operator optimization :

    tidb_opt_agg_push_down  Variable is used to set whether the optimizer performs aggregate function push down to Join Previous optimization operations . When aggregation operations in queries are slow , You can try to set this variable to 1.

    set @@tidb_opt_agg_push_down = 1;

  4. Try to turn on  Distinct  Push through  Join / Union  etc. TiDB Operator optimization :

    tidb_opt_distinct_agg_push_down  Variable is used to set whether the optimizer executes with  Distinct  Aggregate function of ( such as  select count(distinct a) from t) Push down to Coprocessor Optimized operation of . When the query contains  Distinct  When the aggregation operation of is slow , You can try to set this variable to  1.

    set @@tidb_opt_distinct_agg_push_down = 1;

原网站

版权声明
本文为[Tianxiang shop]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/200/202207171446344270.html