You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update ClickBench benchmarks with DataFusion 36 #9404
I just wanted to double-check that using the time from the 2nd line of the output for the result is correct? In the example above, the reported result is 0.034 seconds.
I accidentally created a PR against the ClickBench repo. I was hoping to get your feedback on these results first before doing that....
I took a quick look at the results and in general they looked reasonable to me
One thing I noticed is that there didn't seem to be a DataFusion 36 run for single file parquet (only partitioned).
Also, I wonder if we should remove the older datafusion versions 🤔
Initial performance observation
The only query that seems to have gotten substantially faster is Q9: I think the improvement is due to #8721 from @korowa
It was hoping to see a bigger improvement due to #8827 but it seems that has not yet been released. So we'll have to try with DataFusion 37 again,
There are some queries that show slight degregation in speed -- I am not sure if that is realted to measurement variance or if we have increased our per partition file overheard or something. It would be nice to see the numbers for single file and see if they showed a similar pattern
Thanks @alamb. I've fixed the file so that the Datafusion single file is visible for release 36. I've included 33, 34, 36 in this file so the results can be compared easily with the previous results - the previous versions will not be visible on the Clickbench overall results.
The published clickbench file will only include the latest datafusion release (36.0.0 tag) - this is available here
For a quick comparison here's the single file results for Datafusion 36
It sort of feels like cheating however to cache the metadata, though I suppose it would be allowed 🤔
@Ted-Jiang is there some way to test via configuration setting if caching the per-file metadata would help these queries? I couldn't find any way to enable Caching by default for the Cache Manager.
If it turns out to make a difference, maybe we could provide a simple LRU type cache by default in DataFusion 🤔
@Ted-Jiang is there some way to test via configuration setting if caching the per-file metadata would help these queries?
There are two kinds of cache in datafusion ListFilesCache and FileStatisticsCache
ListFilesCache: Before I change this into session level, i think it is already on in global level (so no config setting in df 🤣 ). it will reuse the result under the same path of list files.
FileStatisticsCache: This cache is specifically used for Cost-Based Optimization (CBO), It is typically disabled and only activated within our internal system to cache FileStatistics, which are used for join selection.
If it turns out to make a difference, maybe we could provide a simple LRU type cache by default in DataFusion
This sounds like great, like linked_hash_map, i would like to help this.
Activity
alamb commentedon Feb 29, 2024
@kmitchener any chance you are willing to run the benchmark numbers again for DF 36?
alamb commentedon Feb 29, 2024
(I am especially keen to see how #8827 has helped)
pmcgleenon commentedon Mar 5, 2024
@kmitchener @alamb I'm happy to help out here if needed
pmcgleenon commentedon Mar 7, 2024
@alamb @kmitchener I went ahead and ran the benchmarks against 36.0.0 - the results are available on this branch
I've added them to the handy html from here which includes the results from releases 33 and 34 for comparison
I accidentally created a PR against the ClickBench repo. I was hoping to get your feedback on these results first before doing that....
pmcgleenon commentedon Mar 7, 2024
I have a basic question about the time being reported for the queries. If you take a look at the shell script
https://github.com/ClickHouse/ClickBench/blob/main/datafusion/run.sh#L34
the variable RES holds the result, it's taking the text from the 7th column in the 2nd line
If I run the cli there are two query times being reported (assuming one for creating the table and one for the query as per the note in the
run.sh.I just wanted to double-check that using the time from the 2nd line of the output for the result is correct? In the example above, the reported result is 0.034 seconds.
Dandandan commentedon Mar 8, 2024
@pmcgleenon second time looks correct to me.
it looks like the script will return 0.154 rather than 0.034 because the grep is done first.
pmcgleenon commentedon Mar 8, 2024
@Dandandan thanks for the confirmation, yep the result will be 0.154 in the example above
pmcgleenon commentedon Mar 8, 2024
For reference, here's the clickbench PR with the update ClickHouse/ClickBench#178
alamb commentedon Mar 8, 2024
Thank you very much @pmcgleenon
I took a quick look at the results and in general they looked reasonable to me
One thing I noticed is that there didn't seem to be a DataFusion 36 run for single file parquet (only partitioned).
Also, I wonder if we should remove the older datafusion versions 🤔
Initial performance observation
The only query that seems to have gotten substantially faster is Q9: I think the improvement is due to #8721 from @korowa
It was hoping to see a bigger improvement due to #8827 but it seems that has not yet been released. So we'll have to try with DataFusion 37 again,
There are some queries that show slight degregation in speed -- I am not sure if that is realted to measurement variance or if we have increased our per partition file overheard or something. It would be nice to see the numbers for single file and see if they showed a similar pattern
pmcgleenon commentedon Mar 8, 2024
Thanks @alamb. I've fixed the file so that the Datafusion single file is visible for release 36. I've included 33, 34, 36 in this file so the results can be compared easily with the previous results - the previous versions will not be visible on the Clickbench overall results.
The published clickbench file will only include the latest datafusion release (36.0.0 tag) - this is available here
For a quick comparison here's the single file results for Datafusion 36
Yep Q9 is showing a decent improvement.
alamb commentedon Mar 9, 2024
I think the numbers are good to publish.
In terms of the slowdown I agree it is likely something real (and we are tracking something similar in #8836)
Perhaps there is per-file or per-partition overhead that has increased in 34.0.0 that we haven't gotten to the bottom of. @Ted-Jiang I wonder if this could be related to caching the file metadata -- for example I wonder if using something like https://docs.rs/datafusion/latest/datafusion/execution/cache/cache_manager/struct.CacheManager.html would improve the performance as it would avoid some small IOs at the start of the query
It sort of feels like cheating however to cache the metadata, though I suppose it would be allowed 🤔
@Ted-Jiang is there some way to test via configuration setting if caching the per-file metadata would help these queries? I couldn't find any way to enable Caching by default for the Cache Manager.
If it turns out to make a difference, maybe we could provide a simple LRU type cache by default in DataFusion 🤔
Ted-Jiang commentedon Mar 11, 2024
@alamb Sorry for the late response.
There are two kinds of cache in datafusion
ListFilesCacheandFileStatisticsCacheListFilesCache: Before I change this intosessionlevel, i think it is alreadyonin global level (so no config setting in df 🤣 ). it will reuse the result under the same path of list files.FileStatisticsCache: This cache is specifically used for Cost-Based Optimization (CBO), It is typically disabled and only activated within our internal system to cache FileStatistics, which are used for join selection.This sounds like great, like
linked_hash_map, i would like to help this.pmcgleenon commentedon Mar 22, 2024
@alamb the Clickbench PR with the datafusion 36 updates has been merged ClickHouse/ClickBench#178
So I think we are good here!
alamb commentedon Mar 22, 2024
Thank you very much @pmcgleenon 🙏
alamb commentedon Jul 20, 2024
Filed #11567 to track udating for DataFusion 40