-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-25476][SPARK-25510][TEST] Refactor AggregateBenchmark and add a new trait to better support Dataset and DataFrame API #22484
Closed
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
649f296
Refactor AggregateBenchmark
wangyum e0c6d09
Merge remote-tracking branch 'upstream/master' into SPARK-25476
wangyum 42230b6
Add RunBenchmarkWithCodegen
wangyum 2d778a4
Rename RunBenchmarkWithCodegen to SqlBasedBenchmark
wangyum 536d4e9
Add withSQLConf to SqlBasedBenchmark
wangyum f783099
true.toString -> "true" and false.toString -> "false"
wangyum d5fecdc
Fix indentation
wangyum 23f1bd8
Merge remote-tracking branch 'upstream/master' into SPARK-25476
wangyum 0fae54d
use SQLHelper
wangyum 45add92
Update result (#12)
dongjoon-hyun 3439992
Fix string variable
wangyum 6c46ad5
Address comments
wangyum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
================================================================================================ | ||
aggregate without grouping | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
agg w/o group: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
agg w/o group wholestage off 39650 / 46049 52.9 18.9 1.0X | ||
agg w/o group wholestage on 1224 / 1413 1713.5 0.6 32.4X | ||
|
||
|
||
================================================================================================ | ||
stat functions | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
stddev: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
stddev wholestage off 6149 / 6366 17.1 58.6 1.0X | ||
stddev wholestage on 871 / 881 120.4 8.3 7.1X | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
kurtosis: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
kurtosis wholestage off 28822 / 29231 3.6 274.9 1.0X | ||
kurtosis wholestage on 929 / 944 112.9 8.9 31.0X | ||
|
||
|
||
================================================================================================ | ||
aggregate with linear keys | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
Aggregate w keys: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
codegen = F 7956 / 7967 10.5 94.8 1.0X | ||
codegen = T hashmap = F 3872 / 4049 21.7 46.2 2.1X | ||
codegen = T hashmap = T 872 / 883 96.3 10.4 9.1X | ||
|
||
|
||
================================================================================================ | ||
aggregate with randomized keys | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
Aggregate w keys: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
codegen = F 9088 / 9240 9.2 108.3 1.0X | ||
codegen = T hashmap = F 5065 / 5238 16.6 60.4 1.8X | ||
codegen = T hashmap = T 1722 / 1768 48.7 20.5 5.3X | ||
|
||
|
||
================================================================================================ | ||
aggregate with string key | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
Aggregate w string key: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
codegen = F 3666 / 3704 5.7 174.8 1.0X | ||
codegen = T hashmap = F 2322 / 2357 9.0 110.7 1.6X | ||
codegen = T hashmap = T 1643 / 1676 12.8 78.3 2.2X | ||
|
||
|
||
================================================================================================ | ||
aggregate with decimal key | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
Aggregate w decimal key: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
codegen = F 2688 / 2704 7.8 128.2 1.0X | ||
codegen = T hashmap = F 1401 / 1430 15.0 66.8 1.9X | ||
codegen = T hashmap = T 394 / 415 53.2 18.8 6.8X | ||
|
||
|
||
================================================================================================ | ||
aggregate with multiple key types | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
Aggregate w multiple keys: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
codegen = F 5380 / 5437 3.9 256.5 1.0X | ||
codegen = T hashmap = F 3554 / 3648 5.9 169.5 1.5X | ||
codegen = T hashmap = T 2687 / 2719 7.8 128.1 2.0X | ||
|
||
|
||
================================================================================================ | ||
max function bytecode size of wholestagecodegen | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
max function bytecode size: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
codegen = F 375 / 416 1.7 572.0 1.0X | ||
codegen = T hugeMethodLimit = 10000 231 / 245 2.8 352.0 1.6X | ||
codegen = T hugeMethodLimit = 1500 383 / 412 1.7 583.7 1.0X | ||
|
||
|
||
================================================================================================ | ||
cube | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
cube: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
cube wholestage off 2250 / 2266 2.3 429.1 1.0X | ||
cube wholestage on 907 / 945 5.8 173.0 2.5X | ||
|
||
|
||
================================================================================================ | ||
hash and BytesToBytesMap | ||
================================================================================================ | ||
|
||
Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 on Mac OS X 10.12.6 | ||
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz | ||
|
||
BytesToBytesMap: Best/Avg Time(ms) Rate(M/s) Per Row(ns) Relative | ||
------------------------------------------------------------------------------------------------ | ||
UnsafeRowhash 205 / 215 102.4 9.8 1.0X | ||
murmur3 hash 104 / 111 202.0 4.9 2.0X | ||
fast hash 55 / 60 381.2 2.6 3.7X | ||
arrayEqual 132 / 139 158.9 6.3 1.6X | ||
Java HashMap (Long) 89 / 103 235.9 4.2 2.3X | ||
Java HashMap (two ints) 91 / 107 229.2 4.4 2.2X | ||
Java HashMap (UnsafeRow) 759 / 772 27.6 36.2 0.3X | ||
LongToUnsafeRowMap (opt=false) 384 / 406 54.7 18.3 0.5X | ||
LongToUnsafeRowMap (opt=true) 82 / 88 256.5 3.9 2.5X | ||
BytesToBytesMap (off Heap) 753 / 811 27.8 35.9 0.3X | ||
BytesToBytesMap (on Heap) 765 / 784 27.4 36.5 0.3X | ||
Aggregate HashMap 35 / 39 591.4 1.7 5.8X | ||
|
||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davies Do you know how to generate there benchmark:
spark/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/AggregateBenchmark.scala
Lines 70 to 78 in 3c3eebc