the nagle finagle
 
 
- Each application-layer message is split into 2 segments.  Why?
- 
- Because the app was calling write() twice
 
- For some reason, the second half isn’t sent until the first half is ACKed!  Why?
- 
- The Nagle Algorithm, which says “don’t send a tinygram if there is an outstanding tinygram.”
 
- Users had to wait 3 RTTs instead of 1
- Short term fix: turn off the Nagle Algorithm (setsockopt TCP_NODELAY in Solaris)
- Long term fix: rewrite the message-passing library to use writev() instead of write().