Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12127

Reduce counter overhead in PCollectionConsumerRegistry.accept

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • Missing
    • java-fn-execution
    • None

    Description

      DelegatingCounter.inc shows up as 21% of cpu on nexmark query 2 benchmark under PCollectionConsumerRegistry.accept

      2% is actual counter incrementing, but the majority is the delegation of DelegatingCounter which involves looking up thread-local state and then getting the counter for the name from the counter container. However in this case the counter container is known and can just be bound when constructing the counter instaed of using DelegatingCounter.

      Attachments

        Activity

          People

            scwhittle Sam Whittle
            scwhittle Sam Whittle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 10m
                2h 10m