Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prewrite and Commit take a long time #29743

Open
ocbsearcher opened this issue Nov 13, 2021 · 0 comments
Open

Prewrite and Commit take a long time #29743

ocbsearcher opened this issue Nov 13, 2021 · 0 comments
Labels
type/performance type/question The issue belongs to a question.

Comments

@ocbsearcher
Copy link

ocbsearcher commented Nov 13, 2021

Performance Questions

What version of TiDB are you using?

  • tidb 5.2.1

What's the observed and your expected performance respectively?

  • We want to improve the writing performance of tidb. According to the information of tidb dashboard and tidb grafana, prewrite and commit stage is very slow.

Cluster's topology architecture:

  1. 4 tidb & 3pd (aws c5.2xlarge 8 cores & 16G)
  2. 6 tikv (aws m5.2xlarge 8 cores & 32G) (disk: gp3 & 10000 iops & 800MB/s)

Modified Cluster Params: (https://docs.pingcap.com/tidb/stable/tidb-configuration-file#txn-local-latches)

  1. txn-local-latches enabled true
  2. txn-local-latches capacity 4196000

Application scenario: Import data, write more and read less. Some businesses use optimistic transactions (auto commit), and some conflicting scenarios use pessimistic transactions.

Under this configuration, the writing performance of tidb is very slow. Can you give me some tuning methods? Thanks!


TiDB Grafana

scheduler prewrite

图片

scheduler commit

图片

tikv trouble shooting hot write

图片

图片

tikv trouble shooting hot read

(During this time period, there are basically no read requests, and almost all requests are for writing data. )
图片

tikv trouble shotting write too slow

图片

图片

图片

图片

tikv node exporter

图片

tikv summary

图片

tidb summary

图片

TiDB Dashboard

cluster qps

图片

commit mean latency

图片

prewrite is very slow

图片

key visulizer

图片

@ocbsearcher ocbsearcher added type/performance type/question The issue belongs to a question. labels Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/performance type/question The issue belongs to a question.
Projects
None yet
Development

No branches or pull requests

1 participant