Академический Документы
Профессиональный Документы
Культура Документы
by
Xiangyang Zhang
School of Computing
in conformity with the requirements for
the degree of Doctor of Philosophy
Queen’s University
The past decade has witnessed tremendous growth of peer-to-peer (P2P) video stream-
ing applications on the Internet. For these applications, playback smoothness and
timeliness are the two most important aspects of users’ viewing experiences, whereas
the amount of traffic is Internet service providers’ main concern. According to the
playback delay, video streaming can be classified into on-demand streaming, live
streaming, and interactive streaming. P2P live streaming applications typically have
an arbitrary number of users, tens of seconds of playback delay, and a high packet
delivery rate, but their heavy traffic incurs great financial expenditure and threatens
the quality of other services. Interactive streaming applications usually have a small
group size, several hundreds of milliseconds of playback delay, and reasonable traffic
volume, but cannot achieve a high packet delivery rate. The goal of this thesis is to
study traffic locality and reliable delivery of packets in large-scale live streaming and
small-scale interactive streaming applications, while keeping the playback delay well
below the targeted applications’ limits.
For P2P live streaming applications, we first identify “typical” schemes from ex-
isting P2P live streaming schemes, investigate packet propagation behavior and the
i
schemes that take both users’ viewing experience and traffic locality into considera-
tion. We show that the network-driven tree-based schemes with the swarming tech-
ward error-correction (FEC) codes against the bursty errors of Internet links when
using peers to provide multiple one-hop paths between two communication parties.
We find that although using peers for path diversity often results in a lower post-FEC
packet loss ratio, some conditions do apply. The interplay of a number of factors,
such as the Internet links’ error ratio and burst length and the coding parameters,
determines the performance of FEC. We provide guidelines and computation methods
to determine whether the use of peers for path diversity can be justified.
ii
Acknowledgments
I am greatly indebted to my wife, Li Cao. This thesis would not have been possible
without her love, sacrifice, and unconditional support. I also credit our child, Angela,
for amazing me every day.
My deepest gratitude goes to my father, Jilai Zhang, and my mother, Cuixin
Wang. They spared no effort to provide the best possible environment for me to grow
up and they had never complained in spite of all the hardships in their life.
I would like to thank Ahmed Hasswa, Dr. Kashif Ali, Dr. Yik Hung Tam, Dr. Abd-
Elhamid Taha, Michael Liu, Mingyi Zhang, Xianrong Zheng, Abdulmonem Rashwan,
Atef Mohamed, Walid Ibrahim, Mervat Abu-Elkheir, Mahmoud Ouda, Abdulrahman
Abahsain, Ed Elkouche, Khalid Elgazzar and all the members of the School of Com-
puting, especially the Telecommunication Research Lab, at Queen’s University for
their support, friendship and fruitful discussions. Special thanks to Dr. Quanhong
Wang and Dr. Kenan Xu for helping me to settle down in Kingston, and to Dr. Afzal
iii
I would like to thank the faculty of Queen’s University for their excellent instruc-
tion. Special thanks to Prof. Glen Takahara, whose lessons are the best I have ever
had in my life.
Thanks to Basia Palmer and Debby Robertson for their help in my time of need.
Thanks to Patti Riley for correcting many grammatical errors in this thesis.
Finally, I would like to thank members of the examination committee for their
valuable remarks, and acknowledge with great appreciation the funding provided by
Queen’s University.
Xiangyang Zhang
Kingston, Ontario
iv
Statement of Originality
I hereby certify that this Ph.D. thesis is original and that all ideas and inventions
attributed to others have been properly referenced.
Xiangyang Zhang
Feb 8th, 2012
v
vi
List of Acronyms
AS Autonomous System
DV Distance-Vector
vii
MDC Multiple Description Coding
RP Rendezvous Point
viii
Co-Authorship
ix
2011, pp. 1–5.
x
Table of Contents
Abstract i
Acknowledgments iii
Statement of Originality v
List of Acronyms vi
Co-Authorship ix
Table of Contents xi
Chapter 1:
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Motivations and Objectives . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Thesis Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
xi
Chapter 2:
Background . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 3:
xii
3.3 Typical Swarm-Based and Tree-Based Schemes . . . . . . . . . . . . . 59
3.3.1 Overlay Construction . . . . . . . . . . . . . . . . . . . . . . . 60
Chapter 4:
xiii
4.5.3 Fast Tree Repairing . . . . . . . . . . . . . . . . . . . . . . . . 99
4.6 Error-Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Chapter 5:
FEC Performance in Interactive Streaming . . . . . . . 115
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
xiv
5.6 FEC Performance With a Limited Number of Disjoint CO Channels . 136
5.6.1 Subchannels of a CO Channel . . . . . . . . . . . . . . . . . . 136
Chapter 6:
Conclusions and Future Directions . . . . . . . . . . . . . 152
6.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Appendix A:
Non-Systematic FEC Performance . . . . . . . . . . . . 172
Appendix B:
Frossard’s Method . . . . . . . . . . . . . . . . . . . . . 175
xv
List of Tables
xvi
List of Figures
2.6 Impact of the two types of cost functions in the recursive method. The
number on a link denotes its cost. . . . . . . . . . . . . . . . . . . . . 46
3.1 Average overlay and propagation tree edge cost in TT and TS, nor-
malized with the average cost of all the pair-wise edges between peers
in the system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
xvii
3.4 Peers’ chunk loss rate when substrate Internet links are error-free. The
y-axis is the cumulative fraction of peers whose chunk loss rate is less
3.6 Two disjoint paths with n and m hops, n > m. The leftmost peer is
denoted as x0 and y0 and the rightmost peer as xn and ym for convenience. 72
3.7 Peer distribution on nearby overlay . . . . . . . . . . . . . . . . . . . 82
4.1 Hierarchical overlay. Higher layers contain peers with higher band-
peers, β = 1, κ = 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
4.3 Neighboring overlay and subscription tree. The number at each peer
indicates the peer’s upload bandwidth. . . . . . . . . . . . . . . . . . 95
4.4 Normalized propagation tree cost of the hierarchical overlay when the
bandwidth setting is U(0, 6). . . . . . . . . . . . . . . . . . . . . . . . 104
4.5 Average propagation tree height on the hierarchical overlay when the
bandwidth setting is U(0, 6). . . . . . . . . . . . . . . . . . . . . . . . 104
4.6 Playback delay CDF on the hierarchical overlay when the bandwidth
setting is U(0, 6). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
xviii
4.7 Delivery-rate-user-ratio on the hierarchical overlay when the band-
width setting is U(0, 6). . . . . . . . . . . . . . . . . . . . . . . . . . 106
xix
5.6 Post-FEC loss ratio when using sufficient CO channels (N ≥ n). Each
of the two segments of a CO channel has the same parameters p and q
The fraction of access segments account for β = 0.25 of total packet loss.149
xx
Chapter 1
Introduction
The past decade has witnessed tremendous growth of video streaming applications
on the Internet. More and more people are watching user-generated videos, or
professionally-made news clips and full-time TV shows on the Internet rather than sit-
ting in front of a TV screen, renting movies from an online store rather than going to a
physical movie store, and making video calls over the Internet rather than audio calls
over traditional telephone networks. Increasingly, media companies are making their
1
CHAPTER 1. INTRODUCTION 2
called the buffering delay, has the most significant impact on the streaming technique.
Video streaming is often classified into two categories: on-demand streaming and live
position in a video, so the user’s request is quickly responded. However, the buffering
delay is large at other times for the purpose of smooth playback. In live streaming
applications, every user plays a video in approximate synchronicity with the video
source, and downloads the video at the video’s playback rate. The buffering delay is
small and constant. In some live streaming applications, such as Internet TV, users
do not interact with the video source, and a buffering delay of several minutes is
acceptable. In other applications, such as online action games, the buffering delay
cannot exceed several hundred milliseconds for the sake of interactivity.
In this thesis, we use the term delay-tolerant live streaming or simply live stream-
ing to refer to streaming applications that can tolerate a buffering delay of several
seconds to several minutes, and the term interactive streaming to refer to streaming
applications that only allow a sub-second buffering delay. Video communications,
such as video telephony and conferencing, are inherently streaming and interactive
by nature. Live streaming applications may have an arbitrary group size. For exam-
ple, in Internet TV applications, there may be hundreds of thousands of receivers in
a single channel. Interactive streaming applications typically have a small number of
receivers, and in some cases, only one receiver. This thesis focuses on the two most
or more users and small-scale interactive streaming applications with several or tens
of users.
A video streaming application may employ the client/server (C/S) model or the
peer-to-peer (P2P) model. In the C/S model, there exists a video server (or server
farm) and every user downloads a video from the video server. In the P2P model, a
user is both a client and a server. A user downloads a video from some other users in
parts (each part from different users), and in the meantime, uploads the video parts
they have to the other users. In large-scale live streaming applications, the C/S model
requires enormous processing power from the video server and the bandwidth of the
Internet, and both incur heavy financial expenditure. The P2P model is attractive
due to its limited requirements of the video server’s processing power and bandwidth
of the Internet. Interactive streaming applications typically use the C/S model, but
may use P2P networks to connect users located behind a firewall or network address
translation (NAT) device. These applications may also use P2P networks to provide
multiple paths between a sender and a receiver for higher reliability, or to organize
users in applications with small group sizes but large numbers of groups. For example,
Skype organizes users into a P2P network and selects some users to be super-nodes to
connect the users behind NATs. This thesis focuses on video streaming applications
that use P2P networks.
For P2P live and interactive streaming applications, the smoothness and timeliness of
playback are the two most important aspects of users’ viewing experiences, whereas
the amount of Internet traffic is the main concern of Internet service providers (ISPs).
CHAPTER 1. INTRODUCTION 4
The smoothness of playback is measured by the packet loss rate perceived by a user’s
media player (i.e., after error correction). The timeliness of the playback is mea-
sured by the playback delay, which is the lag from the time a video frame appears at
the video source to the time the video frame is played at a receiver. In P2P video
streaming applications, packets may be lost due to Internet link errors. When a video
source delivers packets to a receiver via other peers, packets may also be lost due to
2
the churn of intermediate peers. The Internet only provides best-effort delivery of
IP packets. A packet loss rate of several percent is not rare for Internet links. An
application itself needs to correct transmission errors, or it may rely on the transport
control protocol (TCP) to do so. Error correction techniques include re-transmission
and coding. The re-transmission method has little overhead but introduces at least
several seconds of delay. The coding method can be used for applications that only
tolerate a delay of several hundred milliseconds. Coding may be done at the source or
at the channel. Source coding (i.e., video coding), such as multiple description cod-
ing (MDC), has many attractive features but incurs significant coding overhead [19].
Channel coding, sometimes called forward error-correction (FEC) coding, is the most
widely used error correction technique on noisy channels in real-time communications.
Its coding delay is determined by the coding block size, and its efficacy depends on
the coding redundancy and error patterns.
The Internet routes packets along the shortest IP paths between two hosts. How-
ever, in P2P video streaming applications, especially large-scale P2P live streaming
applications where a video source delivers packets to a large number of receivers, the
set of paths a packet propagates from the video source to receivers is a tree from the
perspective of the application layer. We call this tree the packet’s propagation tree.
2
Peers’ departures and arrivals are collectively called peer churn.
CHAPTER 1. INTRODUCTION 5
The amount of Internet traffic is measured by the cost of propagation trees. The
shape of propagation trees and each peer’s position on the substrate Internet have a
traffic throttling or blocking, P2P live streaming applications need to localize their
traffic in order to reduce inter- and intra-autonomous system (AS) traffic on the In-
ternet. Large-scale P2P live streaming applications typically employ a distributed
design. In order to reduce peers’ communication and processing overhead, each peer
only maintains relationships with a limited number of other peers, which are called
the neighbor s of the peer. All the neighboring relationships form an overlay network,
which is called the neighboring overlay. A peer exchanges packets only with its neigh-
bors. The strategy by which a peer selects other peers to neighbor with and the
strategy a peer uses to select neighbors to exchange packets determine the Internet
P2P file sharing applications propose that peers only neighbor with “nearby” peers
(with respect to their locations on the substrate Internet) to construct the neighbor-
ing overlay in order to reduce cross-AS traffic and report positive results. However,
when compared with file sharing applications, live streaming applications have rigid
delay constraints. Packets that arrive after playback deadlines are considered lost,
CHAPTER 1. INTRODUCTION 6
and peers will not attempt to fetch packets that are about to miss playback deadlines.
Whether the neighbor-with-nearby-peers strategy is applicable to P2P live streaming
applications remains an open question in the related literature. Live streaming ap-
plications allow a considerable amount of playback delay. As a result, they can use
any of the above error correction techniques. The re-transmission technique is the
technique most commonly used.
For interactive streaming applications that use helper peers to provide multiple
paths or to traverse NATs, network traffic is mainly determined by the coding over-
head because helper peers are usually selected to be in the “middle” of a sender and
a receiver. Since the playback delay cannot exceed a few hundred milliseconds for the
the existence of a number of disjoint channels between a sender and a receiver, and
the sender transmits packets of an FEC block via different channels. On the Internet,
the most feasible way to maintain multiple paths is to use a P2P network. However,
peers are dynamic, and using helper peers as intermediate hops to achieve path diver-
sity may cause more lost packets when these peers leave. Besides, there may not be
enough disjoint paths or even no disjoint paths at all. It is unknown whether using
P2P networks for path diversity can really improve FEC performance, under what
conditions the performance can be improved, and to what extent the improvements
may be.
CHAPTER 1. INTRODUCTION 7
The goal of this thesis is to study traffic locality and reliable delivery of packets
in large-scale live streaming and small-scale interactive streaming applications, while
keeping the playback delay well below the limit the targeted application can tolerate.
More specifically, we address the following problems.
• Study the impact of traffic locality and propose schemes to reduce network
traffic without jeopardizing users’ viewing experiences in large-scale P2P live
neighboring strategies that take both users’ viewing experiences and traffic lo-
cality into consideration.
• Study the efficacy of FEC for reliable delivery of packets when using P2P net-
works to provide multiple paths to combat bursty packet loss of Internet links in
small-scale interactive streaming applications. To this end, we propose Markov
chain models for Internet links and intermediate peers, develop computation
methods to analyze the packet loss rate after FEC correction, and provide
guidelines for interactive streaming applications to use FEC and path diver-
sity.
P2P live streaming applications to help localize traffic. We identify a “typical” swarm-
based scheme and a data-driven tree-based scheme that capture the essential aspects
of these two types of schemes, especially those in real-world deployments on the In-
ternet. We compare the system performances of the two typical schemes on two types
of neighboring overlays: random overlay and nearby overlay. We study the impact of
the neighbor-with-nearby-peers strategy using both simulation and analytical mod-
els. We find that packets propagate in distinct manners in the swarm-based scheme
and tree-based scheme, although both schemes are data-driven. The neighbor-with-
nearby-peers strategy reduces network traffic significantly, but also results in more
lost packets in the presence of peer churn and substrate network errors because of the
large diameter and clustering coefficient of the nearby overlay. The different chunk
propagation behaviors of the swarm-based and tree-based schemes cause more chunk
loss in the tree-based schemes than in the swarm-based schemes. Our work explains
why commercial deployments, which construct random overlays and use the data-
driven approach, usually have good performance results. Our work also shows that
taining users’ viewing experiences. We first identify the desired shape of propagation
trees. We then construct the neighboring overlay to be the super graph of these
trees. On the hierarchical overlay, most edges are between nearby peers to reduce
network traffic, but a small fraction of edges are rewired to remote peers in a way
error-correction mechanism. Results show that our scheme outperforms the typical
data-driven tree-based scheme and the hierarchical overlay outperforms the small-
world overlay. More users received all the chunks in TreeClimber than in the typical
data-driven tree-based scheme. The network cost of the hierarchical overlay is only
1
3
of that of the random overlay, and the chunk delivery rate is close to that of the
random overlay under loose upload bandwidth constraints.
We investigate the performance of systematic FEC codes when using P2P net-
works to provide multiple one-hop overlay paths between two communication parties.
Systematic FEC is the preferred error correction technique for Internet applications
and path diversity is an effective technique to combat the bursty loss of Internet
links. We study the performance of systematic FEC codes in three situations of
path diversity—a sender using a large number of disjoint paths, a limited number of
disjoint paths, and a large number of non-disjoint paths. We model Internet links
using discrete-time Markov chains and provide numerical analysis of the post-FEC
loss ratio. We also use simulation to investigate FEC performance in situations where
the multiple paths are heterogeneous or a sender lacks the knowledge of which paths
are disjoint. We find that although using peers for path diversity often results in a
lower post-FEC packet loss ratio, conditions do apply. The interplay of a number of
factors—the Internet links’ loss ratio and burst length, the number of disjoint CO
channels, the lifespans of peers, the time it takes to detect peers’ departures, and the
coding parameters—determines the performance of FEC. We provide guidelines and
computation methods to determine whether the use of peers for path diversity can
CHAPTER 1. INTRODUCTION 10
be justified.
the essential aspects of these schemes, especially those in actual deployment on the
Internet. We then compare system performance of the two typical schemes on two
types of neighboring overlays: a random overlay where peers select neighbors without
considering their network locations, and a nearby overlay where peers only select
propagate on a given overlay and models to characterize the random and nearby
overlays and analyze their impact on system performance.
In Chapter 4, we propose a hierarchical overlay scheme and a distance-vector (DV)-
style tree-building scheme for large-scale P2P live streaming applications that reduces
Internet traffic without jeopardizing users’ viewing experiences. We first identify the
parties. We examine three situations of path diversity: a sender using a large number
of disjoint paths, a limited number of disjoint paths, or a large number of non-
disjoint paths. We model Internet links using discrete-time Markov chains and provide
numerical analysis of the post-FEC loss ratio. We also use simulation to investigate
FEC performance in situations where the multiple paths are heterogeneous or a sender
lacks the knowledge of which paths are disjoint.
In Chapter 6, we conclude this thesis and discuss possible future research direc-
tions.
Chapter 2
Background
In this chapter, we outline the background material and previous work necessary to
understand the discussion in the following chapters. We first introduce the data flow in
video streaming applications in Section 2.1. We then introduce the two foundations of
P2P video streaming applications—video coding and P2P networks—in Sections 2.2
and 2.3, respectively. A large number of P2P live streaming schemes have been
proposed during the past two decades. Section 2.4 is dedicated to the introduction of
these P2P live streaming schemes. Sections 2.5 and 2.6 discuss P2P video streaming
traffic and packet loss, respectively. Finally, Section 2.7 defines the performance
metrics used in this thesis.
A video streaming system consists of a number of users and necessary servers for ad-
ministrative and support purposes, all connected through the Internet. The number
of servers and their functions depend on the intended application. For example, in a
12
CHAPTER 2. BACKGROUND 13
video telephony system, there are usually a number of session initiation protocol (SIP)
servers that help users to initiate communication sessions. In a video conferencing
system, there may be a video conferencing unit (VCU) that selects and synthesizes
participating parties’ videos and sends the synthesized video to all participating par-
ties. In a live streaming system, there is usually a web server for users to browse
channel information and a number of streaming servers acting as the video source.
A video file, or the signal captured at the video source, typically consists of a video
stream, several audio streams, and possibly a text stream (e.g., subtitles or instant
messages). Each of these streams is first compressed separately. This process is called
video compression, video coding, or source coding.1 There are many video coding for-
mats, such as H.262/MPEG-2 and H.264/AVC, and many audio coding formats, such
as AAC and MP3. The encoded video, audio, and text streams are then multiplexed
using a multimedia container format. There are many multimedia container formats
as well, each capable of containing certain video and audio coding formats. MPEG PS
and MPEG TS, defined in MPEG-2 Part 1, are the standard containers for MPEG-2
audio and video on reliable media and unreliable media respectively. MP4, defined
in MPEG-4 Part 12, is the standard container for MPEG-4 audio and video. Other
popular multimedia container formats include RM from RealMedia, QuickTime from
Apple, FlashVideo from Adobe, and the open source MKF and OGG.
The video file, now in the multimedia container’s format, is encapsulated into
IP packets. There are several commonly used network protocol stacks, as shown in
Fig. 2.1. For the video streaming applications that use C/S model, the RTP/UDP/IP
and HTTP/TCP/IP protocol stacks are usually used; for the P2P model, the video
1
In the literature, the term video coding may refer to the compression of the video, audio, and
text streams or the compression of the video stream only.
CHAPTER 2. BACKGROUND 14
is usually carried on UDP or TCP directly. Besides the network protocols used to en-
capsulate video files into IP packets, there are also protocols for control purposes. For
example, the real-time streaming protocol (RTSP) controls the streaming of videos
carried on real-time transport protocol (RTP), and the Windows media streaming
protocol (WMSP) from Microsoft, controls the streaming of videos carried on HTTP.
The session announcement protocol (SAP), the session description protocol (SDP),
and the session initialization protocol (SIP) are used to manage streaming sessions.
To reduce the video source’s workload as well as Internet traffic in live streaming
applications that have a large number of users, video packets should be duplicated
at boxes dispersed over the Internet rather than at the video source. Because users
view the video in synchronicity, these boxes only need to cache a short segment of
the video. There are three possible ways to duplicate video packets. As shown in
Fig. 2.2, IP multicast duplicates packets using routers at the IP layer, content delivery
networks (CDNs) duplicate packets using servers strategically placed on the Internet
at the application layer, and P2P networks duplicate packets using peers, also at the
CHAPTER 2. BACKGROUND 15
application layer.
IP multicast was introduced on the Internet to support group communications
based on Deering’s multicast model [16] in the late 1980s. Hosts that wish to join a
multicast group indicate their interest to routers using the Internet group management
protocol (IGMP). Routers use a multicast routing protocol to construct a multicast
tree, and packets are duplicated by routers on the tree and forwarded to member hosts.
Several multicast protocols exist; most IPTV systems use the protocol independent
multicast (PIM) protocol. IP multicast has the same latency as IP unicast and
makes the most efficient use of the Internet. As shown in Fig. 2.2a, packets follow
the shortest path from the video source to each host, and exactly one copy of each
packet traverses each tree link. However, due to the absence of a generally accepted,
usage-based billing policy for ISPs to use when charging customers for carrying their
multicast packets and other technical drawbacks, not only is deployment of the IP
multicast on the Internet sparse, but these IP multicast “islands” are also poorly
connected to one another. Today, IP multicast is the primary approach for ISPs to
to serve nearby users. Each cache server duplicates and forwards packets to nearby
users using IP unicast. Users are redirected to a cache server by the Domain Name
Service (DNS) when they attempt to access the original server. The performance
of CDNs depends on the number and placement of cache servers. For example, in
Fig. 2.2b, cache server c is placed at the other end of the high-cost link (R0, R1) to
CHAPTER 2. BACKGROUND 16
Figure 2.2: Three approaches to distributing video packets from a video source to
receivers on the Internet. The number on a link denotes its cost.
CHAPTER 2. BACKGROUND 17
serve nearby users, reducing network traffic. The biggest drawback of CDNs is their
high cost. In addition to investing in servers, CDN operators must also pay ISPs
for connecting servers to the Internet. Both costs increase as the number of users
increases.
Researchers began to propose the implementation of the multicast functionality
by hosts at the application layer rather than by routers at the IP layer [12, 20] in the
late 1990s. These was in response to the slow and “walled-garden” deployment of
IP multicast a decade after its introduction to the Internet. These early application
layer multicast schemes aimed to replace IP multicast in certain application scenarios,
and like IP multicast, they constructed multicast trees that optimized network cost
function. Inspired by the success of the BitTorrent file sharing application, researchers
began using the swarm technique for live streaming applications that can tolerate tens
of seconds of playback delay [49,86] in 2004. In P2P live streaming applications, each
peer duplicates and forwards packets while at the same time receiving packets from
other peers (see Fig. 2.2c). The most attractive part of P2P networks is their low
cost; only several servers are required for administration purposes, and the upload
bandwidth is contributed by users and increases as the number of users increases.
P2P networks can be used in conjunction with CDNs or IP multicast. For example,
a P2P network may deploy some cache servers to provide upload bandwidth and use
networks is not necessary but is attractive in certain situations. For example, many
CHAPTER 2. BACKGROUND 18
users employ a firewall or NAT device and cannot be reached from the outside; they
rely on outside nodes as bridges. Because Internet links are lossy and the losses are
bursty, a sender and a receiver may want to use a set of helper nodes to provide mul-
tiple paths for more reliable communication. In these situations, users can organize
themselves into a P2P network, and peers outside of firewall and NAT devices can
act as bridges or helper nodes.
The dominant video compression standards are the MPEG series standards [96] pub-
lished by the moving picture experts group (MPEG) of ISO/IEC, whose official des-
ignation is ISO/IEC Joint Technical Committee 1, Subcommittee 29, and the H.260
series standards [95] published by the video coding experts group (VCEG) of ITU-T,
whose official designation is ITU-T Study Group 16, Working Party 3, Question 6.
The two groups often team up to develop standards together. For example, H.262
is equivalent to MPEG-2 Part 2, and H.264 is equivalent to MPEG-4 Part 10, all
developed by the Joint Video Team (JVT). Other popular video coding formats in-
clude WMV from Microsoft, Sorenson from Apple, RealVideo from RealNetworks,
VP8 from Adobe, and the open-source Theora from Xiph.org.
A video stream consists of a series of frames, captured at even time intervals. A
frame is a rectangle of pixels. Each pixel is represented by its RGB values (usually
one byte per value), indicating its red, green, and blue components. For the purpose
of compression, a video frame is divided into slices, a slice is divided into macroblocks,
and a macroblock is divided into blocks.
Video compression exploits the spatial and temporal redundancy of video frames
CHAPTER 2. BACKGROUND 19
and the characteristics of the human visual system. Because the human visual system
is less sensitive to colors than to brightness, the RGB values are converted to YCbCr
pixels can be reduced to 6 bytes. Consecutive frames are usually similar (temporal
redundancy), and nearby blocks in a frame are often similar (spatial redundancy).
A video can be compressed by recording these differences rather than the original
signals.
The input frames to the encoder are usually in the CIF/SIF format. The common
intermediate format (CIF) was first introduced in the H.261 standard; the source
input format (SIF) is identical to CIF but is defined in MPEG-1. Colors are encoded
in the YCbCr space. Picture sizes are multiples of macroblocks, which are usually
16 × 16 pixels. Video telephony and conferencing typically use CIF (352 × 288 pixels)
or QCIF (176 × 144 pixels), while standard TV uses 4CIF (704 × 576 pixels). Each
of the Y, Cb, and Cr components are encoded separately.
Most video coding standards use the block-based motion-compensated predictive cod-
ing model shown in Fig. 2.3 [59]. The upper half of Fig. 2.3 shows the encoding pro-
cess. First, the encoder compares an input frame F (n) with reference frames to find
a best match for each macroblock, and records the motion vectors (the motion esti-
mate box in Fig. 2.3). The encoder can use multiple reference frames and the weighted
CHAPTER 2. BACKGROUND 20
sum of the macroblocks of reference frames to find the best match for a macroblock
in F (n). The accuracy of motion vector can be half-pixel or quarter-pixel. Second,
the encoder uses the motion vectors and reference frames to generate a compensated
prediction frame P (the motion compensation box in Fig. 2.3). Third, the encoder
performs discrete cosine transformation (DCT), block by block, on the residual frame
D(n), which is the difference between F (n) and P . The encoder can use a fixed block
size or adapts the block size to the picture characteristics. For example, the encoder
can use a small block size for regions with details and a large block size in regions
without many details. Most values of the coefficient block are zeros, and non-zeros
are concentrated in the top-left corner. Fourth, the resulting coefficient blocks are
quantised (i.e., divided by a scaler to reduce the number of bits to represent each
coefficient) to generate frame X. This is the only step in the encoding process that is
lossy. Fifth, the coefficients are zig-zag scanned, run-length coded, and together with
motion vectors, entropy-encoded to produce the coded bitstream.
The frames P and X are used to generate the reference frame F ′ (n). The blocks
of frame X are first scaled and then inversely transformed to generate frame D ′ (n).
(Frame D(n) and D ′ (n) differ because the quantisation step is lossy.) Frames D ′ (n)
and P are added to generate reference frame F ′ (n).
The decoding process is similar to the process that generates reference frames.
The decoder first performs the opposite of entropy coding, run-length coding, and
zig-zag scanning to generate frame X, and then uses previously decoded frames and
frame X to generate frame F ′ (n).
Frames are divided into I, P, and B frames. The frames between two consecutive
I frames are collectively called a group of pictures (GOP). I frames are encoded
CHAPTER 2. BACKGROUND 22
using previous frames as reference frames. B frames are encoded with both previous
and later frames as reference frames. Because P and B frames are dependent on I
frames, errors in I frames may propagate into P and B frames. The slices on an
I frame can be divided into I, P, and B slices. I slices are encoded and decoded
independently, P slices are dependent on I slices, and B slices are dependent on I and
P slices. The existence of I slices can prevent an error from propagating to the whole
picture. Note that because of the existence of B frames, the encoding (or decoding)
order is different from the playback order, introducing extra coding delays.
H.264/AVC [95] is the latest video compression standard of the MPEG and H.260
series standards. It defines 17 profiles to support a wide range of applications with var-
ious bandwidths and delays. The main improvements of H.264/AVC, compared with
MPEG-2, are higher compression efficiency and the network abstraction layer (NAL)
for transmission over networks with various delay and loss conditions [73]. H.264/AVC
uses the same block-based, motion-compensated predictive model as its major prede-
cessor, MPEG-2, but achieves significantly higher coding efficiency by incorporating
dozens of improvements. For example, it uses multiple reference pictures, weighted
prediction, variable macroblock size, and quarter-pixel accuracy for motion compen-
sation; it also uses variable block size for DCT. H.264/AVC organizes the coded
bitstream into NAL units. Each NAL unit contains a one-byte header, specifying
the type of the NAL unit. NAL units are classified into two categories: video coding
CHAPTER 2. BACKGROUND 23
layer (VCL) NAL units contain the compressed data (i.e., coefficients and motion
vectors), while non-VCL NAL units contain control information. For example, the
sequence parameter set (SPS) NAL unit carries parameters common to an entire video
sequence, such as the profile and level, the size of video frames, and the maximum
number of reference frames. The picture parameter set (PPS) NAL unit carries pa-
rameters common to a sequence or subset of coded pictures, such as entropy coding
flexible slice size and arbitrary slice order (i.e., the slices of a picture can be coded
in arbitrary order). H.264/AVC also supports slice groups and flexible macroblock
ordering (FMO). Each macro block can be independently assigned to a slice group,
and a slice group can contain one or more slices. H.264/AVC supports slice data
partitions such that different partitions can be transmitted over channels with un-
equal error protection. The coded data that makes up a slice can be placed into
three separate partitions. Partition A contains the slice header and header data for
each macroblock in the slice, partition B contains coded residual data for I slice mac-
roblocks, and partition C contains coded residual data for P and B slice macroblocks.
Partition A is intolerant to errors and is transmitted over the most reliable channels,
while partition B is more tolerant and is transmitted over less reliable channels, and
partition C is the most tolerant and is transmitted over the least reliable channels.
CHAPTER 2. BACKGROUND 24
H.264/AVC encodes a video into a single layer. Single layer coding is the most efficient
type of coding, but multiple layer coding is often desired for receiver-side rate-control
and graceful degradation in lossy transmission environments. There are two types of
multiple layer coding: layered coding and multiple description coding (MDC).
In layered coding schemes, a video is encoded into a base layer and one or more
enhancement layers. Higher layers are dependent on lower layers (i.e., a receiver
must have the lower layers to decode higher layers). The more layers a receiver has,
the higher the fidelity of the decoded video is. Scalability can be achieved in three
descriptions are used. However, MDC has a large coding overhead [19] and is rarely
used in real-world video streaming applications.
power, storage, and communication bandwidth [3]. The substrate network, also called
the underlay network, is usually the Internet.
P2P networks have been used for many applications. P2P file sharing applica-
tions, such as BitTorrent, Gnutella, eDonkey, are among the most popular Internet
applications. The traffic caused by P2P file sharing has been the dominant type of
traffic on the Internet for years. P2P video streaming applications are also popular
among users. PPLive and PPStream, two popular P2P video streaming networks in
China, reported having millions of active daily users as of 2009 [98,99]. Internet tele-
phony is another area where P2P networks have succeeded in the commercial world.
For example, Skype, the most popular Internet telephony service, has tens of millions
of daily active users [100]. Other P2P applications include data storage [32], web
services [47], content publishing [61], etc.
In a P2P network, each peer is both a client and a server. Peers usually have
limited storage and bandwidth, partial knowledge of the neighboring overlay, and
little knowledge of the substrate Internet. Peers may join and leave the P2P network
at any time; the churn of peers poses a great challenge to P2P applications. There
are two basic problems in a P2P network: locating the peers that store a particular
data object given the object’s key or a set of keywords, and retrieving the object
efficiently once knowing which peers have it. Depending on the type of application, a
P2P application also needs to address a number of practical issues, such as incentives
to encourage peers to contribute, issues of fairness among peers to share work load,
accountability and deniability of behavior, and the traffic the application generates
on the substrate Internet.
CHAPTER 2. BACKGROUND 26
Being able to locate the peers that have a certain data object is fundamental to any
distributed file sharing and data storage systems. The location problem is sometimes
termed the routing problem because the query for peers that have a certain data object
is routed hop-by-hop to peers who know the answer. In P2P video live streaming
applications, if we consider the video source as an object, the paths that the query
messages traverse from each user to the video source (or the response messages from
the video source to each user) form a multicast tree on the neighboring overlay.
In a P2P file sharing system, data objects are stored distributively at each peer.
Each data object has a unique ID, which is usually obtained by hashing the data
object. Each peer also has a unique ID, which is usually in the same space as the object
IDs. Depending on the mapping of data objects to peers and the organization of peers,
P2P file sharing systems can be classified into structured systems and unstructured
systems.
In a structured system, each data object is stored at a set of peers deterministically
determined by the object ID. Peers are organized in such a way that, if given an
object ID, locating the peers that have the desired object takes a short amount of
time. Without loss of generality, we will assume that object IDs and peer IDs are in
the same m-bit space. Each data object is represented by a key–value pair (K, V ),
where key K is the object ID and value V can be the data object itself or an index
to the object. Each (K, V ) pair is stored at exactly one peer. All the (K, V ) pairs
form a distributed hash table (DHT). The location problem can be stated as: Given
a key K, locate the peer that stores the key-value pair (K, V ).
Table 2.1 summarizes some of the most well-known DHT algorithms. All of the
CHAPTER 2. BACKGROUND 27
algorithms achieve a path length of O(log N) between two arbitrary peers and only
require peers to maintain a routing table of size O(logN), where N is the system
population2 . In all of the algorithms, peers statistically equally partition the object
ID space. Each peer “owns” a range of the space and stores a (K, V ) pair, if K
falls in the peer’s range. Given an object ID, all the peers can be ordered by their
“distance” to the object ID. When looking up a key K, each peer routes the query to
the neighbor that is closer to the object ID. Eventually the query will reach the peer
that stores the (K, V ) pair.
The DHT algorithms listed in Table 2.1 differ in the manner that peers partition
the ID space and the definition of distance. Pastry [60] and Tapestry [87] organize the
ID space as a hypercube and form a Plaxton mesh [54] neighboring overlay. Chord [65]
organizes the ID space as a circle modulo 2m , where m is the number of bits in IDs.
Kademlia [45] organizes the ID space as a binary tree and uses the XOR logic to
define distance. Viceroy [43] organizes ID space as a circle of length one and forms
a butterfly-shaped neighboring overlay. CAN [55] centers around a d-dimensional
peer u. In Chord [65], it takes O(log2 N) messages for a new peer to join the system;
in other schemes, the join complexity is O(log N).
In an unstructured P2P file sharing system, the mapping of data objects to peers
is non-deterministic, and the neighboring overlay’s topology is not tightly controlled.
2 1
In CAN, when d = 2 log2 N , the routing table size is log2 N , and the average path length is
1
2 log2 N hops.
CHAPTER 2. BACKGROUND 28
Path Join
Architecture State Size
Length
√ Complexity
1 d
CAN d-dimension torus 4
d N 2d O(log N)
Chord Circle O(log N) O(log N) O(log2 N)
Hypercube and Plaxton
Tapestry O(log N) O(log N) O(log N)
mesh overlay
Hypercube and Plaxton
Pastry O(log N) O(log N) O(log N)
mesh overlay
Kademlia Binary tree O(log N) O(log N) O(log N)
Viceroy Circle and butterfly overlay O(log N) O(1) O(log N)
Unstructured systems rely on flooding or random walk to locate the peers that have a
certain data object. The key can can be the unique object ID, or a group of keywords.
A peer floods a query message to all of its neighbors, or to a group of neighbors selected
with a probability function. Each peer compares the key or keywords in the query
super peer s and normal peer s. A normal peer attaches to one or several super peers.
A normal peer stores the data objects itself but stores the key–index pair of the data
objects it has at the super peer. If a normal peer wants to look up a data object,
it asks the super peers to do so. Super peers form an unstructured network and use
flooding or random walk to locate the peers that store the requested data objects.
Unstructured systems are suitable for P2P systems with a dynamic population
because the cost of dealing with peer churn is low. A new peer joins the system by
CHAPTER 2. BACKGROUND 29
attaching to some existing peers. When a peer leaves, its neighbors simply delete it
from their routing tables.
The retrieval problem arises from downloading large files [92] and is drawing renewed
attention due to growing video streaming applications [27, 37, 64, 88]. To facilitate
large file downloads, Kazaa, eDonkey, and BitTorrent allow a peer to download a data
object in parts from multiple peers. Among these applications, the swarm technique
employs the rarest-first strategy to select pieces to request. A peer requests the
missing pieces that are least common in its neighbors’ buffer maps. To avoid a
situation in which many peers are requesting the least common piece at the same
time, the rarest-first strategy includes randomization among at least several of the
seconds. Newly connected peers are three times as likely be optimistically unchoked
in the rotation, which gives them a decent chance of getting a complete piece to
upload.
Videos are typically large files but streaming imposes extra constraints. For P2P
on-demand streaming applications, once a peer has started watching a video, the
chunks after the current playback position have deadlines, and the chunks before
the current playback position are useless. A peer may seek new positions during
the playback, which changes the usefulness and urgency of chunks and may leave
some chunks never fetched [84]. For live streaming applications, because of the delay
constraints, each peer only buffers a small segment of the video, which makes the
rarest-first and tit-for-tat strategies less effective than in P2P file sharing applications.
A large number of P2P video live streaming schemes have been proposed in the
past two decades. These schemes pursue various directions and sometimes integrate
techniques used in other schemes to form various hybrid schemes. As a consequence,
P2P video live streaming schemes can be classified using various perspectives. In this
section, we briefly introduce the classifications and representative schemes.
2.4.1 Classification
Depending on whether or not explicit trees exist, P2P video live streaming schemes
can be classified into tree-based and swarm-based schemes. In tree-based schemes,
pushes the packet to its children. Therefore, tree-based schemes are sometimes called
tree-push schemes or simply push schemes. Swarm-based schemes are sometimes
According to the number of trees, tree-based P2P video live streaming schemes can
be classified into single or multiple tree-based schemes. In single tree-based schemes,
the video is encoded into a single layer and peers construct a single tree that all
the packets follow. In multiple trees-based schemes, the video is either encoded
into a single layer but interleaved into multiple substreams or encoded into multiple
layers with MDC or LC. Peers construct a separate tree for each substream. Single
tree-based schemes have lower overhead. Multiple trees-based schemes utilize peers’
upload capacity more efficiently—a peer can be a leaf node on one tree but upload
to other peers on a different tree. Multiple trees may be interior node-disjoint (i.e., a
peer can be an interior node on at most one tree) or have common interior nodes.
According to whether peers first construct a mesh neighboring overlay, P2P video
live streaming schemes can be classified into mesh-first or tree-first schemes. In mesh-
first schemes, each peer maintains relations with a number of peers (called neighbors).
These relationships form the edges of the neighboring overlay. Then peers build a
spanning tree on the neighboring overlay. In tree-first schemes, there is no neighboring
3
In this thesis, we do not use the terms treeless, mesh-based, push, or tree-push to describe a
scheme in order to avoid possible confusion. For example, tree-based schemes may first construct
a mesh neighboring overlay, swarm-based schemes may use the push mode, and the term push has
different meanings in swarm-push and tree-push. The terms swarm-based, swarm-pull, and swarm-
push in this survey have the same meaning as mesh-based, mesh-pull, and mesh-push in [38], and
data-driven has the same meaning as in [37].
CHAPTER 2. BACKGROUND 32
Figure 2.4: (a) Source tree. (b) Bi-directional shared tree. (c) Uni-directional shared
tree.
are two types of shared trees. The first type, as shown in Fig. 2.4b, makes all tree
edges bi-directional; each node forwards packets to its parent and children except the
one that the packets come from. With the second type, as shown in Fig. 2.4c, video
packets are forwarded from the video source first to the tree root and then to all the
nodes.
In a recent work [85], we propose to classify P2P live streaming schemes according
to the algorithmic choices to their designs. To achieve the basic objective of distribut-
ing video packets from the video source to peers, a scheme needs to fulfill three tasks:
(1) to determine the supplier-receiver relationships4 between peers for each packet
such that the supplier–receiver relationships collectively form a tree that reaches all
the peers (i.e., no loops, no partitions, and each node has an in-degree of one); (2) if
a supplier–receiver relationship applies to more than one packet, a scheme must deal
4
The terms supplier and receiver are equivalent to the terms parent and child in the context of
tree-based schemes. We use the terms supplier and receiver in the context of both tree-based and
swarm-based schemes, and use the terms parent and child only in the context of tree-based schemes.
CHAPTER 2. BACKGROUND 33
with the situation when the supplier or receiver leaves before all the packets are sent;
and (3) to handle lost packets. Fig. 2.5 summarizes the algorithmic choices to the
design of P2P live streaming schemes. In the following we will discuss the first task;
we will discuss the second and third tasks in Section 2.6.
There are three basic algorithmic choices to determine the supplier–receiver rela-
tionships. The first choice is to use a central server to compute the supplier–receiver
relationships using a centralized algorithm and to inform each peer. The supplier–
receiver relationships should apply to the whole stream (i.e., tree-based). It is possible
that the server computes the supplier–receiver relationships for each chunk separately,
but this carries no benefit and the server’s workload and communication overhead
would be too large. The centralized method can be explicitly or implicitly mesh-first.
In the latter case, peers do not have neighbors but the central server implicitly main-
tains a mesh neighboring graph. For example, if the central server maintains each
peer’s virtual network position, it can implicitly construct a complete neighboring
graph.
CHAPTER 2. BACKGROUND 34
The second choice is to use a recursive algorithm. Each peer i first requests
the video source to be the supplier. The video source either accepts the request or
delegates to another peer. This process repeats until peer i is accepted by some peer.
A peer accepts receivers only if it has spare upload capacity. The recursive method
is tree-first. As long as a peer only delegates to its receivers, the recursive method
guarantees building a tree that reaches all the peers. Same as the centralized method,
the supplier-receiver relationships should apply to the whole stream. We remark that
recursive algorithms are distributed, but not fully distributed—peers close to the
video source have high workload. We use the term recursive to differentiate them
from fully distributed algorithms.
The third choice is to use a fully distributed algorithm. Most fully distributed
schemes are mesh-first. Peers must maintain sufficient neighbors such that the neigh-
boring graph remains connected in the presence of peer churn. In a dynamic envi-
ronment, flooding each received video packet to all the neighbors can guarantee the
packet reaching all of the peers. However, flooding also results in a large amount of
unnecessary traffic because multiple copies of the video packet are sent to peers. To
reduce traffic, peers can advertise5 other information with a small size to neighbors
such that peers can arrange the transmission of video packets using this information.
There are two possible choices to achieve this: swarming and routing.
In the swarming method, each chunk is uniquely numbered, each peer advertises
its bit-maps—each bit in the bit-map indicates whether the peer has a chunk—to
neighbors, and peers establish the supplier–receiver relationship for each chunk. The
establishment of a supplier–receiver relationship may be initiated by the receiver or
5
Flooding refers to the practice where a peer forwards each received packet to all the neighbors
except the neighbor from which the packet comes. Advertising refers to the practice where a peer
forwards packets generated by itself to all its neighbors.
CHAPTER 2. BACKGROUND 35
the supplier (called the pull and push mode of the swarm-based scheme in [7]). When
initiated by the receiver, the receiver requests one, and only one, copy of each chunk
from a selected neighbor, and hence it will not receive duplicated chunks. When
initiated by the supplier, the supplier pushes chunks to neighbors that the neighbors
do not already have. However, because a peer’s local copy of a neighbor’s bit-map
may be stale, peers may receive duplicated chunks. Note that with the swarming
DHTs), the peer’s hop counts to the video source (e.g., distance-vector routing), and
the costs between peers (e.g., link-state routing). There are well-known algorithms to
build spanning trees on the neighboring graph with these information. The routing
information a peer advertises may also be data-related (called data-driven routing),
such as the peer’s bit-maps or the sequence number of the most recent packet the peer
has. Although several data-driven routing schemes exist, it is not fully understood
which algorithms can guarantee building a spanning tree (i.e., no partitions, no loops,
and no duplicated packets) on the neighboring graph and what properties the tree
will have.
CHAPTER 2. BACKGROUND 36
Since peers have limited upload capacity, both the swarming method and the
routing method (including centralized and fully-distributed) need to guarantee that
a peer’s workload is within its upload capacity. For the routing method where the
supplier–receiver relationships apply to the whole stream, this problem is typically
addressed by limiting the number of receivers for each supplier. For the swarming
method where the supplier–receiver relationships apply to chunks, this problem can
membership table using a centralized method (i.e., a new peer asks a tracker for
peers already in the system), or a recursively method (i.e., a peer uses a recursive
process to find peers in the system), or a fully distributed method (i.e., a new peer
knows at least one peer already in the system and uses it to find other peers in the
system)6 . The use of a membership table can reduce the time required for a peer
to find new neighbors and can also reduce the tracker’s workload. The neighboring
graph can be structured (i.e., organized with DHTs) or unstructured. It can also
“mirror” the substrate Internet such that the paths between peers will have lower
costs.
6
We classify P2P video live streaming schemes according to tree-building algorithms, not the
method that a peer uses to obtain its membership table.
CHAPTER 2. BACKGROUND 37
Table 2.2 summarizes a list of P2P live streaming schemes. In the table, C stands
for centralized schemes, R stands for recursive schemes, and D stands for fully dis-
tributed schemes. In the category of recursive schemes, NC, WC, and IPI stand
Narada/ESM [12] targets small group multicast applications with multiple sources.
First, the protocol, called Narada, constructs a mesh neighboring overlay G that mir-
rors the substrate Internet. Each peer periodically measures its delay to every other
peer and adds or drops edges on G according to the utility gain or loss, which are
defined in terms of the number of peers to whom the delays via overlay edges become
less or more and by the extent of changes. Then peers run a BGP-like protocol to
maintain a unicast routing table. Because peers’ out-degrees on the multicast tree are
bounded by their upload bandwidth, Narada uses a variant of the shortest widest path
algorithm. Similar to BGP, each routing entry contains a list of peers on the path to
the destination in order to prevent forwarding loops. Finally, peers construct a source
tree on G using RPF for each source. Narada achieves high substrate utilization at
the expense of scalability. Each peer needs to monitor the delays from itself to every
other peer to optimize the overlay G.
Chainsaw [49] is a proof-of-concept implementation of the swarm-pull scheme.
of its neighbors. A problem with the random chunk algorithm is that some chunks
are never requested from the source and hence are lost at all the peers. To fix this
problem, the source records the chunks it has uploaded. When a peer requests a
chunk that has been uploaded, the source will send the oldest chunk that has never
overlay using the scalable probabilistic membership protocol (SCAMP) [22]. SCAMP
is a fully distributed membership management protocol in which each peer maintains
a random subset of size O(log N) of the population. A peer randomly selects a fixed
number of peers in its membership table to neighbor with. The authors tried differ-
ent peer degrees on the neighboring overlay and have concluded that 4 is reasonably
good. The packet loss rate decreases marginally for higher degrees. A peer updates
its neighbor list periodically or when triggered by the departure of an existing neigh-
bor. In a periodic update, the peer replaces the neighbor that has the least amount of
incoming and outgoing traffic between itself and the peer. The use of a membership
table reduces the number of times needed to contact the tracker and helps a peer to
find a new neighbor faster. However, the benefit of using a membership management
protocol such as SCAMP instead of using a naive approach to construct a random
neighboring overlay is not justified, so the new version changes to a naive approach.
CHAPTER 2. BACKGROUND 41
A video is split into one second chunks. Each peer has a sliding window of 120
chunks. Every second, a peer advertises its buffer map to its neighbors and pulls
missing chunks from its neighbors. The scheduling algorithm mixes chunk and neigh-
bor selection together. A peer first considers chunks available from one neighbor,
two neighbors, etc. in sequential order. If a chunk is available from more than one
neighbor, the neighbor with the highest bandwidth and from which the estimated
chunk arrival time falls before the deadline is selected. The authors evaluate the
scheme with a 500 kb/s video streaming rate and about 200 hosts on PlanetLab [97].
A peer buffers 10 seconds of video before playing it back. For the nodes that have an
ON/OFF period of more than 400 seconds, 95-97% of the chunks arrive in time; for
stable nodes, 97-98% of chunks arrive in time. The overhead for exchanging buffer
maps is about 2%.
In the new CoolStreaming [75], the neighboring overlay construction is simpli-
fied. A new peer x contacts a well-known RP for its membership table of size M, from
which it selects neighbors randomly. Peer x exchanges its membership table with a
neighbor only once, immediately after establishing the neighboring relation. When a
neighbor becomes unavailable, peer x deletes the neighbor from its membership table
but will not flood the information.
The video is split into chunks of equal size and interleaved into S substreams.
Neighbors periodically exchange buffer maps. The buffer map peer x sends to peer y
consists of two parts: an S-tuple of sequence numbers of the most recently received
chunks for every substream, and an S-tuple indicating which substreams peer x sub-
scribes to peer y. A peer always accepts subscription requests from its neighbors
CHAPTER 2. BACKGROUND 42
until it has M children. If a parent does not have enough upload capacity, its chil-
dren compete for the upload capacity. A parent will not voluntarily drop a child; it
is up to the child to decide whether to switch parents. A peer tries to ensure that all
the substreams it receives advance at a similar pace, and its parent for a substream
proceeds at a similar pace as its neighbors. A peer monitors its parents for two upper
bounds: the upper bound of acceptable deviation between substreams, and the upper
bound of acceptable deviation between a parent and other neighbors. If they are not
satisfied, the peer will start looking for a new parent.
SPANC [9] aims to minimize the packet delivery delay. It uses an existing
neighboring overlay construction scheme. The video is split into chunks of t seconds
and interleaved into S substreams. Each packet has a sequence number and each peer
periodically advertises its most recent packet’s sequence number in each substream
to neighbors. A new peer x is assigned a set of potential parents, and each parent
reserves a certain amount of bandwidth for peer x. Given the most recent packets’
sequence numbers of potential parents in each substream and the delivery delay d(y, k)
from the source to peer x if peer y is the parent in substream k, peer x calculates
PS
a “schedule” that minimizes k=1 d(pk , k), where pk is peer x’s parent in substream
k. After every interval of length T , peer x calculates a new schedule if its network
conditions have changed (e.g., departure of parents or change of packet loss rate).
Unlike most other schemes, SPANC considers lossy Internet links and uses network
coding for loss recovery. For each chunk of i original packets, j extra NC packets,
which are linear combination of the original packets, are generated by parents of peer
x. Peer x can reproduce the i original packets if it receives any i packets out of the
i+j packets. Every interval of length t, peer x calculates the value j as the sum of the
CHAPTER 2. BACKGROUND 43
exponential moving average and variance of the number of lost packets in previous
chunks. Peer x then assigns the j NC packets to parents in such a way that minimizes
have the shortest RTT and selects other neighbors randomly. This effort aims to
mirror the overlay to the substrate while retaining the favorable property of random
graphs. However, because the membership table is small compared with the popu-
lation, the probability of choosing nearby neighbors is low. Neighbors periodically
exchange keep-alive messages; a departing peer notifies its neighbors and the message
is flooded within a limited number of hops. Each peer keeps track of the data packets
sent to and received from neighbors, and drops a neighbor if the volume is below a
certain level.
The pull mechanism is similar to the original CoolStreaming [86]. The pull mech-
anism is used in the start-up phase when trees do not exist and also as a loss re-
covery mechanism. GridMedia requires that peers have synchronous clocks; every
peer synchronizes with RP when joining the system. At the end of every subscribing-
pushing-packets-interval, a peer x requests substreams from neighbors, which pushes
packets of the subscribed substreams to peer x during the next interval. Peer x uses
the roulette wheel selection algorithm to select parents for each substream; it selects
a neighbor y to be the parent with a probability proportional to the percentage of
packets it has received from peer y during the last interval. Peer x pulls the remaining
packets and the lost packets from neighbors; it uses the same roulette wheel selection
CHAPTER 2. BACKGROUND 44
plications
The enormous traffic of P2P video streaming applications causes ISPs great financial
expenditure and threatens the quality of other Internet services. To avoid unpleasant
traffic throttling or blocking, P2P video streaming applications need to address ISPs’
of a path is best measured by its IP routing cost. This is because the routing costs
of Internet links are configured by ISPs and reflect the costs of carrying packets on
these links from the ISPs’ perspective. The cost information of Internet links may be
provided by ISPs directly, as proposed in [1, 74], or be inferred by P2P applications.
In the latter case, the propagation delay of an Internet link is typically used as an
alternative to its IP routing cost because the two parameters are highly correlated.
In interactive streaming applications that use helper peers to provide multiple
paths or to traverse NATs, helper peers are usually selected to be in the “middle”
of a sender and a receiver, and network traffic is mainly determined by the coding
overhead. In large-scale P2P live streaming applications, network traffic is deter-
mined by both the coding overhead and the propagation paths of packets. P2P live
CHAPTER 2. BACKGROUND 45
streaming applications typically use highly efficient video coding standards and do
not use channel coding. In the following, we focus on packets’ propagation paths in
In a large-scale P2P live streaming application, given a video source and a number of
receivers, from the perspective of the IP layer, the propagation tree with the minimum
cost is a Steiner tree. The substrate Internet can be considered as a sparse graph
where the routers and peers are nodes and Internet links are edges. The Steiner tree
roots at the video source and spans all the peers. All the leaf nodes of the Steiner
tree are peers and all the inner nodes are routers. The Steiner tree problem is NP-
hard. IP multicast protocols use the shortest path tree (SPT) algorithm. There are
several IP multicast protocols, such as PIM, the multicast open shortest path forward-
ing (MOSPF) protocol, and the distance-vector multicast routing protocol (DVMRP).
DVMRP is the multicast counterpart of the unicast RIP and uses a distance-vector
algorithm. MOSPF is the multicast counterpart of the unicast OSPF and uses a
link-state algorithm. PIM relies on unicast routing protocols. The multicast tree is
formed by the collective IP unicast paths from the video source to each receiver. IP
multicast trees are typically used as the benchmark to evaluate how efficiently P2P
live streaming applications can utilize the Internet.
From the perspective of application layer, the propagation tree with the minimum
cost is a minimum spanning tree (MST) of the neighboring overlay graph where the
nodes are peers and the edges are IP unicast paths between peers that are reachable
(i.e., not behind firewall and NAT devices). The MST of a graph can be built using
CHAPTER 2. BACKGROUND 46
Figure 2.6: Impact of the two types of cost functions in the recursive method. The
number on a link denotes its cost.
the Prim’s algorithm or the Kruskal’s algorithm. The overlay is a complete graph if
all the peers are reachable, and is a non-complete densely-connected directed graph
otherwise. However, each peer has a small degree on the spanning tree due to its
limited upload bandwidth. The degree-bounded MST problem is NP-hard [63].
In recursive P2P live streaming schemes where there is no neighboring graph,
the objective of minimizing the tree cost is typically addressed by optimizing a cost
function in each step of the recursive process. The cost function can be defined in
two ways. The closest peer approach is similar to MST. A new peer i selects peer j
that makes dij minimum, where dij is the cost of edge ij. The en route approach is
CHAPTER 2. BACKGROUND 47
similar to SPT. Peer i selects peer j that makes dij + djs minimum, where s is the
video source. Fig. 2.6b and 2.6c illustrate the trees built with the two approaches.
strate Internet in the two selections, and hence enormous Internet traffic ensues [2].
Several studies [1, 11, 74] on P2P file sharing applications propose that peers only
neighbor with “nearby” peers (with respect to their locations on the substrate In-
ternet) to construct the neighboring overlay in order to reduce cross-AS traffic and
report positive results. However, compared to file sharing applications, live streaming
applications have more rigid delay constraints. Whether this strategy is applicable
to P2P live streaming applications remains an open question in the literature. On
the neighboring overlay graph, two types of low-cost trees are often built: MST and
SPT. However, when peers’ out-degrees on the tree are bounded, both problems are
NP-hard.
When the propagation tree is optimum according to a cost function, the arrival
of a new peer may cause existing peers to change their parents to make the new tree
optimum. In the centralized method, the central server periodically computes the
optimum tree and instructs peers to switch parents. In the fully distributed tree-
based method, peers periodically check whether to switch parents. In the recursive
method, peers periodically re-join the tree.
CHAPTER 2. BACKGROUND 48
Network traffic can be greatly reduced if peers can select nearby peers as neighbors
and select nearby neighbors to exchange packets or chunks. The easiest way for a peer
to find nearby peers is to use an ISP-supported oracle service, as proposed in [1]. This
oracle service ranks peers according to their proximity to a requesting peer. In the
same spirit, the P4P architecture [74] provides an interface for the substrate Internet
to communicate cost information to P2P applications. Alternatively, peers can infer
the distance to another peer without the help of ISPs. In [11], peers use a CDN’s
redirecting information, and in [31], peers uses the BGP prefixes.
The most commonly used method to find nearby peers is to use a network po-
sitioning scheme. The basic idea of network positioning is to model the Internet as
a D-dimensional space. Each host has a coordinate in the D-dimensional space and
the distance between two hosts can be estimated from their network coordinates.
Network positioning schemes greatly reduce the probing overhead since a peer only
measures the RTTs to a small number of other hosts. There are two types of network
positioning schemes: centralized and distributed.
The global network positioning system (GNS) [46] is a typical centralized scheme.
First, a small set of M landmark hosts measure the RTTs, and the results are used
as the distance metric between one another, producing a M × M matrix. Then the
coordinates of these landmarks in a D-dimensional space are computed such that
the difference between the measured distance and the calculated distance in the D-
dimensional space is minimized. An ordinary host can measure the distances to these
landmarks and calculate its own network coordinate. Because the landmark hosts are
used by all of the peers, they may become bottlenecked.
CHAPTER 2. BACKGROUND 49
equity (i.e., the RTT between nodes x and y is greater than the sum of the RTT
between nodes x and z and the RTT between nodes z and y) of the Internet. Vivaldi
minimises the sum of squared errors between measured RTTs and computed RTTs
by analogizing the triangular inequity to the displacement in a physical mass-spring
tions
the sender failing to send packets in time (e.g., the sender has left or is experiencing
congestion) or by errors of the Internet link between the sender and the receiver.
Sender-related packet loss is typically bursty. In line with the end-to-end principle,
the Internet only provides the best-effort delivery of IP packets. Studies [50,76] show
that a packet loss rate of several percent is not rare on Internet links; they also show
that packet loss often occurs in bursts of consecutive loss.
In interactive streaming applications that use helper peers, a sender and a receiver
typically use only one intermediate peer for each path. When a helper peer leaves,
the sender and receiver find another helper peer. In tree-based P2P live streaming
applications, all the peers form a tree. When a peer leaves, all the children need to
find another parent. We call this process tree-repairing. Fast tree-repairing is critical
CHAPTER 2. BACKGROUND 50
to the playback smoothness in P2P live streaming applications because when a peer
leaves, all of its descendants may be impacted.
In the following, we first discuss the error correction techniques in live streaming
and interactive streaming applications and then discuss fast tree-repairing techniques
in live streaming applications. The discussion also addresses the second and third
tasks in Section 2.4.
2.6.1 Error-Correction
There are two choices to correct or conceal packet loss: coding and re-transmission.
The coding method can be used for applications that only tolerate a delay of several
hundred milliseconds, but it has a larger overhead and performs poorly when errors
occur in consecutive bursts. The re-transmission method has little overhead but
point re-transmission.) This method is most effective, but is feasible only if a peer
has neighbors (i.e., explicitly mesh-first) and knows which neighbors have the missing
packets. The latter requirement can be met if peers advertise bit-maps.
CHAPTER 2. BACKGROUND 51
For interactive video streaming applications, lost packets can only be recovered (or
concealed) by the use of a coding scheme. The coding can be done at the source (i.e.,
video coding) or at the channel. We have introduced source coding in Section 2.2,
so we only discuss channel coding in the following. There are many types of channel
coding schemes. On the Internet, a receiver knows whether an IP packet is corrupt
and discards the corrupted packet, and hence erasure code is used. (The corrupted
packets are erased.) Reed Solomon code is the most widely used channel coding
scheme on the Internet. Reed Solomon code can be systematic and non-systematic.
Codes that include the original packets in the output are systematic and codes that do
not are non-systematic. A systematic Reed Solomon code RS(n, k) works as follows.
impacts on the post-FEC loss ratio when more than n − k packets of an FEC block
are lost. For example, for RS(10, 9), if 2 original packets of an FEC block are lost,
the post-FEC loss ratio is 92 ; if 1 original packet and 1 FEC packet are lost, the post-
FEC loss ratio is 19 . The main disadvantages of using FEC are the coding overhead
and coding delay. For interactive streaming applications, FEC should not introduce
a coding delay of more than several hundred milliseconds. Therefore, the FEC block
size n should be a small number.
CHAPTER 2. BACKGROUND 52
In P2P live streaming applications, to reduce packet loss caused by the sender, a
receiver needs to quickly detect the failure of the sender and request another peer to
send the video packets. This is especially important in tree-based schemes. When
a peer leaves, its children or parent need to quickly detect the peer’s departure. A
peer can detect the departure of the sender by using the periodic heart-beat (i.e.,
keep-alive) mechanism. A receiver can also detect the departure of the sender by
monitoring the packet arrivals from the sender.
When the receiver leaves, if the supplier-receiver relationship applies to a chunk
(i.e., in swarm-based schemes), it does not matter whether the supplier continues
to send the remaining packets or not. However, if the supplier–receiver relationship
applies to the whole stream (i.e., in tree-based schemes), the supplier should stop
sending the packets as soon as possible. This means that the supplier–receiver re-
than a chunk.
When the supplier leaves, if the supplier–receiver relationship applies a video
segment, a receiver needs to first recover lost packets then find a new supplier for
the remaining packets. In the centralized method, the receiver requests the central
server for a new supplier. In the recursive method, the receiver contacts the video
7
The interval Trn can be in unit of time or in unit of packets since P2P live streaming applications
have a near-constant playback rate. Because peers are in approximate synchronicity, when a peer
switches parents, it is better to specify from which packet the parent–child relationship applies.
CHAPTER 2. BACKGROUND 53
source and repeats the recursive process. In the fully distributed routing method, the
receiver relies on the routing algorithm. However, in a recursive or fully distributed
the tree no longer optimized if a scheme also aims to minimize the propagation tree
cost, the peer needs to look for a new parent using the recursive process or using
the distributed routing protocol and switches to that parent. (A new peer can join
the system in a similar manner.) If the supplier–receiver relationship applies to a
chunk, the receiver can ignore tree-repairing and rely on the error control mechanism
to recover the chunk.
Because peers have limited upload bandwidth, the fast tree-repairing mechanism
also needs to manage peers’ workload. There are two methods for managing workload.
When a peer receives a request to be a parent, it may employ a connection admission
control (CAC) mechanism, i.e., it grants the request if it has spare upload bandwidth
and rejects the request otherwise. Another method is to accept the requests, and let
children compete for upload bandwidth until some children decide to back off.
The smoothness of video playback is measured by the packet (or chunk) delivery
rate, defined as the fraction of packets that arrive before their respective playback
deadlines at a peer. Unlike audio streaming that tolerates a certain percentage of
packet loss, video streaming is sensitive to packet loss. If a packet or chunk fails to
CHAPTER 2. BACKGROUND 54
arrive before its playback deadline, the media player may freeze, play a disrupted
video frame, or skip the frame. For convenience, we say there is a glitch when any of
these situations occurs. The delivery rate can be easily converted to the mean time
between glitches (MTBG); e.g., a delivery rate of 99.96% is equivalent to an MTBG
of 10 minutes at a streaming rate of 512 Kb/s (i.e., standard TV quality). Most users
require smooth playback or do not use the service at all. The departure of unsatisfied
users causes more packets to be lost at satisfied users, resulting in a chain reaction.
We use the delivery-rate-user-ratio plot to show the fraction of peers that have certain
chunk delivery rates. The plot shows the fraction of peers that receive 100%, 99.9%,
99.8%, etc., of the chunks.
The timeliness of the playback is measured by the playback delay, which consists
of the coding delay, delivery delay, and buffering delay. The coding delay refers to
the delay caused by source coding and channel coding. It is typically less than 100
milliseconds. The delivery delay refers to the delay caused by delivering video packets
from the video source to a receiver. Assume the path from the video source s to a
peer d consists of h hops. The delivery delay at the peer d is the sum of the delivery
delays at each hop. For each hop from, say, peer i to peer j, the delivery delay consists
of the queuing delay (which is the amount of time a packet waits at the peer i to be
transmitted), the transmission delay (which is the amount of time required to push
a packet onto a link (i, j)), and the propagation delay (which is the amount of time
required for the head of a packet to travel from the peer i to the peer j over the link
(i, j)). The transmission delay is typically small and can be ignored. The queuing
delay depends on the workload of at the sender. The propagation delay between two
arbitrary hosts on the Internet is usually less than 200 milliseconds. The Meridian
CHAPTER 2. BACKGROUND 55
project [93] measured the delays between 2500 hosts on the Internet and the average
was 77 milliseconds. The buffering delay refers to the time video packets stay in a
peer’s buffer before being played back. The delivery delay may have a large variance,
especially in swarm-based schemes or when using re-transmission for error-correction.
A large buffering delay is necessary for smooth playback.
The Internet traffic is measured by the cost of propagation trees. The cost of a
propagation tree is the sum of all the tree edges’ costs. A tree edge’s cost is the IP
unicast path’s cost between the two end points. Because a video packet may not
reach all the peers, we normalize the propagation tree cost by dividing it by the
number of peers the packet reaches. Because of peer churn, each chunk takes a set of
different paths, so we average metrics across all the propagation trees. Early P2P live
streaming schemes are often compared with IP multicast using the stress and stretch.
The stress of an Internet link refers to the number of copies of a multicast packet
traversing the link. The stretch of a peer refers to the ratio of the cost of the peer’s
root path on the application layer multicast tree over that of the peer’s IP unicast
path to the source. A peer’s root path on a tree refers to the path from the tree root
to the node along tree edges.
Chapter 3
Understanding Neighboring
Strategies
3.1 Introduction
In this chapter, we study packet propagation behavior and the impact of neighboring
Since a large number of P2P video streaming schemes exist, we first identify “typ-
ical” schemes that capture the essential aspects of these schemes, especially those in
actual deployment on the Internet. Because our focus is large-scale P2P live streaming
applications, we only consider unstructured distributed swarm-based and tree-based
56
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 57
schemes. Our typical swarm-based scheme (called TS hereafter) employs the rarest-
first chunk scheduling policy, which is used in most swarm-based schemes. Our typical
structing a random overlay, peers select neighbors without considering their network
locations. When constructing a nearby overlay, peers use the neighbor-with-nearby-
peers strategy and only select nearby peers as neighbors.
We study the impact of the neighbor-with-nearby-peers strategy by both sim-
that packets propagate in distinct manners in TS and TT although both schemes are
data-driven (i.e., the propagation paths are determined by availability of packets at
peers rather than network metrics). In TS, peers have a high probability to pull from
neighbors that have fewer hops to the source peer; the set of paths a chunk traverses
from the source to peers (i.e., propagation tree) is close to a degree-bounded shortest
path tree (in term of hops) on the neighboring overlay. In TT, peers select parents
almost randomly with respect to their hop counts to the source, resulting in signif-
icantly taller propagation trees compared with TS. The neighbor-with-nearby-peers
strategy reduces network traffic significantly, but also results in more lost packets in
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 58
the presence of peer churn and substrate network errors because of the large diameter
and clustering coefficient of the nearby overlay. This problem is more severe in TT
than in TS because they have different packet propagation behaviors, which cause
chunks to be lost in different ways.
The remainder of this chapter is organized as follows: Section 3.2 introduces re-
lated work. Section 3.3 describes the TS and TT schemes. Section 3.4 studies TS and
TT on the random overlay and nearby overlay by simulation. Section 3.5 presents
packet propagation models in TS and TT and analyzes the impact of propagation
behavior on system performance. Section 3.6 presents overlay models and analyzes
the impact of the neighbor-with-nearby-peers strategy on system performance. Sec-
A brief introduction of P2P live streaming schemes has been given in Section 2.4.
Since this thesis focuses on large-scale P2P live streaming, only unstructured dis-
tributed schemes, including the swarm-based and tree-based schemes, are discussed
here.
In large-scale P2P live streaming applications, in order to reduce communication
and processing overhead, a peer only maintains a limited number of neighbors and
exchanges packets only with neighbors. In most schemes, such as [69, 75], peers
construct a random neighboring overlay for its high connectivity, small diameter, and
other favorable properties. However, this strategy results in enormous traffic on the
Internet. In [81], a new peer first obtains a membership table, and then selects some
neighbors randomly and some by RTT from its membership table with the purpose
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 59
of reducing network traffic. Because the membership table is small compared with
the population, the probability of nearby peers being selected is small.
Several studies [1, 11, 74] on P2P file sharing applications propose that peers only
neighbor with nearby peers to construct the neighboring overlay to reduce cross-AS
traffic, and [11, 74] reduced AS hops and file downloading time. However, compared
with file sharing applications, live streaming applications have rigid delay constraints.
Packets that arrive after playback deadlines are considered lost, and peers will not
attempt to fetch packets that are about to miss playback deadlines. Whether the
neighbor-with-nearby-peers strategy is applicable to P2P live streaming applications
remains an open question in the literature.
We also remark that there are only a few analytical studies on P2P video streaming
applications and none of these studies the neighboring strategy or packet propaga-
tion behavior. Zhou et al. [89] compare the chunk delivery rate and delivery delay
of the rarest-first and nearest-deadline-first chunk scheduling policy in swarm-based
schemes. Picconi et al. [53] study the maximum streaming rate achievable in swarm-
based schemes.
based schemes and tree-based schemes, especially those that have been deployed in a
large scale over the Internet. In TS, a peer employs the rarest-first chunk selection
policy, which is in line with most swarm-based schemes. We use a pull target selection
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 60
algorithm similar to that in [52,86], which we found achieves smoother playback than
the algorithm in [41]. A peer grants pull requests if it has spare upload capacity,
i.e., it does not employ the tit-for-tat incentive mechanism. This is in line with
the observations on PPLive and Sopcast, two popular P2P-based Internet television
services, in [2]. Because of the prominence of data-driven tree-based schemes in actual
deployments [75, 81], we devise TT to be data-driven. TT constructs the multicast
tree in a straight-forward manner; each peer subscribes to the neighbor with the
most recent position in the stream. We use this policy for two reasons. First, peers’
positions in the stream are a major factor a peer considers when selecting parents.
Even in schemes where a peer selects parents according to neighbors’ exchange history,
peers’ positions in the stream indirectly play an important role. Second, this policy
contrasts well with TS. When TS employs the rarest-first policy, a peer tends to pull
chunks from neighbors that have the most recent positions in the stream.
The bootstrap and overlay construction in TS and TT are similar to other P2P
video streaming schemes. The system contains a server (source peer), a tracker,
and a number of peers. A new peer obtains the IP addresses of the source and the
tracker using an out-of-band mechanism, such as by browsing a web page. Each peer
maintains a membership table, which consists of peers in the system. A new peer
obtains its initial membership table from the tracker and may contact the tracker for
more peers if the table size drops to a certain level. A peer randomly selects peers
from the membership table to neighbor with. The use of membership tables reduces
the tracker’s load and communication overheads; otherwise peers have to contact the
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 61
constructing a nearby overlay, the tracker randomly selects peers that are close to
the requesting peer. The particular scheme for locating nearby peers is irrelevant to
our analysis. We simply assume the tracker has global knowledge of the system. The
number of neighbors a peer maintains is proportional to its upload capacity, with a
The video stream is split into chunks of size Lck . Each chunk has a unique sequence
number. Each peer maintains a buffer of size Wbuf to hold recently received chunks.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 62
Every interval of length Tbm , each peer advertises its buffer map to neighbors. The
message consists of the most recent chunk’s sequence number n and a vector, whose
ith element indicates whether the peer has chunk n − i. The media player reads
chunks in the buffer and plays them back. If the player is about to play a chunk but
the chunk is unavailable, the player blocks. It resumes playing the chunk when the
chunk arrives or skips to the next available chunk if the peer has Wbbs consecutive
gency window and the rarest chunks in the swarming window to pull from neighbors.
The pull target selection algorithm is similar to that in [52, 86], which has a high
pull success rate. Assume a peer wants to pull m chunks from n neighbors, and each
neighbor has certain chunks. The algorithm starts with chunks that are available
from only 1 peer, then chunks available from 2 peers, and so on. In each step, urgent
chunks are considered before rare chunks, and a random neighbor is selected if more
3
than one qualified neighbor exists. A new peer first swarms until 4
of its swarming
window is filled, then it starts playing after receiving Wbbp consecutive chunks. A peer
has at most n outstanding pull requests. This measure serves as a coarse bandwidth
TT makes the following modifications to TS. Every interval of length Tsubs , a peer
checks whether to switch parents. Neighbors are ranked according to their positions
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 63
in the stream. The neighbor with the most recent position is the candidate parent.
A peer’ child cannot be its candidate parent. A peer switches parents only when the
candidate parent has a margin of Tsm more than the current parent. A child must
subscribe to its parent periodically to keep its status as a child. Peers employ the
CAC and preemption mechanisms when handling subscription requests. When peer
x receives a request from peer y, peer x grants the request if it has spare upload
capacity. Otherwise, peer x compares the upload capacity of peer y with the child z
that has the minimum upload capacity, and replaces child z with peer y if child z’s
capacity is smaller.
A peer pushes a chunk to its children immediately after receiving it and guarantees
the capacity allocated to its children. Peers only pull urgent chunks and chunks
that are Tlate seconds later than their due time. A peer uses the same pull target
selection algorithm as in TS. Note that a peer grants pull requests only if it has spare
upload capacity after serving children. A new peer starts playing after having Wbbp
consecutive chunks.
In this section we study system performance of TS and TT on the random and nearby
overlay by simulation. We use the performance metrics defined in Section 2.7 As we
will show later, system performance is highly related to the shape of propagation
trees, which are described by the tree height and the average root path length of
peers, both in terms of overlay hops. (In this thesis, we say an overlay path is long
or short depending on its hop count.) We only count propagation trees that have
reached more than 90% of all of the peers when taking averages.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 64
We use the following default settings unless specified otherwise. Default values for
system parameters are shown in Table 3.1. We first use the transit-stub model of GT-
ITM [94] to generate 10 substrate networks with 40,050 routers and about 200,000
links, then randomly connect 3000 peers to routers. The cost of router–router links
is assigned by GT-ITM and ranges from 1 to 3000; the cost of peer–router links is 1.
The purpose of using a large number of routers and links is to reflect the complexity
of the Internet. The cost of a neighboring overlay edge (i, j) is the cost of the IP
unicast path between peers i and j. The propagation delays of neighboring overlay
edges are proportional to their costs and normalized to an average of 100 milliseconds.
We assume that the bandwidth of pair-wise connections between peers is limited
by access links rather than by the Internet core. This assumption is used in the
simulation of almost all of the studies on large-scale P2P video streaming applications.
Because users residing in different areas or using different streaming applications may
have different access bandwidth to the Internet, we have simulated with three peers’
upload capacity settings: uniform distribution over range 1–4, 0–6, and range 1–91 .
The upload capacity settings fit areas with good broadband infrastructure. Each peer
attempts to maintain 1.5ui neighbors within the range of 4 to 15, where ui is peer
xi ’s upload capacity. On the nearby overlay, peers select randomly from the closest
10% of peers to neighbor with.
The streaming rate is 512 Kb/s. The chunk size is 16 KB. The intervals that peers
exchange buffer maps and check whether to pull late chunks or switch parents are
1
In this thesis, bandwidth is expressed in units of the streaming rate. The access links of broad-
band Internet users usually have upload capacities between 256 Kb/s and 5 Mb/s. Video streaming
applications usually have a streaming rate between 100 Kb/s and 1 Mb/s.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 65
all set to one second. To emulate a practical setting where peers are asynchronous,
we start peers’ interval timers with a random offset. In TS, peers have a swarming
window of 240 chunks and an emergency window of 5 chunks. In TT, peers have no
swarming window but need a larger emergency window to recover missing chunks.
All peers join the system at time 0 to emulate a “flash crowd”, the source peer
starts streaming at time 5, and the simulation ends at time 600. According to an
empirical study in [33], we set peer churn rate to 10% of the population per minute.
From time 10, one peer is turned off every 0.2 seconds until 600 peers are turned off
at time 130. Then every 0.2 seconds, one peer is turned off and one previously turned
off peer is turned on. Statistics are collected on the 1500 peers that have never been
turned off. At time 5, we dump the neighboring overlay to compute the shortest path
tree. Each test is run 10 times using the 10 substrate networks and the average is
reported.
We report the results of using the U(0, 6) upload setting as the base case, and report
the results of using the other two upload settings only when they lead to different
conclusions.
Tree Cost
Fig. 3.1 shows the average edge cost of overlays and propagation trees. As expected,
the neighbor-with-nearby-peers strategy greatly reduces the tree cost. TT has a
slightly lower tree cost than TS on both overlays. This phenomenon is consistent on
all of the ten topologies, indicating that TT has some capability to select low-cost
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 66
0.8
Random Ov.
TT on Random Ov.
TS on Random Ov.
Nearby Ov.
0.6 TT on Nearby Ov.
TS on Nearby Ov.
0.4
0 1 2 3 4 5 6 7 8 9
Topology Index
Figure 3.1: Average overlay and propagation tree edge cost in TT and TS, normalized
with the average cost of all the pair-wise edges between peers in the system.
paths. Also note that on the nearby overlay, the average cost of propagation tree
edges is slightly higher than overlay edges for both schemes, indicating that high-cost
edges are more heavily used on the nearby overlay.
Table 3.2 summarizes the playback delay and propagation tree height. The chunk
delivery delay is similar on the two overlays. The chunk buffering delay is mainly a
design choice and hence the playback delay is similar on the two overlays. In TS, a
large chunk buffering delay has to be used because the chunk delivery delay has a
large variance. In TT, the main purpose of the chunk buffering delay is to allow peers
to pull chunks that are not pushed, and a delay of of several seconds suffices. In our
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 67
the random overlay than on the nearby overlay for both schemes. Peers’ root path
lengths exhibit a similar pattern. These observations suggest that the tree height and
root path length have little impact on the playback delay and delivery delay for both
schemes.
We are interested in how close propagation trees in TS can approximate the SPT,
in terms of hops, given that each peer’s degree on the tree is bounded by its upload
capacity. Because the degree-bounded shortest path tree (DBSPT) problem is NP-
hard, we use two regular neighboring overlays and configure each peer to have enough
upload capacity such that an SPT is also a DBSPT. Since there is no distributed
algorithm to construct a graph with a given degree sequence, we use the following
heuristics to construct a regular random overlay and a regular nearby overlay. We first
set peers upload capacity to 3 and let them construct the overlay, then reconfigure
each peer’s upload capacity to its degree minus one. There is no peer churn and the
regular overlays remain unchanged during the simulation. Fig. 3.2 shows that the
cumulative distribution of peers’ root path length on propagation trees in TS and on
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 68
0.8
Fraction of Peers CDF
0.6
0.4
Figure 3.2: Cumulative distribution of peers’ root path length in TS when each peer’s
upload capacity is set to its degree minus 1. The y-axis is the fraction of peers whose
root path length is no more than the value plotted on the x-axis.
the SPT are close for the two regular overlays. On average, a peer takes 0.6–0.7 more
hops than the shortest path to the source. This result shows that the propagation
in TS, the trees have a stable height. This phenomenon appears on both the random
overlay and nearby overlay.
We have calculated the clustering coefficient of the random and nearby overlays to
1
be 0.002 and 0.025 respectively. Even on the nearby overlay, on average, less than 200
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 69
15
TT
TS
14
13
Tree Height (Hops)
12
11
10
8
200 400 600 800 1000 1200 1400 1600 1800
Chunk Sequence Number
2-hop paths exist for two adjacent peers2 , which has little impact on peers’ selection
Fig. 3.4 and 3.5 show the chunk loss rate when the substrate Internet links are error-
free and noisy respectively. Different sources report wildly different link error rate
(from less than 0.1% to more than 10%); we use an error rate of 1%. We first
observe that, on both overlays, TS has fewer lost chunks than TT. Second, TT is
more vulnerable to lossy Internet links. When Internet links have an error rate of
1%, as compared to when Internet links are error-free, many more chunks are lost in
TT than in TS. Third, for both schemes, more chunks are lost on the nearby overlay
2
This is because peers do not aggressively select nearby peers. All of the ten overlays are parti-
tioned when peers select from the closest 5% of peers to neighbor with.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 70
0.98
Fraction of Peers CDF
0.96
0.94
0.92
TT on Random Ov.
0.9 TS on Random Ov.
TT on Nearby Ov.
TS on Nearby Ov.
0.88
0% 0.05 % 0.1 % 0.15 % 0.2 %
Chunk Loss Rate
Figure 3.4: Peers’ chunk loss rate when substrate Internet links are error-free. The
y-axis is the cumulative fraction of peers whose chunk loss rate is less than the value
on the x-axis.
TS. In Fig. 3.4, 5.6% fewer peers received all the chunks on the nearby overlay than
on the random overlay in TT (2.4% in TS).
The chunk loss rate has a similar pattern when using the higher capacity setting of
U(1, 9), but varies greatly when using the lower capacity setting of U(1, 4) in TS. On
the random overlay, the chunk delivery rate is less than 85% on 4 of the 10 topologies;
on the nearby overlay, it is 99.9% on 9 topologies and 95.0% on 1 topology.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 71
0.9
Fraction of Peers CDF
0.8
0.7
0.6
TT on Random Ov
0.5 TS on Random Ov
TT on Nearby Ov
TS on Nearby Ov
0.4
0% 0.05 % 0.1 % 0.15 % 0.2 %
Chunk Loss Rate
Figure 3.5: Peers’ chunk loss rate when substrate Internet links have an error rate of
1%. The y-axis is the cumulative fraction of peers whose chunk loss rate is less than
the value on the x-axis.
a source node x0 to a target node xn (see Fig. 3.6) and peers have sufficient upload
capacity, then extend the results to cases where multiple paths exist and the upload
capacity is limited.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 72
x1 x2 xn-1
x0 xn
y0 ym
y1 ym-1
Figure 3.6: Two disjoint paths with n and m hops, n > m. The leftmost peer is
denoted as x0 and y0 and the rightmost peer as xn and ym for convenience.
Notation Comment
g The gap from the checking time to the advertising time
δ A U(0, 1) random variable
fi , Fi The PDF and CDF of the sum of i U(0, 1)
The propagation delay from node xi to node xj (from
dX Y
ij , (dij )
node yi to node yj )
N The population of the P2P system
M The size of the set of nearby peers
Si The set of peers close to node xi
wi The weight of peer xi
ri The radius of set Si
We model the propagation of a new chunk c as follows. The impact of chunk schedul-
ing algorithm is discussed later. Assume peers’ upload capacity and overlay edges’
bandwidth are infinite, i.e., there is no transmission and queuing delay3 . Let dX
ij
denote the propagation delay between peers xi and xj (along path xi , xi+1 , . . . , xj ).
3
Queuing delay is the amount of time a packet waits at the sender to be transmitted; transmission
delay is the amount of time required to push a packet onto a link; and propagation delay is the amount
of time required for the head of a packet to travel from the sender to the receiver over a link.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 73
Each peer advertises its buffer map and checks whether to pull chunks every inter-
val of length T ; the gap g from the check time to the advertise time is constant.
Peers work in an asynchronous manner, i.e., the advertise and check time of peers is
uniformly distributed on [0, T ]. Notations are described in Table 3.3.
A peer pulls a missing chunk immediately after it finds a neighbor that has the
chunk. Since there are no transmission or queuing delays, if peer xi finds a missing
chunk available at peer xi−1 at time 0, it will obtain the chunk at time 2dX
(i−1)i . To
simplify the expression, we assume the interval T to be 1 time unit, i.e., time and
delays are expressed in units of T .
Preposition 1. In the typical swarm-based (TS) scheme, given two disjoint paths
(x0 , x1 , . . . , xn ) and (x0 , y1 , ym−1 , xn ) from a source peer x0 to a target peer xn , the
probability that peer xn pulls chunks from xn−1 rather than from peer ym−1 is
mg + dY0m .
Proof. Let δ̂iX be the random variable denoting the time when peer xi−1 obtains a
chunk c to the time peer xi obtains the same chunk c. Assume peer xi−1 obtains
chunk c at time t. After fetching chunk c, it advertises its buffer map at time t + g.
c is uniformly distributed on (t + g + dX X X
(i−1)i , t + g + d(i−1)i + 1). Therefore δi =
the time from peer x0 obtains a chunk c to the time peer xi obtains chunk c. Then
= Fm+n (m − DnX + Dm
Y
)
Xn − Ym = (n − m)g + (dX Y X Y
0n − d0m ) + (∆n − ∆m ) (3.4)
Pn Pm m+n
where ∆X
n =
X
i=1 δi and ∆Ym = Y
i=1 δi . ∆X Y
n − ∆m has variance 12
; the other two
elements are constant.
From Equation 3.1 and 3.4, we can draw the following conclusions. First, since
T , it has little impact on path selection, i.e., peers cannot select low-cost paths in
TS (see Fig. 3.1). Second, a short path has a significantly larger probability to be
selected over a long path. When g and dX Y
0n − d0m are small enough to be ignored,
P̂n,m has a closed form when m = 1, i.e., the probability that xn retrieves chunk c
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 75
1
from an n-hop path (x0 , x1 , . . . , xn ) rather than a 1-hop path (y0 , ym) is P̂n,1 = (n+1)!
.
When m > 1, the probability can be calculated but has no closed form. For example,
9
P̂3,2 = 40
. Therefore TS has short propagation trees (see Table 3.2 and Fig. 3.2).
Third, a large gap g can dramatically increase the probability of short paths being
selected. For example, when g is set to its maximum value of 1 (i.e., the interval T ),
a 1-hop path will always be chosen over an n-hop (n ≥ 2) path, and a 2-hop path is
23 31
chosen over a 3-hop path with a probability of 24
(compared with 40
when g is 0). In
our simulation, g is set to 1. Although a large d increases the chunk delivery delay,
since pull schemes already have a playback delay of tens of seconds, setting d to its
maximum value seems to be a good trade-off.
We use the fluid traffic model, i.e., the reported position has a continuous space. If
peer xn finds neighbor xn−1 proceeding further in the stream than its parent ym−1 , it
immediately switches to that neighbor, i.e., it becomes the child of peer xn−1 after a
time of length 2dX
(n−1)n . A peer, after receiving a chunk, immediately pushes it to its
children. For example, if peer xi−1 obtains a chunk at time 0, its child xi obtains the
chunk at time dX
(i−1)i . Peer x0 begins streaming as time 0.
Preposition 2. In the typical tree-based (TT) scheme, given two disjoint paths
(x0 , x1 , . . . , xn ) and (x0 , y1 , ym−1 , xn ) from a source peer x0 to a target peer xn , (x0 , . . . , xn−1 )
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 76
and (x0 , . . . , ym−1 ) are two tree branches rooted at x0 , the probability that peer xn sub-
scribes to xn−1 rather than to ym−1 is
0, τ ≥ 1,
P̌ = 1
+τ − τ2
, −1 ≤ τ < 1, (3.5)
2 2
1, τ < −1
where τ = dX Y
0n − d0m .
Proof. Assume dX Y X Y
0n ≥ d0m ; the proof when d0n < d0m is the same. To simplify the
expressions, we assume that peer x0 ’s most recent position in the stream at time 0 is
Similarly, peer ym−1 advertises at time tY1 , and the message arrives at peer xn at time
tY2 = tY1 + dY(m−1)m carrying peer ym−1 ’s playback position tY2 − dY0m .
Since peers are asynchronous, t = tX Y
2 − t2 follows the U(0, 1) distribution. Let
tX Y
1 ≥ t1 , then peer xn will subscribe to peer xn−1 ; otherwise peer xn will subscribe
1 1 τ2
Z
P̌ = (1 − t)dt = −τ + (3.6)
τ 2 2
Equation 3.5 shows that peers in TT choose low-cost paths with a slightly higher
probability (see Fig. 3.1), and the probability increases when using a smaller interval
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 77
T . The gap g between peers’ check time and advertise time is irrelevant in path
selection. In TT, the time difference between when peer xi−1 and its child xi obtain
a chunk is only the propagation delay d(i−1)i , which is one or two orders of magnitude
smaller than the interval T . Compared with pull schemes where each hop incurs a
delay of more than T /2 on average, the edge (xj xj ) seems “short-circuited”. Because
of this short-circuit effect, neighbors’ root path lengths have no direct impact on
the earlier it attaches to the tree. Therefore, the tree height is small initially. With
peer churn, peers switch parents. Because peers’ root path lengths have no impact
on parent selection (i.e., a peer selects parents randomly with respect to neighbors’
root path lengths), the tree height grows.
Section 3.5.2 shows that in TT, peers select low-cost paths with a higher probabil-
ity; we continue to investigate whether peers in TT can retain this capability when
multiple paths exist and peers have limited upload capacity. Let Γn = {y, x1 , . . . , xk }
be the set of non-child neighbors of peer xn with lags dy < d1 < . . . < dk in the
stream behind the source. Let pi denote the probability that peer y is chosen over
peer xi when only neighbor xi exists, then the probability that peer y is chosen when
Qk
all the neighbors exist is P = i=1 pi . Therefore, the existence of multiple paths
reduces peers’ capability to choose low cost paths in TT. When peers have limited
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 78
upload capacity, the value of τ in Equation 3.5 is augmented to include the queu-
ing and transmission delays. When overlay edges have stable bandwidth and peers
employ CAC, the transmission delay is constant given the overlay edge bandwidth.
When peers employ CAC, queuing delays at each peer have a small variance, and the
queuing and transmission delays are proportional to path length. Therefore, peers’
capability to select low-cost paths decreases when peers have limited upload capacity,
but the capability to select short paths increases. In practical settings, these changes
are small because the interval T is typically one or two orders of magnitude larger
than the propagation, queueing, and transmission delays.
Peers may rank neighbors to decide which subscription request to grant when
receiving multiple requests but having insufficient bandwidth. They may also use a
preemption mechanism to deal with the situation when requests from preferred peers
arrive later. In this case, the set Γn contains only high-ranking neighbors, which
further reduces peers’ capability to select low cost paths.
Section 3.5.1 shows that TS can select short paths; we continue to investigate
whether it can retain this capability when multiple paths exist and peers have limited
upload capacity. Assume ~y , ~x1 , . . . , ~xk are disjoint paths from x0 to xn , and let pi
denote the probability that path ~y is chosen over path ~xi when only the two paths
Qk
exist, then the probability that path ~y is chosen when all the paths exist is P = i=1 pi .
When alternate paths are not disjoint, the probability cannot be expressed in a closed
form. As a rule of thumb, adding cross edges between alternate paths ~x1 , . . . , ~xk
decreases the probability that path ~y is chosen. Equation 3.1 indicates that a long
path has a significant lower probability to be chosen, and hence whether TS can
select short paths depends on the number of short alternate paths (we will discuss
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 79
the number of alternative paths in Section 3.6). When peers have limited upload
capacities, although the value of Xn − Ym in Equation 3.4 is augmented to include
queuing and transmission delays at each hop, they are too small to have any impact.
the most impact on system performance, and finally, together with packet propagation
models, analyze these properties’ impact on system performance in the two typical
schemes.
A number of random graph models exist that produce different distributions of nodes
and edges on the graph. Like most Internet topology generators, we use the Erdős–
Rényi model G(N, p) to construct the random and nearby overlays. First N nodes
are randomly placed on a plane, and then for each pair of nodes, an edge is added
with probability p. The Euclidean distance on the plane between two nodes is their
overlay edge’s cost. We use the terms distance and cost interchangeably. Let w
denote the desired average node degree on the neighboring overlay. On the random
w
overlay, the probability p is set to µ = N
. The random graph is expected to have wN
edges (including w self loops). On the nearby overlay, we only add edges between
nearby nodes. Let Si be the set of M nodes that are closest to node xi . Let ri be the
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 80
distance between node xi and the farthest node in Si . For a pair of nodes xi and xj ,
w
the probability p is set to ν = M
if xi ∈ Sj and xj ∈ Si and to 0 otherwise. Since
Nw
ξ = P 2
N
w
i=1 i
The random graph is expected to have wN edges4 . If all the nodes have the same
w
weight w, two arbitrary nodes are adjacent with a probability of µ = N
, and each
node is expected to have w neighbors. If all the nodes have the same weight w, two
w
nearby nodes are adjacent with a probability of ν = M
. If ri > rj , node i may be
adjacent with a node k not in Si but in Sj . Each node has its own expected degree.
The expected number of edges of the graph is unknown as well.
The overlay properties that have the most impact on system performance include
edge cost, diameter, connectivity, and clustering coefficient. Obviously, the nearby
overlay has a lower edge cost and a larger diameter than the random overlay. The
Meridian project [93] measured the delays between 2500 hosts on the Internet. The
average of all the delays was 77 milliseconds. By contrast, the average of the shortest
10% delays is 12 milliseconds and the shortest 5% delays is 7.8 milliseconds. If peers
only neighbor with the closest 10% of peers, the resulting nearby overlay will have
4
PN
This number includes ξ i=1 wi2 self loops.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 81
much shorter edges than a random overlay5 . The random graph has a diameter of
1
O(log N). The nearby overlay has a diameter of O(N α ), where α is the dimension
of the space in which nodes are placed (α equals 2 in our case). The connectivity
of a graph measures how easily a graph can be partitioned. The nearby overlay is
more prone to partitioning than the random overlay, especially in the presence of peer
churn. Temporary partitioning is tolerable in file sharing applications, but greatly
degrades the quality of video streaming service. We find that the system may be
partitioned even when peers neighbor with the closest 10% of peers. The clustering
coefficient measures the extent to which peers cluster together. It is defined as the
number of closed triplets over the total number of triplets on a graph. (A triplet
is three nodes that are connected by either two edges or three edges; in the latter
case, it is called a closed triplet.) The nearby overlay has a much larger clustering
coefficient than the random overlay.
When a neighboring overlay has a high clustering coefficient, for each edge, there
tend to be more short alternate paths. As discussed in the propagation model, this
will have an impact on the probability that a peer chooses the “best” path. We
quantitatively analyze the number of short alternate paths on the random and nearby
overlays in the following two prepositions.
Proof. Let P be the matrix where the (i, j)-th element pi,j denotes the probability
that an edge exists between nodes i and j. Let Q be the matrix where qi,j denotes
the probability that a path of length n exists between node i and j. Let Q′ be the
5
The actual cost saving of the neighbor-with-nearby-peers strategy is significant but less than
these numbers suggested because peers are not evenly placed on the plane.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 82
rj ri
dij
xj xi
Proof. Assume nodes xi and xj have wi and wj neighbors respectively. We first find
the expected number of nodes that are in both Si and Sj . Without loss of generality,
we assume ri ≥ rj . Let cij denote the distance (substrate IP path cost) between
node xi and xj . For an arbitrary node in Sj , the probability ψ that it is in Si is the
proportion of the intersection of the two circles in Fig. 3.7. When cij = 0, the two
sets Si and Sj are equal and ψ is 1. When cij = ri = rj , ψ has its minimum value,
2
√
3
πr 2 − 3r 2
ψ= ≈ 0.12 (3.8)
πr 2
Assuming Si and Sj have M ′ common nodes, the probability Q2,k that nodes xi
and xj is connected via k 2-hop path is
!
M′ ′
Q2,k ≥ (ν 2 )k (1 − ν 2 )M −k , k ∈ [0, M ′ ] (3.9)
k
where the greater sign comes from the fact that nodes xi and xj may be connected via
a node not in Si or Sj . Since the distribution of nodes on the plane and the probability
of an edge existing between two peers are independent, the expected number of 2-hop
ψwi wj
paths is no less than M ′ ν 2 = M
, where ψ ∈ [0.12, 1].
On average, node xj has ψwj adjacent nodes in the intersection area; each node
ψw 2
has M ′ ν 2 = M
2-hop paths to node xi (assuming they have w neighbors). Although
some paths are not edge-disjoint, the number of 3-hop edges is still O(1). The proofs
for l = 2, 3, . . . are similar. Note that the total number of edge-disjoint paths are
bounded by min{wi , wj }.
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 84
Since nearby overlay edges have a lower cost than random overlay edges, any spanning
tree on the nearby overlay will have a smaller tree cost, and hence the propagation
trees in both TS and TT will have smaller costs on the nearby overlay (see Fig. 3.1).
Since the nearby overlay has a larger diameter than the random overlay, the
propagation tree is taller in both TT and TS on the nearby overlay (see Table 3.2).
However, the difference in tree height between the two overlays is larger in TT than
in TS because of the two schemes’ different chunk propagation behaviors. In TT,
the lower edge cost of the nearby overlay makes the value τ in Equation 3.5 smaller,
and hence peers select parents more randomly with respect to neighbors’ root path
lengths. In TS, because peers choose short paths with a significantly large probability,
propagation trees are short unless a substantial number of short alternative paths
exists between a pair of adjacent peers (see Section 3.5.1). On the random overlay,
the number of short alternative paths goes to 0 when N goes to infinity. On the nearby
overlay where peers neighbor with the closest 10% of peers, according to Proposition 4,
the number is only an order of magnitude larger than on the random overlay, which
will have little impact. Therefore, propagation trees in TS are comparable to the
DBSPT on both the random overlay and nearby overlay (see Fig. 3.2).
Despite the propagation tree being taller on the nearby overlay, the average play-
back delay and chunk delivery delay differ only slightly on the two overlays in both
TT and TS (see Table 3.2). In TS, this is mainly because the queuing delay is shorter
at each peer (due to fewer children). In TT, in addition to a shorter queuing delay,
this is also because of the shorter propagation delays of nearby overlay edges.
Because TS uses a large buffering delay, it often has a lower chunk loss rate than
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 85
TT and is more robust when Internet links are erroneous (see Figs. 3.4 and 3.5).
Now we discuss the impact of the overlays on the chunk loss rate. When peers lack
upload capacity to send all the chunks to all the requesting neighbors, or peer churn
and substrate network errors exist, chunks propagate along different paths. When a
neighboring overlay has a higher clustering coefficient, the root path of a peer tends
to be more “similar”, i.e., these paths share more common nodes and edges and have
similar hop counts. Therefore, compared with the random overlay, on the nearby
overlay, chunks tend to propagate along a group of longer but similar paths. This
property has a different impact on the chunk loss rate in TT and TS because of their
different chunk propagation behaviors.
In TT, a peer attempts to pull all the chunks not pushed by its parent. The fewer
chunks that need to be pulled and the higher the pull success rate, the higher the
chunk delivery rate. Because TT has a short playback delay, if a chunk is late at a
peer, its descendants may also need to pull the chunk. On the random overlay, these
peers have different neighbors to pull the chunk from. On the nearby overlay, these
peers share many common neighbors; it is hard for them to find neighbors with the
chunk and spare upload capacity in a short time. Therefore, the pull success rate is
lower and hence more chunks are in TT on the nearby overlay (see Figs. 3.4 and 3.5).
In TS, for a chunk c, at each hop and in each interval, the peer may decide
to pull chunks other than chunk c, causing chunk c to miss its playback deadline.
Therefore, longer root paths on the nearby overlay usually cause more lost chunks in
TS, but because swarm-based schemes typically have a large chunk buffering delay,
the increase is usually not severe (see Figs. 3.4 and 3.5).
Because chunks propagate along a group of similar paths on the nearby overlay, the
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 86
chunk delivery delay has a smaller variance than on the random overlay. If the chunk
buffering delay is set to a value that cannot absorb the variance, the nearby overlay
may results in fewer lost chunks. This is the reason for the unstable performance
in TS when using the lower setting of U(1, 4). By examining the detailed log file,
we find that on the random overlay, peers’ root paths have more diverse hop counts,
especially peers within a few hops to the source peer on the neighboring overlay,
causing many chunks to miss playback deadlines. On the nearby overlay, peers’ root
paths are longer but have smaller variance. Chunks will arrive in time regardless of
which paths they take.
3.7 Summary
In this chapter, we studied packet propagation behavior and the impact of neighbor-
the two typical schemes on a given overlay and to analyze the impact of the two
types of overlays on system performance. We found that chunks propagate in dif-
ferent manners in the two schemes. In the swarm-based scheme, peers have a large
probability to pull chunks from short paths, and propagation trees are comparable
to DBSPT. In the tree-based scheme, because of the short-circuit effect, peers tend
to select parents randomly with respect to neighbors’ hop counts to the source peer
on the neighboring overlay, and hence propagation trees have a large height. The
neighbor-with-nearby-peers strategy reduces the propagation tree cost but increases
CHAPTER 3. UNDERSTANDING NEIGHBORING STRATEGIES 87
the risk of system partitioning and causes more lost chunks. The different chunk
propagation behaviors of the swarm-based and tree-based schemes cause chunk loss
4.1 Introduction
titioning, a multicast tree with a large height, and more lost chunks in the presence
of peer churn and Internet link errors. In this chapter, we propose a neighboring
strategy to construct a hierarchical overlay and a network-driven tree-building algo-
rithm. Our idea is to first identify the desired shape of propagation trees, then to
construct the neighboring overlay to be the super graph of these trees, and to use
the tree-building algorithm to construct trees with the desired shape on the neigh-
boring overlay. On the hierarchical overlay, most edges are between nearby peers to
reduce network traffic, but a small fraction of edges are rewired to remote peers in a
way that the neighboring overlay exhibits a hierarchical structure. The tree-building
The swarm technique is only used for error-correction and has no impact on the shape
of propagation trees. Our scheme allows for a flexible definition of network cost and
presents the tree-building algorithm. Section 4.6 presents the error-correction mech-
anism. Section 4.7 evaluates the performance. Section 4.8 concludes this chapter.
A brief introduction of P2P live streaming schemes has been given in Section 2.4.
The techniques to find nearby peers are given in Section 2.5. There exist a number
nodes. Both a large diameter and a high clustering coefficient have negative impacts
on the performance in P2P live streaming applications.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 90
Layer h
Layer h-1
Layer 1
Figure 4.1: Hierarchical overlay. Higher layers contain peers with higher bandwidths.
Layer 1 contains short edges; upper layers contain rewired edges.
Tree
We desire a short, low-cost multicast tree that is robust in the presence of peer churn.
Fully-distributed P2P live streaming schemes are mesh-first, and to build a desired
into layers depending which segment their bandwidths fall into. Naturally, peers of
each layer are evenly distributed on the plane. We first add short edges between
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 91
nearby peers then rewire a small fraction of edges to form a hierarchical overlay as
shown in Fig. 4.1. We design the neighboring overlay to have and retain the following
properties in the presence of peer churn. First, high-bandwidth peers are evenly dis-
tributed on the neighboring overlay, i.e., given a layer i and hop count j, the number
of layer i peers in the clique within j hops to any peer x are similar. This property
is necessary to utilize peers’ upload bandwidth. Second, long edges are evenly dis-
tributed on the neighboring overlay and exist between high-bandwidth peers with a
greater probability than between low-bandwidth peers. This applies to both intra-
and inter-layer edges. Third, between peers in the same layer, the probability that an
edge exists is inversely proportional to the distance. The lower the layer, the larger
peers. Note that even for peers at high layers, most children are still nearby.
Similar to most P2P live streaming schemes, we use an out-of-band mechanism to find
the video source and the tracker. We assume the existence of a network positioning
scheme (e.g., GNS [46]) such that each peer knows its own network coordinate. Upon
joining the system, peers request a membership table from the tracker and report their
network coordinates and upload bandwidth to the tracker. The tracker maintains a
repository of size Mt . The repository should be large enough to be a representative
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 92
sample of the whole population, i.e., given a peer, the distribution of peers in the
repository is the same as in the whole population with respect to the distance to the
peer and upload bandwidth.
The tracker uses Algorithm 1 to compose a membership table for peer i when
contacted by peer i, and possibly adds peer i to the repository. The tracker first
selects remote peers. Each peer j in the repository is selected with a probability p
γ − βu
1 d
p= e − κu (4.1)
Mt
where γ, β and κ are constant parameters (lines 2–4). The tracker then greedily
selects nearby peers for peer i (lines 5–8). Peer i randomly selects peers from its
membership table to neighbor with. The number of neighbors peer i maintains is
proportional to its upload capacity with a minimum of 4.
Algorithm 1 The algorithm that the tracker uses to compose a membership table
for a requesting peer i
Input: rep, the tracker’s repository
Input: Mp , the size of the membership table
Output: tab, the membership table for peer i
1: tab ← φ
2: for j in rep do
3: if prob(i, j) > random() then
4: tab.insert(j)
5: rep.sort by cost(i)
6: for j in rep do
7: if tab.size() ≥ Mp then break;
8: if j 6∈ tab then tab.insert(j)
Section 4.3. We use an exponential function for two reasons. First, it has the desired
attenuation property. We desire the probability to attenuate sharply when bandwidth
or distance is large and flattens afterwards. Second, the pair-wise distances between
neighboring overlay is independent from the size of the tracker’s repository. Parameter
γ controls the fraction of rewired edges over the membership table size; a larger γ
1
results in a larger fraction of rewired edges. The factor e− βu controls the number of
d
intra- and inter-layer edges between high-bandwidth peers. The factor e− κu ensures
that (1) at any layer, the probability that an edge exists between two peers is inversely
proportional to their distance, and (2) with lower bandwidth, distance has a larger
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 94
Probability
0.4
0.3
0.2
0.1
00 1
0.2 0.8
0.4 0.6
0.6 0.4
0.8 0.2
Distance 1 0 Bandwidth
Figure 4.2: Normalized probability that a long edge exists between two peers. The x
and y axes are normalized bandwidth and distance between the two peers, β = 1, κ =
2
grows with decreasing distance. The proposed formula is less sensitive to κ than to
γ or β. A value between 1–10 for κ provides a good trade-off. Fig. 4.2 shows the
normalized probability distribution when β = 1, κ = 2.
The desired properties are maintained in the presence of peer churn as long as
peers’ arrivals and departures are independent from their bandwidths and positions
on the substrate Internet. A value of several thousand for the repository size Mt is
representative enough. The algorithm has a complexity of O Mt (log Mt + 1) , and
the workload can be handled by an ordinary PC.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 95
0 1
2.1 2.8
3 8
2.1 2.1
4 2
1.4 3.5
5 9
2.1 1.4
7 6
Neighbourhood relationship
1.4 2.1
Parent-child relationship
Figure 4.3: Neighboring overlay and subscription tree. The number at each peer
indicates the peer’s upload bandwidth.
Peers use a modified DV-style algorithm, called TreeClimber, to build a short and
balanced multicast tree out of the neighboring overlay. Each peer tries to “climb”
towards the video source, but only peers with the highest upload bandwidth can hold
to neighbors. The buffer map consists of the most recent chunk’s sequence number
n and a vector, with the ith element indicating whether the peer has chunk n − i.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 96
The buffer map message also contains a tree-hops field, which is the number of hops
from the peer to the video source along the subscription tree. If the peer is not on
the subscription tree, its tree-hops is set to the maximum value of 128.
Every interval of length Tsubs , a peer checks whether to switch parents in order to
reduce its tree-hops to the video source. Algorithm 2 shows the greedy algorithm that
a peer uses to select its parent. Neighbors are ranked according to their tree-hops,
and the neighbors with the lowest tree-hops are candidate parents (lines 1–5). A peer
prefers its current parent to reduce parent switches (line 6). However, if its current
parent is not a candidate parent, the peer will randomly select one from the candidate
parents (line 8). To reduce the occurrence of loops, a peer does not select its child
as the new parent (line 7). If the newly selected parent is not the current parent,
the peer will send a subscription request, together with its own upload capacity, to
the new parent immediately. Otherwise, the peer will send a subscription request
to its current parent only when the last subscription expires, i.e., the peer sends
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 97
subscription requests to its current parent every interval of length Tsexp to keep its
status as a child.
Algorithm 3 The algorithm that a peer uses to handle subscription requests from
peer s
1: if s is child or has spare bandwidth() then
2: send(s, ACCEP T )
3: else
4: d ← calc disown target(s)
5: if d 6= s then
6: send(s, ACCEP T )
7: send(d, DISOW N)
8: else send(s, REJECT )
Algorithm 3 shows the algorithm that peers use to handle subscription requests.
Peers employ the CAC and preemption mechanisms. A peer divides its upload band-
width into push and pull bandwidths, and accepts children if it has spare push band-
width (lines 1–2). If a peer receives subscription requests from more than one peer,
it accepts the peer with the largest upload bandwidth. The requesting peers’ upload
bandwidth is carried in the requests. A peer will preempt a child if it receives sub-
scription requests from neighbors with higher upload bandwidth (lines 4–8). Suppose
a low upload bandwidth peer l sends a request to peer t earlier and becomes a child.
Then peer t receives a request from a high upload bandwidth peer h but has no spare
push bandwidth. Peer t will accept peer h and disown the child with the lowest up-
load bandwidth. In Fig. 4.3, if peer 4 arrives earlier than peer 1 and attaches to peer
parent. In Fig. 4.3, if peer 1 leaves, peers 2 and 3 start searching for a new parent
immediately but peers 4, 5, and 6 will wait.
We use tree-hops, the hops of the path from a peer to the video source along the
subscription tree, rather than hops of the shortest path of the neighboring overlay
used by traditional DV protocols. DV protocols require that each node on the neigh-
boring overlay is capable of accepting d − 1 children, where d is the node’s degree on
the neighboring overlay. This requirement is not practical in a P2P live streaming sys-
tem, where peers have limited upload bandwidth. When peers have sufficient upload
bandwidth, our algorithm builds a MST on the neighboring overlay. When peers are
short of upload bandwidth, our algorithm provides a heuristic to the DBMST prob-
lem. In Fig. 4.3, peer 4’s hop count is 1 in the MST and 3 in the DBMST. Note that
the DBMST problem is NP-hard [63].
example, the routing information protocol (RIP) [44] uses split-horizon with poisoned
reverse while the border gateway protocol (BGP) [57] appends the path information
to routing messages. Even a small number of forwarding loops are disastrous because
packets will circle in the loop until their time-to-live field expires. In P2P live stream-
ing systems, every chunk has a unique sequence number. Peers can ignore received
duplicated chunks, and send a chunk to a child only once to stop a chunk from circling
in a loop. Therefore loops can be tolerated if their frequency can be kept at a low
level.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 99
Loops are caused by peer churn and asynchronous operations of peers. In Fig. 4.3,
if peer 1 leaves and peer 3 detects peer 1’s departure earlier than peer 2, peer 3 requests
peer 2 to be a parent. When peer 2 detects the departure of peer 1, it requests peer
5 to be a parent. Thus, peers 2, 3, and 5 form a loop. Several factors in TreeClimber
help to keep the occurrence of loops at a low level: the greedy algorithm that a peer
uses to select its parent, an interval of one second that tree-hops are advertised, and
a minimum of four neighbors a peer has. In Fig. 4.3, peer 3 will find peer 8 to be a
better parent within several buffer map advertisement intervals should loop between
peers 2, 3, and 5 occur.
TreeClimber uses a simple strategy to stop chunks from circling in a loop. A peer
pushes a chunk to its children only upon receiving the chunk for the first time. A
peer c can specify from which sequence number n it wishes to receive chunks in the
subscription request to peer p. Peer p will push chunks whose sequence number is
larger than n. However, if peer p has proceeded to a position later than n when
receiving the request, it will not push the chunks ahead of n to peer c. Peer c must
IP multicast protocols and early tree-based schemes that aim to replace IP multicast
are slow to repair the multicast tree when nodes leave. Because these schemes cannot
assume packets arrive with a constant rate, peers cannot detect the failures of parents
by monitoring packet arrivals. In order to avoid forwarding loops, peers cannot have
backup parents; they have to wait until the routing table stabilizes to find a new
parent.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 100
Recent P2P live streaming applications only target applications that have near-
constant streaming rate. A peer monitors packet arrivals from its parent and can
quickly detect the failure of its parent. Each packet has a unique sequence number,
and forwarding loops can be avoided at the forwarding plane. These are the same in
data-driven and network-driven schemes.
In data-driven tree-based schemes, a peer knows the buffer maps and spare upload
bandwidth of its neighbors and can quickly pick a new parent should its current parent
leave. In network-driven tree-based schemes, if a peer could pick a new parent as fast
as in data-driven schemes, tree-repairing would be equally fast. In TreeClimber, the
tree-hop information of neighbors is carried in buffer map messages, and hence tree-
4.6 Error-Correction
A peer has to pull chunks for two reasons: Internet link errors and peer churn. A
chunk may get lost during transmission because of Internet link errors. When a peer’s
parent leaves, the peer needs some time to find a new parent. When it find a new
parent, the parent may proceed to a later position and will not push the chunks it
has already pushed to the new child. We use the swarm technique as a multi-point
re-transmission mechanism to pull missing chunks. Unlike in data-driven schemes
where the swarm technique is used for both tree-building and error correction, the
swarm technique is used only for error-correction in our scheme.
Each peer maintains a buffer of size Wbuf to hold recently received chunks. Peers
have a small emergency window of size Wurg , consisting of chunks approaching play-
back deadlines. Every interval of length Tpull , a peer requests all the missing chunks
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 101
in the emergency window. The targets of requests are randomly chosen from neigh-
bors. After examining the simulation results, we decided to eliminate the swarming
window. In TreeClimber, the push bandwidth is guaranteed by the CAC scheme; pull
operations use the residual bandwidth. Upon receiving a pull request, a peer replies
with the chunk if it has spare upload bandwidth; otherwise, it rejects the request.
Each peer maintains a sliding window of late chunks. A peer monitors chunk
arrivals to estimate arrival times of future chunks. A chunk is considered late if it has
not arrived until an interval of Tlate after its due time. Every interval of length Tpull , a
peer pulls all the late chunks in order of urgency (with respect to playback deadlines).
Peers advertise their residual bandwidth to neighbors in buffer map messages. We
use an innovative pull mechanism that has a high success rate of fetching them.
The scheduling algorithm attempts to maximize the number of chunks pulled while
keeping load balanced among neighbors.
Algorithm 4 shows the algorithm that a peer uses to select the neighbors to pull
chunks from. A peer knows the chunks each neighbor has and the residual bandwidth
of the neighbor at the neighbor’s last advertisement time. A peer first, for each chunk,
calculate the number of neighbors that have the chunk. Starting with the chunks that
are only available at one neighbor, the peer assigns a pulling target to each chunk.
If a chunk is available at only one neighbor, that neighbor is selected. If a chunk is
available at more than one neighbor, the peer selects one randomly.
In this section, we compare the performance of TreeClimber with the typical tree-
based scheme (called TT) introduced in Chapter 2, and compare the performance of
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 102
Algorithm 4 The algorithm that a peer uses to select neighbors to pull missing
chunks from
Input: chunks[M], the chunks to be pulled
Input: res bw[N], the residual bandwidth of neighbors
Input: avail[M][N], a matrix denoting which chunks are available at which neighbors
Output: out, a list of (c,t) pairs denoting which chunks to pull from which neighbors
1: for i in [0, M) do
2: avai nei cnt[i] = num avail nei(chunks[i])
3: n ← 1
4: while n ≤ N do
5: m←1
6: while m ≤ M do
7: if avail nei cnt[m] == n then
8: k ← rand sel nei(chunks[m])
9: out.push back(m, k)
10: avail nei cnt[m] ← −1
11: update residual bw(k)
12: if res bw[k] < 1 then
13: update avail matrix()
14: n←1
15: m←0
16: break
17: else m + +
18: else m + +
19: if m == M then n + +
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 103
TreeClimber on the hierarchical overlay with that on the random overlay and small-
world overlay.1
We use the same simulation setting as described in Section 3.4 except for the following.
In TreeClimber, a peer advertises its tree-hops in buffer map messages to neighbors
every interval of length Tbm , and if a neighbor has fewer tree-hops than its current
parent, it will request the neighbor to be the new parent. A late-arriving peer is
We report the results of using the bandwidth setting of U(0, 6). The results of using
the bandwidth setting of U(1, 4) and U(1, 9) lead to the same conclusion.
Fig. 4.4 shows the normalized propagation tree cost of TreeClimber on the hier-
archical overlay when the bandwidth setting is U(0, 6) and compares it with that of
TT. TreeClimber has a slightly higher cost, indicating that the long edges are more
heavily used in TreeClimber. This is expected because we want packets to quickly
propagate from the video source using these long edges.
1
Hierarchical overlays also have the small-world graph properties (i.e., a high clustering coefficient
and a small diameter). In this thesis, we call overlays where a small fraction of edges are rewired
randomly small-world overlays, and call overlays where a small fraction of edges are rewired according
to Equation 4.1 hierarchical overlays.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 104
0.6
0.4
0.2
TT
TC
0
0 1 2 3 4 5 6 7 8 9
Topology Number
Figure 4.4: Normalized propagation tree cost of the hierarchical overlay when the
bandwidth setting is U(0, 6).
18
16
Propagation Tree Height
14
12
10
8
TT
TC
6
0 1 2 3 4 5 6 7 8 9
Topology Number
Figure 4.5: Average propagation tree height on the hierarchical overlay when the
bandwidth setting is U(0, 6).
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 105
0.6
0.4
0.2
TT
TC
0
5 6 7 8 9 10
Playback Delay (sec)
Figure 4.6: Playback delay CDF on the hierarchical overlay when the bandwidth
setting is U(0, 6).
Fig. 4.5 shows the propagation tree height of TreeClimber on the hierarchical
overlay when the bandwidth setting is U(0, 6) and compares it with that of TT.
TreeClimber has a significantly lower tree height than TT, as expected.
Fig. 4.6 shows the playback delay of TreeClimber on the hierarchical overlay when
the bandwidth setting is U(0, 6) and compares it with that of TT. Although Tree-
Climber has a lower tree height, its playback delays are similar to TT. This is because
in TreeClimber, the inner nodes on the tree have more children and hence longer queu-
ing delays.
Fig. 4.7 shows the delivery-rate-user-ratio of TreeClimber on the hierarchical over-
lay when the bandwidth setting is U(0, 6) and compares it with that of TT. More
peers received all the chunks in TreeClimber than in TT. This is because TreeClimber
has a higher success rate in pulling chunks due to the propagation tree shape. A peer
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 106
0.9
Fraction of Peers CDF
0.8
0.7
0.6
TT, e=0%
0.5 TC, e=0%
TT, e=1%
TC, e=1%
0.4
1 0.998 0.996 0.994 0.992 0.99
Chunk Delivery Rate
is more likely to have a neighbor that has the missing chunk in TreeClimber than
in TT. In TreeClimber and TT, most chunks are pushed along the subscription tree.
When the Internet links are error-free, approximately 1–2% chunks are pulled. When
Internet links have errors, 1% more chunks are pulled. To make things worse, 1% of
the pulled chunks are lost in transmission again. The playback delay is too small to
pull missing chunks twice, and hence much fewer peers receive all the chunks when
Internet links have errors.
lays
We now report the results of using the bandwidth setting of U(1, 4) and U(1, 9). Some
0.8
0.6
0.4
0.2
Random Overlay
Small-World Overlay
Hierarchical Overlay
0
0 1 2 3 4 5 6 7 8 9
Topology Number
(a) Bandwidth setting is U (1, 9)
1
Normalized Chunk Tree Cost
0.8
0.6
0.4
0.2
Random Overlay
Small-World Overlay
Hierarchical Overlay
0
0 1 2 3 4 5 6 7 8 9
Topology Number
(b) Bandwidth setting is U (1, 4)
Figure 4.8: Normalized propagation tree cost of the hierarchical overlay, small-world
overlay, and random overlay.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 108
Fig. 4.8 compares the normalized propagation tree cost of the hierarchical overlay,
small-world overlay, and random overlay when the bandwidth setting is U(1, 4) and
U(1, 9). Under the loose bandwidth constraints, the propagation tree cost of the
small-world overlay is slightly lower than on the hierarchical overlay. Under the tight
bandwidth constraints, long edges are used less often because peers have fewer choices,
and the propagation tree cost is similar on the small-world overlay and hierarchical
overlay.
Table. 4.2 compares the propagation tree height on the hierarchical overlay, small-
world overlay, and random overlay when the bandwidth setting is U(1, 4) and U(1, 9).
Under loose bandwidth constraints, the propagation tree height is similar on the
hierarchical overlay and on the random overlay, and is lower than on the nearby
overlay. However, under tight bandwidth constraint, the propagation tree height is
lower on the random overlay than on the hierarchical overlay.
To investigate the causes, we assume that each peer has sufficient upload band-
width and compute the SPT rooted at the video source on the three overlays, which
is shown in Table. 4.2. Although the three overlays asymptotically have a diameter of
O(log N), the random overlay actually has a significant smaller diameter, especially
hierarchical overlay than on the small-world overlay is that rewiring edges incident
to large-degree peers results in a smaller diameter than rewiring randomly, and long
edges play a more important role in spreading chunks across the neighboring overlay
on the hierarchical overlay.
Fig. 4.9 compares the playback delay on the hierarchical overlay, small-world over-
lay, and random overlay when the bandwidth setting is U(1, 4) and U(1, 9). Because
peers buffer 5 seconds before starting to play, the playback delay differs only slightly.
Under loose bandwidth constraints, the difference of playback delays on the three
overlays is very small compared to the absolute value of playback delays. Under tight
bandwidth constraints, the difference between the random overlay and the hierarchi-
cal overlay remains small. We find that queuing delays at peers are larger than the
propagation delays of Internet links, which only accounts for 13%, 17%, and 34% of
the total delay of delivering packets from the source to peers on the small-world over-
lay, hierarchical overlay, and random overlay respectively. Even on the small-world
overlay where the delay is the largest, chunks can reach most peers in 1 second.
Fig. 4.10 compares the chunk delivery rate on the hierarchical overlay, small-world
overlay, and random overlay when the bandwidth setting is U(1, 4) and U(1, 9) and
Internet links are error-free. More chunks are lost on the small-world overlay. As
we have analyzed in the previous chapter, because the small-world overlay still has a
large cluster coefficient, the success rate to pull a missing chunk is lower on the small-
world overlay than on the other two overlays. On the hierarchical overlay, because
packets first propagate along long edges, the propagation tree is shorter and a peer
has a better chance to pull missing chunks, but the chance is still not as good as on
0.8
Fraction of Peers CDF
0.6
0.4
0.2
Random Overlay
Small-World Overlay
Hierarchical Overlay
0
5 5.5 6 6.5 7 7.5 8
Playback Delay (sec)
(a) Bandwidth setting is U (1, 9)
0.8
Fraction of Peers CDF
0.6
0.4
0.2
Random Overlay
Small-World Overlay
Hierarchical Overlay
0
6 8 10 12 14 16 18
Playback Delay (sec)
(b) Bandwidth setting is U (1, 4)
Figure 4.9: Playback delay CDF on the hierarchical overlay, small-world overlay, and
random overlay.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 111
0.98
0.96
0.94
0.92
Random Overlay
Small-World Overlay
Hierarchical Overlay
0.9
1 0.998 0.996 0.994 0.992 0.99
Chunk Delivery Rate
(a) Bandwidth setting is U (1, 9)
0.9
Fraction of Peers CDF
0.8
0.7
0.6
0.5
0.4
10 0.7
Tree Height
SPT Height
Normalized Tree Cost
9 0.6
7 0.4
6 0.3
5 0.2
0.02 0.04 0.08 0.16 0.32
Percentage of Long Edges
Figure 4.11: Impact of fraction of rewired edges on the hierarchical overlay when the
bandwidth setting is U(1, 9).
The fraction of long edges has a great impact on the neighboring overlay. Rewiring
1% of edges to random nodes in a regular graph can reduce the characteristic path
length by 80% [72]. However, in a P2P network, a larger fraction is necessary to
prevent system partitioning in the presence of peer churn. Fig. 4.11 shows the impact
of the fraction of rewired edges on the propagation tree cost and height. The tree
cost is proportional to the fraction but the tree height decreases marginally when
the fraction is larger than 15%. Rewiring 5–10% long edges usually provides a good
trade-off. When peers’ upload bandwidths are larger, a smaller fraction can be used.
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 113
0.9
0.7
0.6
Rate
The primary trade-off in pull schemes is between playback delay and video quality.
Buffering more chunks before playing improves the chunk delivery rate. In our scheme,
1–2% of chunks are pulled (i.e., obtained by the swarm technique). The delivery rate
is determined by the success rate to pull missing chunks. Although a longer buffering
delay translates into a longer playback delay, the fraction of users receiving all the
chunks becomes higher. Fig. 4.12 shows the trade-off between the playback delay and
chunk delivery rate. At a buffering time of 5 seconds, the fraction of such users is
63%, as opposed to 92% when the buffering time is 8 seconds. We remark that further
increasing the buffering time only marginally improves chunk delivery. Fig. 4.12 also
shows that, when the neighboring overlay has fewer edges, more edges should be
rewired. New chunks can spread faster and reach even distribution in the system in
CHAPTER 4. ISP-FRIENDLY P2P LIVE STREAMING 114
a shorter time.
4.8 Summary
fraction of long edges are added and used by the DV-style tree-building algorithm
to quickly distribute packets from the video source to each part of the neighboring
overlay. We compared our scheme with the typical tree-based scheme described in the
previous chapter and the random and small-world overlays. Simulation results show
our scheme outperforms the typical data-driven tree-based scheme and the hierarchi-
cal overlay outperforms the small-world overlay. More users received all the chunks
in TreeClimber than in the typical data-driven tree-based scheme. The network cost
1
of the hierarchical overlay is only 3
of that on the random overlay, and the chunk
delivery rate is close to that on the random overlay under loose upload bandwidth
constraints.
Chapter 5
5.1 Introduction
The past few years have witnessed significant growth of multimedia communication
applications on the Internet. These applications can only tolerate a few hundred
milliseconds of delay at best, and unlike audio communication applications, they
are sensitive to packet loss. Forward error correction (FEC) codes are the preferred
error correction technique for multimedia communication applications, and the Reed
Solomon (RS) codes are the most widely used FEC codes. FEC can be classified into
systematic FEC and non-systematic FEC. Codes that include the original packets in
the output are systematic and codes that do not are non-systematic. With systematic
FEC codes, after FEC correction, the packet loss ratio is lower and the packet losses
are less bursty when compared to non-systematic FEC codes. Both properties are
losses on Internet links. This burstiness of packet losses is usually modeled using the
Gilbert channel model [23] or its variants. The performance of non-systematic RS
codes on a single Gilbert channel is studied in [17], and the performance of systematic
RS codes on a 2-state Markov chain channel, which is a widely used variant of the
Gilbert channel, is studied in [21]. Results show that the performance of FEC is
greatly jeopardized by the burstiness of packet losses of a communication channel.
A number of studies [6, 18, 34, 80] propose that a sender uses multiple paths to
send packets to a receiver in a round-robin fashion to combat bursty packet losses of
Internet links. These schemes assume the existence of multiple disjoint paths, which
are stable during the communication process. Multimedia communication applica-
tions typically use a set of intermediate nodes to establish multiple overlay paths
between two communication parties. The most feasible option for these intermediate
nodes is to use other users in the application, i.e., users are organized into a peer-to-
peer (P2P) network and a set of peers are used as the intermediate nodes between
two communication parties. Indeed, many communication applications, most notably
Skype [100], use P2P networks. However, in a practical P2P network, peers may leave
abruptly at any time. Using dynamic peers as intermediate nodes for path diversity
may cause additional lost packets when these peers leave. Besides, two paths that
are disjoint from the perspective of the overlay may not be disjoint from the perspec-
tive of the substrate Internet1 . Consequently, enough disjoint substrate paths may
not exist between two communication parties or even no disjoint paths at all. It is
1
In this thesis, unless otherwise specified, we distinguish whether two paths are disjoint or not
from the perspective of the substrate Internet.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 117
unknown whether using peers to establish multiple overlay paths can really improve
FEC performance or under what conditions the performance can be improved, and
path is used. Since a sender may not be able to find enough disjoint substrate paths
to a receiver, we study the situations where the sender uses a limited number of
disjoint paths, or a large number of non-disjoint paths, in addition to the situation
when the sender is able to find enough disjoint paths. We model Internet links, with
lengths, and where a sender lacks the knowledge of which paths are disjoint and
sends packets via a set of random paths. We find that although using dynamic peers
for path diversity often results in a lower post-FEC loss ratio, conditions do apply.
The interplay of a number of factors—the Internet links’ loss ratio and burst length,
the number of disjoint channels, the lifespans of peers, the time necessary to detect
peers’ departures, and the coding parameters—determines the performance of FEC.
Guidelines exist, but no simple formula exists to determine whether the use of peers
for path diversity can be justified. For example, using peers to establish multiple
2
We have developed methods to compute the post-FEC loss ratio for both systematic and non-
systematic codes. In this chapter, we focus on systematic codes because they can achieve better
video quality. Please refer to Appendix A for non-systematic codes.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 118
paths will not reduce the post-FEC loss ratio more than using only the direct path
when Internet links have a low packet loss ratio or certain coding parameters are
used. An application should carefully evaluate the gain of FEC performance before
using peers for path diversity or deciding on coding parameters.
The remainder of this chapter is organized as follows. Section 5.2 introduces re-
lated work. Section 5.3 describes how to use peers to establish multiple paths between
two communication parties. Section 5.4 analyzes the post-FEC packet loss ratio when
a single channel is used; the results serve as the benchmark. Sections 5.5, 5.6, and 5.7
analyze the post-FEC packet loss ratio in three situations—where there exist suffi-
cient disjoint channels, a limited number of disjoint channels, and a large number
Elliott [17] pioneered the study of FEC performance in the context of telephone net-
works. He used the Gilbert channel model [23] and introduced two general approaches—
a recursive approach and a generating function approach—to compute the probability
that m errors occur in a block of n bits after FEC correction on a single channel.
However, the approaches in [17] do not distinguish the loss of original bits and FEC
bits and hence only apply to non-systematic FEC codes. Frossard [21] uses a 2-
state Markov chain channel model and systematic FEC codes. He uses the recursive
approach to compute the post-FEC packet loss ratio and burst length for a single
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 119
channel. However, we find his method to be inaccurate3 . Li et al. [36] use the same
2-state Markov chain channel model and systematic RS(n, k) codes as [21]. They
assume that a group of pictures (GOP) has g blocks and a block has k packets. They
use the distortion model in [35] to evaluate video distortion by computing the prob-
ability of each possible sequence of gk packets of a GOP. Yu et al. [77] assume that
packet losses are caused by a single bottleneck node. A number of senders encode
packets with a non-systematic FEC code and send encoded packets to their respec-
tive receivers via the bottleneck node, which is modeled as a G/M/1/K queue. The
post-FEC packet loss ratio is computed using a recursive method.
The general idea of using multiple paths to combat bursty loss has been explored
in a number of research efforts [6,18,34,80]. Zhang et al. [80] use a Bernoulli channel
model (i.e., packet losses are independent and hence not bursty) and non-systematic
FEC codes. They define video distortion as the mean square error of the original
packets and the decoded packets (after FEC correction) of an FEC block, and compare
the distortion when using multiple paths with FEC, a single path with FEC, and
multiple paths without FEC. Begen et al. [6] use a 2-state Markov chain channel
model (same as [21]) and multiple description coding (MDC). They formulate a path
selection problem to maximize video quality. Fashandi et al. [18] use an s-state
continuous-time Markov chain channel model. In each state i, the chain has a rate
∀i ∈ (1, N), bi ≤ Bi .
The work of Li et al. [34] is closest to ours. They use systematic FEC codes and
N disjoint Internet paths, which are established by the use of an overlay network and
the traceroute tool. They use an s-state discrete-time Markov chain channel model.
In each state i, the chain has a probability of pi,i+1 to go to state i + 1 (except at the
state s − 1 it has a probability of ps−1,s−1 to go to itself) and a probability of pi,0 to go
to state 0. They use a heuristic method to estimate the post-FEC loss ratio, which
is based on two assumptions: (1) both the size n of FEC blocks and the number N
of disjoint paths are large, and (2) the loss of original packets and FEC packets of an
FEC block are independent and have a normal distribution. Both assumptions are
Figure 5.1: Network model. The sender encodes k = 7 original packets into an FEC
block of size n = 8 by appending an FEC packet and sends encoded packets via N
channels in a round-robin fashion. The receiver can reproduce all the original packets
if no more than n − k = 1 packet is lost in transmission.
membership table, which consists of peers in the P2P network, by contacting a well-
known tracker or by contacting some peers already in the system. A peer maintains
the size of its membership table within in a certain range (e.g., between 50 and 100),
and contacts the tracker or peers in its membership table for more peers if the table
size drops below this range. To reduce communication overhead, a peer does not
exchange keep-alive messages with peers in its membership table, or it uses a large
interval (e.g., one keep-alive message every 30 minutes). Therefore, a peer may not
know that some peers in its membership table have already left.
Two peers can communicate using the direct path (i.e., the shortest IP unicast
path between them) or via a number of care-of (CO) peers to achieve path diversity
(see Fig. 5.1). We call a path without a CO peer a unicast channel and a path with
a CO peer a CO channel. When a sender and a receiver initiate a communication
session, they try to find CO peers that are located between them on the Internet
(i.e., the sum of propagation delays from a CO peer to the sender and the receiver
is close to the propagation delay between the sender and the receiver). There are
many schemes for the sender and receiver to find these peers in a distributed P2P
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 122
network. For example, they can use virtual network position schemes such as [15] and
a center server that maintains all the peers’ network positions or distributed position-
based routing schemes [24] to do so. The sender specifies the destination peer in a
packet and sends the packet to one of the CO peers, which immediately forwards the
packet to the destination peer. (We only discuss one direction of the communication;
the other direction is the same.) When multiple channels exist between a sender
and a receiver, the sender spreads packets across all the channels in a round-robin
fashion. Assuming there are N channels, the sender will send the (iN + j)-th packet,
i = 0, 1, . . ., via the j-th channel.
In a P2P network, peer departures (and arrivals) are typically modeled as a Poisson
The Internet routes packets to their destination IP addresses via the shortest IP
paths. When a sender sends packets to a receiver via CO peers, from the perspective
of the substrate Internet, the IP paths between the sender and the receiver are the
two shortest path trees (SPTs) that root at the sender and the receiver respectively
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 123
Parameter Comment
n, k The number of total packets and original packets in an FEC block
with RS(n, k) coding
N The number of disjoint paths
d The probability that a peer leaves in any time unit
s The time the sender takes to detect a CO peer’s departure
p, q The parameters of the 2-state and (s + 2)-state Markov chains
e, (ec ) The packet loss ratio of unicast (or CO) channels
l, (lc ) The average burst length of unicast (or CO) channels
usually connect to a single PoP, possibly via a home network; campus users usually
have a local area network (LAN) and connect to several PoPs. Beyond PoPs, the
Internet core is a rich mesh network. Fig. 5.2 shows the number of independent IP
addresses at each hop from a residential user and a campus user (both located in
North America) to the 200 most popular websites. The list of websites is obtained
from Alexa [91]. We extracted their addresses and removed redundant addresses, and
used the traceroute to obtain the Internet paths to these addresses. The second hop
of the residential user is a broadband remote access server (BRAS) of the ISP; there
are 36 unique IP addresses beyond the BRAS. The fourth hop of the campus user
includes two exit points of the campus network, and each exit point connects to two
PoPs of ISPs. Our observations of path diversity agree with [26], which uses both
popular websites and hosts in P2P networks.
Since there may not be enough disjoint paths between a sender and a receiver,
communication applications may choose to use only disjoint paths, or to use a large
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 124
Residential
Campus
100
Unique IP Addresses
10
1
1 2 3 4 5 6 7 8 9 10
Hops
Figure 5.2: The number of unique IP addresses at each hop to the 200 most popular
websites from a residential user and a campus user.
number of non-disjoint paths. In the latter case, when the packet loss ratio before
PoPs is small enough to be ignored, we can consider that sufficient disjoint paths
exist between a sender and a receiver. (Home networks and LANs typically have large
bandwidth and a low packet loss ratio compared with the Internet core.) Therefore, we
study FEC performance in three situations: (1) there exists N ≥ n disjoint channels,
(2) there exist N < n disjoint channels, and (3) a sender uses a large number of
non-disjoint channels. We compare the post-FEC loss ratio in these three situations
with that of the benchmark situation where the single direct path is used.
In this section we compute the post-FEC loss ratio when a sender uses only the direct
path, which is a unicast channel, to send packets. The results serve as the benchmark.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 125
We chose to use a 2-state Markov chain to model a unicast channel (same as [6, 21]).
This model is a simplification of the Gilbert model [23] and is widely used in the
literature. Like the Gilbert model, the channel is assumed to have a constant bit
rate (or packet rate). As long as an Internet path between a sender and a receiver
has a higher bandwidth than the video’s streaming rate, it can be assumed that the
Internet path provides a constant bit rate channel between the sender and receiver.
At each time unit, the channel is either in the good state (state 0) or in the bad state
(state 1). Packets transmitted over the channel are error-free when the channel is in
the good state and are erroneous when the channel is in the bad state4 . The state of
the channel is described by a 2-state Markov chain. As shown in Fig. 5.3, given the
channel’s current state, the channel’s state for the next time unit can be described
1−p p
by the one-step probability transition matrix P = q 1−q .
q p
The 2-state Markov chain has the stationary distribution of π = ( p+q , p+q ). The
channel’s unconditioned packet loss ratio5 e is the proportion of time that the chain
4
In the Gilbert model, when the channel is in the bad state, a packet transmitted over the channel
has a certain probability to be in error.
5
A channel’s unconditioned packet loss ratio is usually called its packet loss ratio. Here uncon-
ditioned means the loss ratio is not conditioned on the state of the channel in the previous time
unit.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 126
p
stays in state 1 and hence e = p+q
. Let 0i and 1i denote a run of i consecutive
0’s and 1’s respectively. The probability that a burst of i consecutive 1’s occurs is
P r{1i−10|01} = q(1 − q)i , i.e., the burst length has a geometric distribution, and
hence the average burst length is l = 1q . Sometimes it is more convenient to describe
the chain by parameters e and l rather than by parameters p and q. Given e and l,
p= e
(1−e)l
and q = 1l .
Algorithm 5 The algorithm to compute the post-FEC loss ratio when using system-
atic RS(n, k) codes.
Input: sequences holds all the possible FEC blocks
1: sequences.init()
2: lossCnt ← 0
3: while seq ← sequences.next() 6= sequences.end() do
4: lossCnt += probability(seq) ∗ origP ktLoss(seq)
5: return lossCnt/k
Let X denote the number of unrecoverable original packets lost in an FEC block.
The post-FEC loss ratio ef ec is the expectation of X divided by the number of orig-
inal packets in an FEC block. To compute E[X], we need to count the number
of unrecoverable original packets lost in each possible FEC block and compute its
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 127
probability.
1X
ef ec = P r{x̄}F (x̄) (5.1)
k x̄
where F (x̄) is the number of unrecoverable original packets lost in FEC block x̄. Fig. 5
shows this algorithm. There are O(2n ) possible FEC blocks of length n. However,
the algorithm is computationally feasible for communication applications because the
FEC block size n is a small number.
where P r{xi|xi−1 } and P r{x1 } are available from the probability transition matrix
and stationary distribution respectively. Fig. 6 shows the algorithm to compute the
probability P r{x̄}.
of Disjoint CO Channels
A CO channel consists of two unicast channels and a CO peer between them. The
state of the CO peer and the states of the two unicast channels are independent
from one another. Therefore, we can move the CO peer right before the receiver,
Assume a path consists of m links. Each link is independent and the i-th link can be
modeled by a 2-state Markov chain with parameters pi and qi . Then the packet loss
ratio of the whole path is
m
Y
e′ = 1 − (1 − ei ) (5.2)
i=1
where ei is the packet loss ratio of link i. If the path is currently in state 0 (i.e., all
the m links are in state 0), the probability that it will stay in state 0 in the next time
unit is the probability that all the links will stay in state 0. Therefore, the gap length
Qm
has geometric distribution with parameter p′ = 1 − i=1 (1 − pi ). Since there are the
same number of runs of 0s as the runs of 1s, the average burst length is
1− m i=1 (1 − ei )
Q
′
l = Qm (5.3)
( i=1 (1 − ei ))(1 − m i=1 (1 − pi ))
Q
Note that the whole path is no longer a 2-state Markov chain because the probability
from state 1 to state 0 depends on individual link states. This is a caveat of the
Gilbert model (as well as the 2-state Markov chain). However, when these links
have a low packet loss ratio such that the probability that two or more links being
simultaneously in state 1 can be ignored and they have the same burst length (i.e.,
unicast channels have the same parameters p and q and the CO peers have the same
probability d to leave the system in any time unit). Then we can model a CO channel,
with CO peer replacement, as an (s + 2)-state Markov chain.
As shown in Fig. 5.4, state 0 refers to when the CO peer is present and the
underlying unicast channel is in the good state, and state 1 refers to when the CO
peer is present but the unicast channel is in the bad state. The CO peer has a
probability of d to leave the system, regardless of whether the unicast channel is in
state 0 or state 1. A sender takes s time units to detect the departure of a CO peer
x. When peer x leaves after forwarding a packet at the t-th time unit, the sender
peer, peer y may have already left between the t-th and the (t + s)-th time units.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 130
(The sender will know peer y has left and will not use peer y if it has left before the
t-th time unit). Peer y has an equal probability to have left in any of the s time
units, and the probability that peer y has left is 1 − (1 − d)s. Therefore, the transition
probabilities a3 , a4 , . . . , as+2 have a value of 1s (1 − (1 − d)s ). By duality, we have
a1
a2
= π1
π2
= pq . Now we can write the chain’s one-step probability transition matrix Pc
as
(1 − p)(1 − d) p(1 − d) d 0 ... 0
q(1 − d) (1 − q)(1 − d) d 0 . . . 0
0 0 0 1 ... 0
.. .. .. .. ..
. . . . .
0 0 0 0 ... 1
a1 a2 a3 a4 . . . as+2
where
q
a1
(1 − d)s
=
p+q
p
a2 = (1 − d)s (5.4)
p + q
1 − (1 − d)s
ai =
, 3≤i≤s+2
s
The (s + 2)-state Markov chain has stationary distribution π such that
πPc = π
s+2
X (5.5)
πi =1
i=1
where α = s+1
2
+ s−1
2
(1 − d)s + d1 (1 − d)s .
The CO channel’s packet loss ratio ec is the fraction of time that the chain stays in
states other than state 0, i.e., ec = 1−π1 . The probability that a gap of length i occurs
between two bursts of non-zeros (i.e., states other than 0) is (1−d−p+pd)i (d+p−pd),
1
i.e., the gap length has a geometric distribution, and hence the average gap is d+p−dp
.
Since there are the same number of gaps and bursts, the average burst length is
1−ec
lc = (d+p−dp)ec
. However, the burst length no longer has a geometric distribution.
When N ≥ n disjoint channels exist with packet loss ratio ec , since each packet in
an FEC block is sent via a channel different from other packets in the FEC block,
whether the packet can reach the receiver without error is independent from the state
of other packets. Therefore, the probability P (m, n) that m packets are erroneous
out of n consecutive packets has a binomial distribution
n!
P (m, n) = em
c (1 − ec )
n−m
m!(n − m)!
Conditioning on the number of original packets lost in an FEC block, the post-FEC
loss ratio is
k n−k
1X X
ef ec = iP (i, k) P (j, n − k) (5.7)
k i=1 j=n−k+1−i
Unless otherwise specified, we use the following default parameters. The streaming
rate is 480 Kbps for TV-quality video streaming, the packet size is 1500 bytes, and
thus 1 time unit is 25 milliseconds. We use an FEC block size of n = 16, which
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 132
introduces 400 milliseconds of coding delay. Internet link loss ratios vary greatly.
According to [50, 76], we use two loss ratios: 1% and 10%, and two burst lengths: 2
and 4. According to an empirical study [33], a peer’s average lifespan in a P2P system
is approximately 10 minutes; therefore the probability that a CO peer leaves in any
1
time unit is d = 40×60×10
. A sender takes 1 second to detect the departure of a CO
peer, i.e., s = 40. The numerical analysis program is written in the Java programming
FEC packets, especially when Internet links have a lower loss ratio. This observation
indicates that path-diversity can improve FEC performance. Also note that the post-
FEC loss ratio is significantly lower when l is 2 than when l is 4 if the direct path is
used, but is not impacted by the burst length if N ≥ n CO channels is used.
Second, the use of CO peers achieves path diversity but also introduces extra
packet loss. This extra packet loss is more significant when Internet links have a low
packet loss ratio. (In Fig. 5.5, the post-FEC loss ratio when k is 16 equals the CO
channels’ loss ratio.) Compared with a unicast channel with parameters p and q,
an CO channel with parameters p, q, d and s has extra loss ratio ∆ = ec − e. From
6
We have run simulations for all the numerical analysis. The simulation results are very close
to the numerical results. Except when the post-FEC packet loss ratio is less than 0.1%, the 95%
confidence interval of the simulation result is within 5% of the corresponding numerical result.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 133
3.0 %
s=40,e=1%,l=2
s=200,e=1%,l=2
2.5 % s=400,e=1%,l=2
Benchmark,e=1%,l=2
Benchmark,e=1%,l=4
Post-FEC Loss Ratio
2.0 %
1.5 %
1.0 %
0.5 %
0.0 %
8 9 10 11 12 13 14 15 16
k
(a) Internet links’ loss ratio e is 1%.
12 %
s=40,e=10%,l=4
s=200,e=10%,l=4
10 % s=400,e=10%,l=4
Benchmark,e=10%,l=2
Benchmark,e=10%,l=4
Post-FEC Loss Ratio
8%
6%
4%
2%
0%
8 9 10 11 12 13 14 15 16
k
(b) Internet links’ loss ratio e is 10%
Figure 5.5: Post-FEC loss ratio when using sufficient CO channels (N ≥ n). Each
CO channel has the same parameters p and q as the direct path (benchmark).
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 134
The first approximation comes from (1 − d)s ≈ 1 − sd when d ≪ 1, and the second
from s ≈ s + 1 when s ≫ 1. Equation 5.8 shows that the extra packet loss caused by
peer churn is proportional to the detection time and inversely proportional to peers’
lifespans. We vary the detection time s to investigate its impact on the post-FEC
loss ratio. The values s=40, 200, and 400 respectively correspond to 1, 5, and 10
seconds. With the increase of the detection time, the post-FEC loss ratio grows for
every value of k. The impact becomes smaller when k becomes smaller because more
lost packets due to peer churn can be recovered.
When a sender and a receiver initiate a communication session, they try to find
CO peers between them such that CO channels have similar parameters p and q as the
direct path. This may not always be possible. Fig. 5.6 shows the post-FEC loss ratio
when both segments of a CO channel have the same parameters p and q as the direct
path (i.e., the CO channel has parameters 2p and q). Because the CO channels’ loss
ratio more than doubles that of the direct path, only when large coding redundancy
is required (i.e., Internet links have a high loss ratio), using multiple channels can
achieve a lower post-FEC loss ratio than when using the direct path. For example,
in Fig. 5.6b, 4 redundant FEC packets are required for 12 original packets (compared
with 1 FEC packet in Fig. 5.6a), resulting in a coding overhead of 31 .
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 135
4.0 %
s=40
3.6 % s=200
s=400
3.2 % Benchmark
Post-FEC Loss Ratio
2.8 %
2.4 %
2.0 %
1.6 %
1.2 %
0.8 %
0.4 %
0.0 %
8 9 10 11 12 13 14 15 16
k
(a) Internet links’ loss ratio e is 1% and burst length l is 2.
20 %
s=40
s=200
s=400
16 % Benchmark
Post-FEC Loss Ratio
12 %
8%
4%
0%
8 9 10 11 12 13 14 15 16
k
(b) Internet links’ loss ratio e is 10% and burst length l is 4.
Figure 5.6: Post-FEC loss ratio when using sufficient CO channels (N ≥ n). Each
of the two segments of a CO channel has the same parameters p and q as the direct
path (benchmark).
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 136
Disjoint CO Channels
We consider the two parts of a CO channel—the unicast channel and the CO peer—
separately. Given a unicast channel with one-step probability transition matrix P , its
subchannel can also be modeled as a 2-state Markov chain, and its one-step probability
transition matrix P ′ is the N-step probability matrix of the whole channel. By the
(1 − p − q)N p −p q p
N ! !
1
1−p p
q 1−q = +
p+q −q q p+q q p
From a subchannel’s perspective, if the CO peer is present for the current packet
at time t, it will leave with a probability of 1 − (1 − d)N before time t + N for the
next packet. When the CO peer leaves, the sender will continue to send ⌊ Ns ⌋ packets
to the CO peer. Therefore, the subchannel of a CO channel can be modeled as a
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 137
p
p′ = (1 − (1 − p − q)N )
p+q
q
′
(1 − (1 − p − q)N )
q =
p+q (5.9)
N
d′ = 1 − (1 − d)
s
s′ =⌊ ⌋
N
As in the case of using a single unicast channel to send packets, when the number
of channels N is less than the block size n, the state of a packet may depend on the
state of a previous packet in the same FEC block. To compute the post-FEC packet
loss ratio, we need to count the number of unrecoverable original packets lost in each
possible FEC block and compute its probability. We continue to use the algorithm
in Fig. 5. However, the generation of all the possible FEC blocks and computation
of their probabilities are different.
n
Assume N divides n and s. Let x̄i = (x1i x2i . . . xbi ), where b = N
, denote the sub-
sequence of channel i. Then an FEC block x̄ consists of N interleaved subsequences,
sub-sequence can be computed using the algorithm in Fig. 6 (with the subchannel’s P ′
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 138
Algorithm 7 The algorithm to generate all the possible sequences of length b for a
CO channel with detection time s′ .
Input: seq and sequences are empty
Output: sequences holds all the sequences of length b
1: Procedure makeSequences()
2: if seq.empty() or seq.top() = s′ + 1 then
3: f irst ← 0; last ← s′ + 1
4: else if seq.top() ≤ 1 then
5: f irst ← 0; last ← 2
6: else
7: f irst ← seq.top() + 1; last ← f irst
8: for f irst ≤ state ≤ last do
9: seq.push(state)
10: if seq.size() = b then sequences.add(seq)
11: else makeSequences()
12: seq.pop(state)
and π ′ ). The recursive algorithm to generate all the possible sequences of a subchannel
is shown in Fig. 7. The algorithm constructs a subsequence packet by packet. The
state of the first packet ranges from 0 to s′ + 1 (lines 2–3). If the state of the current
packet is 0 or 1, the next packet’s state ranges from 0 to 2 (lines 4–5). If the state of the
Fig. 5.7 shows the post-FEC loss ratio when a sender uses N < n disjoint CO channels.
For every value of k, e and l, the post-FEC loss ratio drops when more channels are
used, but the decrease becomes marginal when N exceeds a certain value. As in the
case of using the direct path, a longer burst length results in a higher post-FEC loss
ratio. The increase is more significant when a sender uses fewer channels. This is
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 139
1.2 %
N=2,e=1%,l=2
N=2,e=1%,l=4
1.0 % N=4,e=1%,l=2
N=4,e=1%,l=4
N=8,e=1%,l=2
Post-FEC Loss Ratio
0.8 % N=8,e=1%,l=4
N>=n,e=1%,l=2
Benchmark,e=1%,l=2
0.6 %
0.4 %
0.2 %
0.0 %
8 9 10 11 12 13 14 15 16
k
(a) Internet links’ loss ratio e is 1%
12 %
N=2,e=10%,l=2
N=2,e=10%,l=4
10 % N=4,e=10%,l=2
N=4,e=10%,l=4
N=8,e=10%,l=2
Post-FEC Loss Ratio
8% N=8,e=10%,l=4
N>=n,e=10%,l=4
Benchmark,e=10%,l=4
6%
4%
2%
0%
8 9 10 11 12 13 14 15 16
k
(b) Internet links’ loss ratio e is 10%
Figure 5.7: Post-FEC loss ratio when using limited CO channels (N < n). Each CO
channel has the same parameters p and q as the direct path (benchmark).
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 140
Two points are worth noting. First, each increment of the number of FEC packets
results in certain overhead but does not result in an equal decrease of the post-
FEC loss ratio. Certain combinations of k and n are “better” than others from a
performance/cost perspective. For example, in Fig. 5.7a, when N is 4 and l is 2, using
3 FEC packets (i.e., k is 13) only slightly reduces the post-FEC loss ratio compared
with using 2 FEC packets, but using 4 FEC packets results in a significantly lower
post-FEC loss ratio than using 3 FEC packets. Another example is when N is 2, l
is 2, and k is 8, compared with k equal to 12, 11, 10, and 9. Second, using multiple
CO paths does not necessarily result in a lower post-FEC loss ratio than using a
single unicast channel, even when the extra packet loss caused by peer departures
is insignificant. For example, in Fig. 5.7a, when N is 2, l is 2, and k is 9, 10, and
11, using the direct path has a lower post-FEC loss ratio. Both phenomena result
from the interplay between the distribution of loss ratio and burst length, number
of disjoint channels, and the coding parameters n and k. Although guidelines exist,
there is no simple formula to determine what the good combinations of k and n are
or whether the use of multiple CO channels can be justified.
Non-Disjoint CO Channels
In this section, we consider a scenario when a sender uses a large number of non-
disjoint channels.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 141
Figure 5.8: Abstract topology when a sender uses a large number of non-disjoint
paths to send packets to a receiver. Dashed lines are error-free virtual links.
As discussed in Section 5.3.2, the paths between a sender and a receiver are two
SPTs on the substrate Internet, rooted at the sender and receiver respectively with
CO peers as leaves. The number of unique IP addresses is small close to the tree root
but becomes sufficiently large (compared to the FEC block size n) beyond certain
points. These turning points are usually the PoPs but may be a few hops beyond the
PoPs. For convenience, we still use the term PoPs to refer to these turning points.
We call the segments before PoPs the access segments and beyond PoPs the core
segments. The large number of non-disjoint CO channels can be deemed as consisting
of three sections: two access sections and a core section. In an access section, a
sender (or receiver) connects to N PoPs. In the core section, there exist enough
disjoint paths between PoPs. When a sender and a receiver initiate a communication
session or select a CO peer to replace a departed CO peer, they select CO peers
such that packets in an FEC block are spread evenly across the N access segments to
achieve the maximum possible path diversity. (These CO peers can be found by using
Section 5.3.1.) Assume the N access segments from a sender (or receiver) to its PoPs
are disjoint and there are the same number of access segments at the sender side and
the receiver side7 . Because the state of each segment and CO peer is independent
from the others, we can move the access segments at the sender side and receiver side
together, and move the CO peer right before the receiver. Fig. 5.8 shows the resulting
abstract topology. There are N < n disjoint unicast channels from the sender to N
2-state Markov chain with parameters βp and q. A packet that fails to reach a PoP
will not reach the receiver, and a packet that reaches a PoP will reach the receiver
with a probability of θ. Since sufficient disjoint paths exist between a PoP and the
receiver, and no two packets in an FEC block are transmitted via the same channel,
whether or not the packet can reach the receiver from a PoP is independent from the
states of other packets in the FEC block. The probability θ is the loss ratio of the
CO channel from a PoP to the receiver (consisting of the core segment and the CO
peer), which can be computed by Equation 5.7 with parameters (1 − β)p, q, d and s
using the method introduced in Sections 5.5.2 and 5.5.3. Therefore, the large number
the channel is in the bad state and will have a probability of θ to be erroneous when
the channel is in the good state.
Let 0g denote that the channel is in the good state and the packet is error-free, let
0e denote that the channel is in the good state but the packet is erroneous, and let 1
denote that the channel is in the bad state. As in the case of using the direct path
and a limited number of disjoint CO channels, to compute the post-FEC loss ratio,
we need to count the number of unrecoverable packets lost in each possible FEC
block and compute its probability, i.e., we continue to use the algorithm in Fig. 5.
n
Assume N divides n and s. Let x̄i = (x1i x2i . . . xbi ), where b = N
and xji ∈ {0g , 0e , 1},
denote the subsequence of channel i. Then an FEC block x̄ consists of N interleaved
The stationary distribution π ′ of the 3-state Markov chain can be obtained easily.
The probability of each subsequence can be computed using the algorithm shown in
Fig. 6 (with P ′ and π ′ ).
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 144
1.2 %
β=0.25
β=0.5
1.0 % β=0.75
β=0
2 Paths
Post-FEC Loss Ratio
0.8 % Benchmark
0.6 %
0.4 %
0.2 %
0.0 %
8 9 10 11 12 13 14 15 16
k
(a) Internet links’ loss ratio e is 1% and burst length l is 2.
12 %
β=0.25
β=0.5
10 % β=0.75
β=0
2 Paths
Post-FEC Loss Ratio
8% Benchmark
6%
4%
2%
0%
8 9 10 11 12 13 14 15 16
k
(b) Internet links’ loss ratio e is 10% and burst length l is 4.
Figure 5.9: Post-FEC loss ratio when using a large number of non-disjoint CO chan-
nels. Each CO channel has the same parameters p and q as the direct path (bench-
mark). The access segment has 2 disjoint paths.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 145
Fig. 5.9 shows the post-FEC loss ratio when a sender uses a large number of non-
disjoint channels. The access section has 2 disjoint paths. We use three values for the
1 1
fraction β: , ,
4 2
and 34 . In all the three cases, the post-FEC loss ratio is lower than
when using only 2 disjoint end-to-end paths. The smaller the access segment accounts
for the packet loss of the whole unicast channel, the lower the post-FEC loss ratio
will be. When β is 0, the post-FEC loss ratio is the same as when sufficient disjoint
paths exist between the sender and receiver. This result indicates that it is better
to use a large number of non-disjoint paths than to use only the limited number of
disjoint paths.
In this section, we use simulation to study two practical situations that are hard
In the numerical analysis, we assume that all the Internet links have the same loss
ratio and average burst length. Now we investigate the impact of using heteroge-
neous Internet links. We set the loss ratio and average burst length of Internet links
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 146
1.2 %
Heterogeneous, N=2
Homogeneous, N=2
1.0 % Heterogeneous, N>=n
Homogeneous, N>=n
Post-FEC Loss Ratio
0.8 %
0.6 %
0.4 %
0.2 %
0.0 %
8 9 10 11 12 13 14 15 16
k
(a) e is U (0, 2%) and l is U (1, 3).
12 %
Heterogeneous, N=2
Homogeneous, N=2
10 % Heterogeneous, N>=n
Homogeneous, N>=n
Post-FEC Loss Ratio
8%
6%
4%
2%
0%
8 9 10 11 12 13 14 15 16
k
(b) e is U (0, 20%) and l is U (1, 7).
Figure 5.10: Post-FEC loss ratio when using heterogeneous CO channels. Internet
links’ loss ratio e and burst length l are uniformly distributed.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 147
1.4
Homogeneous
Heteromogeneous
1.2
1
Probability Density
0.8
0.6
0.4
0.2
0
0.0 % 0.5 % 1.0 % 1.5 % 2.0 % 2.5 %
Figure 5.11: Comparison of the probability density of the post-FEC loss ratio when
Internet links are homogeneous (e is 1% and l is 2) and heterogeneous (e is U(0, 2%)
and l is U(1, 3). The sender uses N=2 disjoint paths and k=15.
according to a uniform distribution with the means equal to that of the homoge-
neous case. Fig. 5.10 compares the post-FEC loss ratio when using heterogeneous
and homogeneous Internet links. When a sender uses N ≥ n disjoint CO channels,
there is no discernible difference. When a sender uses N=2 disjoint CO channels, the
the post-FEC loss ratio fluctuates more severely in the heterogeneous case than in
the homogeneous case, we first calculate the post-FEC loss ratio per minute, and
then obtain the probability density function (PDF) using kernel density estimation
(Gaussian kernel with bandwidth of 0.1). Fig. 5.11 shows a sample comparison of the
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 148
PDF of post-FEC loss ratio when N is 2 and k is 15. The heterogeneous case has
a larger variance (0.22% vs. 0.17%) than the homogeneous case but a similar mean
(0.65% vs. 0.61%). From the perspective of users’ viewing experience, the difference
is unlikely to have significant impact.
In the numerical analysis, we assume that a sender and a receiver use the traceroute
tool and know the route to each CO peer on the substrate Internet such that a sender
can spread packets in an FEC block as evenly as possible over multiple channels.
When a sender uses a large number of CO peers, this will cause considerable overhead
for the sender and receiver (as well as routers on the Internet). In this subsection,
we study the post-FEC loss ratio when a sender uses a light-weight algorithm, which
we call random-M. This algorithm does not require the sender or receiver to have
knowledge of the substrate Internet routes to CO peers.
When a sender and a receiver initiate a communication session, they select M CO
peers between them (using the network position schemes mentioned in Section 5.3.1).
For each packet, a sender uniformly, randomly selects a CO peer that it has not
selected for the past n − 1 packets to relay the packet to the receiver. We remark
that this algorithm may be improved in a practical system (e.g., a sender can infer
which paths are more likely to be disjoint from the feedback of a receiver).
Fig. 5.12 compares the post-FEC loss ratio when a sender selects a large number
1.2 %
N=2, random
N=4, random
1.0 % N=8, random
N=2, round-robin
N=4, round-robin
Post-FEC Loss Ratio
0.6 %
0.4 %
0.2 %
0.0 %
8 9 10 11 12 13 14 15 16
k
(a) Internet links’ loss ratio e is 1% and burst length l is 2.
12 %
N=2, random
N=4, random
10 % N=8, random
N=2, round-robin
N=4, round-robin
Post-FEC Loss Ratio
8% N=8, round-robin
6%
4%
2%
0%
8 9 10 11 12 13 14 15 16
k
(b) Internet links’ loss ratio e is 10% and burst length l is 4.
Figure 5.12: Post-FEC loss ratio when using a large number of random CO peers.
The fraction of access segments account for β = 0.25 of total packet loss.
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 150
β=0.25 of the packet loss of the whole path. In the random case, there are 64 disjoint
paths between PoPs in the core section, whereas in the round-robin case, there are
n=16 disjoint paths between each pair of PoPs. Fig. 5.12 shows that the difference
between the two cases is not significant. However, this is because the access section
accounts for only β=0.25 of the packet loss of the whole path. In fact, in Fig. 5.12a,
the post-FEC loss ratio in the random case when N is 8 is similar to that in the
5.9 Summary
sender using a large number of disjoint paths, a limited number of disjoint paths, and
a large number of non-disjoint paths. We modeled Internet links using Markov chains
and computed exact numerical results. We found that although using peers for path
diversity often results in lower post-FEC loss ratio, conditions do apply. The interplay
of a number of factors—the Internet links’ loss ratio and burst length, the number of
disjoint CO channels, the lifespans of peers, the time to detect peers’ departures, and
the coding parameters—determines the performance of FEC. Guidelines exist but no
simple formula exists to determine whether the use of peers for path diversity can
be justified. When a sender can find a large number of disjoint CO channels with
similar parameters as the direct path, path diversity typically leads to lower post-FEC
loss ratio unless the direct path has a low loss ratio such that the extra packet loss
caused by peer departures is significant. When the number of disjoint CO channels
CHAPTER 5. FEC PERFORMANCE IN INTERACTIVE STREAMING 151
is less than the FEC block size, a longer burst length of Internet links has a negative
impact on the post-FEC loss ratio. Also, the more disjoint CO channels a sender
uses, the lower the post-FEC loss ratio will be. Using multiple CO channels does
not necessarily result in a lower post-FEC ratio compared with using only the direct
path, even when the extra packet loss caused by peer departures is insignificant.
Additionally, and some combinations of k and n of the RS(n, k) codes are better
than others from a performance/cost perspective. When a sender can only find a
large number of non-disjoint CO channels, it is better to use all of them than it
is to use only a subset of disjoint channels of these non-disjoint channels. When a
sender uses a set of heterogeneous Internet links, as compared to using homogeneous
Internet links, the post-FEC loss ratio differs only slightly but has a larger variance.
Compared with maintaining substrate IP routes to each CO peer to spread packets
in an FEC block evenly on multiple paths, when a sender selects CO peers randomly
to forward packets, the post-FEC loss ratio will drop, but not significantly.
Chapter 6
6.1 Conclusions
Video streaming applications have become wildly popular on the Internet. According
to the playback delay, video streaming can be classified into on-demand streaming,
live streaming, and interactive streaming. Live streaming applications may have
an arbitrary number of receivers, while interactive streaming applications typically
have a small group size. To reduce financial expenditure and improve scalability, live
streaming applications often adopt the P2P model to utilize users’ upload bandwidth.
Interactive streaming applications usually use the C/S model but may use peers to
traffic locality and reliable delivery of packets in large-scale live streaming and small-
scale interactive streaming applications, while keeping the playback delay well below
152
CHAPTER 6. CONCLUSIONS AND FUTURE DIRECTIONS 153
the limit that the targeted application can tolerate. More specifically, we addressed
two problems.
The first problem we addressed is how to localize video traffic without jeopardiz-
ing users’ viewing experiences in large-scale P2P live streaming applications. Real-
world P2P live streaming deployments use the swarm-based or data-driven tree-based
schemes. Therefore, we first investigated whether the neighbor-with-nearby-peers
strategy, which was originally proposed for P2P file sharing applications, is applica-
ble to P2P live streaming applications. We identified a “typical” swarm-based scheme
and a data-driven tree-based scheme that capture the essential aspects of these two
types of schemes. We compare system performance of the two typical schemes on two
types of neighboring overlays: random overlay where peers select neighbors randomly,
and nearby overlay where peers use the neighbor-with-nearby-peers strategy and only
select nearby peers as neighbors. We developed a discrete-event simulator to study
system performance of the two typical schemes on the two overlays, and proposed
packet propagation models to analyze the paths packets propagate on a given overlay
and overlay models to characterize the random and nearby overlays and analyze their
impact on system performance.
We found that packets propagate in distinct manners in the swarm-based scheme
and tree-based scheme although both schemes are data-driven. In the swarm-based
scheme, peers have a high probability to pull from neighbors that have fewer hops to
the source peer; the set of paths a chunk traverses from the source to peers is close to
a degree-bounded shortest path tree (in term of hops) on the neighboring overlay. In
the tree-based scheme, because of the short-circuit effect, peers select parents almost
randomly with respect to their hop counts to the source, resulting in significantly
CHAPTER 6. CONCLUSIONS AND FUTURE DIRECTIONS 154
lost packets in the presence of peer churn and substrate network errors because of the
large diameter and clustering coefficient of the nearby overlay. The different chunk
propagation behaviors of the swarm-based and tree-based schemes cause chunk loss in
different ways in the two schemes. The neighbor-with-nearby-peers strategy causes
more chunk loss in the tree-based schemes than in the swarm-based schemes. On
one hand, our work explains why commercial deployments, which construct random
overlays and use the data-driven approach, usually have good performance. Our work
also shows that simply applying the neighbor-with-nearby-peers strategy deteriorates
the quality of their services. On the other hand, our work furthers the understanding
of data-driven video live streaming schemes and suggests that new schemes should use
the network-driven approach to control chunks’ propagation paths to localize video
traffic while maintaining service quality.
In light of the above findings, we propose a neighboring strategy to construct a
most edges are between nearby peers to reduce network traffic, but a small fraction
of edges are rewired to remote peers in a way that the neighboring overlay exhibits a
hierarchical structure. The tree-building algorithm, called TreeClimber, is a DV-style
routing protocol that heuristically constructs a DBMST, with respect to hops, on
tree-based scheme and compared the hierarchical overlay with the random overlay
and small-world overlay. Simulation results show that our scheme outperforms the
typical data-driven tree-based scheme and that the hierarchical overlay outperforms
the small-world overlay. More users receive all the video chunks in TreeClimber than
in the typical data-driven tree-based scheme. The network cost of the hierarchical
1
overlay is only 3
of that on the random overlay, and the chunk delivery rate is close
to that on the random overlay under loose upload bandwidth constraints.
The second problem we addressed is the efficacy of systematic FEC for reducing
the packet loss rate perceived by the receiver without causing significant playback
delay and overhead in small-scale interactive streaming applications. FEC is the
preferred error correction technique for interactive streaming applications. Since it is
vulnerable to bursty packet loss of Internet links, P2P networks are used to provide
multiple one-hop overlay paths between two communication parties. We studied FEC
FEC performance in situations where the multiple paths are heterogeneous or a sender
lacks the knowledge of which paths are disjoint.
We found that although using peers for path diversity often results in a lower post-
FEC packet loss ratio, conditions do apply. The interplay of a number of factors—
the Internet links’ loss ratio and burst length, the number of disjoint CO channels,
CHAPTER 6. CONCLUSIONS AND FUTURE DIRECTIONS 156
the lifespans of peers, the time required to detect peers’ departures, and the coding
parameters—determines the performance of FEC. Guidelines exist, but some con-
ditions do apply. When a sender can find a large number of disjoint CO channels
with parameters similar to the direct path, path diversity typically leads to a lower
post-FEC loss ratio unless the direct path has a low loss ratio such that the extra
packet loss caused by peer departures is significant. When the number of disjoint CO
channels is less than the FEC block size, a longer burst length of Internet links has
a negative impact on the post-FEC loss ratio, and the more disjoint CO channels a
sender uses, the lower the post-FEC loss ratio will be. Using multiple CO channels
does not necessarily result in a lower post-FEC ratio as compared to with using only
the direct path, even when the extra packet loss caused by peer departures is insignif-
icant, and some combinations of k and n of the RS(n, k) codes are better than others
from a performance/cost perspective. When a sender can only find a large number
of non-disjoint CO channels, it is better to use all of them than it is to use only a
subset of disjoint channels of these non-disjoint channels. When a sender uses a set
packets, the post-FEC loss ratio will drop, but not significantly.
Video streaming traffic will undoubtedly continue to be the dominant type of traffic
on the Internet in the foreseeable future and both the C/S and P2P models will play
CHAPTER 6. CONCLUSIONS AND FUTURE DIRECTIONS 157
an important role in delivering video content. For large-scale P2P live streaming
applications, when a sufficient playback delay is allowed, the swarm technique can
guarantee a packet delivery rate of 100% because lost packets can be requested and
re-transmitted. However, in swarm-based schemes, each hop takes a long time and
the playback delay can easily exceed several minutes. Building a tree to push pack-
ets can greatly reduce the required playback delay. In tree-based schemes with the
rate is determined by the deviation of the packet delivery delay. Packets follow dif-
ferent paths from the video source to a peer due to peer churn. It is preferable that
these paths have fewer overlaps, but similar numbers of hops. The network-driven
approach is superior to the data-driven approach because the latter lacks the ability
to control the propagation paths of packets. Therefore, network-driven tree-based
small number of dedicated servers into a P2P network. These servers can act as the
proxy video sources or as the last resort for peers to re-transmit lost packets.
Interactive streaming applications rely on coding schemes and path diversity for
protection against failures and bursty errors of Internet links. The packet loss rate
after error-correction can be improved along three directions. The first direction is
multi-layer source coding. Continuous research efforts have been and will be put into
leave abruptly as intermediate helper nodes. A sender can transmit critical packets,
such as I-frame packets or the original packets of an FEC block, via more reliable
paths and transmit less critical packets via less reliable paths. The third direction is
to use rateless channel coding schemes when the RTT between a sender and a receiver
is small. With a small RTT, the communication overhead is acceptable.
Bibliography
[1] V. Aggarwal, A. Feldmann, and C. Scheideler. Can ISPS and P2P users coop-
erate for improved performance? ACM SIGCOMM Computer Communication
Review, 37(3):40, 2007.
217, 2002.
159
BIBLIOGRAPHY 160
[6] A.C. Begen, Y. Altunbasak, and O. Ergun. Multi-path selection for multiple
description encoded video streaming. In IEEE Int. Conf. on Communications
2008.
[9] K.-H.K. Chan, S.-H.G. Chan, and A.C. Begen. Spanc: Optimizing scheduling
delay for peer-to-peer live streaming. IEEE Trans. on Multimedia, 12(7):743–
753, 2010.
[11] D.R. Choffnes and F.E. Bustamante. Taming the Torrent: a practical approach
to reducing cross-ISP traffic in peer-to-peer systems. ACM SIGCOMM Com-
puter Communication Review, 38(4):363–374, 2008.
[12] Y. Chu, SG Rao, S. Seshan, and H. Zhang. A case for end system multicast.
IEEE Journal on Selected Areas in Communications, 20(8):1456–1471, 2002.
BIBLIOGRAPHY 161
[16] S.E. Deering and D.R. Cheriton. Multicast routing in datagram internetworks
and extended LANs. ACM Trans. on Computer Systems, 8(2):85–110, 1990.
[17] E.O Elliot. A model of the switched telephone network for data communications.
Bell System Technical Journal, 44(1):89, 1965.
[18] S. Fashandi, S.O. Gharan, and A.K. Khandani. Path diversity over packet
switched networks: Performance analysis and rate allocation. IEEE/ACM
[19] F.H.P. Fitzek, B. Can, R. Prasad, and M. Katz. Overhead and quality mea-
surements for multiple description coding for video services. Wireless Personal
Multimedia Communications, 2:524–528, 2004.
149, 2003.
[23] E.N. Gilbert. Capacity of a burst-noise channel. Bell System Technical Journal,
39(9):1253–1265, 1960.
[25] V.K Goyal. Multiple description coding: Compression meets the network. IEEE
Signal Processing Magazine, 18(5):74–93, 2001.
[26] K.P. Gummadi, H.V. Madhyastha, S.D. Gribble, H.M. Levy, and D. Wetherall.
Improving the reliability of Internet paths with one-hop source routing. In Proc.
Conf. on Symp. on Opearting Systems Design and Implementation, volume 6,
pages 13–13, 2004.
[27] M. Hefeeda and H. Saleh. Traffic modeling and proportional partial caching
for peer-to-peer systems. IEEE/ACM Trans. on Networking, 16(6):1447–1460,
2008.
[29] X. Jin, K.L. Cheng, and S.H.G. Chan. Island multicast: Combining IP multicast
with overlay data distribution. IEEE Trans. on Multimedia, 11(5):1024–1036,
2009.
[34] Y. Li, Y. Zhang, L.L. Qiu, and S. Lam. SmartTunnel: Achieving reliability in
the Internet. In Proc. IEEE INFOCOM, pages 830–838, 2006.
[35] Z. Li, J. Chakareski, X. Niu, Y. Zhang, and W. Gu. Modeling and analysis
of distortion caused by Markov-model burst packet losses in video transmis-
sion. IEEE Trans. on Circuits and Systems for Sideo Technology, 19(7):917–931,
2009.
BIBLIOGRAPHY 164
[36] Z. Li, J. Chakareski, L. Shen, and L. Wang. Video quality in transmission over
burst-loss channels: A forward error correction perspective. IEEE Communi-
[37] J. Liu, S. G. Rao, B. Li, and H. Zhang. Opportunities and challenges of peer-
to-peer internet video broadcast. Proc. IEEE, 96(1):11–24, 2008.
[38] Y. Liu, Y. Guo, and C. Liang. A survey on peer-to-peer video streaming sys-
tems. Peer-to-Peer Networking and Applications, 1(1):18–28, 2008.
[39] Z. Liu, Y. Shen, K.W. Ross, S.S. Panwar, et al. Substream trading: Towards
an open p2p live streaming system. In IEEE Int. Conf. on Network Protocols,
[40] Z. Liu, Y. Shen, K.W. Ross, S.S. Panwar, and Y. Wang. LayerP2P: Using
layered video chunks in P2P live streaming. IEEE Trans. on Multimedia,
11(7):1340–1352, 2009.
[43] D. Malkhi, M. Naor, and D. Ratajczak. Viceroy: A scalable and dynamic emu-
lation of the butterfly. In Proc. Annual ACM Symp. on Principles of Distributed
Computing (PODC), pages 183–192, 2002.
1–12, 2002.
[46] T.S.E. Ng and H. Zhang. Predicting internet network distance with coordinates-
[51] Dimitrios Pendarakis, Sherlia Shi, Dinesh Verma, and Marcel Waldvogel. ALMI:
an application level multicast infrastructure. In Proc. of USENIX Symp. on
[53] F. Picconi and L. Massoulié. Is there a future for mesh-based live video stream-
ing? In Int. Conf. on Peer-to-Peer Computing, pages 289–298, 2008.
[54] C.G Plaxton, R. Rajaraman, and A.W Richa. Accessing nearby copies of repli-
cated objects in a distributed environment. Theory of Computing Systems,
32(3):241–280, 1999.
[56] Sylvia Ratnasamy, Mark Handley, Richard M. Karp, and Scott Shenker.
[57] Y. Rekhter and T. Li. Border Gateway Protocol 4 (BGP-4). RFC 1771, 1995.
[58] Dongni Ren, Y.-T.H. Li, and S.-H.G. Chan. Fast-mesh: A low-delay high-
[59] I.E.G. Richardson. H. 264 and MPEG-4 video compression. Wiley Online
Library, 2003.
[60] A. Rowstron and P. Druschel. Pastry: Scalable, distributed object location and
routing for large-scale peer-to-peer systems. In Proc. IFIP/ACM Int. Conf. on
Distributed Systems Platforms (Middleware), volume 11, pages 329–350, 2001.
BIBLIOGRAPHY 167
[62] H. Schwarz, D. Marpe, and T. Wiegand. Overview of the scalable video cod-
ing extension of the h. 264/avc standard. IEEE Transactions on Circuits and
Systems for Video Technology, 17(9):1103–1120, 2007.
[63] M. Singh and L.C. Lau. Approximating minimum bounded degree spanning
[66] R. Tian, Y. Xiong, Q. Zhang, B. Li, B. Y. Zhao, and X. Li. Hybrid overlay
structure based on random walks. In Proc. Int. Workshop on Peer-to-Peer
[67] D.A Tran, K.A Hua, and T.T Do. A peer-to-peer architecture for media stream-
ing. IEEE Journal on Selected Areas in Communications, 22(1):121–133, 2004.
BIBLIOGRAPHY 168
2006.
[69] F. Wang, Y. Xiong, and J. Liu. mTreebone: A hybrid tree/mesh overlay for
application-layer live video multicast. In Proc. ICDCS, pages 49–57, 2007.
[70] M. Wang and B. Li. R2: Random push with random network coding in live
peer-to-peer streaming. IEEE Journal on Selected Areas in Communications,
25(9):1655–1666, 2007.
[71] Y. Wang, A.R. Reibman, and S. Lin. Multiple description coding for video
[72] D.J. Watts and S.H. Strogatz. Collective dynamics of small-world networks.
Nature, 393(6684):440–442, 1998.
H.264/AVC video coding standard. IEEE Trans. on Circuits and Systems for
Video Technology, 13(7):560–576, 2003.
[75] S. Xie, B. Li, G. Y. Keung, and X. Zhang. Coolstreaming: Design, theory and
practice. IEEE Trans. on Multimedia, 9(8):1661–1671, 2007.
[76] M. Yajnik, J. Kurose, and D. Towsley. Packet loss correlation in the MBone
[77] X. Yu, J.W. Modestino, R. Kurceren, and Y.S. Chan. A model-based approach
to evaluation of the efficacy of FEC coding in combating network packet losses.
[78] E.W. Zegura, K.L. Calvert, S. Bhattacharjee, et al. How to model an internet-
work. In IEEE infocom, volume 2, pages 594–602, 1996.
[79] B. Zhang, S. Jamin, and L. Zhang. Host multicast: A framework for delivering
[80] H. Zhang, J. Zhou, and J. Li. M2FEC: An effective FEC based multi-path trans-
mission scheme for interactive multimedia communication. Journal of Visual
[81] M. Zhang, L. Zhao, Y. Tang, J. G. Luo, and S. Q. Yang. Large-scale live media
streaming over peer-to-peer networks through global Internet. In Proc. ACM
Workshop on Advances in Peer-to-Peer Multimedia Streaming, pages 21–28,
2005.
[82] Rongmei Zhang and Y. Charlie Hu. Borg: a hybrid protocol for scalable
application-level multicast in peer-to-peer networks. In Proc. Int. Workshop on
Network and Operating Systems Support for Digital Audio and Video (NOSS-
2010.
[87] B.Y. Zhao, L. Huang, J. Stribling, S.C. Rhea, A.D. Joseph, and J.D. Kubia-
891, 2007.
[89] Y. Zhou, D.M. Chiu, and J.C.S. Lui. A simple model for analyzing P2P stream-
ing protocols. In IEEE Int. Conf. on Network Protocols (ICNP), pages 226–235,
2007.
Lemma 1. The probability p̃(i) = P r{0i−1E|E} that given an error, the first error
occurs at the i-th packet is
1 − α if i = 1
p̃(i) =
α(1 − d − p + pd)i−2 (d + p − pd) if i > 1
π2 (1−d)q+πs+2 a1
where α = e
.
When i = 1,
π2 π3 πs+1
p̃(i) = (1 − (1 − d)q) + + ...+
1 − π1 1 − π1 1 − π1
πs+2
+ (1 − a1 )
1 − π1
π2 (1 − d)q + πs+2 a1
=1−
e
When i ≥ 2,
π2
p̃(i) = (1 − d)q((1 − d)(1 − p))i−2 (d + (1 − d)p)
1 − π1
πs+2
+ a1 ((1 − d)(1 − p))i−2 (d + (1 − d)p)
1 − π1
π2 (1 − d)q + πs+2 a1
= (1 − d − p + pd)i−2 (d + p − pd)
e
Lemma 2. The probability P̃ (i) = P r{0i−1|E} that given an error, the next i − 1
Proof. When i = 1, the result is obvious. When i ≥ 2, conditioning on that the chain
+ . . . + P r{0i−1|Ds }P r{Ds|E}
π2
= (1 − d)q((1 − d)(1 − p))i−2
1 − π1
πs+2
+ a1 ((1 − d)(1 − p))i−2
1 − π1
π2 (1 − d)q + πs+2 a1
= (1 − d − p + pd)i−2
e
APPENDIX A. NON-SYSTEMATIC FEC PERFORMANCE 174
Lemma 3. The probability R̃(m, n) that given an error, m − 1 errors occurs in the
next n − 1 packets is
P̃ (m) if m = 1
R̃(m, n) =
n−m+1 p̃(i)R̃(m − 1, n − i + 1) if m ≥ 2
P
i=1
the result.
Since there are the same number of runs of 0s as the runs of 1s, we have P r{0i−1E} =
P r{E0i−1} = eP̃ (i).
Appendix B
Frossard’s Method
We use RS(3, 2), where an FEC block consists of 2 original packets followed by 1 FEC
packet (XOR of the 2 original packets), to show that Frossard’s method is inaccurate.
175
APPENDIX B. FROSSARD’S METHOD 176
a recursive method
k n−k
eX X
e′F EC = iR(i, k) R(j + 1, n − k + 1)
k i=1 j=n−k+1−i
r k−1
X k−1−i
X
+ (k − i)S(i, k) S(j + 1, n − k + 1)
k i=1 j=0
where
R(1, 2) = P r{0|1} = q
R(2, 2) = P r{1|1} = 1 − q
S(1, 2) = P r{1|0} = p
S(2, 2) = P r{0|0} = 1 − p