1 / 28

Interactions Between Delayed Acks and Nagle’s Algorithm in HTTP and HTTPS: Problems and Solutions

Interactions Between Delayed Acks and Nagle’s Algorithm in HTTP and HTTPS: Problems and Solutions. Arthur Goldberg Robert Buff New York University March 1999. Nagle - Delayed Ack Interaction. Client Browser. Web Server. Application. TCP/IP. Network. TCP/IP. Application.

jael
Télécharger la présentation

Interactions Between Delayed Acks and Nagle’s Algorithm in HTTP and HTTPS: Problems and Solutions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interactions Between Delayed Acks and Nagle’s Algorithm in HTTP and HTTPS: Problems and Solutions Arthur Goldberg Robert Buff New York University March 1999

  2. Nagle - Delayed Ack Interaction Client Browser Web Server Application TCP/IP Network TCP/IP Application W1: write() less than MSS TCP segment with W1 W2: write() less than MSS read() W1 175 ms (Win32) Ack delay ACK for W1 20 ms TCP segment with W2 read() W2 segment with response write() W1/W2 response read() W1/W2 response

  3. Observations • Applies to request/response applications other than the Web • Diagram to scale, and generous with message travel times • Client blocks until receipt of response • ACK delay depends on TCP implementation • Occurs with client/server roles reversed, too

  4. Solution Opportunities: In Order of Increasing Implementation Difficulty and Impact • Application: Change buffering, disable Nagle • Sockets API: Broaden semantics • TCP implementation: Decrease ACK delay • TCP standard: Change Nagle

  5. Network Communications Goals • Application layer: minimize median response time - deliver data to a receiver as soon as it’s ready • Transport and Network layers: avoid gross inefficiencies - collect data into the largest possible segments

  6. Assumptions • Network • modest delay • high bandwidth • minimal packet lost • Application • client/server • many modules

  7. data ack Advertise 1 byte of available window 1 byte of data ack Advertise 1 byte of available window 1 byte of data The Silly Window Syndrome (SWS) Sender Receiver write() some TCP window full read 1 byte read 1 byte Overhead: 3 packets and 3*40 = 120 bytes of TCP/IP headers transport 1 byte of data!

  8. TCP’s SWS Avoidance • Receiver • avoid advertising small TCP window advances • delay acknowledgements • Sender • Nagle algorithm: delays transmission of partially filled segments until all previously transmitted data has been acknowledged

  9. Receiver SWS Avoidance in the TCP Spec, RFC 1122 • The receiver's SWS avoidance algorithm determines when the right window edge may be advanced; • For realistic receive buffers (greater than twice the MSS) window advances are announced in increments of MSS. • A TCP SHOULD implement a delayed ACK … the delay MUST be less than 0.5 seconds, and in a stream of full-sized segments there SHOULD be an ACK for at least every second segment.

  10. Sender SWS Avoidance in the TCP Spec • A TCP SHOULD implement … [Nagle 84] to coalesce short segments. However, there MUST be a way for an application to disable the Nagle algorithm on an individual connection. • The Nagle algorithm is …: If there is unacknowledged data … then the sending TCP buffers all user data … until the outstanding data has been acknowledged or until the TCP can send a full-sized segment …

  11. Test Application • Execute 100 iterations

  12. Lab Machines connected by unloaded 100 Mbps Ethernet * Win95 separated by 1 router

  13. Linux/NT, Nagle Off

  14. NT/NT, Nagle On

  15. Solaris/NT, Nagle On

  16. Summary

  17. ACK delays

  18. HTTPS, new session key

  19. HTTPS, session key reused

  20. HTTPS Potential Savings

  21. HTTP, GIF from Netscape

  22. Application Alternatives

  23. Alternative: Disable Nagle on the last write of an application message • Advantages • easy to do • removes delayed ACK from critical path • eliminate risk of small packets flood • Disadvantages • two extra system calls per application message • possibly one extra IP packet • complicated for a programmer

  24. Related Work • Nagle - delayed ACK interactions widely recognized, e.g. Stevens 98, Microsoft 98 and Sun 98 • P-HTTP recorded by Heidemann 97 • Nielsen 97, 98: test a typical HTTP/1.1 server page load • (Client ran on a DEC Alphastation 400 4/233, UNIX 4.0a)

  25. Possible Solutions • Sockets API • Include a flush • TCP implementation • Decrease ACK delay, especially in Win32 • TCP standard • Desensitize SWS avoidance • SWS avoidance clearly being triggered prematurely and introducing unnecessary delays

  26. Nagle modification proposed • Minshall, “A Suggested Modification to Nagle's Algorithm”, http://search.ietf.org/internet-drafts/draft-minshall-nagle-00.txt • If a TCP has less than a full-sized packet to transmit, and if any previous less than full-sized packet has not yet been acknowledged, do not transmit a packet. • Will not solve SSL problem above

  27. Measure production delayed ACK costs Examine other application protocols Develop high-performance sockets Todos

  28. Interactions Between Delayed Acks and Nagle’s Algorithm in HTTP and HTTPS: Problems and Solutions Arthur Goldberg Robert Buff New York University March 1999

More Related