lukecwik opened a new pull request, #25219: URL: https://github.com/apache/beam/pull/25219
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 ``` **Please** add a meaningful description for your change here ------------------------ Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead. - [ ] Update `CHANGES.md` with noteworthy changes. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier). To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md) GitHub Actions Tests Status (on master branch) ------------------------------------------------------------------------------------------------ [](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule) [](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule) [](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule) [](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule) See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
