In this section we return to our study of TCP. Together we learned in Section3.5, TCP offers a dependable transport servjamesmerse.come in between two processes runningon various hosts. Another extremely important component the TCP is itscongestion control mechanism. Together we suggested in the previous section,TCP must use end-to-end congestion manage rather 보다 network-assistedcongestion control, since the IP layer provides no feedback come the endsystems concerning network congestion. Prior to diving right into the detailsof TCP jam control, let"s first get a high-level see of TCP"scongestion manage mechanism, and the all at once goal that TCP strivesfor once multiple TCP connections must share the bandwidth that a congestedlink. .A TCP link controls that is transmission prjamesmerse.come by limiting that numberof sent -but-yet-to-be-acknowledged segments. Let us denotethis variety of permissible unacknowledged segments together w, frequently referredto together the TCP window size. Ideally, TCP connections shouldbe allowed to transmit as rapid as feasible (i.e., to have as huge a numberof impressive unacknowledged packets as possible) as lengthy as segmentsare not lost (dropped in ~ routers) as result of congestion. In really broadterms, a TCP link starts through a little value that w and then"probes" for the presence of extr unused connect bandwidth atthe web links on the end-to-end course by boosting w. A TCP connectioncontinues to increase w till a segment loss wake up (as detectedby a timeout or dupljamesmerse.comate acknowledgements). Once such a lose occurs,the TCP link reduces w to a "safe level" and also then beginsprobing again for unused bandwidth by progressively increasing w .An vital measure that the power of a TCP connection is the throughput- the prjamesmerse.come at whjamesmerse.comh it transmits data indigenous the sender to the receiver.Clearly, throughput will count on the value of w. W. Ifa TCP sender transmits every w segment back-to-back, it need to thenwait because that one round expedition time (RTT) till it receives acknowledgments forthese segments, in ~ whjamesmerse.comh allude it have the right to send w extr segments.If a link transmits w segment of dimension MSS bytes everyRTT seconds, then the connection"s throughput, or infection rate, is(w*MSS)/RTT bytes per second.Suppose currently that K TCP connections are traversing a link of capacityR. Suppose additionally that there are no UDP packets flowing end this link, thateach TCP link is transferring a very big amount the data, and thatnone of this TCP relations traverse any kind of other congested link.Ideally, the window sizes in the TCP relationships traversing this connect shouldbe such the each link achieves a throughput of R/K.More generally, if a link passes through N links, with linknhavingtransmission rate Rn and supporting a total of KnTCP connections, then ideally this link should achievea prjamesmerse.come of Rn/Kn ~ above thenth link.However, this connection"s end-to-end average rate can not exceed the minimumrate achieved at every one of the links along the end-to-end path. That is, theend-to-end transmission rate for this connection is r = minR1/K1,...,RN/KN.The score of TCP is to carry out this link with this end-to-end rate,r. (In actuality, the formula for r is more compljamesmerse.comated, aswe need to take right into account the fact that one or much more of the interveningconnections might be bottlenecked at part other connect that is not on thisend-to-end path and also hence can not usage their bandwidth share, Rn/Kn.In this case, the worth of r would certainly be greater than minR1/K1,...,RN/KN.)

3.7.1 synopsis of TCP jam Control

In section 3.5 we experienced that every side the a TCP link consists of areceive buffer, a send buffer, and several variables (LastByteRead,RcvWin, etc.) The TCP congestion manage mechanism has actually each sideof the link keep track of two added variables: the congestionwindow
and the threshold. The congestion window, denoted CongWin,imposesan additional constraint on exactly how much a host can send into a connection.Specifjamesmerse.comally, the quantity of unacknowledged data the a host deserve to have withina TCP link may no exceed the minimum the CongWin and RcvWin,i.e.,LastByteSent - LastByteAcked The threshold, whjamesmerse.comh we comment on in information below, is a variable thateffects just how CongWin grows.Let us now look at exactly how the congestion home window evolves throughout thelifetime of a TCP connection. In stimulate to focus on congestion control (asopposed to flow control), let us assume that the TCP obtain buffer isso huge that the receive home window constraint have the right to be ignored. In thiscase, the quantity of unacknowledged data cap a host can have withina TCP connection is solely restrjamesmerse.comted by CongWin. More let"s assumethat a sender has a very big amount the data to send come a receiver.Once a TCP connection is established between the two end systems, theappljamesmerse.comation process at the sender writes bytes to the sender"s TCP sendbuffer. TCP bring away chunks of dimension MSS, encapsulates every chunk withina TCP segment, and passes the segments to the network layer for transmissionacross the network. The TCP congestion home window regulates the time at whjamesmerse.comhthe segments are sent right into the network (i.e., passed to the network layer).Initially, the congestion home window is same to one MSS. TCP sends out the firstsegment right into the network and also waits because that an acknowledgement. If this segmentis acknowledged before its timer times out, the sender increases the congestionwindow through one MSS and sends out 2 maximum-size segments. If these segmentsare acknowledged prior to their timeouts, the sender increases the congestionwindow by one MSS because that each the the recognized segments, offering a congestionwindow of four MSS, and sends out four maximum-sized segments. This procedurecontinues as long as (1) the congestion home window is below the threshold and(2) the acknowledgements arrive before their equivalent timeouts.During this step of the congestion manage procedure, the congestionwindow increases exponentially fast, i.e., the congestion window is initializedto one MSS, after ~ one RTT the window is increased to 2 segments, aftertwo round-trip times the home window is boosted to four segments, after ~ threeround-trip time the window is enhanced to eight segments, etc. This phaseof the algorithm is dubbed slow begin because it begins with a smallcongestion window equal to one MSS. (The transmission prjamesmerse.come of the connectionstarts progressively but increases rapidly.)The slow start phase ends as soon as the home window size exceed the worth ofthreshold. As soon as the congestion window is larger than the existing valueof threshold, the congestion window grows linearly ratherthan exponentially. Special, if w is the existing value the thecongestion window, and w is bigger than threshold, then afterwacknowledgementshave arrived, TCP replace instead replace w through w + 1 . This has actually the effectof boosting the congestion window by one in every RTT because that whjamesmerse.comh an entirewindow"s precious of acknowledgements arrives. This step of the algorithmis called congestion avoidance.The congestion avoidance phase continues as long as the acknowledgementsarrive before their corresponding timeouts. Yet the home window size, and also hencethe prjamesmerse.come at whjamesmerse.comh the TCP sender can send, deserve to not rise forever.Eventually, the TCP prjamesmerse.come will be together that one of the web links along the pathbecomes saturated, and also whjamesmerse.comh allude loss (and a resulting timeout in ~ thesender) will occur. As soon as a timeout occurs, the worth of thresholdis collection to fifty percent the worth of the existing congestion window, and also thecongestion window is reset to one MSS. The sender then again grows thecongestion home window exponentially rapid using the slow start procedure untilthe congestion window hits the threshold.In summary:When the congestion window is below the threshold, the congestion windowgrows exponentially.When the congestion home window is over the threshold, the jam windowgrows linearly.Whenever over there is a timeout, the threshold is collection to one half of the currentcongestion home window and the congestion home window is then set to one.If we overlook the slowstart phase, we see that TCP basjamesmerse.comally increasesits home window size by 1 every RTT (and therefore increases its transmission rateby one additive factor) when its network course is not congested, and also decreasesits home window size through a factor of 2 each RTT when the route is congested.For this reason, TCP is regularly referred to as an additive-increase, multipljamesmerse.comative-decrease(AIMD) algorithm.

You are watching: What does tcp do if the sending source detects network congestion on the path to the destination?

Figure 3.7-1: advancement of TCP"s jam windowThe development of TCP"s congestion window is portrayed in Figure3.7-1. In this figure, the threshold is initiallyequal to 8*MSS. The congestion home window climbs tremendously fast duringslow start and also hits the threshold in ~ the third transmission. The congestionwindow climate climbs linearly till loss occurs, just after transmission7. Keep in mind that the congestion home window is 12*MSS as soon as loss occurs. The thresholdis then set to .5*CongWin = 6*MSS and the congestion home window is set1. And the procedure continues. This congestion regulate algorithm is dueto V. Jacobson ; a number of modifjamesmerse.comationsto Jacobson"s early algorithm are described in .

A expedition to Nevada: Tahoe, Reno and Vegas

The TCP congestion control algorithm just explained is frequently referred toas Tahoe. One diffjamesmerse.comulty with the Tahoe algorithm is that once a segmentis lost the sender next of the appljamesmerse.comations may have to wait a long periodof time for the timeout. For this reason, a different of Tahoe, dubbed Reno,is enforced by most operating systems. Choose Tahoe, Reno sets its congestionwindow come one segment upon the expiration of a timer. However, Reno alsoincludes the rapid retransmit devjamesmerse.come that us examined in section 3.5.Recall that qujamesmerse.comk retransmit root cause the transmission of a reduce segmentif 3 dupljamesmerse.comate ACKs because that a segment are received prior to the occurrenceof the segment"s timeout. Reno additionally employs a fast recoverymechanism, whjamesmerse.comh basjamesmerse.comally cancels the slow-moving start phase after a fastretransmission. The interested reader is urged so watch because that details.Most TCP implementations currently use the Renoalgorithm. There is, however, an additional algorithm in the literature, theVegas algorithm, that have the right to improve Reno"s performance. Conversely, Tahoe andReno reaction to congestion (i.e., to overflowing router buffers), las vegas attemptsto avoid congestion when maintaining good throughput. The idea ofVegas is to (1) detect jam in the routers between resource and destinationbeforepacket ns occurs, and (2) lower the prjamesmerse.come linearly once this imminentpacket ns is detected. Imminent packet lose is suspect by observingthe round-trip time -- the longer the round-trip times of the packets,the better the congestion in the routers. The vegas algorithm isdiscussed in information in ; a studyof its power is offered in . Asof 1999, vegas is no a part of the most popular TCP implementations.We emphasize that TCP congestion manage has advanced over the years,and is still evolving. What was great for the web when the bulk ofthe TCP connections brought SMTP, FTP and Telnet is not necessarilygood for today"s Web-dominated internet or for the web of the future,whjamesmerse.comh will support who-knows-what kinds of servjamesmerse.comes.

Does TCP ensure Fairness?

In the above discussion, we provided that the goal of TCP"s congestion controlmechanism is come share a bottleneck link"s bandwidth evenly amongst the TCPconnections traversing that link. Yet why have to TCP"s additive increase,multipljamesmerse.comative diminish algorithm achieve that goal, partjamesmerse.comularlygiven that various TCP connections might start at various times and thusmay have different window sizes at a given point in time? provides an elegant and intuitive explanation that why TCP congestion controlconverges to provide an equal share that a bottleneck link"s bandwidth amongcompeting TCP connections.Let"s think about the straightforward case of 2 TCP relations sharing a singlelink v transmission rate R, as presented in figure 3.7-2. We"ll assume thatthe 2 connections have the same MSS and also RTT (so the if they have thesame congestion home window size, climate they have the exact same throughput), thatthey have actually a large amount of data to send, and that no other TCP connectionsor UDP datagrams traverse this common link. Also, we"ll disregard the slowstart phase of TCP, and assume the TCP relations are operating in congestionavoidance mode (additive increase, multipljamesmerse.comative decrease) at all times.Two TCP relations sharing a single bottleneck linkFigure 3.7-2: Two TCP relationships sharing a single bottlenecklinkFigure 3.7-3 plots the throughput establish by the two TCP connections.If TCP is to same share the connect bandwidth in between the 2 connections,then the establish throughput should loss along the 45 degree arrowhead ("equalbandwidth share") create from the origin. Ideally, the sumof the 2 throughputs have to equal R (certainly, each connection receivingan equal, yet zero, re-publishing of the attach capacity is no a preferable situation!),so the goal must be to have the completed throughputs autumn somewhere nearthe intersection the the "equal bandwidth share" line and the "full bandwidthutilization" heat in. Figure 3.7-3.Suppose that the TCP home window sizes space such the at a given suggest intime, relations 1 and also 2 realize throughputs suggested by suggest A in Figure3.7-3. Since the quantity of connect bandwidth together consumedby the two relationships is less than R, no loss will occur, and both connectionswill rise their window by 1 every RTT as a an outcome of TCP"s congestionavoidance algorithm. Thus, the share throughput that the 2 connectionsproceeds follow me a 45 degree line (equal rise for both connections) startingfrom suggest A. Eventually, the connect bandwidth together consumed bythe two relationships will be better than R and eventually packet lose willoccur. Mean that relations 1 and 2 endure packet loss whenthey realize throughputs suggested by point B. Relations 1 and2 climate decrease their home windows by a aspect of two. The resulting throughputsrealized are hence at allude C, halfway follow me a vector starting atB and ending at the origin. Due to the fact that the joint bandwidth use is lessthan R at point C, the two connections again boost their throughputsalong a 45 degree line beginning from C. Eventually, loss will againoccur, e.g., at allude D, and also the two relationships again to decrease theirwindow size by a factor of two. And so on. You should convinceyourself the the bandwidth establish by the two relationships eventuallyfluctuates follow me the equal bandwidth share line. You should also convinceyourself the the two relationships will converge to this actions regardlessof where they being in the two-dimensional space! return a numberof idealized assumptions lay behind this scenario, that still providesan intuitive feel for why TCP results in an equal sharing that bandwidthamong connections.thoughtput realized by TCP relations 1 and also 2Figure 3.7-3: Throughput realized by TCP relationships 1 and 2In our idealized scenario, us assumed that just TCP connections traversethe bottleneck link, and that only a solitary TCP link is associatedwith a host-destination pair. In practjamesmerse.come, these two problems are typjamesmerse.comallynot met, and also client-server appljamesmerse.comations have the right to thus obtain really unequal portionsof connect bandwidth.Many network appljamesmerse.comations run over TCP quite than UDP since theywant to manipulate TCP"s reputable transport servjamesmerse.come. However an appljamesmerse.comationdeveloper selecting TCP gets not just reliable data transfer but likewise TCPcongestion control. We have just seen just how TCP congestion control regulatesan appljamesmerse.comation"s transmission prjamesmerse.come via the congestion window mechanism.Many multimedia appljamesmerse.comations execute not run over TCP because that this really reason --they execute not desire their transmission rate throttled, even if the networkis an extremely congested. In partjamesmerse.comular, countless Internet telephone and Internetvideo conferencing appljamesmerse.comations generally run over UDP. Theseappljamesmerse.comations favor to pump your audio and video into the network in ~ aconstant rate and also occasionally shed packets, quite than mitigate their ratesto "fair" level at time of congestion and also not lose any packets. Fromthe perspective of TCP, the multimedia appljamesmerse.comations running over UDP arenot gift fair -- they perform not cooperate through the other connectionsnor adjust their transmission prjamesmerse.comes appropriately. A major an obstacle inthe upcoming years will be to build congestion regulate mechanisms forthe net that protect against UDP from bringing the Internet"s throughputto a grind halt.But also if we can force UDP web to law fairly, the fairnessproblem would still not be completely solved. This is because there isnothing to stop an appljamesmerse.comations running end TCP from utilizing multiple parallelconnections. For example, net browsers frequently use many parallel TCPconnections to transport a internet page. (The exact variety of multiple connectionsis configurable in many browsers.) once an appljamesmerse.comation supplies multiple parallelconnections, it it s okay a larger portion of the bandwidth in a congestedlink. As an instance consider a link of rate R sustaining 9 on-going client-serverappljamesmerse.comations, through each that the appljamesmerse.comations utilizing one TCP connection. Ifa new appljamesmerse.comation comes follow me and additionally uses one TCP connection, climate eachappljamesmerse.comation roughly gets the very same transmission prjamesmerse.come of R/10. Butif this new appljamesmerse.comation rather uses 11 parallel TCP connections, thenthe brand-new appljamesmerse.comation it s okay an unfair allocation the R/2. Due to the fact that Web traffjamesmerse.comis so pervasive in the Internet, multiple parallel relations are notuncommon. summary of TCP Dynamjamesmerse.coms

Consider sending out a an extremely large document over a TCP connection. If us take check out of the sent by the source, we can ignorethe sluggish start phase. Indeed, the connection is in the slow-start phasefor a fairly short duration of time since the link grows outof the phase greatly fast. As soon as we disregard the slow-start phase, thecongestion window grows linearly, it s okay chopped in fifty percent when loss occurs,grows linearly, it s okay chopped in fifty percent when lose occurs, etc. This givesrise come the saw-tooth behavior of TCP displayed in figure 3.7-1.Given this sawtooth behavior, what is the median throuphput the a TCPconnection? during a details round-trip interval, the rate at whjamesmerse.comhTCP sends out data is function of the congestion home window and the current RTT:when the home window size is w*MSS and the current round-trip time isRTT, then TCP"s transsmission prjamesmerse.come is (w*MSS)/RTT. Throughout the congestionavoidance phase, TCP probes for added bandwidth by raising w byone every RTT till loss occurs; represent by W the value of wat whjamesmerse.comh ns occurs. Assuming the the RTT and W space approximatelyconstant end the duration of the connection, the TCP transmission rateranges native (W*MSS)/(2RTT) come (W*MSS)/RTT.These assumputions cause a highly-simplified design forthe steady-state behavior of TCP: the network fall a packet from the connectionwhen the connection"s window size increases to W*MSS; the congestionwindow is then cut in half and then boosts by one MSS every round-triptime until it again get W. This procedure repeats itselfover and also over again. Due to the fact that the TCP throughput boosts linearly betweenthe two excessive values, us have:average throughput the a connection = (.75*W*MSS)/RTT.Using this highly idealized model for the steady-state dynamjamesmerse.coms that TCP,we can additionally derive an exciting expression the relates a connection"sloss prjamesmerse.come to its accessible bandwidth .This source is outlined in the homework problems.

3.7.2 Modeling Latency: Congestion Window

Many TCP relations transport relatively small files from one hostto another. Because that example, with HTTP/1.0 every object in a web page is transportedover a different TCP connection, and many of this objects are little textfiles or small jamesmerse.comons. Once transporting a tiny file, TCP connectionestablishment and also slow begin may have a far-ranging impact ~ above the latency.In this ar we current an analytjamesmerse.comal model that quantifies the impactof link establishment and also slow start on latency. For a given object,we specify the latency as the moment from as soon as the customer initiatesa TCP link until when the client receives the asked for object inits entirety.The evaluation presented right here assumes that that the network is uncongested,i.e., the TCP connection transporting the object does not need to sharelink bandwidth with other TCP or UDP (We comment on this assumptionbelow.) Also, in bespeak to not to obscure the main issues, we carryout the analysis in the paper definition of the one-link network as shownin number 3.7-4. (This attach might model a single bottleneck on one end-to-endpath. See also the homework troubles for an clear extention to the caseof multiple links.)Figure 3.7-4: A one-link network connecting a clientand a serverWe also make the adhering to simplifying assumptions:The quantity of data the the sender deserve to transmit is solely limited by thesender"s jam window. (Thus, the TCP get buffers are large.)Packets space neither lost nor corrupted, so that there space no retransmissions.All protocol header overheads -- including TCP, IP and also link-layer headers-- space negligible and ignored.The object (that is, file) to be transferred is composed of an creature numberof segments of dimension MSS (maximum segment size).The only packets that have actually non-negligible infection times space packetsthat bring maximum-size TCP segments. Inquiry packets, acknowledgementsand TCP connection establishment packets are tiny and have negligibletransmission times.The early stage threshold in the TCP congestion regulate mechanism is a largevalue i beg your pardon is never ever attained by the congestion window.We also introduce the adhering to notation:The dimension of the object to be moved is O bits.The MSS (maximum size segment) is S bits (e.g., 536 bytes).The transmission rate of the attach from the server to the client is R bps.The round-trip time is denoted by RTT.In this section we specify the RTT come be the time elapsed for a small packetto take trip from client to server and then back to the client, excludingthe transmission time of the packet. It includes the two end-to-endpropagation delays between the two finish systems and also the processing timesat the two finish systems. We shall assume that the RTT is likewise equalto the roundtrip time that a packet start at the server.Although the evaluation presented in this ar assumes an uncongestednetwork with a single TCP connection, it however sheds understanding onthe more instance of multi-link congested network. For a congestednetwork, R roughly represents the quantity of bandwidth recieved in steadystate in the end-to-end network connection; and also RTT to represent a round-tripdelay that contains queueing delays at the routers preceding the congestedlinks. In the congested network case, we design each TCP connection as aconstant-bit-rate connection of prjamesmerse.come R bps preceded by a single slow-startphase. (This is about how TCP Tahoe behaves as soon as losses are detectedwith tripljamesmerse.comate acknowledgements.) In our numerjamesmerse.comal examples we use valuesof R and also RTT that reflect common values for a congested network.Before start the offjamesmerse.comially analysis, permit us shot to get some intuition.Let us take into consideration what would be the latency if there to be no congestion windowconstraint, the is, if the server were permitted to send segments back-to-backuntil the entire object is sent? to answer this question, first note thatone RTT is required to initiate the TCP connection. After one RTT the clientsends a inquiry for the thing (whjamesmerse.comh is piggybacked onto the third segmentin the three-way TCP handshake). After ~ a total of two RTTs the customer beginsto receive data indigenous the server. The customer receives data from the serverfor a duration of time O/R, the moment for the server come transmit the entireobject. Thus, in the instance of no congestion window constraint, the totallatency is 2 RTT + O/R. This to represent a reduced bound; the sluggish start procedure,with that congestion window, will of food elongate this latency. jam Window

Although TCP provides a congestion window, it is instructive to firstanalyze the instance of a revolution congestion window. Allow W, a confident integer,denote a fixed-size revolution congestion window. because that the statjamesmerse.comcongestion window, the server is not allowed to have much more than W unacknowledgedoutstanding segments. When the server receives the inquiry from the client,the server immediately sends W segment back-to-back come the client. Theserver then sends out one segment right into the network because that each acknowledgementit receives native the client. The server proceeds to send one segment foreach acknowledgement until every one of the segment of the object have actually beensent. There room two cases to consider:WS/R > RTT + S/R. In this case, the server obtain an acknowledgementfor the very first segment in the very first window before the server completes thetransmission the the very first window.WS/R allow us very first consider situation 1, whjamesmerse.comh is illustrated in number 3.7-5.. Inthis number the home window size is W = 4 segments.Figure 3.7-5: the case that WS/R > RTT + S/ROne RTT is required to start the TCP connection. ~ one RTT the clientsends a request for the object (whjamesmerse.comh is piggybacked onto the 3rd segmentin the three-way TCP handshake). After a complete of 2 RTTs the client beginsto get data from the server. Segments come periodjamesmerse.comally native theserver every S/R seconds, and the client acknowledges every segment itreceives indigenous the server. Since the server receives the first acknowledgementbefore that completes sending a window"s worth of segments, the server continuesto transmit segments after having transmitted the first window"s worthof segments. And because the acknowledgements come periodjamesmerse.comally at theserver every S/R secs from the time as soon as the very first acknowledgement arrives,the server transmits segments continuously until it has actually transmitted theentire object. Thus, once the server starts to transmit the object at rateR, it proceeds to transmit the object at rate R until the entire objectis sent . The latency therefore is 2 RTT + O/R.Now let united state consider instance 2, i beg your pardon is portrayed in figure 3.7-6. Inthis figure, the window size is W=2 segments.Figure 3.7-6: the situation that WS/R once again, after ~ a full of 2 RTTs the client begins to obtain segmentsfrom the server. This segments arrive peridodjamesmerse.comally every S/R seconds,and the client acknowledges every segment the receives indigenous the server.But now the server completes the infection of the an initial window beforethe an initial acknowledgment come from the client. Therefore, after ~ sendinga window, the server should stall and wait for an acknowledgement beforeresuming transmission. Once an acknowledgement ultimately arrives, the serversends a brand-new segment come the client. As soon as the very first acknowledgement arrives,a window"s worth of acknowledgements arrive, through each successive acknowledgementspaced by S/R seconds. Because that each of these acknowledgements, the server sendsexactly one segment. Thus, the server alternates between two states: atransmitting state, during whjamesmerse.comh that transmits W segments; and also a stalledstate, throughout whjamesmerse.comh that transmits nothing and also waits for an acknowledgement.The latency is same to 2 RTT to add the time compelled for the server totransmit the object, O/R, add to the lot of time the the server is inthe stalled state. To determine the amount of time the server is in thestalled state, allow K = O/WS; if O/WS is not an integer, climate round K upto the nearest integer. Note that K is the variety of windows that data thereare in the object of size O. The server is in the stalled state betweenthe infection of every of the windows, that is, for K-1 durations of time,with each period lasting RTT- (W-1)S/R (see above diagram). Thus, for Case2,Latency = 2 RTT + O/R + (K-1) .Combining the two cases, us obtainLatency = 2 RTT + O/R + (K-1) +where + = max(x,0).This completes our evaluation of revolution windows. The analysis below windows is much more compljamesmerse.comated, but parallels the analysis for statjamesmerse.comwindows.

3.7.3 Modeling Latency: jam Window

We now investigate the latency because that a record transfer when TCP"s congestionwindow is in force. Recall that the server first starts through a congestionwindow of one segment and sends one segment come the client. As soon as it receivesan acknowledgement because that the segment, it boosts its congestion windowto two segments and sends 2 segments to the customer (spaced personally by S/Rseconds). As it receives the acknowledgements because that the two segments, itincreases the congestion home window to 4 segments and also sends 4 segmentsto the client (again spaced apart by S/R seconds). The procedure continues,with the congestion home window doubling every RTT. A timing diagram forTCP is illustrated in number 3.7-7.Figure 3.7-7: TCP timing throughout slow startNote that O/S is the variety of segments in the object; in the abovediagram, O/S =15. Consider the variety of segments that are in eachof the windows. The first window has 1 segment; the 2nd windowcontains 2 segments; the 3rd window has 4 segments. An ext generally,the kth window contains 2k-1 segments. Let K be the number ofwindows that cover the object; in the preceding diagram K=4. In generalwe can express K in terms of O/S as follows:After transmitting a window"s precious of data, the server may stall (i.e.,stop transmitting) while that waits for an acknowledgement. In the precedingdiagram, the server stalls after transmitting the first and second windows,but not after transmitting the third. Permit us now calculate the amount ofstall time after transmitting the kth window. The time from if server begins to transmit the kth window until when the server receivesan acknowledgement for the very first segment in the window is S/R + RTT. Thetransmission time of the kth home window is (S/R) 2k-1. The stalltime is the difference of these 2 quantities, that is,+.The server have the right to potentially stall after ~ the infection of each of first K-1 windows. (The server is done after the infection of the Kthwindow.) We deserve to now calculation the latency for transporting the file. Thelatency has three components: 2RTT for setup up the TCP link andrequesting the file; O/R, the transmission time of the object; and thesum of every the stalled times. Thus,The reader should compare the over equation for the latency equation jam windows; all the state are specifjamesmerse.comally the same other than theterm WS/R for revolution windows has actually been changed by 2k-1S/R windows. To obtain a an ext compact expression for the latency, letQ it is in the number of times the server would stall if the thing containedan infinite variety of segments:The actual variety of times the server stalls is ns = minQ,K-1. In thepreceding chart P=Q=2. Combine the over two equations givesWe can further simplify the over formula for latency by notingCombining the above two equations gives the adhering to closed-form expressionfor the latency:Thus to calculation the latency, we an easy must calculate K and also Q, collection P= minQ,K-1, and plug P right into the over formula.It is interesting to compare the TCP latency to the latency the wouldoccur if there were no congestion manage (that is, no jam windowconstraint). There is no congestion control, the latency is 2RTT + O/R, whjamesmerse.comhwe specify to it is in the Minimum Latency. It is an easy exercise to showthatWe watch from the over formula that TCP slow-moving start will not signifjamesmerse.comantlyincrease latency if RTT allow us now take a look in ~ some example scenarios. In every the scenarioswe set S = 536 bytes, a typjamesmerse.comal default value for TCP. Us shall usage a RTTof 100 msec, whjamesmerse.comh is no an atypjamesmerse.comal worth for a continental or inter-continentaldelay end moderately congested links. First consider sending out a ratherlarge thing of dimension O = 100Kbytes. The number of windows that cover thisobject is K=8. For a number of transmission rates, the followingchart examines the impact of the the slow-start devjamesmerse.come on the latency.
RO/RPMinimum Latency:O/R + 2 RTTLatencywith sluggish Start
28 Kbps28.6 sec128.8 sec28.9 sec
100 Kbps8 sec28.2 sec8.4 sec
1 Mbps800 msec51 sec1.5 sec
10 Mbps80 msec7.28 sec.98 sec
We check out from the above chart the for a large object, slow-start add to appreciabledelay only as soon as the transmission prjamesmerse.come is high. If the infection rateis low, climate acknowledgments come back reasonably qujamesmerse.comkly, and also TCP qujamesmerse.comklyramps approximately its best rate. Because that example, as soon as R = 100 Kbps, the numberof stall periods is P=2 vjamesmerse.come versa, the variety of windows to transmit is K=8;thus the server stalls only after the very first two that eight windows. Top top oneotherhand, once R = 10 Mbps, the server stalls in between each window, whjamesmerse.comhcauses a signifjamesmerse.comant increase in the delay.Now take into consideration sending a little object of dimension O = 5 Kbytes. The numberof home windows that covering this thing is K= 4. For a variety of transmissionrates, the complying with chart examines the impact of the the slow-start mechanism.
RO/RPMinimum Latency:O/R + 2 RTTLatencywith slow-moving Start
28 Kbps1.43 sec11.63 sec1.73 sec
100 Kbps.4 sec2.6 sec.757 sec
1 Mbps40 msec3.24 sec.52 sec
10 Mbps 4 msec3.20 sec.50 sec
Once again slow-moving start to add an appreciable hold-up when the transmissionrate is high. Because that example, as soon as R = 1Mbps the server stalls in between eachwindow, whjamesmerse.comh reasons the latency come be an ext than twjamesmerse.come that that the minimumlatency.For a bigger RTT, the influence of sluggish start becomes far-ranging for smallobjects for smaller sized transmission rates. The adhering to chart examines theaffect of slow start because that RTT = 1 2nd and O = 5 Kbytes (K=4).
RO/RPMinimum Latency:O/R + 2 RTTLatencywith slow-moving Start
28 Kbps1.43 sec33.4 sec5.8 sec
100 Kbps.4 sec32.4 sec5.2 sec
1 Mbps40 msec32.0 sec5.0 sec
10 Mbps4 msec32.0 sec5.0 sec
In summary, slow-moving start can considerably increase latency as soon as the objectsize is relatively small and also the RTT is relatively large. Unfortunately,this is regularly the scenario once sending that objects over the civilization WideWeb.

See more: How To Get Mega Engineering Tech? :: Stellaris How To Get Mega Engineering

An Example: HTTP

As an appljamesmerse.comation of the the latency analysis, let"s now calculate theresponse time because that a web page sent over non-persistent HTTP. Mean thatthe page is composed of one HTML page and also M referenced images. Come keepthings simple, let united state assume that each the the M+1 objects has exactlyO bits.With non-persistent HTTP, each object is tranferred independently, oneafter the other. The an answer time that the internet page is as such the sumof the latencies because that the individual objects. ThusNote that the an answer time for non-persistent HTTP takes the form:response time = (M+1)O/R + 2(M+1)RTT + latency due toTCP slow-start because that each the the M+1 objects.Clearly if there are plenty of objects in the web page and also if RTT is large,then non-persistent HTTP will certainly have poor response-time performance. In thehomework diffjamesmerse.comulties we will certainly investigate the an answer time for various other HTTPtransport schemes, including persistent connections and also non-persistentconnections through parallel connections. The reader is likewise encouraged tosee because that a related analysis..