⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc813.txt

📁 RFC 相关的技术文档
💻 TXT
📖 第 1 页 / 共 3 页
字号:
sender should simply refuse to send anything.     Simple experiments suggest that the exact value of the ratio is notvery important, but that a value of about 25 percent  is  sufficient  toavoid  SWS  and  achieve reasonable throughput, even for machines with asmall offered window.    An  additional  enhancement  which  might  helpthroughput  would be to attempt to hold off sending until one can send amaximum size segment.  Another enhancement would be to send anyway, evenif the ratio is small, if the useable window is sufficient to  hold  thedata available up to the next "push point".     This algorithm at the sender end is very simple.  Notice that it isnot  necessary  to  set  a timer to protect against protocol lockup whenpostponing the  send  operation.    Further  acknowledgements,  as  theyarrive,  will  inevitably change the ratio of offered to useable window.(To see this, note that when all the data in the  catanet  pipeline  hasarrived  at  the  receiver,  the resulting acknowledgement must yield anoffered window and  useable  window  that  equal  each  other.)  If  theexpected  acknowledgements  do  not arrive, the retransmission mechanismwill come into play to assure that something finally happens.  Thus,  toadd  this  algorithm  to an existing TCP implementation usually requiresone line of code.  As part of the send algorithm it is already necessaryto compute the useable window from the offered window.  It is  a  simplematter  to add a line of code which, if the ratio is less than a certain                                   9percent,  sets  the  useable  window to zero.  The results of SWS are sodevastating that no sender  should  be  without  this  simple  piece  ofinsurance.     5.  Improved Acknowledgement Algorithms     In the beginning of this paper, an overly simplistic implementationof  TCP  was described, which led to SWS.  One of the characteristics ofthis implementation was that the  recipient  of  data  sent  a  separateacknowledgement  for  every  segment  that it received.  This compulsiveacknowledgement  was  one  of  the   causes   of   SWS,   because   eachacknowledgement provided some new useable window, but even if one of thealgorithms  described  above  is  used to eliminate SWS, overly frequentacknowledgement still has  a  substantial  problem,  which  is  that  itgreatly  increases the processing time at the sender's end.  Measurementof TCP implementations, especially on large operating systems,  indicatethat  most  of  the  overhead  of  dealing  with a segment is not in theprocessing at the TCP or IP level, but simply in the scheduling  of  thehandler which is required to deal with the segment.  A steady dribble ofacknowledgements  causes a high overhead in scheduling, with very littleto show for it.  This waste is to be avoided if possible.     There are two reasons  for  prompt  acknowledgement.    One  is  toprevent  retransmission.  We will discuss later how to determine whetherunnecessary  retransmission  is  occurring.    The  other   reason   oneacknowledges  promptly  is  to permit further data to be sent.  However,the previous section makes quite clear that it is not  always  desirableto send a little bit of data, even though the receiver may have room for                                   10it.    Therefore,  one  can  state  a  general  rule  that  under normaloperation, the receiver of data need not,  and  for  efficiency  reasonsshould  not,  acknowledge  the data unless either the acknowledgement isintended to produce an increased useable window, is necessary  in  orderto  prevent  retransmission  or  is  being  sent  as  part  of a reversedirection segment being sent for some other reason.  We will consider analgorithm to achieve these goals.     Only the recipient of  the  data  can  control  the  generation  ofacknowledgements.    Once  an  acknowledgement  has  been  sent from thereceiver back to the sender, the sender must process it.   Although  theextra overhead is incurred at the sender's end, it is entirely under thereceiver's  control.  Therefore, we must now describe an algorithm whichoccurs at the receiver's end.  Obviously, the algorithm  must  have  thefollowing  general form; sometimes the receiver of data, upon processinga segment, decides not to send an acknowledgement now, but  to  postponethe  acknowledgement until some time in the future, perhaps by setting atimer.  The peril of this approach  is  that  on  many  large  operatingsystems  it  is  extremely costly to respond to a timer event, almost ascostly as to respond to an incoming segment.  Clearly, if  the  receiverof  the data, in order to avoid extra overhead at the sender end, spendsa great deal of time responding to timer interrupts, no overall  benefithas been achieved, for efficiency at the sender end is achieved by greatthrashing  at  the  receiver end.  We must find an algorithm that avoidsboth of these perils.     The following scheme seems a good compromise.  The receiver of data                                   11will   refrain   from   sending   an   acknowledgement   under   certaincircumstances, in which case it must set a timer which  will  cause  theacknowledgement  to be sent later.  However, the receiver should do thisonly where it is a reasonable guess that some other event will interveneand prevent the necessity of the timer  interrupt.    The  most  obviousevent  on  which  to depend is the arrival of another segment.  So, if asegment arrives, postpone sending an  acknowledgement  if  both  of  thefollowing  conditions  hold.    First,  the  push  bit is not set in thesegment, since it is a reasonable assumption that  there  is  more  datacoming  in  a  subsequent  segment.   Second, there is no revised windowinformation to be sent back.     This algorithm will insure that the timer, although set, is  seldomused.    The  interval  of  the  timer is related to the expected inter-segment delay, which is in turn a function  of  the  particular  networkthrough  which  the  data  is  flowing.    For the Arpanet, a reasonableinterval seems to be 200 to 300 milliseconds.  Appendix A  describes  anadaptive algorithm for measuring this delay.     The section on improved window algorithms described both a receiveralgorithm  and  a  sender  algorithm,  and suggested that both should beused.  The reason for this is now clear.  While the sender algorithm  isextremely  simple,  and  useful  as insurance, the receiver algorithm isrequired in order that this improved acknowledgement strategy work.   Ifthe  receipt  of every segment causes a new window value to be returned,then of necessity  an  acknowledgement  will  be  sent  for  every  datasegment.    When, according to the strategy of the previous section, the                                   12receiver  determines  to artificially reduce the offered window, that isprecisely the circumstance under which an acknowledgement  need  not  besent.      When   the   receiver   window  algorithm  and  the  receiveracknowledgement algorithm are  used  together,  it  will  be  seen  thatsending  an  acknowledgement  will  be triggered by one of the followingevents.  First, a push bit has been received.  Second, a temporary pausein the data stream is detected.  Third,  the  offered  window  has  beenartificially reduced to one-half its actual value.     In the beginning of this section, it was pointed out that there aretwo  reasons  why  one must acknowledge data.  Our consideration at thispoint has been concerned only with the first,  that  an  acknowledgementmust  be  returned as part of triggering the sending of new data.  It isalso necessary to acknowledge  whenever  the  failure  to  do  so  wouldtrigger retransmission by the sender.  Since the retransmission intervalis  selected  by  the  sender,  the  receiver  of the data cannot make aprecise  determination  of  when  the  acknowledgement  must  be   sent.However,   there   is   a  rough  rule  the  sender  can  use  to  avoidretransmission, provided that the receiver is reasonably well behaved.     We will assume that sender of the data uses the optional  algorithmdescribed  in  the  TCP  specification,  in which the roundtrip delay ismeasured using an exponential decay smoothing algorithm.  Retransmissionof a segment occurs if the measured delay for that segment  exceeds  thesmoothed  average  by  some  factor.  To see how retransmission might betriggered, one must consider the pattern  of  segment  arrivals  at  thereceiver.   The goal of our strategy was that the sender should send off                                   13a  number of segments in close sequence, and receive one acknowledgementfor the whole burst.  The  acknowledgement  will  be  generated  by  thereceiver  at  the time that the last segment in the burst arrives at thereceiver.  (To ensure the prompt  return  of  the  acknowledgement,  thesender  could  turn on the "push" bit in the last segment of the burst.)The delay observed at the sender between the initial transmission  of  asegment  and  the  receipt  of the acknowledgement will include both thenetwork transit time, plus the  holding  time  at  the  receiver.    Theholding  time  will be greatest for the first segments in the burst, andsmallest for the last segments  in  the  burst.    Thus,  the  smoothingalgorithm  will  measure  a  delay  which is roughly proportional to theaverage roundtrip delay for all the segments in  the  burst.    Problemswill  arise  if  the  average  delay  is  substantially smaller than themaximum delay  and  the  smoothing  algorithm  used  has  a  very  smallthreshold  for  triggering retransmission.  The widest variation betweenaverage and maximum delay  will  occur  when  network  transit  time  isnegligible, and all delay is processing time.  In this case, the maximumwill  be  twice  the  average  (by simple algebra) so the threshold thatcontrols retransmission should be somewhat more than a factor of two.     In practice, retransmission of the first segments of  a  burst  hasnot  been  a  problem because the delay measured consists of the networkroundtrip  delay,  as  well  as  the  delay  due  to   withholding   theacknowledgement,  and the roundtrip tends to dominate except in very lowroundtrip time situations (such as when sending to one's self  for  testpurposes).    This low roundtrip situation can be covered very simply byincluding a minimum value below which  the  roundtrip  estimate  is  notpermitted to drop.                                   14     In  our  experiments  with  this  algorithm,  retransmission due tofaulty calculation of the roundtrip delay occurred only once,  when  theparameters  of  the exponential smoothing algorithm had been misadjustedso that they were only  taking  into  account  the  last  two  or  threesegments  sent.   Clearly, this will cause trouble since the last two orthree segments of any burst are the  ones  whose  holding  time  at  thereceiver is minimal, so the resulting total estimate was much lower thanappropriate.   Once the parameters of the algorithm had been adjusted sothat the number of segments taken into account was  approximately  twicethe  number  of  segments  in  a burst of average size, with a thresholdfactor of 1.5, no further retransmission has ever been identified due tothis problem, including when sending to ourself and  when  sending  overhigh delay nets.     6.  Conservative Vs. Optimistic Windows     According  to the TCP specification, the offered window is presumedto have some relationship to the amount of data which  the  receiver  isactually  prepared  to receive.  However, it is not necessarily an exactcorrespondence.  We will use the term "conservative window" to  describethe case where the offered window is precisely no larger than the actualbuffering  available.  The drawback to conservative window algorithms isthat they can produce very low throughput in long delay situations.   Itis easy to see that the maximum input of a conservative window algorithmis  one  bufferfull  every  roundtrip  delay  in the net, since the nextbufferfull cannot be launched until the  updated  window/acknowledgementinformation from the previous transmission has made the roundtrip.                                   15     In  certain  cases,  it  may  be  possible  to increase the overallthroughput of the transmission by increasing the offered window over theactual buffer available at the receiver.  Such a strategy we  will  callan  "optimistic  window" strategy.  The optimistic strategy works if the

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -