[
https://issues.apache.org/jira/browse/BEAM-4468?focusedWorklogId=202943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-202943
]
ASF GitHub Bot logged work on BEAM-4468:
----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Feb/19 00:10
Start Date: 23/Feb/19 00:10
Worklog Time Spent: 10m
Work Description: youngoli commented on pull request #7927: [BEAM-4468]
Go SDK Combiner Lifting cache cap & eviction.
URL: https://github.com/apache/beam/pull/7927#discussion_r259549720
##########
File path: sdks/go/pkg/beam/core/runtime/exec/combine.go
##########
@@ -318,6 +318,27 @@ func (n *LiftedCombine) ProcessElement(ctx
context.Context, value *FullValue, va
return n.fail(err)
}
+ // TODO(BEAM-4468): replace with some better implementation
+ // once adding dependencies is easier.
+ // Arbitrary limit until a broader improvement can be demonstrated.
+ const cacheMax = 2000
+ if len(n.cache) > cacheMax {
Review comment:
My gut feeling is that the performance benefits of being able to combine
here more often because more keys are still cached would outweigh the
performance cost of having to remove elements more often (and it might not even
be that often, it depends on how many different keys we might expect the user
to use).
I thought about suggesting maybe removing a number of elements (50 or so) at
once to avoid this... But then I realized that the performance cost is probably
near-identical, just front-loaded to a single removal of 50 elements instead of
50 removals of single elements.
So I agree with Robert here that this is probably not a significant problem.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 202943)
Time Spent: 2h 10m (was: 2h)
> Go SDK-Tune in memory pre-combine caching for Lifted Combines.
> --------------------------------------------------------------
>
> Key: BEAM-4468
> URL: https://issues.apache.org/jira/browse/BEAM-4468
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Robert Burke
> Priority: Minor
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> Requires [BEAM-4276|https://issues.apache.org/jira/browse/BEAM-4276] to be
> completed first.
> Additional performance tweaks to the in memory per-key accumulator cache
> during the pre-combine phase of a lifted combine.
> This can include any of
> * capping the number of key-accumulator in the cache, and draining them
> eagerly after x elements seen, or evicting keys by some heuristic after the
> cache has seen X distinct keys.
> * providing a counter on cache size (key/element counts) exposable through
> the metrics interface or another runner standard counter, to permit observing
> the cache's status, especially if it could grow without bound within a bundle.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)