Hadoop Common
  1. Hadoop Common
  2. HADOOP-2232

Add option to disable nagles algorithm in the IPC Server

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.16.0
    • Fix Version/s: 0.16.0
    • Component/s: ipc
    • Labels:
      None

      Description

      While investigating hbase performance, I found a bottleneck caused by
      Nagles algorithm. For some reads I would get a bi-modal distribution
      of read times, with about half the times being around 20ms, and half
      around 200ms. I tracked this down to the well-known interaction between
      Nagle's algorithm and TCP delayed acknowledgments.

      I found that calling setTcpNoDelay(true) on the server's socket
      connection dropped all of my read times back to a constant 20 ms.

      I propose a patch to have this TCP_NODELAY option be configurable. The
      attacked patch allows one to set the TCP_NODELAY option on both the
      client and the server side. Currently this is defaulted to false
      (i.e., with Nagle's enabled).

      To see the effect, I have included a Test which provokes the issue by
      sending a MapWriteable over an IPC call. On my machine this test shows
      a speedup of 117 times when using TCP_NODELAY.

      These tests were done on OSX 10.4. Your milage may very with other
      TCP/IP implementation stacks.

      1. HADOOP-2232-1.patch
        9 kB
        Clint Morgan
      2. HADOOP-2232-2.patch
        4 kB
        Clint Morgan
      3. 2232-3.patch
        4 kB
        Chris Douglas

        Activity

        Clint Morgan created issue -
        Clint Morgan made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Clint Morgan made changes -
        Attachment HADOOP-2232-1.patch [ 12369828 ]
        Clint Morgan made changes -
        Attachment HADOOP-2232-2.patch [ 12369890 ]
        Owen O'Malley made changes -
        Assignee Clint Morgan [ clint.morgan ]
        Chris Douglas made changes -
        Attachment 2232-3.patch [ 12373779 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Chris Douglas made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Nigel Daley made changes -
        Fix Version/s 0.16.0 [ 12312740 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Nigel Daley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Clint Morgan
            Reporter:
            Clint Morgan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development