Bandwidth Estimation and Rate Control in Bitvampire
Total Page:16
File Type:pdf, Size:1020Kb
Bandwidth Estimation and Rate Control in BitVampire CPSC 527: Advanced Computer Networks Mayukh Saubhasik Uwe Schmidt Department of Computer Science Department of Computer Science University of British Columbia University of British Columbia Vancouver, B.C. Vancouver, B.C. [email protected] [email protected] ABSTRACT demanding a certain bandwidth value. Each of these peers We consider the problem of bandwidth estimation and rate replies whether they can satisfy the request or not, subject control in the context of the peer-to-peer video streaming to their available bandwidth. application BitVampire. BitVampire requires each peer to maintain an estimate of its available upstream bandwidth. We are giving a brief overview over the rich body of work This is needed by a scheduling algorithm which takes in- which has already investigated in this problem. In section formation about peer’s bandwidth into account in order to 2.4 we will explain why these methods aren’t applicable in minimize the initial buffering time when watching a video. our context. As a result, we came up with a pragmatic It is also an interesting problem in general, since P2P ap- approach which is applicable in the context of any generic plications can generally offer a better quality of service if P2P application. Although the accuracy of the method is they are aware of their bandwidth limitations. We looked quite low, it makes up for this in terms of speed and ease of into the area of bandwidth estimation and evaluated their implementation. applicability for the context of P2P applications. We found that it is not easy to use them in this context since most of them require very accurate timing and low level network 2. RELATED WORK access which is often not given by high-level programming The bandwidth of a link can either be measured by pas- languages like Java. We went for a pragmatic approach in- sively monitoring the amount of traffic flowing through it, stead, which uses round-trip-time measurements as an in- or by actively probing the link to estimate its bandwidth. dicator for the available bandwidth of a peer. We did a The passive monitoring mechanism requires access to the prototype implementation in Java and evaluated it in the intermediate network elements or administrative resources, LAN environment. Future work has to investigate about whereas the active probing techniques can be run just on the the choice of many policy decisions which arose when creat- end hosts. Thus passive monitoring methods aren’t really ing the prototype. feasible except in a well controlled network testbed. Active bandwidth estimation is a well studied field, which 1. MOTIVATION has been around for at least 10 years. Despite that, there are This project is largely motivated by the need for accurate quite a few open problems within it. What makes the prob- bandwidth estimation in BitVampire [Liu and Vuong, 2006]. lem hard is its real-time nature and the need for a balance BitVampire is a peer-to-peer (P2P) video streaming soft- between the amount of traffic generated, time taken and ac- ware, which is being actively developed here at UBC. Bit- curacy of the measurements. Similar to all active measure- Vampire requires each peer to maintain an estimate of its ment techniques, the very act of measuring the bandwidth available upstream bandwidth. This is needed by a schedul- tends to change it. This makes the problem even more chal- ing algorithm which takes information about peer’s band- lenging. width into account in order to minimize the initial buffering time when watching a video. Although we are motivated by BitVampire, bandwidth estimation is also an interesting 2.1 Terminology problem in general, since P2P applications can generally A link is defined to be the interconnect between any two offer a better quality of service if they are aware of their network elements. For example, this could be between the bandwidth limitations. an end host and its gateway router or between any two in- termediate routers. BitVampire is a cost-effective P2P video streaming solution, which aims to collate the individual peer’s resources to sup- Each link is modelled to have a constant delay and band- port large scale on-demand media streaming. The basic width. The link latency is a constant delay which is a prop- idea of BitVampire is to split a published video in various erty of the physical medium being used for transmission, segments and distribute these segments among the peers. this value is independent of the amount of data being trans- When a peer requests to watch a video, it creates a schedule ferred. The bandwidth characterizes the rate at which data which aggregates the bandwidth from various other peers can be sent over the link [Curtis and McGregor, 2001]. to stream the video. In order to do that it sends a request to a number of peers, in possession of parts of the movie, Therefore for a packet size P , the time taken to transmit it 1 over a link t is given by The problem with this approach is that cross-traffic is de- P laying the transmission of the probe packets. Thus to cal- t = + l (1) culate the link capacity bandwidth, the measurements for b each packet size are repeated multiple times to discount for , where b is the link bandwidth and l the link latency. Some cross traffic. The assumption is that at least one probe for of the key terms, used in further discussion, are: each packet size won’t get delayed by cross-traffic. For each packet size, only the minimum recorded RTT is taken into account while calculating the linear fit as illustrated in figure Capacity bandwidth is the maximum bandwidth avail- 2. able on a link. This is a static value which doesn’t change over time. 0.75 RTT Available bandwidth refers to the currently available band- Minimum RTT Linear fit nents in the forward and reverse paths: serialization width on a link. Thus this value may continuously vary delays, propagation delays, and queuing delays. The serial- over time. 0.625 ization delay of a packet of size L at a link of transmission rate C is the time to transmit the packet on the link, equal Bottleneck link of a path refers to the link with the min- to L/C. The propagation delay of a packet at a link is the imum capacity bandwidth among all the links on a 0.5 time it takes for each bit of the packet to traverse the link, RTT (ms) and is independent of the packet size. Finally, queuing path. delays can occur in the buffers of routers or switches when there is contention at the input or output ports of these Path capacity bandwidth denotes the capacity bandwidth 0.375 devices. of the bottleneck link. VPS sends multiple probing packets of a given size from the sending host to each layer 3 device along the path. The 0.25 technique assumes that at least one of these packets, together Path available bandwidth is the available bandwidth of 0 200 400 600 800 1000 1200 1400 1600 with the ICMP reply it generates, will not encounter any the bottleneck link. Probing packet size (bytes) queuing delays. Therefore, the minimum RTT measured for each packet size will consist of two terms: a delay that is inde- Cross traffic refers to all traffic going over a link, apart I Figure 4. RTT measurements, minimum RTTs, and the least pendent of packet size and mostly due to propagation delays, from the traffic generated by the method itself. squares linear fit of the minimum RTTs for the first hop of a and a term proportional to the packet size due to serialization Figurepath. 2: Multiple measurements. Source: [Prasaddelays at each link along the packet’s path. Specifically, the et al., 2003] minimum RTT Ti(L) for a given packet size L up to hop i is expected to be able bandwidth metric does not depend on a specific transport We are mostly interested in the path capacity bandwidth i protocol. The BTC depends on how TCP shares bandwidth L T (L) = α + = α + β L, and the path available bandwidth. Note that a path in our with other TCP flows, while the available bandwidth metric i ∑ i (7) In order to get the path capacity bandwidth using this meth- k Ck case is the sequence of links from one peer to another. assumes that the average traffic load remains constant and =1 od, theest linkimate capacitys the additio bandwidthnal bandwidth for a p eachath can link offer along before theits pathwhere: has totig beht l calculated.ink is saturated The. To il RTTlustrate value this po forint, s aup linkpose Na sinis- given• Ck: capacity kth hop 2.2 Single Packet Techniques by equationgle-link p 2,ath wherein with capa wecity C takeis sa intoturate accountd by a sing thele TC RTTP con- values• α: delays up to hop i that do not depend on the probing nection. The available bandwidth in this path would be zero packet size L Single packet techniques work by sending probe packets, for all preceding links 1,...,N. Therefore if one knows the due to path saturation, but the BTC would be about C/2 if the • βi: slope of minimum RTT up to hop i against probing which are then echoed back by the destination. The mea- RTT valuesBTC con fornec alltion the has precedingthe same RT links,T as th onee com canpetin easilyg TCP calcu-packet size L, given by sured round-trip-time (RTT) values are used to form an es- connection.