-
Notifications
You must be signed in to change notification settings - Fork 165
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
fix: Avoid to call import and export Arrow array for native execution #1055
base: main
Are you sure you want to change the base?
fix: Avoid to call import and export Arrow array for native execution #1055
Conversation
I tried running benchmarks from this PR but I am running into an error:
I also see this glib error in the executor log:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1055 +/- ##
============================================
- Coverage 34.46% 34.32% -0.15%
- Complexity 888 893 +5
============================================
Files 113 114 +1
Lines 43580 42916 -664
Branches 9658 9339 -319
============================================
- Hits 15021 14732 -289
+ Misses 25507 25336 -171
+ Partials 3052 2848 -204 ☔ View full report in Codecov by Sentry. |
@kazuyukitanimura. I can run the benchmarks now, but I did not see any difference in performance compared to the main branch. Are you still seeing a performance benefit after the recent changes? |
Thank you @andygrove |
5 iterations
After
|
Before
After
|
I see these results from 3 runs of q39 (both a+b) with 1TB input: main: 59.3s/57.0s/57.1s I am using these configs:
|
Thanks @andygrove
|
I guess the diff is only observable on very small scale (ms). Once the query time is second/minute/hour level, the diff is insignificant. |
Thank you @andygrove @viirya I addressed memory issues and added DSv2 support (except Iceberg). This is ready for review again. I also run with 1TB by myself. I still see 10% ish speed up that is the order of seconds not Before (1TB)
After (1TB)
|
It looks like less than 5%? 27979 - 27281 = 698 ~= 2% So I believe that the diff is insignificant for longer query time. |
Thanks @viirya
I used
The performance gain is proportional to the input size by design because it saves the overhead for all input arrow vectors. |
33349 obviously looks like it is affected by some noises. q44 avg diff is also ~ 5%.
I mean it is less significant with longer query time. For queries running many minutes or hours, it has no difference. I doubt that if it is worth. |
@viirya Let me try to convince one more time.
If the query time is long because the data size, this PR still helps (5% at least?). If the query time is long because the query itself is complex, this PR has less value.
The latest change is pretty small after following your change on Arrow spec memory model. There are only 3 main changes
The rest of changes are only for passing the information of the new mode is used.
Do you have any recommendations here? What if I add a feature flag to enable/disable this new code flow. The latest change is fully backward compatible. We can easily enable/disable with a single flag to manipulate |
Which issue does this PR close?
Rationale for this change
Performance improvement
What changes are included in this PR?
This PR has changes to avoid to call import and export Arrow array for native execution
How are these changes tested?
Exisiting tests