Reuse temporary bytebuffer in loop #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small change that removes an object allocation in a common loop where we deserialize Maps in Pinot. It works by creating one secondary temporary buffer and then we adjust the buffer start and end, instead of making new buffer each time.
Performance measurement results:
Machine configuration:
4 core (8 threads) Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz
32GB of RAM
Linux x86-64, kernel: 5.0.0-37-generic
Benchmark configuration:
TPC-H (optimal index)
20 clients
180s runtime
Results (QPS higher is better, response time lower is better)
Base with (parse-query-cache):
Time Passed: 180.014s, Query Executed: 546726, QPS: 3037.1304454098013, Avg Response Time: 6.5738871024974115ms
Improved (this branch):
Time Passed: 180.013s, Query Executed: 567074, QPS: 3150.1835978512663, Avg Response Time: 6.337580280527762ms
Todo:
Co-authored-by: @grcevski @charliegracie @macarte @adityamandaleeka