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

Netty-based block server / client module

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.2.0
    • Shuffle, Spark Core
    • None

    Description

      Right now shuffle send goes through the block manager. This is inefficient because it requires loading a block from disk into a kernel buffer, then into a user space buffer, and then back to a kernel send buffer before it reaches the NIC. It does multiple copies of the data and context switching between kernel/user. It also creates unnecessary buffer in the JVM that increases GC

      Instead, we should use FileChannel.transferTo, which handles this in the kernel space with zero-copy. See http://www.ibm.com/developerworks/library/j-zerocopy/

      One potential solution is to use Netty. Spark already has a Netty based network module implemented (org.apache.spark.network.netty). However, it lacks some functionality and is turned off by default.

      Attachments

        Issue Links

          1.
          Migrate Netty network module from Java to Scala Sub-task Resolved Reynold Xin
          2.
          Support transferring large blocks in Netty network module Sub-task Resolved Reynold Xin
          3.
          Add config option to support NIO vs OIO in Netty network module Sub-task Resolved Reynold Xin
          4.
          Support fetching in-memory blocks for Netty network module Sub-task Resolved Reynold Xin
          5.
          Create config options for Netty sendBufferSize and receiveBufferSize Sub-task Resolved Reynold Xin
          6.
          Report error messages back from server to client Sub-task Resolved Reynold Xin
          7.
          Support fetching multiple blocks in a single request in Netty network module Sub-task Resolved Reynold Xin
          8.
          Use a single FileClient and Netty client thread pool Sub-task Resolved Reynold Xin
          9.
          Support SASL authentication in Netty network module Sub-task Resolved Aaron Davidson
          10.
          Leverage Hadoop native io's fadvise and read-ahead in Netty transferTo Sub-task Closed Unassigned
          11.
          Recycle ByteBufs by using PooledByteBufAllocator Sub-task Resolved Reynold Xin
          12.
          Maintains a connection pool and reuse clients in BlockClientFactory Sub-task Resolved Reynold Xin
          13.
          Client should be able to put blocks in addition to fetch blocks Sub-task Resolved Reynold Xin
          14.
          Implement unit/integration tests for connection failures Sub-task Resolved Reynold Xin
          15.
          Release all ManagedBuffers upon task completion/failure Sub-task Resolved Reynold Xin
          16.
          Make sure client doesn't block when server/connection has error(s) Sub-task Resolved Reynold Xin
          17.
          Refactor Netty module to use BlockTransferService Sub-task Resolved Reynold Xin
          18.
          SO_RCVBUF and SO_SNDBUF should be bootstrap childOption, not option Sub-task Resolved Reynold Xin
          19.
          Disable thread local cache in PooledByteBufAllocator Sub-task Resolved Reynold Xin

          Activity

            People

              rxin Reynold Xin
              rxin Reynold Xin
              Votes:
              0 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: