-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add query batching #180
base: master
Are you sure you want to change the base?
Add query batching #180
Conversation
BenchmarkResults
Current status
|
9c528c7
to
c5319ec
Compare
Depends on #181 |
2d6889f
to
bd5b970
Compare
Ready as #181 was merged. |
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.
Great work @marco6, took a first look.
I would like to understand why we have some outliers in our benchmark test, some being as high as +900% through our change. Overall, the benchmark is looking very promising.
ba4887f
to
bd5b970
Compare
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.
Overall I think this is looking quite nice! Here are a few notes to help polish up the code
Heads up for any reviewer: I moved the logic in a separate package, together with the old |
f93f082
to
907ce6c
Compare
This PR has been rebased so that the benchmarks results are comparing the current master branch. |
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.
A few small nits and then I'll re-base your branch on the performance test to ensure improvements are made as expected.
Given the increased memory requirement from this PR, I think we should wait canonical/dqlite#714. |
f11a99e
to
4e16cd4
Compare
4e16cd4
to
ecafe37
Compare
This PR now depends also on #216 which factors out all the code which is not related to batching from this PR. Some of the comments here are in fact about the refactor rather than batching itself and should be probably discussed there. |
ecafe37
to
54d1b5b
Compare
I have rebased this on top of master as #216 was merged. The patch now is way smaller. |
All update operations (insert/update/delete) force a fsync on the WAL (and sometimes on the disk because of checkpoints). This limits the number of operations to what the underlying disk can do (usually in the order of hundreds).
Grouping these operations in transactions should dramatically increase the throughput while making the top X%ile latency a bit higher. However, this should be balanced by a lower latency in the bottom X%ile.
We should test this also on a real cluster.
This PR also removes the write lock as now there is always only one active writer.