Rethinking the TCP Nagle algorithm

  • Authors:
  • J. C. Mogul;G. Minshall

  • Affiliations:
  • Computer Corp. Western Research Lab, 250 University Ave., Palo Alto, CA;Redback Networks, 350 Holger Way, San Jose, CA

  • Venue:
  • ACM SIGCOMM Computer Communication Review
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Modern TCP implementations include a mechanism, known as the Nagle algorithm, which prevents the unnecessary transmission of a large number of small packets. This algorithm has proved useful in protecting the Internet against excessive packet loads. However, many applications suffer performance problems as a result of the traditional implementation of the Nagle algorithm. An interaction between the Nagle algorithm and TCP's delayed acknowledgement policy can create an especially severe problems, through a temporary “deadlock.” These flaws in the Nagle algorithm have prompted many application implementors to disable it, even in cases where this is neither necessary nor wise. We categorize the applications that should and should not disable the Nagle algorithm, and we show that for some applications that often disable the Nagle algorithm, equivalent performance can be obtained through an improved implementation of the algorithm. We describe five possible modifications, including one novel proposal, and analyze their performance on benchmark tests. We also describe a receiver-side modification that can help in some circumstances.