Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^2: I know two prints are slower than one, but 200x slower?!?!?
in thread I know two prints are slower than one, but 200x slower?!?!?

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.

--
[ e d @ h a l l e y . c c ]

  • Comment on Re^3: I know two prints are slower than one, but 200x slower?!?!?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://633050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 23:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found