Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18533

RPC Client performance improvement

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • rpc-server

    Description

        The current implementation copies the rpcRequest and header to a ByteArrayOutputStream in order to calculate the total length of the sent request, and then writes it to the socket buffer.

        But if the rpc engine is ProtobufRpcEngine2, we can pre-calculate the request size, and then send the request directly to the socket buffer, reducing a memory copy. And avoid allocating 1024 bytes of ResponseBuffer each time a request is sent.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xinqiu asdfgh19
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: