[arrow-flight encode path]re-use flatbufferbuilder#10220
Conversation
|
cc @alamb |
|
run benchmark flight |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing rich-T-kid/re-use-allocations (e9f85aa) to 44f3772 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
e9f85aa to
9fadcd7
Compare
|
🤔 i've been thinking about changing the benchmarks to avoid having tokio polling be a factor. It may be more useful to benchmark the top level entry functions I.E
directly the decode path wasnt touched in this PR but its showing a drastic change we have no control over the tokio run time so it makes sense to avoid it in the benchmarks if we can. |
Makes sense to me |
|
At the very least we should be using a single threaded tokio Runtime (not the multip threaded one) to avoid threading variability |
alamb
left a comment
There was a problem hiding this comment.
Makes sense to me -- thank you @Rich-T-kid
|
run benchmarks flight |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing rich-T-kid/re-use-allocations (9fadcd7) to 4e55832 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
…nchmarks] (#10242) # Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. --> - works towards #10125 # Rationale for this change see #10220 (comment) attempting to remove as much noise from profile/benchmarks as possible <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> # What changes are included in this PR? - sets each tokio runtime builder to use [new_current_thread](https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.new_current_thread) - remove [1] column case, trying to make benchmarks easier to read, reducing the size by 1/3 while keeping [4,8] <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> # Are these changes tested? n/a <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? If this PR claims a performance improvement, please include evidence such as benchmark results. --> # Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out. --> n/a
Which issue does this PR close?
Rationale for this change
flat buffer builder was being allocated repeatedly when it could be created once and reset using
fbb.resetWhat changes are included in this PR?
provides methods for setting and getting fbb. This avoids needing to re-allocate it on every call
Are these changes tested?
Are there any user-facing changes?