Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12950

Improve performance of BytesToBytesMap

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      When benchmark generated aggregate with grouping keys, the profiling show that lookup in BytesToBytesMap took about 90% of the CPU time, we should optimize it.

      After profiling with jvisualvm, here are the things that take most of the time:

      1. decode address from Long to baseObject and offset
      2. calculate hash code
      3. compare the bytes (equality check)

        Issue Links

          Activity

          Hide
          apachespark Apache Spark added a comment -

          User 'viirya' has created a pull request for this issue:
          https://github.com/apache/spark/pull/10877

          Show
          apachespark Apache Spark added a comment - User 'viirya' has created a pull request for this issue: https://github.com/apache/spark/pull/10877
          Hide
          apachespark Apache Spark added a comment -

          User 'viirya' has created a pull request for this issue:
          https://github.com/apache/spark/pull/11002

          Show
          apachespark Apache Spark added a comment - User 'viirya' has created a pull request for this issue: https://github.com/apache/spark/pull/11002
          Hide
          davies Davies Liu added a comment -

          Issue resolved by pull request 11010
          https://github.com/apache/spark/pull/11010

          Show
          davies Davies Liu added a comment - Issue resolved by pull request 11010 https://github.com/apache/spark/pull/11010

            People

            • Assignee:
              davies Davies Liu
              Reporter:
              davies Davies Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development