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

BlockManager does not account for memory consumed by remote fetches

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersStop watchingWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • Block Manager, Spark Core
    • None

    Description

      We use Spark exclusively with StorageLevel.DiskOnly as our workloads are very sensitive to memory usage. Recently, we've spotted that the jobs sometimes OOM leaving lots of byte[] arrays on the heap. Upon further investigation, we've found that the arrays come from BlockManager.getRemoteBytes, which calls BlockTransferService.fetchBlockSync, which in its turn would allocate an on-heap ByteBuffer of the same size as the block (e.g. full partition), if the block was successfully retrieved over the network.

      This memory is not accounted towards Spark storage/execution memory and could potentially lead to OOM if BlockManager fetches too many partitions in parallel. I wonder if this is intentional behaviour, or in fact a bug?

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jerryshao Saisai Shao Assign to me
            lebedev Sergei Lebedev
            Votes:
            0 Vote for this issue
            Watchers:
            9 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment