Multimedia Systems DOI 10.1007/s00530-008-0148-7
REGULAR PAPER
Optimizing P2P streaming throughput under peer churning Yi Cui · Yanchuan Cao · Liang Dai · Yuan Xue
Received: 2 January 2008 / Accepted: 10 October 2008 © Springer-Verlag 2008
Abstract High-throughput P2P streaming relies on peer selection, the strategy a peer uses to select other peer(s) as its parent(s) of streaming. Although this problem has been thoroughly investigated in the classical optimization framework under static settings, it still remains unaddressed as how to sustain throughput competitive to the optimum under highly dynamic peer churning. To accommodate such peer dynamics, we extend the classical optimization framework and propose a distributed online peer selection algorithm. This basic algorithm is further extended to a variety of settings commonly seen in operational P2P networks, such as multiparent streaming, admission control, delay constraint, etc. We prove approximation bound of our algorithm to the optimal throughput. Through evaluation under different topological setups and peer churning sequences, we show that our solution can consistently deliver competitive throughput, which greatly outperforms its theoretical bound.
Communicated by R. Steinmetz. This work was supported by NSF award 0643488, Vanderbilt Discovery grant, and a gift from Microsoft Research. Views and conclusions of this paper are those of authors, which should not be interpreted as representing the official policies, either expressed or implied, of the funding agencies. Y. Cui (B) · Y. Cao · L. Dai · Y. Xue Department of Electrical Engineering and Computer Science, Vanderbilt University, Nashville, TN 37235, USA e-mail:
[email protected] Y. Cao e-mail:
[email protected] L. Dai e-mail:
[email protected] Y. Xue e-mail:
[email protected]
Keywords Peer-to-peer · Streaming · Optimization · Online algorithm · Routing
1 Introduction Recently, peer-to-peer (P2P) streaming has attracted great attention from academia and industry as a powerful enabling platform to support large-scale multimedia distribution. By utilizing the storage space and up-link bandwidth of client machines, P2P streaming achieves superb scalability in terms of the number of peers it is able to support. In P2P streaming, peers self-organize themselves into an overlay network, the underlying vehicle in which multimedia stream is distributed. Each link in the overlay network, termed overlay edge, refers to the unicast path interconnecting the two peers as end nodes. The performance factors of P2P streaming, e.g., delay, throughput experienced by each peer, crucially depend on the structure of the overlay network. A central problem in the overlay network construction is peer selection, the strategy a peer employs to select other peer(s) as its parent(s) of streaming. Under the static setting, it is formulated as the overlay multicast problem: given the source (streaming server) and a fixed set of receivers (peers), how to set up the optimal spanning tree to interconnect them? Under different application contexts, there are various optimization objectives, such as maximizing throughput to all receivers, minimizing the average or worst-case delay, minimizing service disruptions, etc. Although existing work has proved this problem hard to solve under the centralized and static setting, the realistic constraints of P2P streaming makes it even more challenging. The central challenge is peer churning, i.e., a peer can dynamically join or leave the streaming by the will of its user. This characteristic leaves a constantly changing peer
123
Y. Cui et al.
set throughout the lifetime of P2P streaming. In order to apply the optimization to this problem, the optimal distribution structure has to be setup from scratch, and torn down to restart again if any peer churning event happens, which is prohibitively expensive, if at all possible. To accommodate peer churning, existing P2P streaming systems choose to perform peer selection in an online fashion, where a newly joined peer autonomously selects one or multiple existing peers as its parent(s). If a peer is disconnected due to its parent leaving, it will rejoin the streaming as a new peer. Therefore, any attempt to bring optimization flavor into the online strategy should answer the following questions. If the optimization approach could not be directly applied, will the online solution perform to any competitive ratio to optimality? If so, does there exist a lower-bound that is guaranteed theoretically, and consistently sustained beyond experimentally? As the peer churning continues during the course of P2P streaming, will the online solution result in steady or deteriorating performance? This paper sets out to answer these questions. In particular, we focus on the objective of throughput maximization, since it holds great practical value for P2P streaming practitioners to maintain or improve the quality of multimedia streaming. We extend the classical optimization framework and propose a distributed online peer selection algorithm as follows. We associate with each overlay edge an artificial length which is an asymptotic cost function of the traffic load carried by this edge. The distance between peers is then measured by this length. Following this metric, each peer selects its closest neighbor as the parent, based on the intuition that the shortest edge is the one carrying the least traffic. We further extend our algorithm to the following settings. (1) Multi-parent streaming. The above algorithm only allows each peer to have one parent. We show that it can be upgraded to the case of multi-parent streaming, an approach adopted by many existing solutions [1–3]. (2) Admission control. In many P2P streaming applications, streaming rate is predetermined by the server, which calls for the admission control mechanism to reject peers unable to achieve the desired throughput. We show that our online solution could be easily adapted to this scenario. (3) Delay constraint. When delay requirement is imposed, it shrinks the peer selection space. We study the performance of our solution under this constraint. (4) Simplified topology. The above algorithm requires complete knowledge of the underlying physical network (topology and physical link capacity), which is unrealistic in practical settings. We extend the basic algorithm so that it relies on partial knowledge that is easy to acquire and manage at the P2P network level.
123
Under all above settings, we prove that our online algorithm is guaranteed to achieve logarithm competitive ratio to the optimal throughput when peers join but do not leave the P2P session. Simulation results show our algorithm to greatly outperform this bound under different topological setups and peer churning sequences. Due to space constraint, we delay the proofs to the theorems appeared in this paper to our technical report [4]. The rest of this paper is organized as follows. We first review related work in Sect. 2. Then in Sect. 3, we introduce the network model and optimization framework. Section 4 presents the basic online peer selection algorithm, and its implementation issues. Section 5 follows up by discussing several cases to extend the basic algorithm, including multiple parents, admission control, delay constraint, and simplified topology. We discuss performance evaluation in Sect. 6 and conclude in Sect. 7. Proofs to the theorems are provided in the appendices.
2 Related work Our work is uniquely positioned in the overlapping area of P2P streaming and traffic routing optimization. In this section, we briefly review the existing literatures in these two areas, compare and highlight the contribution of our work. 2.1 P2P streaming In recent years, P2P streaming is gaining increasing popularity with the advent of commercial deployments [5,6], as well as the significant number of published works from academia. Earliest works include Narada [7], Overcast [8], etc., which propose heuristic solutions to construct an overlay multicast tree serving all peers. Following works try to improve throughput, delay, or scalability of overlay multicast, such as ZigZag [9], NICE [10], and CollectCast [11]. Another set of works employ advanced coding schemes to improve the streaming quality [12] or reliability [1] of P2P streaming. Until recently, a large body of mesh-based solutions have been proposed, e.g., [13,14]. The central problem addressed by these works is how to construct the relaying structure among the peers to achieve improved streaming quality, which are reflected in different metrics such as delay, throughput, and scalability. Existing works have studied different overlay topologies such as single tree-based [7,8,10,15], multi-tree-based [1] and mesh-based [12,14] topologies and explored different peer selection strategies such as random peer selection [13], proximity-aware peer selection [16], etc. For example, in TAG (Topology-Aware Grouping) [17], the information about overlapping routes to the sender among group members is used to guide the construction of overlay tree. The
Optimizing P2P streaming throughput under peer churning
resulting tree has low relative delay penalty, and introduces a limited number of identical packets on the same link. In [18], a distributed binning scheme is proposed where overlay nodes partition themselves into bins such that nodes that fall within a given bin are relatively close to one another in terms of network latency. A landmark node is assigned for each bin, and each node determines which bin it belongs to by measuring its distance to these landmark nodes. Since the location of landmark nodes are well-known, each overlay node can infer its distance to other nodes, which in turn aids the construction of the overlay graph.
v5 = S(b)
v0 = S(a) v3
v1
Overlay Graph
v6
Session a Session b End Host Router
(v0, v1)
Overlay Edge
Physical Network
Fig. 1 Illustration of overlay graph
2.2 Optimization-based routing Optimization-based routing strategies are also extensively studied based on the multi-commodity flow problem formulation. The basic idea is to assign weights to links to reflect their congestion conditions, and perform traffic routing based on the weights. In particular, the work of [19,20] present the theoretical models for online unicast routing. In the multicast domain, the work of [21] investigate the case of receivers within a multicast session arriving in batch, and the work in [22] presents a solution for receivers arriving separately. Finally, [23] shares the same goal with our work: to maximize the overlay throughput by exploring the route diversity of overlay network. The proposed solution is to build multiple disjoint overlay MSTs for each session. However, since the routing metric is defined as the static latency, not the dynamic weight to reflect the traffic condition, this solution does not have any performance guarantee.
v4
v2
v2
v4 v5 = S(b) Tree Edge of Session a
v0 = S(a)
v6 v1
Tree Edge of Session b
v3
Fig. 2 Illustration of overlay spanning tree
We use multicommodity flow theory to formulate the optimal P2P streaming problem. We first model this problem under the static setting with no peer churning. The optimal algorithm derived in this section forms the methodological foundation to our online peer selection algorithm. It also serves as baseline algorithm to evaluate the approximation of the online algorithm to the optimality (Table 2).
application considered in this paper is assumed to employ the non-scalable media codec. Therefore, we define dem(m) as the demand of m, which is the desired streaming rate from S(m) to all receivers in R(m). For a session m ∈ M, we define its overlay graph G(m) = (V(m), E(m)). In this graph, the node set V(m) = {S(m)} ∪ R(m) includes the sender and all receivers of session m. A directed edge (vs , vt ) ∈ E(m) represents the data dependency between two nodes vs and vt , i.e., vt can retrieve data from vs . In Fig. 1, two sessions, a and b, coexist in the same physical network. V(a) = {v0 , v1 , v2 , v3 , v4 }. Here, peer v0 is the sender of session a, and peers v1 through v4 are the receivers of a. For session b, V(b) = {v3 , v4 , v5 , v6 }. Here, peer v5 is the sender of session b, and the rest belong to the receiver set R(b). Note that a peer can belong to several sessions. In this example, v3 and v4 belong to both sessions a and b. Each overlay edge, e.g., (v0 , v1 ) in Fig. 1, corresponds to the unicast route at the physical network.
3.1 Overlay graph model
3.2 Optimal solution
We view the network as a directed graph G = (V, L), with capacity cl on each physical edge l ∈ L. We assume that multiple P2P sessions coexist on G. We model the P2P session into a commodity set M, where each commodity m ∈ M is a session.1 S(m) is the source, i.e., the server distributing the multimedia stream, and R(m) is the set of receivers. The
On top of each overlay graph, different spanning trees can be found. Figure 2 shows a sample spanning tree for the overlay graphs G(a) and G(b) in Fig. 1. With the formulation of overlay graph, the overlay routing problem boils down to, for each session m ∈ M, finding a set of spanning trees on top of its overlay graph G(m). The flow rate of session m is the aggregated rate of all its spanning trees. We collect these trees into the set T (m) = {t j (m)}. We use f j (m) to denote the flow of commodity m sent along the tree t j (m). Our goal
3 Problem formulation
1
We will use the terms session and commodity interchangeably thereafter in this paper.
123
Y. Cui et al.
is to maximize the flow rates of all sessions, formulated as the following linear programming problem. M: (1)
|T (m)|
f j (m) ≥ f · dem(m), m ∈ M
(m)| m∈ M |T m
(2)
6
f j (m) · nl (t j (m)) ≤ cl , l ∈ L
(3)
j=1
The objective of M is to maximize the scalar value f , subject to the fairness and capacity constraints. Inequality (2) enforces fairness constraint by requiring that the comparative ratio of traffic routed for different commodities satisfies the comparative ratio of their demands, i.e., at least f · dem(m) units of commodity flow can be routed simultaneously for each session m ∈ M. In other words, f maintains weighted max–min fairness among all P2P sessions, where the weight of a session m is defined as its demand dem(m). Thus, the absolute value of dem(m) is meaningless, as we can easily tune the value of f by scaling up/down all demands, while f · dem(m) stays unchanged. Inequality (3) specifies the capacity constraint that the traffic routed on each physical edge l ∈ L does not exceed its capacity cl . Note here that nl (t j (m)) is an integer value denoting the number of appearances of l in t j (m). This value could be greater than one, since a physical edge may appear in a tree more than once, a unique feature of overlay network. The central difficulty of problem M is that its number of variables is exponential to the size of the P2P network. According to Cayley’s theorem [24], the number of possible trees for session m is |m||m|−2 , where |m| is defined as the number of receivers in m. On the other hand, the dimensionality of this problem, i.e., the number of constraints is |L|, the number of physical links. This gives us a chance to solve this problem via its dual, which contains |L| variables but exponential number of constraints.
l∈L
cl · dl
l
subject to
l∈L
nl (t j (m)) · dl ≥ z(m), m ∈ M
(4)
l m∈ M
z(m) · dem(m) ≥ 1
m
dl ≥ 0, ∀l ∈ L, z(m) ≥ 0, ∀m ∈ M
123
4 5
f ≥ 0, f j (m) ≥ 0, 1 ≤ j ≤ |T (m)|, ∀m ∈ M
minimize
f j (m) ← 0, t j (m) ∈ T (m),∀m ∈ M
Loop 3
j=1
D:
Initialization 1 ∀l ∈ L, dl ← β/cl 2
maximize f subject to
Table 1 Optimal algorithm
(5)
while
l∈L cl
· dl < 1
for ∀m ∈ M dem (m) ← dem(m) while l∈L < 1 and dem (m) > 0
7
t ← minimum overlay spanning tree in T (m) using dl
8
c ← min{dem (m), minl∈t
9
dem (m) ← dem (m) − c
cl nl (t) }
10
f (t) ← f (t) + c
11
) ∀l ∈ t, dl ← dl (1 + ρ nl c(t)c l
12 13
end while end while
D corresponds to the problem of assigning length dl to each edge l ∈ L and weight z(m) to each session m ∈ M, such that for m, the length of any spanning tree in T (m) is at least z(m), and the weighted sum of z(m) by dem(m) over all sessions is at least 1. By LP duality theory [25], the minimum of D is the maximum of M. Although the number of constraints of D is exponential, if we can find a separation oracle able to check whether constraints (4) and (5) are met in polynomial time, then it is solvable in polynomial time, hence the primal problem M. This means we can derive the optimal value of the scalar f , denoted as f ∗ . We can also interpret this problem from the viewpoint of supply and demand. Here, dl represents the marginal price of l, i.e., the cost of using an additional unit of capacity of l. The more traffic is routed through l, the more expensive its bandwidth becomes, specified via dl . In a similar fashion, z(m) represents the marginal cost of not satisfying another unit of dem(m), the traffic demand of session m. Based on this interpretation, our algorithm is designed to run iteratively, in each iteration solving the primal M and dual D alternatively. The algorithm is shown in Table 1. At the initialization phase, we assign initial length β for each physical edge l ∈ L normalized by its capacity cl . Then we calculate the length of each overlay edge. Each edge corresponds to the unicast route connecting the two end nodes. The length of the edge is the aggregated length of all physical links of this unicast route. Then we obtain the minimum overlay spanning tree by running the MST algorithm on top of the overlay graph. After the tree is found, we route dem(m) amount of traffic, and update the length of physical link based on the asymptotic function shown in Line 11. Here ρ denotes the step size to
Optimizing P2P streaming throughput under peer churning
increment the link cost. The above procedure is repeated until the condition (4) is met. The essential idea of this algorithm is to always route traffic through the “cheapest route”, i.e., the most lightly loaded overlay tree. In the following theorem, we show that it is able to approximate the optimal result given arbitrary value of the step size ρ. Theorem 1 The optimal algorithm achieves the result at least (1 − 3) times the optimal value of problem M, if β = (|L|/(1 − ρ))−1/ρ . 3.3 Discussion Our optimal algorithm relies on the following assumptions. If they are compromised, so will be its optimality and the tractability of the problem. First, any peer churning event will cause the established spanning trees to be torn down and rebuilt. Second, each peer is allowed to have unlimited number of parents in order to achieve the optimal rate. The problem becomes NP-hard [26] when one tries to limit the number of parents. Third, the optimal algorithm assigns length to each physical link, which requires complete physical network knowledge, i.e., each P2P session has the complete knowledge of its underlying topology, as well as the capacity of each physical link. Nevertheless, this algorithm constitutes the methodological foundation to the online peer selection algorithm we are about to present. Furthermore, due to its ability to derive optimal throughput, our performance evaluation uses it as the baseline algorithm to evaluate the approximation of the online algorithm to the optimality.
Table 2 Notations used in Sect. 3 Notation
Definition
G = (V , L)
Physical network
m∈M
Overlay session
S(m)
Sender of session m
R(m)
Receivers of session m
dem(m)
Traffic demand of session m
G(m) = (V (m), E (m))
Overlay graph of session m
(vs , vt ) ∈ E (m)
Edge of overlay graph G(m)
T (m) = t j (m)
Multicast tree of session m
f j (m)
Flow rate of tree t j (m)
l∈L
Physical link
cl
Capacity of l
dl
Edge length of l
nl (t j (m))
Number of times l appears in t j (m)
z(m)
Weight of session m
β
Initial value of physical edge length dl
ρ
Step size
Table 3 Online peer selection algorithm Initialization 1 ∀l ∈ L, dl ← β/cl , σl ← 0 /* When peer vnew Joins session m*/ Join(vnew , m, dem) 1
p(vnew , m) ← argmin{d(v, vnew ) | (v, vnew ) ∈ G(m)}
2
R(m) ← R(m) ∪ vnew
3
∀l ∈ ( p(vnew ), vnew )
4
dem dl ← dl (1 + ρ dem cl ), σl ← σl + cl d( p(vnew ), vnew ) ← l∈( p(vnew ),vnew ) dl
5
/* When peer vold Leaves session m*/ Leave(vold , m, dem) 1
R(m) ← R(m) − vold
2
∀l ∈ ( p(vold ), vold )
3 4
dem dl ← dl /(1 + ρ dem cl ), σl ← σl − cl d( p(vold ), vold ) ← l∈( p(vold ),vold ) dl
4.1 Overview
5
∀vchild ∈ {vchild | p(vchild ) = vold }
6
∀l ∈ (vold , vchild )
In this section, we present our online peer selection algorithm. The algorithm essentially follows the solution methodology elaborated in Sect. 3.2. Here, the tree construction is decomposed into autonomous actions taken by each peer in response to different peer churning events. Our algorithm consists of three elementary functions. Join is run by each new peer joining a P2P streaming session. Leave is the operation for each old peer leaving its session. We start by introducing the online peer selection algorithm in its most basic setting, where each peer is only allowed to have one parent. We then present extensions of our algorithm to new settings including multi-parent streaming, admission control, delay constraint, etc.
7 8
dl ← dl /(1 + ρ dem ), σl ← σl − cl d(vold , vchild ) ← l∈((vold ,vchild )) dl
9
Join(vchild , m, dem)
4 Online peer selection algorithm
dem cl
4.2 Basic algorithm We list the elementary functions of online peer selection algorithm in Table 3. We introduce load indicator σl for each link l ∈ L, which indicates the percentage of l’s capacity occupied by traffic. The initialization phase of this algorithm is as the same as the optimal algorithm in Table 1. Here, we note that there
123
Y. Cui et al.
is no need to initialize all links in one shot. If no peer exists in the P2P session m, the physical link set L remains empty. L gradually grows as more peers join m. Therefore, a link l should stay uninitialized until the newly joined peer vnew introduces it into L. Its length dl and load indicator σl should be updated and maintained by vnew as well. More discussions will follow in Sect. 4.3. When a new peer vnew joins the session m, it runs the Join function to find its parent p(vnew ), and attach itself to the found parent. According to the definition of the overlay graph G(m) in Sect. 3.1, an overlay edge in G(m) is directed from a peer v to vnew if v can serve as the parent of vnew to retrieve data from. Therefore, all peers which have an overlay edge directed towards vnew are its candidate parents. Among these peers, our algorithm chooses the one with the minimum overlay edge length as the parent of vnew (Lines 1 and 2). Then for each physical link along the overlay edge ( p(vnew ), vnew ), we route dem amount of traffic, record the change to its load indicator, and update its length (Lines 3 to 5) in the same length update function employed in the optimal algorithm in Table 1. dem dl ← dl 1 + ρ cl
Table 4 Notations used in Sect. 4 Notation
Definition
p(v, m)
Parent of v in session m
d(vs , vt )
Edge length of overlay edge(vs , vt )
ce
Capacity of overlay edge e
de
Length of overlay edge e
f∗
Optimal throughput
f achievable
Achievable throughput by the online peer selection algorithm
edge is the sum of lengths of physical links enroute. Among these physical links, some of them are new, while others have already been brought to the P2P session by other peers. The lengths of new links are calculated by the new peer vnew , which we will discuss on Sect. 4.3.5. The lengths of existing links are provided by the server. At lines 3 through 5, vnew updates the length of the chosen overlay edge, whose overhead is the number of physical links enroute. In Leave function, the leaving node vold updates the length of the overlay edges connecting itself to its parent and children, whose overhead is the total number of physical links encompassed by these overlay edges. Also each orphaned child will need to rejoin the P2P session, whose overhead is the same as Join function (Table 4).
Based on the above function, dl increases in a super-linear fashion as the traffic load indicator σl increases. The length of an overlay edge e is the aggregate length of physical links along its unicast route. Such a cost function definition aggressively increases the edge length of an occupied overlay edge, in order to direct peer selection to under-utilized overlay edges. The step size ρ controls the growth speed of the edge length. This attempt to achieve load-balancing helps maximizing capacity utilization, hence maximizing achievable throughput. If an old peer vold leaves the P2P session m, then Leave function is called. In this function, the leaving peer vold first terminates the incoming traffic from its parent, then stops feeding its children, if any (Line 1). vold then reduces the lengths and load indicators of overlay edges connecting itself to its parent and children (Lines 2 to 8). Here, the algorithm reverses what was done in the Join function. Finally, the orphaned children of vold is notified to find themselves new parents by rejoining the session m as a new peer. We analyze the computing overhead of our algorithm, starting from the Join function. At lines 1 and 2, the joining peer vnew chooses its parent among all candidates. This steps involves calculation of the lengths of overlay edges connecting vnew to all its candidate parents.2 Hence, the computing overhead is the total number of physical links encompassed by all these overlay edges, since the length of an overlay
Upon joining a P2P streaming session, the new peer vnew should seek from a bootstrapping node the initial knowledge of the session. Most existing solutions [5,6] choose the media server (S(m) in the context of this paper) as the bootstrapping node (tracker server),3 which essentially includes the set of candidate parents for vnew . To fulfill the server with such knowledge, vnew should report to S(m) its presence after successfully joining the session. With the server as the bootstrapping node, we are now able to analyze the messaging overhead of the basic algorithm. This centralized approach can effectively reduce the messaging overhead. For example, when a leaving peer vold leaves the session, it can aggregate the new length information of overlay edges connecting its parent and all children into one message. Also, when a new peer vnew chooses among overlay edges connecting itself to all its candidate parents,
The new peer vnew is responsible to learn the information of physical edges by running traceroute on all candidate overlay edges.
3 Due to the dual identity of S(m), it will be referred to as either the media server or the bootstrap server, depending on the usage context.
2
123
4.3 Practical issues We now discuss several practical issues involved in the basic algorithm. 4.3.1 Bootstrapping
Optimizing P2P streaming throughput under peer churning Fig. 3 Practical issues in online peer selection: a Loop avoidance; b Link correlation
(a)
v1
(b)
v2
e1
v5
S(m)
v3
the server can feed vnew in one condensed message about the length information of all physical links which have already joined the P2P session. To summarize, in Join function, vnew expects one message from the server on length information of existing physical links, and returns one message to update the length related to the new overlay edge. In Leave function, vold sends one message to the server to update length information related to the overlay edge to be deleted. 4.3.2 Media encoding rate As will be seen in its evaluation, the online algorithm consistently tries to maximize the achievable throughput for all peers. This unavoidably causes the throughput to fluctuate as peers join and leave the P2P streaming. While ideally the server of the video streaming can continuously adapt its encoding rate within certain range, this can be hardly achieved in reality. Instead, the server can only support a set of discrete streaming rates in its best effort. As such, we claim that the main purpose of our algorithm is trying to find the optimal routing structure (via peer selection) such that the achievable throughput between the peer and its parent(s) is maximized. Whether the application our algorithm serves can fill up the achievable throughput is irrelevant to how our algorithm will behave. In fact, the link length update function given in line 4 of the Join function in Table 3 updates the length based on the demand value of the joining peer, not the maximum throughput it can possibly get from its parent(s). The demand value is given by the overlying application, such as media streaming rate. 4.3.3 Traffic scaling Both Join and Leave functions require the involved peers to specify dem, the desired streaming rate. Since we assume single-rate P2P streaming, we should set the desired rate as dem(m) as defined in Sect. 3. This is different to the achievable rate, which is the maximum throughput among all peers allowed by the physical network capacity. Formally, we denote it as f achievable . If the load indicator σl < 1 for all physical links, then f achievable > dem(m), which means the streaming rate could be amplified to fully utilize the remaining capacity. If f achievable < dem(m), then at least one link is congested, i.e., σl > 1, which needs the streaming rate to be
v4
v1
ll
e2
v2
decreased. Traffic scaling is a useful mechanism if the streaming rate could be dynamically adapted at the data source, such as live event broadcasting. In Sect. 5.3, we will discuss the case when the streaming rate is non-adaptable. 4.3.4 Loop avoidance Each peer selects its parent from the set of candidate parents defined by the overlay graph G(m). If G(m) is a directed acyclic graph (DAG), there is a strong partial ordering of relaying dependency among peers. Here, a peer can only retrieve data from those which arrived earlier and already possessed the data, e.g., on-demand streaming4 . However, the DAG restriction does not apply in certain applications such as teleconferencing and live broadcasting. In this case, a rejoining peer v1 might choose one of its own descendants as the parent, as illustrated in Fig. 3a. To enforce loop avoidance, either v1 itself or the server S(m) should keep the up-to-date view of all descendants of v1 . In fact, a simple modification to the bootstrapping procedure can address this issue. After the new peer vnew joins the session, we ask it to report to S(m) not only its presence, but also the parent it chooses. This enables S(m) to have the global view of the entire streaming session. S(m) can easily achieve loop avoidance by excluding rejoining peer v1 ’s descendants from its candidate parent set. 4.3.5 Overlay edge length computing In order to compute the length de of an overlay edge e, we need to know the capacity of each physical link along its unicast route, which can be measured by tools such as pathchar [27], in an end-to-end manner. A directed overlay edge is solely owned by its two end peers, therefore should be managed by either its sender or receiver. We choose the receiverbased approach: since vnew invites e into the P2P streaming session, it should also update the initialization and updating of de . At the end of Sect. 4.2, we analyzed the messaging overhead of our algorithm, which essentially involves updating to the bootstrapping node in one message when a peer joins or leaves the P2P session respectively. However, a unique phe4
We note the DAG restriction can be easily sustained by the bootstrapping server by tagging each current peer with its joining time.
123
Y. Cui et al.
nomenon in P2P and overlay networks termed “link correlation” greatly complicates the problem. As an example shown in Fig. 3b, the link l is owned by both overlay edges e1 and e2 . If e1 joins first into the session, then its managing peer v1 should manage l. When e2 joins later, the following message exchanges need to occur between peers v1 and v2 . (1) Upon joining, v2 should send a “register” message to remind v1 that a new peer is now sharing the link l with v1 . (2) When new traffic is streamed to v2 , it should also send an “update” message to request v1 update the length of l. (3) If v1 leaves, it should send a “delegate” message to request v2 as the new manager of l. If link l is shared by more peers, synchronization needs to be done among these peers when the length of l is changed. Therefore, anytime a peer routes new traffic through l, it should update this change to the bootstrap node as well as all other peers sharing l. Finally, we note that the running time of bandwidth measurement tool, such as pathchar, can be very long in the order of tens or hundreds of seconds. This can significantly impact the practicability of our algorithm if its overlying application runs in a highly dynamic networking environment and demands fast route setup. However, our algorithm is able to run over any arbitrary topology. In Sect. 5.4, we extend our algorithm to a simplified star topology, which is built on the assumption that the bottleneck link of an end-to-end connection always happen at the access link of either end host. Under the star topology, each peer only needs to measure the bandwidth of its access link, which will significantly reduce the overhead of this task. 4.3.6 Route maintenance As stated in Sect. 4.3.2, the main purpose of our algorithm is to find high-quality route for P2P applications with high bandwidth demand. However, given the dynamic nature of Internet, the quality of the route can vary or degrade over time. Therefore, an important question is the necessity of route maintenance, whether we should monitor the quality of the current route and trigger the construction of a new route if the quality of the current one becomes unacceptable. This question is best answerable by the application that our algorithm serves. We enumerate some possible semantics. First, since the application’s streaming rate can be well below the achievable throughput found by our algorithm, the route can highly possibly last for an extended period of time even its quality degrades or its bandwidth is taken partially by other peers. Second, some applications, such as video chatting or conferencing, have the ability to adapt its streaming rate in
123
case the route is unable to deliver the demanded throughput, often temporarily. Third, given the high churn rate witnessed in a wide range of P2P applications, which is also the main target of our paper, a peer might as well leave before its route becomes unusable. Given the above scenarios, we choose our algorithm to function in a passive fashion, i.e., it will find a route only when the application demands it to do so. Our algorithm provides two essential function calls to the applications it serves, Join and Leave. So the above requirement can be fulfilled by recalling the Join function. We also note that changing of route may cause disruption to the application, but only when the newly found route is different from the one currently in use. 4.3.7 Coexistence with other applications We note that given the formulation of problem M, we can see that our algorithm is designed to coordinate among multiple P2P sessions. Moreover, our algorithm is able to achieve fairness among these P2P sessions based on their demands. However, there may exist non-P2P applications or P2P applications choosing not to use our service. We can address this problem by altering the link capacity in the link length update function given in line 4 of the Join function in Table 3. Instead of using the true capacity of the physical link, we only report a portion of it, e.g., 50%. If such a discount value is taken consistently in our algorithm, then theoretically it is able to leave 50% capacity of all physical links to applications not served by our service. This method can be easily enforced in the case of simplified star topology (to be discussed in Sect. 5.4), where we only need to deduct capacity of the access link for each peer. 4.4 Theoretical result We measure the performance of our algorithm by comparing its achievable throughput f achievable by the optimal value f ∗ obtained via the optimal algorithm introduced in Sect. 3. More specifically, we define the competitive ratio of our algorithm as f∗ f achievable and verify if there exists a worst case bound to the above ratio. We have the following result. Theorem 2 When peers join but do not leave the P2P session, the online peer selection algorithm returns the competitive ratio bounded by log(|L|).
Optimizing P2P streaming throughput under peer churning Table 5 Modified algorithm for the case of multi-parent streaming
Table 6 Modified algorithm for the case of admission control
/* When peer vnew Joins session m*/ Join(vnew , m, dem)
/* When peer vnew Joins session m*/ Join(vnew , m, dem)
1 2
for j = 1 to k Join(vnew , m, dem/k)
1
vparent ← argmin{d(v, vnew ) | (v, vnew ) ∈ G(m)}
2
if ∃l ∈ (vparent , vnew ) : σl +
/* When peer vold Leaves session m*/
3
Leave(vold , m, dem)
4
1 2
for j = 1 to k Leave(vold , m, dem/k)
rejects vnew
dem cl
>1
else
5
p(vnew , m) ← vparent
6
R(m) ← R(m) ∪ vnew
7
∀l ∈ ( p(vnew ), vnew )
8
dem dl ← dl (1 + ρ dem cl ), σl ← σl + cl d( p(vnew ), vnew ) ← l∈( p(vnew ),vnew ) dl
9
5 Extensions to online peer selection algorithm 5.1 Multi-parent streaming The basic algorithm only allows each peer to select one parent. It can be easily upgraded to the case of multi-parent streaming, a highly effective strategy to improve overall throughput in many of today’s mesh-based and multi-treebased P2P streaming systems [5,6,13]. The modified algorithm is shown in Table 5, where each peer is allowed to have k parents. The modified algorithm decomposes the multi-parent streaming problem as a collection of single-parent streaming problems for k sessions with the same set of peers. Each peer simultaneously belongs to k sessions, and independently chooses its parent in each session. Our algorithm does not require each peer to have k distinct parents. When the new peer vnew initially joins the session, it repeats the same action for k times, during each time it finds one parent whose distance to itself is the shortest, routes dem/k amount of traffic through the chosen overlay edge, and updates the lengths of corresponding physical links. This does not prevent the same peer from being chosen more than once as vnew ’s parent. In fact, it suggests that the overlay edge leading this peer to vnew has more available capacity, therefore should share more traffic than other candidate overlay edges. Also due to the the multi-parent algorithm, each peer will have more children compared to the basic algorithm. So when an existing peer vold leaves, more peers will be affected. However, as a compensation, each peer will remain to have the streaming support from its other parents, in contrast to the total (temporary) disruption experienced in the single-parent case. We note that this extension does not bring much additional overhead to the basic online algorithm. Besides the increase of computing overhead from calculating one shortest overlay edge to k such edges, the messaging overhead stays the same, mainly due to the centralized approach we choose. Upon joining or leaving a P2P session, the peer only needs to send one condensed message to the bootstrapping node to update
the length information related to all affected overlay edges, regardless the number of parents or children it has. From the claim made in Sect. 4.4, it is straightforward that Theorem 2 also applies to the case of multi-parent streaming. 5.2 Admission control So far in this paper, we have assumed that the streaming rate is adaptable at the media server S(m). Such a flexibility brings no constraint to the peer admission process, as long as the achievable rate f achievable is within the acceptable range of the streaming rate. However, in many P2P streaming applications (e.g., video-on-demand) where the multimedia content is encoded already, all peers have to conform to the fixed streaming rate dem(m). In this case, if a newly joined peer vnew would bring the achievable rate f achievable below this threshold, we should reject vnew to ensure proper functioning of the current streaming session. Table 6 shows the modified online peer selection algorithm enforcing the admission control. The major change to the original algorithm lies in lines 2 and 3. After choosing its parent, vnew checks the expected load indicator, the current traffic load plus the new traffic about to be routed, for all links along the overlay edge from the parent to vnew . If the expected load is beyond the capacity of any link, vnew would not be able to receive enough throughput from its parent, thus will be rejected. Otherwise, the algorithm proceeds as normal. The computing and messaging overhead of this algorithm stays the same with the basic algorithm in Table 3, except that if the peer is rejected, it does not need to send the update message to the bootstrap node anymore. 5.3 Delay constraint While the focus of this paper is on optimizing throughput, many P2P streaming applications, such as live event broadcasting, have delay restriction as well. In this paper, we define delay constraint as an upper-bound on the end-to-end
123
Y. Cui et al.
propagation delay between any pair of peers. Depending on the definition of the propagation delay, the delay constraint can be expressed in time units or hop count. From the definition of overlay graph in Sect. 3.1, we can see that such a delay constraint could be integrated with our solution by altering the way overlay graph is organized without changing the peer selection algorithm. For example, we consider a P2P live event streaming application. Without the DAG restriction defined in Sect. 4.3.4, the overlay graph should be a complete graph, where every peer is the candidate parent of all other peers. Let the delay of an overlay edge be the aggregate delay of all its physical links, under a given delay constraint, some edges will be expunged, making the graph an incomplete one. However, as long as the graph stays connected, our peer selection algorithm, as well as the optimal algorithm presented in [26], is able to properly function. In practice, the “pruning” of the overlay graph is actually conducted by each individual peer in an entirely distributed fashion. Each time the newly-joined peer vnew receives the list of candidate parents from the bootstrapping server, it will test the delay from itself to peers in the list and remove the unqualified ones. This approach also offers flexibility for each peer to individualize its own delay constraint. A downside of imposing delay constraint is that it might partition the overlay graph, especially during its initial growth when the new peer vnew does not have a big selection of peers as its candidate parents, and all peers are too far away to meet the delay constraint. As a remedy, we could ask vnew to temporarily violate the constraint by connecting to its closest peers, and make the switch later by rejoining the P2P session when more peers appear online in a position closer to vnew . 5.4 Simplified topology In Sect. 4.3.5, we have elaborated the management complexities brought about by the “link correlation” problem in P2P network. This problem can be removed under a reasonably simplified topology model defined as follows. We assume that the bottleneck of an overlay edge only happens at either access link of its two peers. In other words, if we assume the Internet cloud to have enough capacity supporting its end hosts, we could shrink the cloud into a single central hub node. The network topology is thus simplified as a star topology (Fig. 4). Within the star topology, each link is solely owned by the peer it attaches to, which removes the link correlation problem discussed in Sect. 4.3.5. The length of the overlay edge from peer v1 to v2 is simplified by summarizing the lengths of v1 ’s inbound link and v2 ’s outbound link. Therefore, although the computing and messaging overhead of the algorithm stays unchanged from the basic one in Table 3, it reduces a peer’s bandwidth measurement task from measuring hop-by-hop
123
S(m)
v2 v1
v3
Fig. 4 Star topology
bandwidth of all its overlay edges to measuring its access link bandwidth. The star topology also simplifies the pursuit for the maximally achievable throughput. We first show that, under the single-rate assumption, for a given session m with its server S(m) and the set of peers R(m), a single-parent solution can be found to maximize the throughput. We show the algorithm in Table 7. Consider the peers v1 , v2 , . . . , v|m| ∈ m. Each peer vi has inbound capacity cin (vi ) and cout (vi ). The server S(m)’s outbound capacity is cout (S(m)). Furthermore, v1 through vn are sorted on the ascending order of their outbound bandwidths. We first bound the streaming rate to be at most the smallest of minimum inbound bandwidth of all peers and outbound bandwidth of server (Line 1). Then we test the schedule-ability of the proposed streaming rate by using it to divide each peer’s outbound bandwidth and counting the number of peers that can be supported (Lines 4 to 6). We repeat this test by continuing to shrink the streaming rate by conforming it to the outbound bandwidth of the next peer in the sorted array, until it passes the schedule-ability test. It can be seen that, after the algorithm completes, at least one peer’s inbound or outbound bandwidth will be exhausted. This easily proves that this algorithm returns the optimal streaming rate for all peers v1 , . . . , vn . Also under the star topology and the restriction that each peer must receive the same streaming rate, the multi-parent solution is not necessary, since the single-parent algorithm will disable at least one peer from either receiving or sending. Although multi-rate streaming is not the topic of this paper, the algorithm also helps us reach the following implication. We can employ the same algorithm to achieve max–min rate allocation in a “flow augmenting” fashion. We iteratively run the algorithm in Table 7. Each time after the algorithm completes, we remove each peer of its allocated inbound/outbound bandwidth, and proceed into the next iteration. In each iteration, at least one peer is depleted of
Optimizing P2P streaming throughput under peer churning Table 8 Notations used in Sect. 5
Table 7 Optimal single-parent algorithm over star topology f∗
Finding optimal rate |R(m)| 1 f ∗ ← min{mini=1 {cin (vi )}, cout (S(m))} 2
findk such that cout (vk−1 ) ≥ c > cout (vk )
3
do
4
i ← 0, sum ← 0
5
while sum < n and i < |R(m)|
6 7 8 9
Notation
Definition
σmax
Maximum load indicator of σl
σ∗
Minimally achievable value of σmax
cin (vi )
Inbound bandwidth of peer vi in star topology
cout (vi )
Outbound bandwidth of peer vi in star topology
sum ← sum + cout (vi )/ f ∗ , i ← i + 1 if sum < |R(m)| f ∗ ← cout (vk ), k ← k + 1 while sum < |R(m)|
Parent selection 1
enqueue S(m), v1 , . . . , v|R(m)|−1 into queue P
2
enqueue v1 , . . . , v|R(m)| into queue C
3
while C = φ
4
dequeue vparent from P
5
while cout (vparent ) ≥ f ∗
6
dequeue vchild from C, cout (vparent ) ← cout (vparent ) − f ∗
7
p(vnew , m) ← vparent
its inbound or outbound bandwidth, hence out of the game. Therefore, a peer could end up at most n parents. However, this algorithm, like the optimal algorithm designed for general topology [26], requires off-line scheduling. Any peer churning event will disrupt the optimal streaming structure and require it to be rebuilt. The online peer selection algorithm and its adaptations are still the valid strategy to deal with peer churning under the star topology (Table 8).
6 Performance evaluations 6.1 Experimental setup and methodology We use simulation to evaluate the performance of our algorithm. Two experimental topologies are chosen. The first one is a 100-node router-level network (200 edges) created by
(a)
(b) 70
Number of peers in the system
Number of peers in the system
Fig. 5 Peer population along time: a BRITE sequence; b STAR sequence
the Boston BRITE topology generator [28] using the Waxman model. Any pair of routers are connected by a pair of links with opposite directions. Peers are randomly attached to the routers in this network. The bandwidth of physical links between routers, as well as peers’ access links, are uniformly distributed from 10 to 1024 Mbps. The second topology follows the star configuration outlined in Sect. 5.4. One thousand peers are created to connect to the central hub node. The bandwidths of their inbound and outbound bandwidths follow the same distribution of the first topology. Over these two topologies, we simulate the lifetime of a P2P streaming session, from the moment the first peer joins, to the point it becomes empty again when the last peer leaves. The peers join the session following the Poisson process. The average inter-arrival time is 30 s. Each peer stays online for a duration exponentially distributed from 1 min to 1 h. For the star topology, each of the 1,000 peers is scheduled to join and leave the session once. For the BRITE topology, a total of 100 peers joins and leaves the session. We create a unique event sequence, BRITE with duration more than 5,000 s, and STAR with duration more than 30,000 s. In Fig. 5, we show the peer population along the lifetime of each sequence. We use these two sequences to repeatedly test the performance of our algorithm. Our evaluation is carried out under the basic setting, and advanced settings discussed in Sect. 5, including multi-parent streaming, admission control, and delay constraint.
60 50 40 30 20 10 0
90 80 70 60 50 40 30 20 10 0
0
1000
2000
3000
Time
4000
5000
6000
0
5000
10000 15000 20000 25000 30000 35000
Time
123
Y. Cui et al.
6.2 Optimal throughput In Fig. 6, we first show the optimal throughput f ∗ calculated from the optimal algorithm in Table 1 for BRITE topology, and the optimal throughput derived from the algorithm listed in Table 7 for STAR topology. We reemphasize that the above results are obtained by rearranging the peer streaming session from scratch at any time a peer joins or leaves. In the remainder of this section, we evaluate the performance of our online peer selection algorithm in terms of throughput ratio, the ratio of the throughput achieved by the online algorithm over the optimal throughput displayed in Fig. 6. 6.3 Performance of online peer selection algorithm We compare our algorithm with three other heuristic algorithms. The first is shortest-path algorithm, in which the new peer always finds the peer with the shortest end-to-end delay as its parent. This algorithm does not react to the multiparent streaming scenario, since it will repeatedly choose the same parent with the shortest delay. The second is multishortest-path algorithm, in which the new peer finds k distinct parents with the shortest end-to-end delays, k being the number of parents allowed. The third is random algorithm, which chooses k distinct parents out of random choice. Figure 7 shows the throughput ratios achieved by the above algorithms and our online algorithm. Under both BRITE and STAR sequences and different number of parents allowed, our algorithm outperforms others. At the beginning and ending of both sequences, i.e., when the peer population is small (referenced in Fig. 5), all algorithms deliver optimal or near-optimal performance. The online algorithm also consistently outperforms its theoretical lower bound (log |L|) by a great extent. Under the STAR sequence, the algorithm is able to maintain its throughput ratio at a stable level. Also the throughput ratio of the online algorithm steadily increases as the number of parents increases, while other algorithms fail to take this advantage. Under the BRITE sequence, its performance fluctuates comparatively, and displays the general trend to perform less well as the peer population grows. 6.4 Impact of admission control We then evaluate the impact of enforcing admission control to the above algorithms. Since the streaming rate is fixed (100 Mbps in our experiment), the throughput ratio does not apply here. We introduce a new metric peer admission ratio, which is the percentage of peers admitted up to the current time point. As shown in Fig. 8, under both BRITE and STAR sequences and different number of parents, our algorithm achieves the highest admission ratio. Rejecting peers at early
123
stage has a cascading effect to the performance of an algorithm thereafter, since it reduces the available peer bandwidth by cutting down the number of active peers. This can be witnessed by the performance of the random algorithm under the BRITE sequence and two shortest path algorithms under the STAR sequence. Since the peer number involved in STAR sequence is ten times of the BRITE sequence, the admission ratio of the two shortest path algorithms are quickly degraded at the beginning phase of the STAR sequence, when many peers crowed to join. Also by comparing Fig. 8b, d, and f, we identify the limited gain of multi-shortest-path algorithm over the single shortest path algorithm. However, this result might not be due to the nature of multi-shortestpath algorithm, but the fact that P2P routing structure formed in the early phase is significantly suboptimal, hence limit the performance when more peers are added to it later. In comparison, the consistent high admission ratio by the online algorithm demonstrates the importance of staying off the busy physical links at all times. Finally, we note that in both Figs. 7 and 8, the random algorithm has different performances under BRITE and STAR sequences. While under BRITE sequence, it has the worst performance, it greatly outperforms the shortest path algorithms under the STAR sequence. We conjecture this is due to the unpredictability of the random algorithm itself. On the other hand, the consistently high performance of online algorithm is enabled by its ability to take into account the capacity utilization of physical edges. 6.5 Impact of step size ρ We next study the throughput ratios under different step size ρ, which decides how sensitive the edge length update function reacts to traffic update. If ρ is too small, then the edge length may increase too slowly, causing the already loaded edges to be chosen again. If ρ is too large, the length can be incremented dramatically, exaggerating its traffic condition. In either case, the algorithm will not be able to maximally utilize the network bandwidth. Evidenced in Fig. 7, increasing ρ results in opposite changes at different time points. However, as the figure also suggests, under both sequences, the algorithm is able to withstand different ρ in a wide range. Based on this reason, in what follows, we only show the performance of our algorithm when ρ = 1 (Fig. 9). 6.6 Impact of delay constraint Next, we impose delay constraint to the multi-parent streaming algorithm. Here, the constraint is expressed as hop count between two peers. The STAR topology does not apply to this evaluation since the distance between any pair of peers are two hops. Therefore, we only evaluate the BRITE
Optimizing P2P streaming throughput under peer churning Fig. 6 Optimal throughputs: a BRITE sequence; b STAR sequence
(a)
(b)
500
900 800
400
700
Rate
Rate
600 500 400
300
200
300 200
100
100 0
rate 0
rate 1000
2000
3000
4000
0
5000
0
5000
10000 15000 20000 25000 30000
Time
(a)
Online Random MultiShortest Shortest
1 Online Random MultiShortest Shortest
0.8
0.6
Ratio
Ratio
(b)
1
0.8
0.6
0.4
0.4
0.2
0.2
0
0 0
1000
2000
3000
4000
5000
0
5000
10000 15000 20000 25000 30000
Time
(c)
(d)
Online Random MultiShortest Shortest
1 Online Random MultiShortest Shortest
0.8
0.6
Ratio
Ratio
Time
1
0.8
0.6
0.4
0.4
0.2
0.2
0
0 0
1000
2000
3000
4000
5000
0
5000
10000 15000 20000 25000 30000
Time
(e)
Time
(f)
1 Star Random MultiShortest Shortest
0.8
1 Online Random MultiShortest Shortest
0.8
0.6
Ratio
Ratio
Fig. 7 Throughput ratio of online peer selection algorithm (ρ = 1) compared with random, shortest, and multi-shortest algorithms: a BRITE sequence (# of parents = 1); b STAR sequence (# of parents = 1); c BRITE sequence (# of parents = 2); d STAR Sequence (# of parents = 2); e BRITE sequence (# of parents = 4); f STAR Sequence (# of parents = 4)
Time
0.6
0.4
0.4
0.2
0.2
0
0 0
1000
2000
3000
Time
4000
5000
0
5000
10000 15000 20000 25000 30000
Time
123
Y. Cui et al.
(a)
(b) 1.2 1 0.8 0.6 0.4
Dynamic Random MultiShortest Shortest
0.2
1.2
Percentage of admitted peers
Percentage of admitted peers
Fig. 8 Admission ratio of online peer selection algorithm (ρ = 1, Media encoding rate = 100 Mbps) compared with random, shortest, and multi-shortest algorithms: a BRITE Sequence (# of parents = 1); b STAR sequence (# of parents = 1); c BRITE sequence (# of parents = 2); d STAR sequence (# of parents = 2); e BRITE sequence (# of parents = 4); f STAR sequence (# of parents = 4)
1 0.8 Online Random MultiShortest Shortest
0.6 0.4 0.2
0
0 0
1000
2000
3000
4000
5000
0
5000
Time
Time
(d) 1.2 1 0.8 0.6 0.4
Online Random MultiShortest Shortest
0.2
1.2
Percentage of admitted peers
Percentage of admitted peers
(c)
1 0.8 Online Random MultiShortest Shortest
0.6 0.4 0.2
0
0 0
1000
2000
3000
4000
0
5000
5000
Time
1 0.8 0.6 0.4
Online Random MultiShortest Shortest
0.2
1.2
Percentage of admitted peers
Percentage of admitted peers
(f) 1.2
1 0.8 Online Random MultiShortest Shortest
0.6 0.4 0.2
0
0 0
1000
2000
3000
4000
5000
0
5000
Time
(a)
rho=0.01 rho=0.1 rho=1 rho=10 rho=100
1
0.8
Ratio
0.8
Ratio
(b)
rho=0.01 rho=0.1 rho=1 rho=10 rho=100
1
10000 15000 20000 25000 30000
Time
0.6
0.6
0.4
0.4
0.2
0.2
0
0 0
1000
2000
3000
Time
123
10000 15000 20000 25000 30000
Time
(e)
Fig. 9 Impact of step size ρ (number of parents = 16): a BRITE sequence; b STAR sequence
10000 15000 20000 25000 30000
4000
5000
0
5000
10000 15000 20000 25000 30000
Time
Optimizing P2P streaming throughput under peer churning
(a)
(b)
1 # of parents=1 # of parents=2 # of parents=4 # of parents=8 # of parents=16
0.8
1
0.6
0.6
0.4
0.4
0.2
0.2
0
0
1000
2000
# of parents=1 # of parents=2 # of parents=4 # of parents=8 # of parents=16
0.8
Ratio
Ratio
Fig. 10 Impact of delay constraint of multi-parent streaming algorithm (ρ = 1): a BRITE Sequence (delay = 4 hops); b BRITE Sequence (delay = 5 hops)
3000
4000
0
5000
0
1000
2000
Time
4000
5000
50 # of parents=1 # of parents=2 # of parents=4 # of parents=8 # of parents=16
45 40
Link Correlation
topology, in which the maximum distance between two peers is 3.41 (average distance 1.16). In Fig. 10a, as we limit the distance between peers to be no more than 4, the throughput ratio significantly drops compared to the case when there is no delay constraint. Furthermore, multi-parent streaming does not increase the throughput ratio, except the limited enhancement at the beginning of the sequence, when peer population is small. This suggests that multi-parent solution relies on streaming from parents from different distances to perform well. In Fig. 10b, when relaxing the delay constraint by one more hop, the benefit of multi-parent streaming is still limited, but the performance of the single-tree solution is greatly lifted, since more candidate parents, hence more overlay edges, are available to choose from.
3000
Time
35 30 25 20 15 10 5 0
0
1000
2000
3000
4000
5000
Time Fig. 11 Messaging overhead due to link correlation (BRITE sequence, ρ = 1)
6.7 Messaging overhead due to link correlation As discussed in Sect. 4.3.5, when a physical link is shared by multiple peers, then the length information update of this edge has to be synchronized among all peers sharing it, a problem termed as link correlation. Since this problem does not exist in star topology, we only evaluate the impact of link correlation under the BRITE topology. Figure 11 records the messaging overhead incurred due to link correlation, which is triggered each time a peer joins or leaves the P2P session. Obviously, the number of messages equals to the total number of peers sharing the correlated links. As seen in the picture, the more parents a peer is allowed to have, the heavier the messaging overhead becomes. Also the curve shows a general trend matching the evolution of peer population shown in Fig. 5a. A single event (peer joining or leaving) can incur as many as 45 messages, a considerable overhead. Nevertheless, this overhead can be removed completely under the STAR topology. 6.8 Bandwidth measurement overhead Finally, we evaluate the accuracy of efficiency of bandwidth measurement, an important task necessary to the computation
of physical links. We choose a PC machine within Vanderbilt campus as the joining peer, and 395 PlanetLab nodes as the candidate parents of this peer. We first run pathchar to measure the hop-by-hop bandwidth of the end-to-end path from Vanderbilt server to each of the PlanetLab nodes, but soon to find out that the running time is extremely long, lasting hundreds of seconds. Therefore, before any fast hop-by-hop bandwidth measurement tool can be developed or found, the applicability of our algorithm under the general topology model will be significantly limited. Since our algorithm can fit into any arbitrary topology, we run the same evaluation under the star topology, in which a peer only needs to measure the bandwidth of its access link. We again use pathchar to measure only the first hop of the end-to-end path leading from Vanderbilt server to all PlanetLab nodes, and have the following observations. First, the first hop remains to be the same router across all endto-end paths we have tested, which indicates that the server we choose is not likely to be multi-homed. Second, the measured bandwidth of the access link has the average value of 47.2278 Mbps with standard deviation of 0.4603. Third, the round trip delay of measuring the first hop is 451.7063us
123
Y. Cui et al. Fig. 12 Probability density function: a Measured bandwidth; b Round-trip time
(a) 0.9
(b)
Probability Between Limits = 1
0.08
0.8
Probability Between Limits = 0.65105
0.07
0.7
0.06
0.6
0.05
0.5 0.04 0.4 0.03
0.3
0.02
0.2
0.01
0.1 0 42
44
46
48
with standard deviation of 5.3383. The probability density functions of these two measurement results are shown in Fig. 12. In the context of our experiment, we see that measuring the access link over a variety of end-to-end paths returns consistent bandwidth measurement result, while each measurement run lasts a very short period of time. In practice, we can estimate the capacity of access link by running first-hop bandwidth measurement over a handful of end-to-end paths to selected candidate parents, which will further reduce the overall delay of the bandwidth measurement task.
7 Conclusions This work aims to find practical peer selection solutions for maximum-throughput P2P streaming. The central challenge considered in this paper is peer churning, which is addressed by an online peer selection algorithm. We further adapt our solution under additional practical settings, including multi-parent streaming, admission control, delay constraint, and simplified topology. Theoretically, we prove its approximation bound to the optimal throughput. Through evaluation under different topological setups and peer churning sequences, we show our solution to consistently deliver competitive throughput, which greatly outperform its theoretical bound.
References 1. Padmanabhan, V.N., Wang, H.J., Chou, P.A., Sripanidkulchai, K.: Distributing streaming media content using cooperative networking. In: NOSSDAV ’02: Proceedings of the 12th International Workshop on Network and Operating Systems Support for Digital Audio and Video, pp. 177–186. ACM Press, New York (2002) 2. Castro, M., Druschel, P., Kermarrec, A.M., Nandi, A., Rowstron, A., Singh, A.: Splitstream: High-bandwidth multicast in cooperative environments. In: Proceedings of ACM Symposium on Operating Systems Principles (SOSP), October (2003)
123
50
52
54
0 435
440
445
450
455
460
465
470
3. Kostic, D., Rodriguez, A., Albrecht, J., Vahdat, A.: Bullet: High bandwidth data dissemination using an overlay mesh. In: Proceedings of ACM Symposium on Operating Systems Principles (SOSP) (2003) 4. Cui, Y., Cao, Y., Dai, L., Xue, Y.: Optimizing p2p streaming throughput under peer churning. In: Vanderbilt University Institute of Software Integrated Systems Technical Report ISIS-08-905 (2007) 5. “Pplive”. http://pplive.com 6. “Uusee”. http://uusee.com 7. Chu, Y., Rao, R., Zhang, H.: A case for end system multicast. In: Proceedings of ACM SIGMETRICS (2000) 8. Jannotti, J., Gifford, D.K., Johnson, K.L., Kaashoek, M.F., O’Toole, J.W.: Overcast: Reliable multicasting with an overlay network. In: Proceedings of Operating Systems Design and Implementation (OSDI) (2000) 9. Tran, D., Hua, K., Sheu, S.: Zigzag: An efficient peer-to-peer scheme for media streaming. In: Proceedings of IEEE INFOCOM (2003) 10. Banerjee, S., Bhattacharjee, B., Kommareddy, C.: Scalable application layer multicast. In: Proceedings of ACM SIGCOMM, August (2002) 11. Hefeeda, M., Habib, A., Xu, D., Bhargava, B., Botev, B.: Collectcast: a peer-to-peer service for media streaming. ACM/Springer Multimedia Syst. J. 11(1), (2005) 12. Cui, Y., Nahrstedt, K.: Layered peer-to-peer streaming. In: Proceedings of ACM NOSSDAV (2003) 13. Zhang, X., Liu, J., Li, B., Yum, Y.S.P.: Coolstreaming/donet: a data-driven overlay network for peer-to-peer live media streaming. In: INFOCOM 2005: 24th Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings IEEE, vol. 3, pp. 2102–2111 (2005) 14. Liao, X., Jin, H., Liu, Y., Ni, L.M., Deng, D.: Anysee: peer-to-peer live streaming. In: Proceedings of INFOCOM, April (2006) 15. Liu, L., Zimmermann, R.: Active: Adaptive low-latency peer-topeer streaming. In: Proceedings of SPIE/ACM Multimedia Computing and Networking (2005) 16. Dai, L., Cui, Y., Xue, Y.: On scalability of proximity-aware p2p streaming. In: IEEE INFOCOM Mini-Symposium (2007) 17. Kwon, M., Fahmy, S.: Topology-aware overlay networks for group communication. In: ACM NOSSDAV (2002) 18. Ratnasamy, S., Handley, M., Karp, R., Shenker, S.: Topologicallyaware overlay construction and server selection. In: IEEE INFOCOM (2002) 19. Aspnes, J., Azar, Y., Fiat, A., Plotkin, S., Waarts, O.: On-line routing of virtual circuits with applications to load balancing and machine scheduling. J. ACM 44, 486–504 (1997)
Optimizing P2P streaming throughput under peer churning 20. Awerbuch, B., Azar, Y., Plotkin, S., Waarts, O.: Competitive routing of virtual circuits with unknown duration. In: ACM-SIAM Symposium on Discrete Algorithms (SODA) (1995) 21. Awerbuch, B., Azar, Y., Plotkin, S.: Throughput-competitive on-line routing. In: IEEE Conference on Foundation of Computer Science (FOCS) (1993) 22. Goel, A., Henzinger, M., Plotkin, S.: Online throughputcompetitive algorithm for multicast routing and admission control. In: ACM-SIAM Symposium on Discrete Algorithms (SODA) (1998) 23. Young, A., Chen, J., Ma, Z., Krishnamurthy, A., Peterson, L., Wang, R.Y.: Overlay mesh construction using interleaved spanning trees. In: IEEE INFOCOM (2004) 24. Deo, N.: Graph Theory with Applications to Engineering and Computer Science. Prentice-Hall, Englewood Cliffs (1994)
25. Grotschel, M., Lovasz, L., Schrijver, A.: Geometric Algorithms and Combinatorial Optimizations. Springer, Heidelberg (1993) 26. Cui, Y., Li, B., Nahrstedt, K.: On achieving optimized capacity utilization in application overlahy networks with multiple competing sessions. In: Proceedings of ACM Symposium on Parallel Algorithms and Architectures (2004) 27. Jacobson, V.: Pathchar, http://www.caida/org/tools/utilities/ others/pathchar 28. Medina, A., Lakhina, A., Matta, I., Byers, J.: Brite: An approach to universal topology generation. In: Proceedings of IEEE MASCOTS (2001)
123