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

Performance tuning in MultivariateOnlineSummarizer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • MLlib
    • None

    Description

      In MultivariateOnlineSummarizer, breeze's activeIterator is used to loop through the nonZero elements in the vector. However, activeIterator doesn't perform well due to lots of overhead. In this PR, native while loop is used for both DenseVector and SparseVector.

      The benchmark result with 20 executors using mnist8m dataset:

      Before:
      DenseVector: 48.2 seconds
      SparseVector: 16.3 seconds

      After:
      DenseVector: 17.8 seconds
      SparseVector: 11.2 seconds

      Since MultivariateOnlineSummarizer is used in several places, the overall performance gain in mllib library will be significant with this PR.

      Attachments

        Activity

          People

            dbtsai DB Tsai
            dbtsai DB Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: