P2P Streaming TP
P2P Streaming TP
Xiaofei Liao, Hai Jin, *Yunhao Liu, *Lionel M. Ni, and Dafu Deng
School of Computer Science and Technology *Department of Computer Science
Huazhong University of Science and Technology Hong Kong University of Science and Technology
Wuhan, 430074, China Clear Water Bay, Kowloon, Hong Kong
{xfliao, hjin, dfdeng }@hust.edu.cn {liu, ni}@cs.ust.hk
Abstract — Efficient and scalable live-streaming overlay patience and unplanned interruptions would spoil the
construction has become a hot topic recently. In order to improve entertainment value.
the performance metrics, such as startup delay, source-to-end
delay, and playback continuity, most previous studies focused on In order to improve the above metrics, previous studies [9]
intra-overlay optimization. Such approaches have drawbacks focused on intra-overlay optimization, in which each node
including low resource utilization, high startup and source-to-end joins at most one overlay. With the help of locality-aware
delay, and unreasonable resource assignment in global P2P strategies [10][11] and optimization schemes such as DONet in
networks. Anysee is a peer-to-peer live streaming system and CoolStreaming [12], Narada in ESM [13], QoS of live
adopts an inter-overlay optimization scheme, in which resources streaming P2Ps have significantly improved. However, they
can join multiple overlays, so as to (1) improve global resource still suffer from long delay and unplanned interruptions,
utilization and distribute traffic to all physical links evenly; (2) especially when a large number of peers join the network
assign resources based on their locality and delay; (3) guarantee simultaneously.
streaming service quality by using the nearest peers, even when
such peers might belong to different overlays; and (4) balance the Figure 1 shows an example of intra-overlay optimization
load among the group members. We compare the performance of with two logical streaming overlays. Peers A, B, C and D join
our design with existing approaches based on comprehensive the stream originating at S1 and peers E, F, G, H and K join the
trace driven simulations. Results show that AnySee outperforms stream originating at S2. The number on each edge represents
previous schemes in resource utilization and the QoS of the cost of the link between two nodes. In traditional intra-
streaming services. AnySee has been implemented as an Internet overlay optimization schemes, two multicast trees can be
based live streaming system, and was successfully released in the established as shown in Fig. 1 (a) and (b). There are two
summer of 2004 in CERNET of China. Over 60,000 users enjoy obvious drawbacks. First, such overlay construction is not
massive entertainment programs, including TV programs, globally optimal. Considering peer D in Fig. 1(a), the cost S1
movies, and academic conferences. Statistics prove that this Æ D is 8, while if the path S1 Æ S2 Æ D is used, the cost is
design is scalable and robust, and we believe that the wide only 4. Second, resource utilization of traditional approaches is
deployment of AnySee will soon benefit many more Internet relatively low. Most of the existing protocols are tree based.
users.
Consequently, all leaf nodes fail to contribute any bandwidth or
Keywords — Peer-to-Peer; Live Streaming; Inter-Overlay
CPU cycles to the multicast trees.
Optimization; Distributed Approach; Load Balance; AnySee
(a) Overlay Topology (b)
S1 S2
I. INTRODUCTION
3 3 5 3 5 3
With the improvement of network bandwidth, multimedia
services based on streaming live media, such as IPTV [5], have B A G
C F E
gained much attention recently. Significant progress has been 5 6
made on the efficient distribution of live streams in a real-time 2
manner over a large population of spectators with good QoS D H K
[4]. Due to the practical issues of routers, IP multicast [6] has
not been widely deployed. Therefore, researchers have A 5 D 2 S2 5 E
expended a lot of effort building an efficient streaming overlay 6
multicast scheme based on P2P networks [7], in which 5 3 2 2 5 4
spectators behave as routers for other users. Efficient and 3
scalable live-streaming overlay construction [8] has become a 4 2
3 5 G 3 7 2
hot topic. Different from traditional distributed systems, 2
streaming overlays focus on the following three metrics: B S1 C H F K
startup delay, source-to-end delay, and playback continuity, as (c) Physical Topology
these metrics have a direct bearing on the interactive usability
of a live streaming system. Large delays would exhaust user Figure 1. Intra-overlay optimization: (a) optimal multicast tree rooted at S1;
(b) optimal multicast tree rooted at S2; (c) physical topology
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
D ecoding/Player dm (id , S , 0 ) P1
Buffer K ey N ode P2
N1
Manager Manager S N2 P3
Single Inter-overlays
N4 P4
O verlay O ptim izations
Manager Manager dm (id , S ,1)
N3 P6
P5
M esh-based O verlay M anager
Figure 3. The system diagram of an AnySee node Figure 4. Roadmap of detector message initaited by S
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
end delay from source S to peer P; rate(SPi, S, P) is the D
D D
D
streaming rate in the last hop of the path. Clearly, we have: 5 2 5
2 10
δa (P, S ) S1
S2 A S2 A
∑i =1
rate ( SPi , S , P ) ≥ rate ( S ) (1)
2 5
End
2 >8 3 5 2 2 3 5
δb (P , S ) δa (P , S )
S1 F G S1 B S1 G S1 B
G
∑i =1
rate ( SPi , S , P ) = p ∑i =1
rate ( SPi , S , P ) (2) End
7 2 2 6
End
>=8
>8 End
2 6
End
>=8
>8
H I C
C H C H
Let µ D ( S ) denote the threshold for the delay, which is >8 >8 2
>=8 >=8
5 2 5
related to the priority of the streams only. H S1 H S1
>=8 End >=8 End
We also design a probing message named ProbM as >8
>8
shown in Fig. 5. This message includes two major parts: (1)
initial information about the message, including sequence (a) LastDelay = 8 (b) LastDelay = 8
number, Seq., initial peer ID, Peer_0, message issuance time, j=3 j=2
Timestamp0, media source ID of the initial peer, Source, Figure 6. Examples of reverse tracing algorithm: (a) each peer forwards to
current LastDelay, and TTL; (2) an array with the size of three neighbors; (b) each peer forwards to two neighbors
TTL to record peer ID and the arriving timestamp of the
message. Considering that 95% of peers in the Gnutella A streaming path is treated as invalid if (1) the source-to-
system could be reached within 7 hops by pure flooding, the end delay is larger than a given threshold µ D ( S ) , or (2) the
maximal TTL is set to 7. direct parent of the end peer on the path leaves. In this
design, we only disconnect the overlay link between the end
There are mainly two tasks for the inter-overlay
peer to its parent node because (1) the other connections on
optimization manager, including backup streaming path set
the path can be reserved to provide support for new
management and active streaming path set management.
incoming peers, and (2) our observations show that large
The major operation in backup streaming path set delays often come from the last connection in the path, and
management is the probing procedure, called reverse tracing (3) frequent disconnections incur a lot of unnecessary traffic.
algorithm. This algorithm starts when the size of backup set
The management of an active streaming path set has
is less than δ b ( P, S ) . Peer_0 sends out a ProbM message to j three operations, including maintaining the states of active
of its neighbors with the recording array empty. Each streaming paths, cutting off invalid paths, and adding new
receiver records the message arrival time and its ID into the active paths from a backup set, which are straightforward.
accepted message body. The receiver will stop forwarding When the total bit rates from active streaming paths are
the message if (1) it finds that the delay from the initial peer lower than rate(S), the manager will check whether a better
Peer_0 to this peer is greater than LastDelay; or (2) the path should be activated to replace the current one.
receiver is the source of this streaming service. Otherwise,
This manager has the following characteristics: (1) it
the message would be forwarded to j random neighbors.
employs a heuristic algorithm, and the system is optimized
After reverse tracing, the media source is able to analyze
step by step; (2) probing procedures have originated from the
the arrived messages with ID Seq., and explore the best path
normal peers, not the source peer, so that the control
from the source to the message issuance peer. Informed by
overhead is balanced to normal peers; (3) the number of
the source, the peer is able to construct the best overlay path
forwarding neighbors, j, balance the tradeoff between the
accordingly. Figure 6 shows an example of the reverse
optimization effectiveness and the overhead; (4) the
tracing algorithm based on the overlay shown in Fig. 1, when
frequency of probing and optimization is dynamic. In
j=3 and j=2, respectively. In this figure, all delays are
AnySee, probing procedure is feedback-driven based on
replaced with the cost of two peers. Peer D sends out a
delay. Here how to set the initial value of the threshold,
message and the possible routes of the message are
illustrated. Some routes are cancelled due to a longer delay µ D ( S ) , is of importance. Logs from AnySee, to be
than LastDelay. Eventually, a good path S1ÆS2ÆD is described in Figures 19-21, show that when peers are
successfully selected. Then LastDelay is updated. As a large watching highly popular movies, they are willing to tolerate
portion of ProM messages are stopped during forwarding a higher delay as much as 30 seconds. It is reasonable that
process, the overhead is acceptable. different programs define different µ D ( S ) .
Seq. Peer_0 Timestamp0 Source LastDelay TTL E. Key Node Manager
Peer_1 Timestamp1 It is of great importance for peers to have an effective
Middle admission control policy when there are too many requests.
Peers
Suppose each peer has N spare connections. According to the
Array
characteristics of requests, each request will fall into one of
Peer_TTL Timestampn M queues with different priorities and popularities. When we
assign the N spare connections to M queues, there are two
Figure 5. Structure of message ProbM
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
interesting cases. First, some queues are assigned with more i≠k −
)) = Max ∑ ρ i + ρ j
~
than one connection tunnel, which can be modeled as an Max ( ρ ( N1 , N 2 ,...N M
M/M/m/K queuing system [28]. Second, some queues only
1≤ i , j ≤ M (8)
receive one connection, which follows an M/M/1/K queuing M
model.
Subject to ∑N
i =1
i = N 1 ≤ Ni < N
The admission control policy of a peer is designed to The above optimization problem (Eq. (8)) can be divided
make the resources utilization optimal. The problem can be into two parts. First, we enumerate all (M, 1)-partitions (M
described as follows. Suppose there are M queues of queues and each should be allocated at least 1 connection) of
requests. The arriving rate of queue j is λ j , all arriving rates N spare connections such that the best allocation can be
satisfy λ1 < ... < λ j < ... < λM . The service rate to assign one found to maximize ρ ( N1 , N 2 ,...N M ) in Eq. (8). Second, for
connection is µ and each connection processor can buffer k all H partitions of N connections, we can compute all H
results of average resources utilization and select the best
requests (k≥1). Assuming the probability that n requests partition, based on which of the resources utilization is
follow the M/M/m/K queuing model is pn , we have maximal. In the first phase, we can get H, the number of
partitions of N by
( m ρ )n
p0 n = 0,1...m − 1 ( N − 1)!
pn = n ! (3) H = ( MN −−11 ) = ,N≥M (9)
m ρ
m n ( M − 1)!( N − M )!
m ! p0 n = m , m + 1... K
From Equation (9), the first algorithm complexity is
λ O(N). The second algorithm is to select the maximal one
where ρ = ; we also have from H results. Its complexity is O (C MN −−11 ) = O ( N ) .
mµ
Consequently, this optimization problem has complexity of
m −1 m ρ i −1
O(N). Considering one normal peer with 10Mbps bandwidth
∑ ( ) (m ρ ) 1 − ρ K − m +1
m
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
two logical neighbors is calculated based on the shortest the ratio between the used connections to all connections; (2)
physical path between this pair of nodes. Continuity index, representing the playback continuity, is
defined as the number of segments that arrive before
We develop a crawler based on Gnutella protocol [1] and playback deadlines over the total number of the segments.
the source codes are rewritten from Limewire open source
client [2]. The crawler’s main function is to probe the
connections of Gnutella peers. When peers are receiving TABLE I. SIMULATION PARAMETERS
crawler ping messages, they reply with corresponding pong
messages. With the help of forty-five independent threads, Abbreviate Comment
our crawler discovers over fifty thousands peers and their S Number of streaming overlays
connections in one week. In this simulation we use three data
M Number of neighbors
sets, obtained from different time slots. Each trace includes
around 2,000 peering nodes. N Size of one overlay
r Streaming playback rate
For the physical topology, we use BRITE [3] generating C Number of total bandwidth connections
three topologies, each with 5,000 nodes. The average number
of neighbors of each node ranges from 4 to 10. B. Results
The major parameters in our simulations are listed in The first set of simulations is conducted in a stable
Table 1. In each run, peers randomly join one of S streaming environment, in which peers do not leave after joining the
overlays (S=1, 4, 8, 12). Each peer randomly has C overlays. For each simulation setup, we take 100 runs and
connections ranging from 4 (1 Mbps bandwidth) to 40 (10 report the average.
Mbps bandwidth) and maintains at least M neighbors. The
size of each overlay is N (N<500). Each stream is 1800- We first evaluate the QoS of the AnySee service in a
seconds long, and the streaming rate is r, normally 300 Kbps. stable environment. Figure 7 plots the continuity index
Based on the delay values from the trace, we set the against streaming rate, where we contrast AnySee and
bandwidths for peers. For simplicity, the threshold µ D ( S ) is Coolstreaming. When the streaming rate is increased, the
continuity of AnySee is relatively good while the continuity
set to 25 seconds, which is estimated from logs of AnySee of Coolstreaming is degraded. There are two reasons. First,
implementation. The adjustment factor p is set to 1, which AnySee can find more near neighbors from all peering nodes
means we provide one backup streaming path for each active to request services, while Coolstraming is only able to find
streaming path. suppliers from the same overlay. Second, the necessary
buffer size of AnySee is only 40 seconds, while
To better evaluate the performance of AnySee, we use
Coolstreaming needs a 120-second buffer.
the metrics as follows. (1) Resource utilization is defined as
Figure 7. Continuity index V.S. streaming rates when N=400, S=12 and Figure 8. Resources utilization: overlay size V.S. the number of streaming
initial buffer size is 40 seconds overlays when M=12, r=300 Kbps
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
Figure 9. Continuity index under dynamic environments when M=5, Figure 10. Resource utilization under dynamic environments when M=5,
N=400, r=300 Kbps and initial buffer size is 40 seconds N=400, and r=300 Kbps
Figure 11. Services map of AnySee in CERNET of China (red center point: Figure 12. System modules of AnySee
HUST, Wuhan)
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
Figure 12 shows the modules of end systems in AnySee. border delays. Suppose the transporting delay per hop is µ
Every end system (including the Broadcaster) is composed of and the total hops between the source peer and peer A is m, the
several function modules as follows: (1) getting media data total transporting delay of peer A is t A' = µ × m . If the path
(GMD) module is for Broadcaster; (2) sending peer selection
(SPS) module is deployed on all peers except the Broadcaster; from source peer to peer A is lS → A = {lS → a1 , la1 →a2 ,..., lam−1 → A } ,
(3) session for controlling message (SFCM) module is the path has the following properties: (1) the source peer
responsible for exchanging control messages between current would persist all the time and the path lS → a1 would not break
peer and its supplier, and monitoring actions of child peers; (4)
buffer manager (BM) module gets media packets from the down; (2) peer A would also stay in the network and the path
upper-layer, sends them to the HTTP server module, and lam−1 → A would exist; (3) the influence that multiple borders
deletes packets with outdated timestamps in the buffer; (5) break down simultaneously is the accumulation of influence
data transmitter (DT) module fetches media packets from the that multiple borders break down one by one; (4) if one peer
buffer, and transmits packets to underlying peers under flow ai leaves, one new peer ai' would join the tree and replace the
control policy; (6) HTTP server (HS) module creates a virtual
HTTP service at a local machine. After retrieving media data position of ai . Then the total link delay can be computed as
packets from the buffer, HS module sends them to media i = m −1
players such as Windows Media Player, under the HTTP
protocol.
tA = ∑t
i =1
lai →ai +1 ,
and
B. Implementation Experiences tla →a = (1 − Pb ) i −1 × tl
We discuss two interesting issues in AnySee i i +1
then, t A = tl + (1 − Pb ) × tl + ... + (1 − Pb )
m−2
implementation, GID based service scheme and locality-aware × tl ,
buffer management scheme.
after computation,
1) GID based service scheme
1 − (1 − Pb )
m −1
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
Figure 13. Height V.S. tree size Figure 14. Source-to-end delay V.S. tree size
Figure 15. Maximum number of peers in different Figure 16. Maximum percentage of leaving peers in Figure 17. Average delay in different hot periods
hot periods different hot periods
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.
VI. CONCLUSION AND FUTURE WORK Infrastructure for Real-Time Applications", in Proceedings of
IEEE INFOCOM, 2003.
Efficient and scalable live-streaming overlay construction [9] A. Myers, T.S.E. Ng, and H. Zhang, "Rethinking the Service
has become a hot topic recently. In order to improve the Model: Scaling Ethernet to a Million Nodes", in Proceedings
metrics, such as startup delay, source-to-end delay, and of ACM SIGCOMM HotNets, 2004.
playback continuity, most previous studies focused on intra- [10] Y. Liu, X. Liu, L. Xiao, L. Ni, and X. Zhang, "Location-
overlay optimization. Such approaches have drawbacks Aware Topology Matching in P2P Systems", in Proceedings
including low resource utilization, high startup and source- of IEEE INFOCOM, 2004
to-end delay, and inefficient resource assignment in global [11] T.S.E. Ng and H. Zhang, "A Network Positioning System for
P2P networks. the Internet", in Proceedings of USENIX, 2004.
[12] X. Zhang, J. Liu, B. Li, and T. P. Yum, "DONET: A Data-
In this paper, we propose an inter-overlay optimization Driven Overlay Network for Efficient Live Media Streaming",
based live streaming scheme. Instead of selecting better in Proceedings of IEEE INFOCOM, 2005.
paths in the same overlay, AnySee peers are able to construct [13] Y. Chu, S. G. Rao, and H. Zhang, "A Case for End System
efficient paths using peers in different overlays. We evaluate Multicast," in Proceedings of ACM SIGMETRICS, 2000.
the performance of AnySee by comprehensive simulations. [14] M. Castro, P. Druschel, A. Kermarrec, A. Nandi, A. Rowstron,
Our experimental results show that AnySee outperforms and A. Singh, "SplitStream: High-bandwidth Content
existing intra-overlay live streaming schemes, such as Distribution in Cooperative Environments", in Proceedings of
Coolstreaming. ACM SOSP, 2003.
[15] D. Kostic, A. Rodriguez, J. Albrecht, and A. Vahdat, "Bullet:
The practical AnySee system has been released for High Bandwidth Data Dissemination Using an Overlay Mesh",
several months and its client code is free to be downloaded in Proceedings of ACM SOSP, 2003.
in CERNET of China. To date, over 60,000 users benefit [16] V. N. Padmanabhan, H. J. Wang, P. A. Chou, and K.
from AnySee to enjoy two international academic Sripanidkulchai, "Distributing Streaming Media Content
conferences, namely GCC’04 (Grid and Cooperative Using Cooperative Networking", in Proceedings of ACM
Computing) and NPC’04 (Network and Parallel Computing), NOSSDAV, 2002.
and other massive entertainment programs. Logs from [17] M. Hefeeda, A. Habib, B. Botev, D. Xu, and B. Bhargava,
AnySee show that users have great patience for live "PROMISE: Peer-To-Peer Media Streaming Using
streaming services with large delay if they have enough Collectcast", in Proceedings of ACM Multimedia, 2003.
interest in the programs. We hope the system can serve more [18] D. Tran, K. Hua, and S. Sheu, "Zigzag: An Efficient Peer-To-
people and attain better quality in the future. Peer Scheme for Media Streaming", in Proceedings of IEEE
INFOCOM, 2003.
We are currently building peer-to-peer video-on-demand [19] S. Banerjee, B. Bhattacharjee, and C. Kommareddy, "Scalable
services for large-scale users based on inter-overlay Application Layer Multicast", in Proceedings of ACM
optimization schemes. We are going to observe more user SIGCOMM, 2002.
behaviors to further improve the system performance. [20] Y. Guo, K. Suh, J. Kurose, and D. Towsley, "P2Cast: P2P
Patching Scheme for VoD Service", in Proceedings of WWW,
2003.
ACKNOWLEDGMENT [21] X. Jiang, Y. Dong, and X. D, B. Bhargava, "GNUSTREAM:
This work was partially supported by China National A P2P Media Streaming System Prototype", in Proceedings of
IEEE ICME, 2003.
Natural Science Foundation (NSFC) under grant
[22] Z. Zhang, Y. Chen, S. Lin, B. Lu, S. Shi, X. Xie, and C. Yuan,
No.60125208, 60433040, 60573129, 60573140, Specialized "P2P Resource Pool and Its Application to Optimize Wide-
Research Fund for the Ph.D Program from Ministry of Area Application Level Multicasting", in Proceedings of
Education under grant No. 20050487040, and Hong Kong International Conference on Parallel Processing Workshops,
RGC Grants HKUST6264/04E, DAG 05/06.EG44 and 2004.
AoE/E-01/99. [23] Z. Zhang, S. Shi, and J. Zhu, "SOMO: Self-Organized
Metadata Overlay for Resource Management in P2P DHT", in
REFERENCES Proceedings of IEEE IPTPS, 2003.
[24] S. Ratnasamy, P. Francis, M. Handley, R. Karp, and S.
[1] The Gnutella protocol specification 0.6, http://rfc- Shenker, "A Scalable Content-Addressable Network", in
gnutella.sourceforge.net. Proceedings of ACM SIGCOMM, 2001.
[2] Limewire, http://www.limewire.com/. [25] Y. Liu, L. Xiao, X. Liu, L.M. Ni, and X. Zhang, "Location
[3] BRITE, http://www.cs.bu.edu/brite/. Awareness in Unstructured Peer-To-Peer Systems", IEEE
[4] J. Liu, B. Li, and Y.-Q Zhang, "Adaptive Video Multicast Transactions on Parallel and Distributed Systems, 2005.
Over the Internet", IEEE Multimedia, 2003. [26] M. Ripeanu and I. Foster, “Mapping Gnutella Network”,
[5] B. Alfonsi, "I Want My IPTV: Internet Protocol Television IEEE Internet Computing, 2002.
Predicted a Winner", IEEE Distributed Systems Online, 2005. [27] NTP: The Network Time Protocol, http://www.ntp.org/.
[6] R. Perlman, "Models for IP Multicast", in Proceedings of [28] L. Kleinrock, Queueing Systems, John Wiley, 1974.
IEEE International Conference on Networks, 2004. [29] Y. Liu, A-H. Esfahanian, L. Xiao, and L. M. Ni,
[7] A. Ganjam and H. Zhang, "Internet Multicast Video "Approaching Optimal Peer-to-Peer Overlays", in
Delivery", IEEE Proceeding, 2005. Proceedings of IEEE MASCOTS, 2005.
[8] S. Banerjee, C. Kommareddy, K. Kar, B. Bhattacharjee, and S.
Khuller, "Construction of an Efficient Overlay Multicast
This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the Proceedings IEEE Infocom.