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

UnifiedMemoryManager double counts storage memory freed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.0
    • Component/s: Spark Core
    • Labels:
      None
    • Target Version/s:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: