Search code examples
nagle

what's the risk of disabling TCP nagle behavior?


By default for Windows at least, Nagling is on. There are potential performance gains due to turning it off. What's the downside of turning it off?


Solution

  • Suppose you do a write and send exactly one byte. And suppose tcphdr + iphdr are 40 bytes. This means you're there's more overhead than data.

    There's no real "risk". If your application does many small writes you'll experience a lot more packets and a drop in efficiency (it shouldn't translate into a drop in performance).