home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / protocol / tcpip / 5878 < prev    next >
Encoding:
Text File  |  1993-01-08  |  3.6 KB  |  70 lines

  1. Newsgroups: comp.protocols.tcp-ip
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!sarah!cook!percival.albany.edu!narten
  3. From: narten@cs.albany.edu (Thomas Narten)
  4. Subject: Re: Why would a Sun take 1.5 seconds to retransmit a missed packet?
  5. In-Reply-To: jbvb@vax.ftp.com's message of Fri, 08 Jan 1993 12:48:46
  6. Message-ID: <NARTEN.93Jan8154912@percival.albany.edu>
  7. Originator: narten@percival.albany.edu
  8. Sender: narten@cs.albany.edu (Thomas Narten)
  9. Organization: Computer Science Department, SUNY at Albany, Albany, NY 12222
  10. References: <184841@pyramid.pyramid.com> <930108124846@cream.ftp.com>
  11. Distribution: na
  12. Date: Fri, 8 Jan 1993 20:49:12 GMT
  13. Lines: 55
  14.  
  15. In article <930108124846@cream.ftp.com> jbvb@vax.ftp.com  (James B. VanBokkelen) writes:
  16.  
  17. > In article <184841@pyramid.pyramid.com> lstowell@pyrnova.mis.pyramid.com (Lon Stowell) writes:
  18. >     In article <BARNETT.93Jan7091846@grymoire.crd.ge.com> barnett@crdgw1.ge.com writes:
  19. >     >Packets are missed by the archive system, so the Sun has to retransmit
  20. >     >the missed packets. I have noticed large delays (0.5 - 1.5 seconds)
  21. >        Those are pretty typical numbers for TCP layer time-outs...
  22. > If so, it indicates that 1) the path is long, 2) the archive system is very
  23. > slow or 3) the sending TCP has an inferior or broken adaptive retransmit
  24. > algorithm.
  25.  
  26. The third answer is probably the best.  While one could argue that the
  27. implementation is "inferior", the observed behavior makes sense given
  28. the implementation. In the following, assume we are on a LAN, so that
  29. actual RTTs are on the order of milliseconds.  It is still possible to
  30. see retransmissions up to 1.5 seconds after a segment is sent.
  31.  
  32. Under BSD, the TCP retransmit timer clock ticks at a relatively slow
  33. rate of .5 seconds.  Thus, the absolute minimum retransmit time one
  34. can set is .5 seconds.  However, the time can be up to twice as long
  35. even under normal circumstances.  One factor is that BSD only has one
  36. retransmit timer going at a time, rather than one for each outstanding
  37. segment.  If one transmits segments 1-4, for example, BSD starts a
  38. single retransmit timer for segment 1.  When the ACK for segment 1
  39. arrives, a timer needs to be started for segment 2.  Although segment
  40. 2 was sent in the past sometime (perhaps as long as just under one RTT
  41. ago), the timer is reset to the full smoothed RTT value.  Thus, the
  42. actual time that elapses before the retransmit timer for segment 2
  43. expires could be as long as twice what it should be.
  44.  
  45. Finally, even though one can theoretically set a timer to go off in .5
  46. seconds, that's not exactly the case.  BSD implements timers by having
  47. a clock device driver call the routine tcp_slowtimeo() every .5
  48. seconds. The actual retransmit timer is maintained as a counter in
  49. units of .5 seconds, so that tcp_slowtimeo() simply decrements the
  50. timer, and if it reaches 0, retransmits the segment in question.  Now,
  51. if one wants to schedule a timer to go off in exactly .5 seconds, one
  52. might think that setting the counter (timer) to 1 would do the trick.
  53. Unfortunately, if tcp_slowtimeo() was last invoked 499 ms ago, it is
  54. about to be invoked right away again and it would decrement a timer of
  55. 1 to 0 almost immediately, certainly before .5 seconds have elapsed.
  56. Thus, when setting a timer for .5 seconds, one actually wants the
  57. timer to go off *no sooner than* .5 seconds from now, and one may
  58. actually have to wait .9999 seconds. That is, we want the timer to go
  59. off during the second call of tcp_slowtimeo() rather than the first.
  60.  
  61. Even on a LAN, the above would account for the actual retransmit timer
  62. for a segment varying from .5-1.5 seconds.  
  63. -- 
  64. Thomas Narten
  65. narten@cs.albany.edu
  66.