The disclosed embodiments relate generally to transmitting data via communication networks. More particularly, the disclosed embodiments relate to dynamically controlling size of the receive window utilized by a transmitting device.
Operating systems typically specify a default Transmission Control Protocol (TCP) receive window parameter that limits the number of packets each TCP flow can receive at any instance. For example, the default TCP receive window parameter for a system using Window XP or earlier versions is typically 64 KB. The default TCP receive window parameter prevents a TCP sender from overwhelming the receiver by sending more packets than the receiver can adequately handle. Initially, a default TCP receive window value is communicated to a sender through a receive window parameter, sometimes herein called the rwnd parameter, in each acknowledgment (ACK) packet. When subsequent ACKs are transmitted to the sender, the value of the receive window parameter (sometimes called the advertised receive window) in those ACKs is set to the default TCP receive window value minus the backlog in the receiver buffer, and represents space available in the receiver's buffer for new packets. Accordingly, a sender is not to send more than advertised receive window amount of data. Because computer hardware has become exponentially faster over the years, and memory for buffers has become less expensive, receivers can typically accept a more data from the sender than indicated by the default TCP receive window parameter.
In order to maximize the amount of data transmitted to a receiver without overwhelming the receiver, the size of the receive window can be dynamically controlled to allow the sender to send more packets at any one time than is specified by the rwnd parameter.
A method of controlling size of a receive window includes, at a transmitting device, transmitting packets over a communication channel from the transmitting device to a receiver, receiving acknowledgment packets from the receiver corresponding to the transmitted packets, determining a backlog parameter for the receiver in accordance with a parameter value in the received acknowledgment packets, resetting the size of the receive window in accordance with a function of a current size of the receive window and the backlog parameter, and after the resetting, transmitting packets over the communication channel from the transmitting devices to the receiver in accordance with the size of the receive window.
In some embodiments, the method includes determining the backlog parameter for the receiver in accordance with a difference between the parameter value in the received acknowledgment packets and a predefined threshold. The parameter value in the received acknowledgment packets may comprise a receive window value generated by the receiver.
In other embodiments, the method further includes determining a current round trip time for the transmitted packets, and resetting the size of the receive window in accordance with a scaling factor, the current round trip time, the current size of the receive window, and the backlog parameter. In some embodiments, the method also includes determining the scaling factor, wherein the scaling factor is a nominal round trip time. In other embodiments, the method includes determining the scaling factor, wherein the scaling factor has a first value when the backlog parameter's value corresponds to a backlog at the receiver that is greater than a predefined threshold, the scaling factor has a second value when the backlog parameter's value corresponds to a backlog at the receiver that is less than a predefined threshold, and the second value is less than the first value.
In some embodiments, the resetting includes maintaining the current size of the receive window when the backlog parameter is within a predefined value range. Optionally, the size of the receive window is reset once every round trip time. In other embodiments, the method includes resetting the size of the receive window periodically.
In some embodiments, the method includes determining a congestion window size in accordance with one or more measurements of network congestion, and determining a transmission window size in accordance with both the congestion window size and the receive window size.
An apparatus for controlling size of a receive window includes a transceiver to transmit packets over a communication channel to a receiver, and to receive acknowledgement packets from the receiver corresponding to the transmitted packets, one or more processors, and memory for storing instructions to be executed by the one or more processors. The stored instructions include instructions to determine a backlog parameter for the receiver in accordance with a parameter value in the received acknowledgment packets, instructions to reset the size of the receive window in accordance with a function of a current size of the receive window and the backlog parameter, and instructions to transmit packets over the communication channel to the receiver in accordance with the reset size of the receive window.
In some embodiments, the apparatus' memory includes instructions to determine the backlog parameter for the receiver in accordance with a difference between the parameter value in the received acknowledgment packets and a predefined threshold.
In some embodiments, the apparatus' memory includes instructions to determine a current round trip time for the transmitted packets and reset the size of the receive window in accordance with a scaling factor and the current round trip time. In some embodiments, the apparatus' memory includes instructions to determine the scaling factor, wherein the scaling factor is a nominal round trip time. In other embodiments, the apparatus' memory includes instructions to determine the scaling factor, wherein the scaling factor has a first value when the backlog parameter's value corresponds to a backlog at the receiver that is greater than a predefined threshold, the scaling factor has a second value when the backlog parameter's value corresponds to a backlog at the receiver that is less than a predefined threshold, and the second value is less than the first value.
In some embodiments, the instructions to reset the size of the receive window include instructions to maintain the current size of the receive window when the backlog parameter is within a predefined value range. In some embodiments, the instructions to reset the size of the receive window are executed once every round trip time. In other embodiments, the instructions to reset the size of the receive window are executed periodically (e.g., once every N milliseconds, where N is typically in the range 10 to 200).
In some embodiments, the apparatus' memory further includes instructions to determine a congestion window size in accordance with one or more measurements of network congestion, and determine a transmission window size in accordance with both the congestion window size and the receive window size.
A computer readable storage medium stores one or more programs for execution by one or more processors of an apparatus, which includes a transceiver to transmit packets over a communication channel to a receiver and to receive acknowledgment packets from the receiver corresponding to the transmitted packets. The one or more programs are for execution by one or more processors of the apparatus so as to perform a method that includes determining a backlog parameter for the receiver in accordance with a parameter value in the acknowledgment packets received by the apparatus, resetting the size of a receive window in accordance with a function of a current size of the receive window and the backlog parameter, and after the receive window size is reset, transmitting packets over the communication channel to the receiver in accordance with the reset size of the receive window.
In some embodiments, the method performed by execution of the one or more programs includes determining the backlog parameter for the receiver in accordance with a difference between the parameter value in the received acknowledgment packets and a predefined threshold.
In some embodiments, the method performed by execution of the one or more programs also includes determining a current round trip time for the transmitted packets resetting the size of the receive window in accordance with a scaling factor and the current round trip time. In some embodiments, the method includes determining the scaling factor, wherein the scaling factor is a nominal round trip time. In some embodiments, the scaling factor has a first value when the backlog parameter's value corresponds to a backlog at the receiver that is greater than a predefined threshold, the scaling factor has a second value when the backlog parameter's value corresponds to a backlog at the receiver that is less than a predefined threshold, and the second value is less than the first value.
In some embodiments, resetting the size of the receive window includes maintaining the current size of the receive window when the backlog parameter is within a predefined value range. In some embodiments, the method performed by execution of the one or more programs includes resetting the size of the receive window every round trip time. In other embodiments, the method includes resetting the size of the receive window periodically.
In some embodiments, the method performed by execution of the one or more programs includes determining a congestion window size in accordance with one or more measurements of network congestion, and determining a transmission window size in accordance with both the congestion window size and the receive window size.
A method of controlling the transmission of messages from a sender to a recipient over a network includes, at a transmitting device, receiving acknowledgment packets from the receiver corresponding to the transmitted packets, determining a backlog parameter for the receiver in accordance with a parameter value in the received acknowledgment packets, determining a queuing delay in accordance with the received acknowledgment packets, resetting a size of a congestion window in accordance with a function of a current size of the congestion window and the queuing delay, resetting a size of a receive window in accordance with a function of a current size of the receive window and the backlog parameter, comparing the size of the congestion window and the size of the receive window, resetting a size of a network window in accordance with the smaller of the size of the congestion window and the size of the receive window, and transmitting packets over the network from the sender to the recipient in accordance with the size of the network window.
An apparatus for controlling the transmission of messages from a sender to a recipient over a network includes a congestion window control block (congestion window control means) configured to reset a size of a congestion window in accordance with a function of a current size of the congestion window and a queuing delay, a receive window control block (receive window control means) configured to reset a size of a receive window in accordance with a function of a current size of the receive window and a backlog parameter, a compare block (compare means) configured to compare the size of the congestion window and the size of the receive window, a network control block (network control means) configured to reset a size of a network window in accordance with the smaller of the size of the congestion window and the size of the receive window, and a transmitter to transmit packets over the network from the sender to the recipient in accordance with the size of the network window.
A computer readable storage medium stores one or more programs for execution by one or more processors of an apparatus that includes a transceiver to transmit packets over a communication channel to a receiver and to receive acknowledgment packets from the receiver corresponding to the transmitted packets. The one or more programs are for execution by one or more processors of the apparatus so as to perform a method comprising receiving acknowledgment packets from the receiver corresponding to the transmitted packets, determining a backlog parameter for the receiver in accordance with a parameter value in the received acknowledgment packets, determining a queuing delay in accordance the received acknowledgment packets, resetting a size of a congestion window in accordance with a function of a current size of the congestion window and the queuing delay, resetting a size of a receive window in accordance with a function of a current size of the receive window and the backlog parameter, comparing the size of the congestion window and the size of the receive window, resetting the size of a network window in accordance with the smaller of the size of the congestion window and the size of the receive window, and after the network window size is reset, transmitting packets over the communication channel to the receiver in accordance with the reset size of the network window.
Like reference numerals refer to corresponding parts throughout the drawings.
The network window wnd corresponds to the amount of outstanding data (unacknowledged by the recipient) the transmitting device 110 can send on a particular connection before it gets acknowledgment packets (ACKs) back from the receiver 130. A dynamically calculated receive window, fp_rwnd (not shown), corresponds to the amount of data that the transmitting device 110 can send to the receiver 130. The size of the receive window, fp_rwnd, is dynamically adjusted by the transmitter in response to receiver 130 conditions, and is calculated as described below in relation to
The communication network 120 may be any local area network (LAN) and/or wide area network (WAN), such as an intranet, an extranet, the Internet, or a combination of such networks. It is sufficient that the communication network 120 provides communication capability between the transmitting device 110 and the receiver 130. In some embodiments, the communication network 120 transports packets using FAST Transmission Control Protocol (FAST TCP).
The communication network 120 is connected to the receiver 130 during transmission of packets between transmitter 110 and receiver 130. Receiver 130 may include a communication interface 132, a plurality of buffers or queues 134 and 136, a processor 138, and memory 140. Receiver 130 receives and processes the packets transmitted by transmitting device 110. The transmitted packets are received at communication interface 132 and stored in buffer or queue 134 before being processed by processor 138. Once processed, the transmitted packets are stored in memory 140 where the data may be accessed and used by a recipient system (not shown). Processor 138 also generates acknowledgment packets (ACKs) corresponding to each of the transmitted packets. The ACKs include a parameter value rwnd, sometimes called the advertised receive window, that corresponds generally to the size of buffer 134 minus the amount of data (sometimes called the backlog) waiting in buffer 134 to be processed (e.g., awaiting delivery to an application). As described below in relation to
Memory 210 includes high-speed random access memory, such as DRAM, SRAM, DDR RAM or other random access solid state memory devices; and may include non-volatile memory, such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, or other non-volatile solid state storage devices. Memory 210 may optionally include one or more storage devices remotely located from processor 202. Memory 210, or alternately the non-volatile memory device(s) within memory 210, comprises a computer readable storage medium. In some embodiments, memory 210 or the computer readable storage medium of memory 210 stores the following programs, modules and data structures, or a subset thereof:
The ACK analyzer 226 analyzes the ACK packets received from a receiver (e.g., receiver 130,
The parameter generators 228 may include a backlog parameter generator 230, a round trip time (RTT) generator 232, a scaling factor generator 234, and a queuing delay generator 236.
The backlog parameter generator 230 generates a backlog parameter β for use by the window control module 218 to reset the size of a receive window fp_rwnd(t). The backlog parameter β(t) is a function of rwnd(t) and an estimated default TCP receive window parameter B(t), such that:
β(t)=rwnd(t)−ηB(t) (Eq. 1)
where η∈(0, 1). In one example, η=0.75. B(t) is defined as an estimate, produced by the transmitter, of the size of the receive buffer in the receiver, or equivalently, as an estimate of the default TCP receive window advertized by the receiver in acknowledgement packets. In some embodiments, B(t) is set equal to the maximum advertised receive window value, rwnd, in the ACK packets received by the transmitting device 110 so far. Alternatively, B(t) is set equal to (or, alternatively, to a value corresponding to) the maximum rwnd value observed in all received ACK packets if the number of received ACK packets is less than N, and otherwise in the last N received ACK packets, where N is a large number, such as 1000, or 10,000 or the like. In yet other embodiments, B(t) is set equal to (or, alternatively, to a value corresponding to) the greater of a predefined value, such as 64 KB or other default receive window size, and the maximum rwnd value observed in all or a predefined subset of all received ACK packets. In some embodiments the operating system of the receiver can dynamically change the size of the receiver buffer. By using an estimated default TCP receive window parameter B(t) that is time varying, the window control module 218 is able to track any changes in the receive buffer at the receiver.
The RTT generator 232 generates a current round trip time value, RTT(t), for use by the window control module 218 to control both the size of the dynamically generated receive window fp_rwnd(t) and a size of the dynamically generated congestion window cwnd(t). Generally, RTT(t) is the time required for a transmitted packet to travel from the transmitting device 200 to the receiver and for a corresponding ACK to travel back from the receiver to the transmitting device 200.
The scaling factor generator 234 generates a scaling factor δ for use by the window control module 218 to control the size of the dynamically generated receive window fp_rwnd(t). The scaling factor δ can be set according to desired system features (e.g., fast or slow increment or decrement). In some embodiments, the scaling factor δ is the nominal RTT, measured in milliseconds (ms). In some embodiments, scaling factor δ will have different values depending on the desired rate of increase or decrease of the size of the receive window fp_rwnd(t). For example, in situations where the value of backlog parameter β(t) is greater than a predefined threshold (e.g., a maximum desired backlog at the receiver), it may be desirable to decrement the size of the receive window fp_rwnd(t) much faster than it is incremented. In this case, scaling factor δ may be δd for decrement and for δi increment with δd greater than δi.
The queuing delay generator 236 generates a queuing delay q(t) for use by the window control module 218 to control the size of the congestion window cwnd(t). Generally, queuing delay q(t) is the time a packet waits in a queue at a bottleneck (e.g., a network or receiver bottleneck) until it can be processed.
As shown in
The receive window control module 220 is used for controlling the size of a receive window fp_rwnd. In this regard, the receive window control module 220 resets the size of the receive window fp_rwnd such that:
where fp_rwnd(t−1) is the current size of the receive window. The increment or decrement of the receive window fp_rwnd is scaled by the ratio of the scaling factor δ to the RTT(t). Alternatively, in equation 2, the RTT(t) and β(t) values are replaced by RTT(t−l) and β(t)
The receive window control module 220 works to stabilize the size of the receive window fp_rwnd(t) around a value that is η percent of the estimated TCP receive window parameter B(t). For example, if B(t) is 64 KB and η is ¾, then the algorithm attempts to stabilized fp_rwnd(t) to within a predefined range (e.g., plus or minus 10%) around 48 KB (e.g., between 45 KB and 51 KB). If the receive window fp_rwnd(t) is within the predefined range, the size of the receive window fp_rwnd(t) is maintained.
In some embodiments, the size of the receive window fp_rwnd is reset (i.e., recomputed, based on the most recently determined RTT(t), rwnd(t) and B(t) values) once every round trip time. In other embodiments, the size of the receive window fp_rwnd is reset periodically (e.g., once every N milliseconds, where N is typically in the range 10 to 200). In further embodiments, the size of the receive window fp_rwnd is reset once every other round trip time.
The congestion window control module 222 is used for controlling the size of the congestion window cwnd(t). In some embodiments, the congestion window control module 222 resets the size of the congestion window cwnd(t) in accordance with a function of a current size of the congestion window cwnd(t−1) and the queuing delay q(t). In some embodiments, the congestion window cwnd(t) is updated at predefined times (e.g., when the receive window is updated) in accordance with:
wherein γ is a parameter that scales the adjustments to the congestion window, and α is a parameter that determines the equilibrium point of the congestion window.
The network window control module 224 is used for controlling the size of the network window wnd(t). The network window control module 224 resets the size of the network window wnd(t) to the minimum of the reset size of the congestion window cwnd(t) and the reset size of the receive window fp_rwnd(t):
wnd(t)=min {cwnd(t), fp_rwnd(t)} (Eq. 4)
As stated above, the transmitting device 200 transmits packets to the receiver in accordance with network window wnd(t). Accordingly, when the reset size of the receive window fp_rwnd(t) is less than the congestion window cwnd(t), the transmitting device 200 transmits packets over a communication channel (e.g., communication channel 120) to the receiver in accordance with the reset size of the receive window fp_rwnd(t). Conversely, when the reset size of the receive window fp_rwnd(t) is greater than the reset size congestion window cwnd(t), the transmitting device 200 transmits packets over the communication channel to the receiver in accordance with the reset size of the congestion window cwnd(t).
Each of the above identified elements may be stored in one or more of the previously mentioned memory devices. The applications, functions, modules, and operating systems shown in
Although
Similar to transmitting device 200 (
As shown in
The congestion window control block 314 includes a congestion window state machine 316 to update and store the current value of the congestion window, cwnd (e.g. cwnd(t−1)). The congestion window control block 314 receives a round trip time RTT(t) and a queuing delay q(t) from processor 302. The round trip time RTT(t) and queuing delay q(t) are used by the congestion window state machine 316 to reset (i.e., update or adjust) the size of the congestion window cwnd(t) as described above in relation to
The compare block 318 compares the size of the receive window fp_rwnd(t) produced by the receive window control block 310 and the size of the congestion window produced by the congestion window control block 314 in order to determine which window is smaller.
The network control state machine 322 resets the size of the network window wnd(t) in accordance with the smaller of the size of the receive window fp_rwnd(t) and the size of the congestion window cwnd(t), and then makes the current size of the network window wnd(t) available to the processor 302. The transmitting device 300 transmits packets to the receiver in accordance with the reset size of the network window wnd(t).
Although
At the receiver, the transmitted packets are received (404) and stored in a buffer (e.g., queue 134 (
At the transceiver, the acknowledgment packets are received (412). A backlog parameter is determined in accordance with the parameter value in the acknowledgement packets (414). In some embodiments, a round trip time for the transmitted packets is determined (416). As described above in connection with
The method 400 further includes, at the transceiver, resetting (i.e., adjusting) the size of a receive window in accordance with a function of a current size of the receive window and the backlog parameter (420). In some embodiments, the size of the receive window is also reset in accordance with the scaling factor and the current round trip time (422).
Packets are then transmitted to the receiver in accordance with the reset size of the receive window (424). The receiver receives the transmitted packets (426).
The transmitting device transmits packets over a communication channel (e.g., communication network 120 (
A backlog parameter for the receiver is determined at the transmitting device in accordance with a parameter value in the received acknowledgment packets (506). As explained above in connection with
In some embodiments, a current round trip time for the packets is determined (510). As described above in connection with
Additionally, in some embodiments, a scaling factor is determined (512). As described above in relation to
A size of a receive window is reset in accordance with a function of a current size of the receive window and the backlog parameter (518). In some embodiments, the current size of the receive window is maintained when the backlog parameter is within a predefined value range (520). For example, the predefined value range may be values within N percent of a predefined equilibrium value, where N is between 5 and 50, inclusive (N∈[5, 50]), and more typically N is between 10 and 20, inclusive (N∈[10, 20]) . In some embodiments, the size of the receive window is reset exactly once every round trip time (522). Alternatively, the size of the receive window is reset periodically (524). In yet another alternative, the size of the receive window is reset exactly once every other round trip time.
The transmitting device then transmits packets over the communication channel to the receiver in accordance with the size of the receive window (526).
The sender or transmitting device receives acknowledgment packets from the receiver corresponding to transmitted packets (602).
A backlog parameter for the receiver is determined at the transmitting device in accordance with a parameter value in the received acknowledgment packets (604). As explained above in connection with
Additionally, a queuing delay is determined at the transmitting device in accordance with the received acknowledgment packets (608). As discussed above in connection with
The method 600 further includes comparing the size of the congestion window and the size of the receive window (612). A size of a network window is reset in accordance with the smaller of the dynamically generated size of the congestion window, cwnd, and the dynamically generated size of the receive window, fp_rwnd (614). The transmitting device then transmits packets over the communication channel to the receiver in accordance with the size of the network window (616).
The foregoing description, for purpose of explanation, has been described with reference to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated.
This application is a continuation of U.S. patent application Ser. No. 13/040,214, filed Mar. 3, 2011, which claims priority to U.S. Provisional Application Ser. No. 61/310,244, filed Mar. 3, 2010, both of which are incorporated by reference herein in their entireties.
Number | Date | Country | |
---|---|---|---|
61310244 | Mar 2010 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13040214 | Mar 2011 | US |
Child | 14256836 | US |