-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[vtgate] Add flag to pool connection read buffers #11167
[vtgate] Add flag to pool connection read buffers #11167
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we run the benchmarks from here go/mysql/query_benchmark_test.go
if it gives some additional insights?
Benchmark output from this branch(still need to compare with main but figured this was good to have for now):
|
…stener and connection Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
878a51f
to
59208c5
Compare
results off of the main branch:
|
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
modified the benchmark to run with the read buffer pooling enable and disabled so we can compare more effectively:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes looks good, just one flag naming convention change.
Would need to add in |
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
As the title suggests, this is a backport of a change that was made in upstream for the v15 release.
Backport vitessio#11167-vtgate buffer
* Backport vitessio#11167-vtgate buffer fix * update help message * fix help message
Description
We(Slack) found that when a vtgate is under heavy connection load, tail latencies of connect times
tend to spike into the tens of milliseconds. A contributing factor is GC slowdown that is
exacerbated by the repeated allocation of enw 16k read buffers for each incoming connection. This PR
adds a flag to the vtgate mysql server to enable pooling those read buffers and re-using them across
requests.
@henryr found that under a synthetic load, we were able to get connection times down by 55% at the
p999 and 40% at the p99:
We've also run this against our loadtest environment and found, aside from less GC pauses, that our
upstream clients saw a 20% reduction in connection failures, with a 5-8% drop in connect latencies
across the board(p50 -> p999), and no perceived degradation in query latency.
This type of change has been attempted in the past
and was closed out but since there has since been work to buffer connection writes, figured it made
sense to revisit that.
Related Issue(s)
#4186
Checklist
Deployment Notes
n/a