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

UnifiedMemoryManager double counts storage memory freed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.6.0
    • 1.6.0
    • Spark Core
    • None

    Description

      When execution evicts storage, we decrement the storage memory in two places:

      (1) https://github.com/apache/spark/blob/3e7e05f5ee763925ed60410d7de04cf36b723de1/core/src/main/scala/org/apache/spark/memory/StorageMemoryPool.scala#L131

      (2) https://github.com/apache/spark/blob/3e7e05f5ee763925ed60410d7de04cf36b723de1/core/src/main/scala/org/apache/spark/memory/StorageMemoryPool.scala#L133

      (1) calls MemoryStore#ensureFreeSpace, which internally calls MemoryManager#releaseStorageMemory for each block it drops. This call lowers the storage memory used by the block size.

      A seemingly simple fix is just to remove the line in (2). However, this bug is actually masked by SPARK-12165, so this one must be fixed after that one. Josh actually has an outstanding patch to fix both: https://github.com/apache/spark/pull/10170

      Attachments

        Issue Links

          Activity

            People

              joshrosen Josh Rosen
              andrewor14 Andrew Or
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: