You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Robert Burke (JIRA)" <ji...@apache.org> on 2018/08/06 20:40:00 UTC

[jira] [Resolved] (BEAM-4727) Reduce metrics overhead

     [ https://issues.apache.org/jira/browse/BEAM-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burke resolved BEAM-4727.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 2.7.0

It may be possible to reduce this even further, but to me it's not immediately obvious how without also changing the API. The suggested improvements have also been implemented. If there's additional opportunity, feel free to re-open.

> Reduce metrics overhead
> -----------------------
>
>                 Key: BEAM-4727
>                 URL: https://issues.apache.org/jira/browse/BEAM-4727
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Robert Burke
>            Assignee: Robert Burke
>            Priority: Major
>             Fix For: 2.7.0
>
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> There are a few opportunities to avoid metrics overhead.
> First when setting state in the context, we allocate a new one for the stored value, per element. This generates a fair amount of objects for the garbage collector too. If we retain and re-use contexts within a bundle, we would have the opportunity to save on these costs.
> Also, it's possible that we have overhead on the metric updating paths. We can possibly do better than the general sync.Map, and avoid the type assertion cost for extracting values of known types from the maps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)