Optimize the performance of GetTS
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Description
Obtaining TSO is a key step in the transaction. Improving the performance of `GetTS` can improve the performance of the entire cluster. One of the more obvious problems is that when the client is busy, getting TSO has a significant long tail problem. We have a benchmark client `bench-tso` in PD project, and you can run it with 10000 concurrency. Example output:
```
count:947492, max:50, min:8, >1ms:0, >2ms:0, >5ms:478043, >10ms:459063, >30ms:10386
count:982164, max:13, min:8, >1ms:0, >2ms:0, >5ms:487404, >10ms:494760, >30ms:0
count:973954, max:13, min:8, >1ms:0, >2ms:0, >5ms:385329, >10ms:588625, >30ms:0
count:972821, max:14, min:8, >1ms:0, >2ms:0, >5ms:377676, >10ms:595145, >30ms:0
count:975413, max:14, min:8, >1ms:0, >2ms:0, >5ms:412231, >10ms:563182, >30ms:0
count:941196, max:21, min:8, >1ms:0, >2ms:0, >5ms:303737, >10ms:637459, >30ms:0
count:961796, max:14, min:8, >1ms:0, >2ms:0, >5ms:369033, >10ms:592763, >30ms:0
count:973593, max:14, min:8, >1ms:0, >2ms:0, >5ms:418633, >10ms:554960, >30ms:0
count:982489, max:13, min:8, >1ms:0, >2ms:0, >5ms:472591, >10ms:509898, >30ms:0
count:931930, max:61, min:8, >1ms:0, >2ms:0, >5ms:448291, >10ms:471571, >30ms:12068
count:979887, max:13, min:8, >1ms:0, >2ms:0, >5ms:419038, >10ms:560849, >30ms:0
count:973117, max:25, min:8, >1ms:0, >2ms:0, >5ms:478479, >10ms:494638, >30ms:0
count:984385, max:13, min:8, >1ms:0, >2ms:0, >5ms:483516, >10ms:500869, >30ms:0
count:939342, max:19, min:8, >1ms:0, >2ms:0, >5ms:280159, >10ms:659183, >30ms:0
count:935988, max:32, min:8, >1ms:0, >2ms:0, >5ms:302658, >10ms:633283, >30ms:47
count:991155, max:14, min:8, >1ms:0, >2ms:0, >5ms:593176, >10ms:397979, >30ms:0
count:984702, max:13, min:8, >1ms:0, >2ms:0, >5ms:422315, >10ms:562387, >30ms:0
count:957891, max:31, min:8, >1ms:0, >2ms:0, >5ms:394925, >10ms:562376, >30ms:590
count:976569, max:13, min:8, >1ms:0, >2ms:0, >5ms:441844, >10ms:534725, >30ms:0
count:974835, max:24, min:8, >1ms:0, >2ms:0, >5ms:459893, >10ms:514942, >30ms:0
count:986326, max:14, min:8, >1ms:0, >2ms:0, >5ms:477202, >10ms:509124, >30ms:0
count:978978, max:13, min:8, >1ms:0, >2ms:0, >5ms:444974, >10ms:534004, >30ms:0
count:975067, max:13, min:8, >1ms:0, >2ms:0, >5ms:404418, >10ms:570649, >30ms:0
count:971453, max:21, min:8, >1ms:0, >2ms:0, >5ms:448108, >10ms:523345, >30ms:0
count:961049, max:23, min:8, >1ms:0, >2ms:0, >5ms:410778, >10ms:550271, >30ms:0
count:983659, max:13, min:8, >1ms:0, >2ms:0, >5ms:423110, >10ms:560549, >30ms:0
count:951750, max:30, min:8, >1ms:0, >2ms:0, >5ms:397103, >10ms:554362, >30ms:285
```
The requests greater than 30ms occur periodically.
Goals:
- Improve the long tail problem in TiDB
- Improve the ability to acquire TS ( more TPS )
## Difficulty
- Hard
## Score
- 20000
## Mentor(s)
- @disksing
## Recommended Skills
- Go
Contributor guide
Assessment
This issue has not been assessed yet.