首页 > 其他 > 详细

Nagle's algorithm

时间:2017-01-17 10:21:13      阅读:187      评论:0      收藏:0      [点我收藏+]

w以减少数据包发送量来提高TCP/IP网络性能。

https://en.wikipedia.org/wiki/Nagle‘s_algorithm

https://zh.wikipedia.org/wiki/纳格算法

http://www.ietf.org/rfc/rfc896.txt

 

纳格算法是以减少数据包发送量来增进TCP/IP网络的性能。它是由约翰.纳格任职于Ford Aerospace时命名。

纳格的文件[注 1]描述了他所谓的“小数据包问题”-某个应用程序不断地提交小单位的数据,且某些常只占1字节大小。因为TCP数据包具有40字节的标头信息(TCP与IPv4各占20字节),这导致了41字节大小的数据包只有1字节的可用信息,造成庞大的浪费。这种状况常常发生于Telnet工作阶段-大部分的键盘操作会产生1字节的数据并马上提交。更糟的是,在慢速的网络连接下,这类的数据包会大量地在同一时点传输,造成壅塞碰撞(Congestion Collapse)。

纳格算法的工作方式是合并(coalescing)一定数量的输出数据后一次提交。特别的是,只要有已提交的数据包尚未确认,发送者会持续缓冲数据包,直到累积一定数量的数据才提交。

算法

 if有新資料要傳送
   if訊窗大小>= MSS and可傳送的資料>= MSS
     立刻傳送完整MSS大小的segment
   else
    if管線中有尚未確認的資料
      在下一個確認(ACK)封包收到前,將資料排進緩衝區佇列
    else
      立即傳送資料  

MSS = 最大segment大小

 

                          Introduction

Congestion control is a recognized problem in  complex  networks.
We have discovered that the Department of Defense‘s Internet Pro-
tocol (IP) , a pure datagram protocol, and  Transmission  Control
Protocol  (TCP),  a transport layer protocol, when used together,
are subject to unusual congestion problems caused by interactions
between  the  transport  and  datagram layers.  In particular, IP
gateways are vulnerable to a phenomenon we call  "congestion col-
lapse",  especially when such gateways connect networks of widely
different bandwidth.  We have developed  solutions  that  prevent
congestion collapse.

Nagle's algorithm

原文:http://www.cnblogs.com/yuanjiangw/p/6291821.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!