Datagram Congestion Control Y. Dong Protocol H. Zhao Internet-Draft Nanjing Univ. of Posts and Intended status: Informational Telecom. Expires: June 27, 2011 December 24, 2010 A Wireless Channel Model Based Rate Control (WMRC) Scheme in RTP/UDP for Real Time Multimedia Transmissions over Wired-Wireless Networks(WMRC- RTP/UDP) draft-dong-wmrc-rtpcontrol-00 Abstract This document introduces a Wireless Channel Model Based rate control scheme for improving the behavior of real time multimedia streams with TFRC [2] in wireless-wired heterogeneous networks. Based on wireless channel characteristics, the method can first identify the level of packet losses of two different types by sending large and small packets alternately, then adopt different adaptive rate control strategies to increase the network throughput and decrease congestion packet loss rate, to improve transmission quality of real-time multimedia stream. The proposed method is compared with previously reported algorithms [3-4] by simulation. It is shown from the simulation results in different network topology environments, the performance the proposed algorithm is better than existing algorithms in the aspects of network bandwidth utilization and congestion packet loss control. Parts of this method published in the IEEE Wireless Communications and Networking Conference (WCNC2007) and in a pending China patent (access number: CN101686100). Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on June 27, 2011. Dong & Zhao Expires June 27, 2011 [Page 1] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 Copyright Notice Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Packet Loss Discrimination . . . . . . . . . . . . . . . . . . 3 3. Adaptation to Network State Changes . . . . . . . . . . . . . 8 4. WMRC Behavior Description . . . . . . . . . . . . . . . . . . 8 4.1. Adaptive Rate Control Mechanism . . . . . . . . . . . . . 9 4.2. WMRC Specific Implementation Steps . . . . . . . . . . . . 9 5. WMRC Packet Processing Protocol . . . . . . . . . . . . . . . 10 5.1. Sender Initialization . . . . . . . . . . . . . . . . . . 10 5.2. Receiver Behavior When a Data Packet Is Received . . . . . 10 5.3. Sender Behavior When a Feedback Packet Is Received . . . . 10 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 8. Security Considerations . . . . . . . . . . . . . . . . . . . 12 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13 9.1. Normative References . . . . . . . . . . . . . . . . . . . 13 9.2. Informative References . . . . . . . . . . . . . . . . . . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13 Dong & Zhao Expires June 27, 2011 [Page 2] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 1. Introduction This document describes a wireless channel model based packet loss discrimination method that can differentiate wireless random bit error packet loss from congestion packet loss over wireless-wired networks. This work focuses on how to obtain the dynamic change characteristics of wireless communication network from the transport/ application layer, and to achieve a better end-to-end quality of service by making adaptive adjustment according to these changes. The proposed scheme shows to be more accurate than existing methods in estimating current network status by means of a wireless channel model and statistical analysis of large and small packets loss rates, and its performance basically not affected by the variation of network topology and the competition flows. The realtime multimedia transmission protocol can carry out performance optimization based on the packet loss discrimination results. For example, if only the wireless losses are reported, the source and channel coding ratio can be adjusted to increase the data protection instead of reducing sending rate. 1.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [1]. 2. Packet Loss Discrimination Previous research indicates that the packet loss probability caused by random bit errors is related to the packet size in wireless environment, namely, the larger the packet size, the higher the packet loss probability. The congestion packet losses (drop-tail router), however, are generally independent of the packet size. Based on this observation, one can send small probing packets regularly to the channel to distinguish from the large-size video packets, and estimate current main cause of packet losses from their feedback information. However, channel bandwidth utilization will be reduced by these probing packets. Therefore, we use small-size video packets instead of probing packet to improve channel bandwidth utilization. A method for identifying packet loss reason from the packet loss rates of large and small packets is developed below. In order to identify between congestion packet losses and wireless fading losses, the sender node sends large and small packets alternately and the statistics of the lost large and small packets over a period is calculated at the receiver end. For ease of analysis, let us define the following variables: Dong & Zhao Expires June 27, 2011 [Page 3] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 o Nps = the number of lost small packets; o Npsc = the number of lost small packets due to congestions; o Npsb = the number of lost small packets due to bit errors; o Npl = the number of lost large packets; o Nplc = the number of lost large packets due to congestions; o Nplb = the number of lost large packets due to bit errors. According to traditional communication theory, the wireless packet loss rate varies exponentially with the channel bit error rate r. In some cases such as uniform distribution with a very small r, the variations of packet loss rate with r can be approximated by a linear function. For the wired channel, as mentioned above, the numbers of large and small congestion packet losses in the given period would approximately be equal, namely Nplc=Npsc. Thus, we have the following equations: o Npl = Nplc + Nplb (1) o Nps = Npsc + Npsb (2) Let B denote the ratio of Nplb to Npsb in certain wireless channel condition. Obviously, B is a function of the channel bit error rate r and can be expressed as: o B(r) = Nplb / Npsb (3) Thus, equation (1) can be rewritten as: o Npl = Npsc + B(r) * Npsb (4) At the receiver end, one can obtain the statistical values of Npl and Nps over a time interval. If B is known, one can get the values of Nplc (=Npsc), Nplb and Npsb by solving above equations, namely, the congestion loss rate and random erroneous loss rate of large and small packets respectively. One can then know current congestion level of the wired networks from Nplc and Npsc, and fading condition of the wireless link from Nplb and Npsb. The problem now is how to know the value of B, and there seems very few works have been done on this issue. In [5], B was assumed to be a constant, dependent on the sizes of large and small packets. This however is not always true according to our experimental results. Therefore, by taking this assumption in solving equations (2) through Dong & Zhao Expires June 27, 2011 [Page 4] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 (4) for other variables, the applicable scope of the obtained values will probably be rather limited. To analyze the relations between packet loss rates and the packet sizes, a group of experimental tests in wireless channels have been carried out by using a modified Jakes Rayleigh fading model [6] in different channel BERs (Bit Error Rates) and packet sizes. Linear, quadratic and exponential curves are used to fit the obtained simulation data where the exponential fitting has the largest fitting errors. Let G denote packet length, and assume the random bit error of a wireless channel is subject to uniform distribution and any two bit error events are uncorrelated. The packet loss error rate P of wireless link can thus be computed as o P=1-(1-r)^G (5) If r is very small, by Taylor expansion in r = 0 and omitting higher order terms, the linear (first-order) and second-order approximation of equation (5) can be obtained as follows, o Linear approximation (first order): P=r*G (6) o Second-order approximation: P=r*G*(1-r*G/2) (7) If the linear approximation is used, we have, o Pl/Ps = Gl/Gs = b (8) Where Pl and Ps are the loss rate of large and small packets respectively; Gl and Gs are the lengths of large and small packet respectively; b denotes the ratio of the large packet length to small packet length. B in this condition is a constant (=b), which is frequently used in previous literatures. However, when r is not small enough, the above equation is not applicable. At this time, one can consider second-order approximation and the ratio can be obtained from equation (7) as, o Pl/Ps=b*(2-r*b*Gs)/(2-r*Gs)=b*A(r) (9) o Where A(r) = (2-r*b*Gs)/ (2-r*Gs) (10) When b = 2, the above equation becomes, o A(r) = (1-r*Gs)/ (1-r*Gs/2) (11) From above analysis, we can see that, when r is not small enough, Dong & Zhao Expires June 27, 2011 [Page 5] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 Pl/Ps is not a constant but determined by A. In most practical settings, the reasonable value scope of A in equation (11) is 0.6~1 on condition that r is less than 4/7*Gs (In fact, this is not a necessary condition). For example, when Gs is 4000bits (500Bytes), then r is less than 1.4*10^- 4, and when Gs is 800bits (100Bytes), r is less than 7.1*10^-4. That is to say, the bit error rate is kept in a small or medium value range. Otherwise, the second-order approximation (equation (7)) may not be applicable. A(r) monotonically decreases for a given value G with the increase of r. On the other hand, let us define the following variable, o &N = Npl - Nps = Nplc + Nplb - Npsc - Npsb = Nplb - Npsb = &Nb (Since Nplc =Npsc) (12) From equation (12), we can know that the difference between the number of lost large and small packets is equal to the difference between the number of lost large and small packets due to bit errors. The wireless packet loss rate P increases linearly with packet size under certain r ranges, namely, o &P=k*&G (13) Where &P=Pl-Ps, &G=Gl-Gs and k (k>0) is an r-related constant. Since &P can be calculated from equation (12), and &G is known in advance, constant k can be obtained, that reflects the degree of link bit errors. The slope of packet loss rate curve decreases with packet length increase when BER is relatively high; while the curve slope almost keeps stable and uncorrelated to packet length when BER is small, namely, the packet loss rate varies linearly with packet length under small BER conditions. Therefore, one can estimate the current level of r from k within the scope of r less than 1.8*10^-4. As for congestion packet losses in wired networks, the adaptive rate control mechanism TFRC[2], decreases the sending rate when high packet loss rate is reported, and allows the loss rate to decrease quickly (assuming the video stream shares the network bandwidth with other TCP-friendly traffic) [7]. According to our NS2 simulation results, the packet loss rate can normally drop by more than 50% within 4 RTT (Round Trip Time) time. Based on above analyses, we propose the following computation strategy: 1) When the packet loss rate rises to an unacceptable level, the rate control mechanism will decrease the sending rate. Thus, (1) If this Dong & Zhao Expires June 27, 2011 [Page 6] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 high loss rate is due to congestions of the wired link, then as discussed above, the loss rate will drop considerably within several RTTs; (2) If however, the loss rate doesn!_t show any obvious drop within the time interval, one may regard present packet losses most probably due to the bit errors of the wireless link rather than network congestions. 2) If present packet losses are indeed mainly due to bit errors of the wireless link, we may assume the number of congestion packet losses Npsc in (2) and (4) much less than the number of erroneous packet losses Npsb, and Nplc is far less than Nplb. Equations (2) and (4) can then be simplified as: o Nps = Npsb (14) o Npl = B(r)*Npsb (15) From above equations, one can estimate the value of B, and at the same time identify the main cause of current packet losses. Note that in our method, there is no assumption of the linear correlation of the erroneous packet loss rate with the packet size. 3) A linear prediction with error correction method is adopted to estimate the value of B. If present packet losses are mainly due to bit errors of the wireless link, then o B(t) = d*B(t"C1) + (1-d)*&B(t) (B0 is the initial value) (16a) o Otherwise, B(t)=B0 (16b) Where B0=Gl/Gs; &B(t)=Npl/Nps is the prediction error corrective value; d is a weighting coefficient (d is (0,1)); t=1,2,..., denotes sampling time with sampling interval of q*RTT (q is (0,1], a constant). As mentioned above, B is no longer a constant when wireless random bit errors are high. Therefore, we adopt the linear prediction with error correction (corrective value &B(t)) method to gradually track the value of B as shown in equation (16a). The weighting coefficient d determines tracking speed of B(t) to the real value of B that is not a constant, and the selection of d should compromise between tracking speed and stability of B. Equation (16b) represents the case of low BER of wireless link, where packet losses are mainly due to network congestion and B can be approximated by a constant (see equation (8)). Dong & Zhao Expires June 27, 2011 [Page 7] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 3. Adaptation to Network State Changes For timely response to the change of network status, a finite length history record based large and small packet loss statistics is used. In a sliding window, Nps and Npl record the lost number of small and large packets respectively. When a new packet loss occurs, the oldest recorded one will be removed from the record queue, and the statistical value will be updated correspondingly. The main concern here is the selection of the queue length: on one hand, if the queue is shorter, the response to the change of network status will be quick, but may cause stability problem; on the other hand, if the queue is too long, the sending rate will be relatively stable, but the response to network state changes may be slow. Therefore, the length of lost packets record queue represents a compromise between response time and control stability. In order to track the change of the network states effectively, we introduce another statistic to help determine the current network states. Let, o Dec = 2*(B*Ps-Pl) / ((B-1)*(Ps+Pl)) (17) o And, Pc = (Npsc+Nplc) / (Nps+Npl) (18) From equations (1)-(4), one can see that the statistic Dec is equal to Pc in a statistical sense, and reflects the ratio of the number of congestion packet losses to the number of total lost packets. Therefore, the value of Dec also reflects the congestion/wireless packet loss status of current networks. The larger the value is, the more serious the congestion packet losses. The values of Pl and Ps in equation (17) are approximated by the reciprocal of the average length of intervals of packet loss events [RFC 5348, section 5] for large and small packets respectively. The advantage of calculating Dec by equation (17) is: if no packet loss happens for a long time, although no new packet loss event occurs, the interval between packet loss events gets longer, and the congestion reduction can be reflected timely by the weighting coefficient of sliding window. This means the weight of loss events that occur more recently is larger, and that of older loss events is smaller. In this way, we can track current network status more quickly, and at the same time achieve good control stability. 4. WMRC Behavior Description Dong & Zhao Expires June 27, 2011 [Page 8] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 4.1. Adaptive Rate Control Mechanism To satisfy the TCP friendliness requirement, an adaptive rate control based on TCP throughput model is used in this paper. The used TCP throughput mathematical model is as follows [2]: o rate=TU/[RTT*sqrt(2*p/3)+(4*tout*(3*sqrt(3*p/8)*p*(1+32*p^2)))] (19) Where, TU denotes data packet size, RTT denotes round trip time, tout denotes retransmission timeout time (tout = 4 RTTs), P denotes packet loss event rate[2]. Equation (19) works well in wired IP environment, but in wireless environment, the performance of conventional TCP/TFRC is often unsatisfactory. Therefore, we modify this model a bit by removing the number of lost packets due to wireless bit errors in the calculation of P. Thus the capability to differentiate the packet loss types will be essential. In the WMRC algorithm, when the receiver detects a packet loss event, it calculates the Dec first, then judges whether it is a congestion packet loss by comparing the value of Dec with a given threshold Dth (Dth is (0,1)). If it is judged as a congestion packet loss (Dec is more than Dth), this packet loss event will be used in the calculation of packet loss rate P in Equation (19); otherwise, it won't be. Thus, the packet loss rate P obtained from the RTCP feedback packets at the sender reflects only the congestion packet loss rate, not including the wireless packet losses. And the calculated sending rate will be fit the current network situation well. Then, the situation of excessive restriction of the sending rate will not happen. The smaller the value of Dth is, the greater the possibility of judging the current packet loss as the congestion loss; conversely, the greater the possibility of judging it as the wireless random packet loss. We generally set Dth=0.8 after running a number of experimental tests. 4.2. WMRC Specific Implementation Steps The proposed scheme is based on RTP/UDP transport layer protocol [8], and works in following steps: 1) Initialization: after setting the initial sending rate, the parameters of a, b, d, h, q, Gl, Gs, Dth, and the length of record queue of packet losses, the algorithm enters a slow start stage. 2) When the media streaming gets into a stable state when packet loss occurs, the receiver end computes the statistical values of Npl, Nps, Pl, Ps, RTT, and P (recording the congestion packet loss rate only). Dong & Zhao Expires June 27, 2011 [Page 9] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 3) The receiver end calculates the value of Dec by equation (17) for every packet loss event, and estimates the reason of the current packet loss. If Dec > Dth, the packet loss is judged as the congestion loss, otherwise, the wireless packet loss. If it is a congestion packet loss, it will be used to update the packet loss rate P; otherwise it will not be. At every sampling time point t, B(t) is updated by equation (16) according to the nature of the current packet loss. At every certain time interval, the receiver informs the sender the RTT and packet loss rate P by RTCP feedback packets. 4) If there are packet losses occurred during the feedback period, when the sender receives the RTCP feedback packets, rate control will be carried out according to the equation (19). Otherwise, a MIMD(a, b) congestion control scheme [9] will be adopted. 5. WMRC Packet Processing Protocol 5.1. Sender Initialization Sender parameter settings: a=0.2, b=0.1, d=0.9, h=0.5, q=0.5, Gl=1016Bytes, Gs=508Bytes, and Dth=0.8. A loss queue of 32 packets is used in WMRC. The initial slow-start phase will basically be the same as that of TFRC [2,section 4]. 5.2. Receiver Behavior When a Data Packet Is Received At the receiver end, if there are losses of large packets, one Updates the loss queue by Npl+1; otherwise (there are losses of small packets), Nps+1, and simultaneously calculates Dec by Equation (18). The values of Pl and Ps are calculated based on the length of intervals of (large and small) packet loss events in a similar way as TFRC [RFC 5348, section 5]. Then B is updated by B(t) = d*B(t-1)+(1- d)*&B(t). If Dec is greater than a fixed threshold Dth, we judge the current packet loss type as congestion loss and record this packet loss event (that will be used in the computation of the packet loss event rate p); otherwise the current packet loss type is judged as random loss and we do not record this loss event. At every h*RTT (h is (0,1]) time, the receiver end feeds back the loss event rate p and round trip time RTT to the sender with a feedback packet. 5.3. Sender Behavior When a Feedback Packet Is Received The algorithm of WMRC will decrease the sender!_s sending rate when high packet loss rates are reported, expecting the loss rates to drop quickly (assuming the multimedia stream shares the network bandwidth with other TCP-friendly traffic). We propose the following sending Dong & Zhao Expires June 27, 2011 [Page 10] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 strategy of the WMRC algorithm at the sender end. When the sender receives the feedback packet, it will carry out rate control according to (19) with the packet loss rate p and round trip time RTT. Sometimes the calculated rate may not suit the current networks state due to the change of round trip time. If there is no packet loss reported in this feedback round, or the calculated rate is 1.5 times more than the current sending rate, the sender!_s rate control will be based on the MIMD (a, b) algorithm (described below). The MIMD(a, b) congestion control algorithm can be briefly described as: a and b are the parameters of MIMD(a, b) model to increase or decrease the sending rate respectively, and a, b is (0,1). Let R denote the current sending rate, if no packet losses occurred in this control period, the sending rate will be increased to (a+1)*R, otherwise, decreased to (1-b)*R. The whole adaptive rate control scheme is described in Algorithm 1. /*Algorithm 1: The adaptive rate control scheme */ ------------------------------------------------------------------- 1. Initialization 2. Updating Nps, Npl 3. For {receive a feedback packet} do 4. Compute Dec by equations (17) and (1)-(4) 5. If Dec>Dth 6. The current packet loss is the congestion loss, and updates the packet loss rate P 7. Else then 8. The current packet loss is the wireless loss, and does not update the packet loss rate P 9. End else 10.End if 11. At a certain time interval, updating RTT and P, and compute Rate by equation (19) 12. If no packet loss or Rate > 1.5 Rcurrent 13. The rate control be done by the MIMD algorithm 14. Else then 15. The next transmission rate Rn = Rate 16. End else 17. End if 18. End for ------------------------------------------------------------------- Dong & Zhao Expires June 27, 2011 [Page 11] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 6. Acknowledgements The authors would like to acknowledge feedback and discussions on equation-based congestion control with a wide range of people, including members of the Wireless Communication Research Group and the End-to-End Research Group. Thanks are given to the National Natural Science Foundation of China (No.60972038), the Jiangsu Province Universities Natural Science Research Key Grant Project (07KJA51006), and Jiangsu Province Graduate Innovative Research Plan (CX09B_149Z) for their financial support. 7. IANA Considerations There are no IANA actions required for this document. 8. Security Considerations WMRC is not a transport protocol in its own right, but a congestion control mechanism that is intended to be used in conjunction with a transport protocol. Therefore security primarily needs to be considered in the context of a specific transport protocol and its authentication mechanisms. Congestion control mechanisms can potentially be exploited to create denial of service. This may occur through spoofed feedback. Thus any transport protocol that uses WMRC should take care to ensure that feedback is only accepted from the receiver of the data. The precise mechanism to achieve this will however depend on the transport protocol itself. In addition, congestion control mechanisms may potentially be manipulated by a greedy receiver that wishes to receive more than its fair share of network bandwidth. A receiver might do this by claiming to have received packets that in fact were lost due to congestion. Possible defenses against such a receiver would normally include some form of nonce that the receiver must feed back to the sender to prove receipt. However, the details of such a nonce would depend on the transport protocol, and in particular on whether the transport protocol is reliable or unreliable. We expect that protocols incorporating large/small packet with WMRC will also want to incorporate feedback from the receiver to the sender using packet loss discrimination. The packet loss discrimination is a modification to TFRC that distinguishes the loss packets from congestion loss or wireless random error. 9. References Dong & Zhao Expires June 27, 2011 [Page 12] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 9.1. Normative References [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. 9.2. Informative References [2] Floyd, S., Handley, M., Padhye, J., and J. Widmer, "TCP Friendly Rate Control (TFRC): Protocol Specification", RFC 5348, September 2008. [3] Song Cen, et al., "End-to-End Differentiation of Congestion and Wireless Losses", October 2003, . [4] Min Kyu Park, Kue-Hwan Sihn, Jun Ho Jeong, "A Statistical Method of Packet Loss Type Discrimination in Wired-Wireless Networks", 2006, . [5] C. L. Lee, et al., "On the Use of Loss History for Performance Improvement of TCP over Wireless Networks", 2002, . [6] H.-J. Lee, H.-J. Byun, and J.-T. Lim, "TCP-friendly congestion control for streaming real-time applications over wireless networks", 2008, . [7] S. Floyd and J. Padhye, "Equation-Based congestion control for unicast applications", 2000, . [8] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", RFC 1889, January 1996. [9] Yu-ning Dong and Meng-yue Chen, "Real time video transmission control in wireless-wired IP networks", 2007, . Dong & Zhao Expires June 27, 2011 [Page 13] Internet-Draft WMRC-RTP/UDP Rate Control December 2010 Authors' Addresses Yu-ning Dong Nanjing Univ. of Posts and Telecom. 66 New Mo-fan-ma-lu Road Nanjing, Gulou 210003 China Phone: +86 25 83492402 Email: dongyn@njupt.edu.cn Hai-tao Zhao Nanjing Univ. of Posts and Telecom. 66 New Mo-fan-ma-lu Road Nanjing, Gulou 210003 China Phone: +86 25 83492402 Email: zhaohtmail@gmail.com Dong & Zhao Expires June 27, 2011 [Page 14]