-
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
VTTablet: Transmit raw MySQL packets for Fields and Rows over wire with grpc buffer #17135
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Harshit Gangal <[email protected]>
9fafcb1
to
6313ead
Compare
cc6ea94
to
8c5edf6
Compare
…retreive query result Signed-off-by: Harshit Gangal <[email protected]>
363f2dd
to
ab80841
Compare
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Hello! 👋 This Pull Request is now handled by arewefastyet. The current HEAD and future commits will be benchmarked. You can find the performance comparison on the arewefastyet website. |
Signed-off-by: Harshit Gangal <[email protected]>
7305f33
to
846022c
Compare
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
1a92368
to
4f9b3d6
Compare
Signed-off-by: Harshit Gangal <[email protected]>
4f9b3d6
to
6057421
Compare
Signed-off-by: Harshit Gangal <[email protected]>
07a7260
to
e0d5217
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17135 +/- ##
==========================================
- Coverage 67.39% 67.31% -0.08%
==========================================
Files 1570 1574 +4
Lines 252917 253484 +567
==========================================
+ Hits 170446 170632 +186
- Misses 82471 82852 +381 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
881851f
to
050a239
Compare
Signed-off-by: Harshit Gangal <[email protected]>
45da34f
to
a5382bb
Compare
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
Signed-off-by: Harshit Gangal <[email protected]>
818b3de
to
35d913c
Compare
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Signed-off-by: Vicent Marti <[email protected]>
Alright, after a lot of tweaking this week I've got a branch going in our benchmarks which appears to behave properly. The results are, sadly, not good: As you can see, we have managed to reduce allocation costs in the vttablet by almost 40%. That's an extremely significant amount which unfortunately doesn't appear to translate into savings anywhere else. There's no increase in QPS and no reduction on latency. Why is this happening? Well, most of the performance wins to be had with pooling were already covered by this PR which I shipped a few weeks ago, enabling the v2 codec for GRPC. The idea here was that the CPU costs of parsing MySQL packets could be amortized further by moving the packet parsing from the tablets to the gates, and hence reducing GC costs on the former, but this doesn't appear to materialize. I've also checked the possibility that the constant allocations we optimized away could be acting as a memory ballast and forcing GC to be triggering more often, but that doesn't appear to be the case because these appear to be all ephemeral. Overall, I'm still not 100% convinced this is a dead end because I feel like we're missing something in this performance analysis. But I think we've already spent enough time on it (particularly @harshit-gangal who very kindly backported this patch and made it work again on newer Vitess) that we should stick it on the back-burner. I'll keep thinking about this however. |
Description
In this PR, VTTablet sends raw MySQL packets to VTGate avoiding two conversion
In this approach, the raw packets received from the MySQL is prefixed with the proto header and using mem.BufferSlice are send as-is over GRPC transport layer avoiding the double cost of conversions.
VTGate on the receiving side will convert the raw packets to sqltypes.Result, earlier the conversion was from proto to sqltypes.Result.
Related Issue(s)
Checklist