-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize PGBK table to only update cache when there is a large enough…
… size change. #21250 (#25219) * Optimize PGBK table to only update cache when there is a large enough size change. #21250 This prevents an expensive scenario where a user is outputting lots of small values (e.g. ints) to be precombined and hence takes little to no space to store so updating the cache provides little value. Note the 5-10x change for all types except for unique keys. Some early profiles show that there is an issue with the G1 garbage collector when storing so many small values that the GC management overhead dominates 75% of the execution which requires further investigation. Before: ``` Benchmark (distribution) (globallyWindowed) Mode Cnt Score Error Units PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniform true thrpt 5 8.306 ± 1.255 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniform false thrpt 5 7.849 ± 0.476 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine normal true thrpt 5 10.575 ± 1.295 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine normal false thrpt 5 10.772 ± 0.141 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine hotKey true thrpt 5 9.131 ± 2.761 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine hotKey false thrpt 5 8.302 ± 1.078 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniqueKeys true thrpt 5 3.899 ± 1.737 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniqueKeys false thrpt 5 4.203 ± 2.170 ops/s ``` After: ``` Benchmark (distribution) (globallyWindowed) Mode Cnt Score Error Units PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniform true thrpt 5 88.740 ± 8.925 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniform false thrpt 5 76.005 ± 5.150 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine normal true thrpt 5 43.388 ± 1.966 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine normal false thrpt 5 37.804 ± 7.177 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine hotKey true thrpt 5 84.881 ± 5.040 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine hotKey false thrpt 5 74.183 ± 2.063 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniqueKeys true thrpt 5 5.567 ± 4.068 ops/s PrecombineGroupingTableBenchmark.sumIntegerBinaryCombine uniqueKeys false thrpt 5 6.957 ± 1.508 ops/s ```
- Loading branch information
Showing
5 changed files
with
117 additions
and
58 deletions.
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
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
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
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
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