-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Performance Regression: Backtraces in errors slow down planning time (Expensive backtraces) #7522
Comments
cc @comphead
I agree with this assessment. What I propose we do is:
|
Thanks for reporting this. I'm thinking of adding an extra check whether backtrace should be generated. For the happy path, would you mind to clarify a bit the idea? |
@crepererum if you run your workload with |
I think the idea is that there are many places in the code that use fallible functions (on |
as a quick fix I can do backtrace even more optional, like crate feature(the same done in anyhow crate) or put another datafusion config param to enable/disable backtrace. Also its probably good to have a benchmark test for planner, not sure how to do it though, but its doable. @alamb @crepererum let me know your thoughts |
I can check w/ |
I think there is one benchmark for the planner here: cargo bench --bench sql_planner I haven't run it recently -- it would be great to eventually run these over time and track their performance #5504 |
DataFusion creates loads of errors even on the happy path. However as of #7434, we now gather a backtrace for each error. This is rather expensive. Here is a profile dump from a prod workload:
In the said workload, there is a LOT of going for bookkeeping (that's why I had the profiler running in the first place) but the backtraces alone make up for 30% of the time. The place looks like this:
(had to remove a good amount of details due to data protection, but the filters / predicates are rather simple)
I think there are two paths forward:
Option
or some other enumThe text was updated successfully, but these errors were encountered: