Skip to content
uencoder

Nagle's Algorithm

Nagle's algorithm coalesces small segments into full-size ones, reducing small-packet counts but potentially adding 40 ms of delay (through interaction with delayed ACK).

Purpose

It cuts small-packet overhead for throughput-sensitive, latency-tolerant bulk transfers; real-time applications should disable it.

Mechanism

While unacknowledged data is outstanding, small segments are buffered until they fill an MSS or the previous segment is ACKed. Interacting with delayed ACK can introduce 40 ms of latency, so real-time applications set TCP_NODELAY to disable it.

Use cases

  • Bulk data transfer
  • Telnet/FTP
  • Reducing small packets

Related tools

References