Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1229

TCP Options incorrect - optimized for throughput not latency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • None
    • None
    • netconf
    • None
    • Operating System: All
      Platform: All

    • 2914

      TCP Basics - if you want to implement a command/reply protocol you have to set TCP_NODELAY.

      This is doubly so when using Netty and abstractions on top of it which form the full command (or response) in one write buffer to write out. In such double-buffering environments the additional buffering in the kernel which happens when not setting NO_DELAY makes no sense and can only do harm in terms of latency.

      References (I can probably start with TCP Illustrated here):

      https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/1.2/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-Application_Tuning_and_Deployment-TCP_NODELAY_and_Small_Buffer_Writes.html

      or

      http://www.techrepublic.com/article/tcp-ip-options-for-high-performance-data-transmission/

      and even the (reference) ssh implementation. Quoting from the source of openssh:

      if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof opt) == -1)
      error("setsockopt TCP_NODELAY: %.100s", strerror(errno));

      Patch to follow shortly.

            Unassigned Unassigned
            aivanov@brocade.com Anton Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: