-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Help Wanted] cdc: why my replication_gap so large? #402
Comments
I noticed that there are many hard-coded parameters. After modifying some of them, I found that the latency decreased from 8 seconds to 4 seconds. Would it be possible to make these parameters configurable? |
I think yes. Which parameters, and why they affect the latency in your case ? |
This parameter in TiKV can cause a timestamp discrepancy with physical time, resulting in incorrect calculations, but seems no real negative effect.
This parameter have a real negative effect, but it seems related to a server side bug. I also tried other parameters, like |
This parameter is configurable, See https://docs.pingcap.com/tidb/v6.5/tikv-configuration-file#alloc-ahead-buffer-new-in-v640. It's indeed an issue, the cached TSO should not affect the calculation of replication gap. But currently I don't find a good way to fix it. (Maybe carry the information about the cache in resolved ts message ?)
Emmm... I think the issue has been fixed by tikv/tikv#13520. The parameter is a work around (#196) but we forget to remove it. I will remove it and do some tests. |
Great! Thank you master @pingyu |
You are right, the |
En ? You mean these parameters should be constant or configurable ? |
There are many hard-coded numbers in the code now, which is not very friendly for some optimization operations because developers often do not realize the impact these numbers may have. If we can give these numbers some names, it will make it easier for developers to optimize them instead of reading through all the code. When we find parameters that really have a huge impact on performance, we can consider making them configurable. Before that, we can consider giving them constant names and corresponding comments to facilitate retrieval. |
Get it. BTW, the concurrency is configurable by migration/cdc/cdc/sink/tikv.go Line 99 in 1b33b2a
|
I used this command to monitor my cdc job, and found the latency is large than I expected.
replication_gap
is big butsink_gap
is small, could this be due to slow data pulling? How can I increase its speed?The text was updated successfully, but these errors were encountered: