go ahead... be a heretic | |
PerlMonks |
Re^3: I know two prints are slower than one, but 200x slower?!?!?by halley (Prior) |
on Aug 16, 2007 at 13:55 UTC ( [id://633050]=note: print w/replies, xml ) | Need Help?? |
Exactly right.
Candidates for turning off Nagle's Algorithm are applications which will create a trickle of a few small packets on a probably-quiet network, and yet should still be pretty low latency. For example, a user who is typing would find it really annoying to suffer lag on full-duplex telnet. They can't see what they typed until the character is echoed back. If your packets are big (multiple hundreds of bytes), if variable latency isn't a problem, or you are spewing many many packets to keep the network saturated much of the time, then let Nagle do its job. In the 90s (and still today), tons of games developers would think that they needed to reinvent all the "promises" of TCP by writing a huge and ugly app layer on top of a UDP datagrams protocol. It's folly to reinvent TCP at the app layer, especially when all the infrastructure is highly tuned to do TCP really really well. Turning off Nagle usually opened their eyes in disbelief. --
In Section
Seekers of Perl Wisdom
|
|