p2p live video streaming - diva portal

125
P2P Live Video Streaming ILIAS CHATZIDROSSOS Licentiate thesis in Telecommunications Stockholm, Sweden 2010

Upload: others

Post on 09-Feb-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: P2P Live Video Streaming - DiVA Portal

P2P Live Video Streaming

ILIAS CHATZIDROSSOS

Licentiate thesis in TelecommunicationsStockholm, Sweden 2010

Page 2: P2P Live Video Streaming - DiVA Portal
Page 3: P2P Live Video Streaming - DiVA Portal

P2P Live Video Streaming

ILIAS CHATZIDROSSOS

Licentiate ThesisStockholm, Sweden, 2010

Page 4: P2P Live Video Streaming - DiVA Portal

TRITA-EE 2010:010ISSN 1653-5146

School of Electrical EngineeringKTH, Stockholm, Sweden

Akademisk avhandling som med tillstånd av Kungl Tekniska högskolan framläggestill offentlig granskning för avläggande av licentiatexamen måndagen den 22 mars2010 i Hörsal Q21, KTH, Stockholm.

© Ilias Chatzidrossos, March 2010

Tryck: Universitetsservice US AB

Page 5: P2P Live Video Streaming - DiVA Portal

Abstract

The ever increasing demand for video content directed the focus of re-search from traditional server-based schemes to peer-to-peer systems for videodelivery. In such systems, video data is delivered to the users by utilizing theresources of the users themselves, leading to a potentially scalable solution.Users connect to each other, forming a p2p overlay network on top of theInternet and exchange the video segments among themselves. The perfor-mance of a p2p system is characterized by its capability to deliver the videocontent to all peers without errors and with the smallest possible delay. Thisconstitutes a challenge since peers dynamically join and leave the overlay andalso contribute different amounts of resources to the system.

The contribution of this thesis lies in two areas. The first area is theperformance evaluation of the most prominent p2p streaming architectures.We study the streaming quality in multiple-tree-based systems. We derivemodels to evaluate the stability of a multiple tree overlay in dynamic scenariosand the efficiency of the data distribution over the multiple trees. Then, westudy the data propagation in mesh-based overlays. We develop a generalframework for the evaluation of forwarding algorithms in such overlays anduse this framework to evaluate the performance of four different algorithms.

The second area of the thesis is a study of streaming in heterogeneous p2poverlays. The streaming quality depends on the aggregate resources that peerscontribute to the system: low average contribution leads to low streamingquality. Therefore, maintaining high streaming quality requires mechanismsthat either prohibit non-contributing peers or encourage contribution. In thisthesis we investigate both approaches. For the former, we derive a model tocapture the evolution of available capacity in an overlay and propose simpleadmission control mechanisms to avoid capacity drainage. For the latter, inour last work, we propose a novel incentive mechanism that maximizes thestreaming quality in an overlay by encouraging highly contributing peers tooffer more of their resources.

Page 6: P2P Live Video Streaming - DiVA Portal

AcknowledgementsI would like to thank my advisor Viktória Fodor for introducing me, and helping metake the first steps, into the world of research. Without her guidance, none of thework included in this thesis would have been feasible. I would also like to thank mysecond advisor György Dán for his comments and the many fruitful discussions overthese years. Furthermore, I am thankful to Professor Gunnar Karlsson, director ofLCN, for giving me the opportunity to become a member of this lab. I feel thatI should also thank all the members of LCN, current and past, for maintaining afriendly environment in the lab and for breaking the monotony of everyday work.I am thankful to all my friends everywhere. Their presence has been invaluable tome during the whole period of work leading to the writing of this thesis. Lastly, Iwould like to express my gratefulness to my family for their constant support.

Page 7: P2P Live Video Streaming - DiVA Portal

Contents

Contents v

1 Introduction 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Thesis structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Performance requirements and metrics for p2p streaming systems 32.1 Challenges for p2p streaming systems . . . . . . . . . . . . . . . . . 4

3 Tree-based streaming 73.1 Tree construction and maintenance . . . . . . . . . . . . . . . . . . . 83.2 Data forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.3 Peer heterogeneity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Mesh-based streaming 154.1 Overlay construction . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Data distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.3 Streaming in heterogeneous meshes . . . . . . . . . . . . . . . . . . . 18

5 Summary of original work 21

6 Future work 25

Bibliography 27

Paper A: On the Performance of Multiple-tree-based Peer-to-peer LiveStreaming

Paper B: Streaming Performance in Multiple-tree-based OverlaysPaper C: On the Effect of Free-riders in P2P Streaming SystemsPaper D: Delay and playout probability trade-off in mesh-based peer-to-

peer streaming with delayed buffer map updatesPaper E: Server Guaranteed Cap: An incentive mechanism for maximizing

streaming quality in heterogeneous overlays

v

Page 8: P2P Live Video Streaming - DiVA Portal
Page 9: P2P Live Video Streaming - DiVA Portal

Chapter 1

Introduction

In this chapter we present a brief discussion on video delivery over the Internet andintroduce the concept of peer-to-peer streaming, which constitutes the core subjectof this thesis. Then, we briefly state the objectives of this thesis and present theoutline.

1.1 Background

Streaming of video contents was initially introduced as a typical client-server ap-plication. A video, stored in or originating from a server, is delivered directly bythe server to the viewers upon request. The delivery of a live video stream to alarge number of viewers using this client-server paradigm requires not only hugeupload bandwidth for the server but also incurs high levels of redundancy in theaccess link of the server, as the same data is replicated on the link as many timesas there are viewers. Given the high and ever increasing demand for video content,this solution is not adequate for live streaming.

As an answer to the scalability issue for media delivery, two solutions have beenproposed. The first is IP multicast. IP multicast, which is not restricted only tovideo traffic, strives to deliver data from one source to many recipients, using thenetwork resources as efficiently as possible. As it is implemented on the networklayer, it requires that routers support the multicast functionality. The lack of largescale deployment of IP multicast-enabled routers in the Internet core prevents,though, the extensive use of this solution.

The second solution for accommodating a large audience is that of ContentDelivery Networks (CDN) [1]. A CDN consists of a set of geographically dispersedservers, that relay the video content from its source to the viewers. As a concept itis similar to IP multicast and tries to minimize the redundancy of transmissions overthe physical Internet topology. It differs, though, from IP multicast as it operatesat the application layer, the intermediate servers being just high capacity end hosts.However, even with CDNs the problem of scalability is only partially solved. An

1

Page 10: P2P Live Video Streaming - DiVA Portal

2 CHAPTER 1. INTRODUCTION

increase in demand for the content still requires improvements in infrastructure,which are both costly and time consuming to deploy.

The most promising multicast solution with respect to scalability is streamingusing peer-to-peer systems. In such systems, peers (end-hosts) establish connectionswith each other and form overlay networks. These networks are called overlays,because they use the Internet topology as a substrate. Peers in an overlay contributeresources, namely bandwidth and processing power, to disseminate the stream.This means that the system can ideally scale very well as the quantity of resourcesincreases proportionally to the number of peers in the overlay.

1.2 Objectives

The performance of peer-to-peer streaming systems is the streaming quality theycan provide to the peers. It depends on the structure of the overlay as well as theway peers exchange data with each other. The objectives of this thesis are to:

• Analyze the video delivery efficiency in peer-to-peer streaming systems.

• Evaluate the performance of different peer-to-peer streaming architectures tofind their advantages and disadvantages.

• Investigate the impact of the different levels of contribution by the peers onthe streaming quality.

1.3 Thesis structure

In chapter 2, we introduce the performance requirements of a peer-to-peer streamingsystem and present the metrics that we are going to use in our analysis. Chapter3 gives an overview of streaming using tree-based overlays. In chapter 4 we discussmesh-based streaming. Chapter 5 provides a summary of the papers included inthe thesis along with the contribution of the author of this thesis to each paper.Chapter 6 discusses open issues in the area of peer-to-peer streaming and statespotential directions for future research.

Page 11: P2P Live Video Streaming - DiVA Portal

Chapter 2

Performance requirements andmetrics for p2p streaming systems

The perceived quality of video delivered over the Internet is generally characterizedby two factors: distortion and delay. Distortion of the received video, as introducedby the network, is evaluated with respect to the original video sent by the server.Parts of the video might not arrive to end hosts due to errors in the network orcongestion, leading to the reception of a video that is not identical to the one sentby the server. The video playback delay is the time elapsed from the momentone requests a video until it is projected on one’s screen. The sending of videodata between two end hosts in the Internet introduces a varying delay per packet,depending on the current network conditions. This makes it necessary to delay theplayback for some period in order to increase the probability that video packets arereceived before they are requested for playback.

The above mentioned distorting factors are magnified in peer-to-peer streamingsystems. Distortion effects can be aggravated due to error propagation in the over-lay, since peers cannot forward content that they have not received. Furthermore,since data arrives to a peer after being relayed by other peers, delays and delayvariations are accumulated on the path from the server to all peers. The accumu-lation of delays means that peers may not display the video at the same time, eventhough the video is supposed to bear live content.

The metrics that characterize the quality of live video delivered by a peer-to-peer streaming system take into account the distortion of the video content as wellas the timeliness of video delivery and the difference in the delivery times amongpeers. High quality implies that peers receive a video that is identical to the onesent by the server and that the time it takes for each part of the video streamto reach the peers is as low as possible and approximately the same for all peers.More specifically the most common metrics, that we are also going to refer to inthis thesis, are the following:Playback continuity (Playout probability): it reflects the quality of the stream that a

3

Page 12: P2P Live Video Streaming - DiVA Portal

4CHAPTER 2. PERFORMANCE REQUIREMENTS AND METRICS FOR P2P

STREAMING SYSTEMS

peer receives. Playout probability is expressed as the ratio of successfully rendereddata at the receiver.Startup delay: it is the time it takes from the moment a user requests a stream untilit starts to project on her screen. It can be broken down into two distinct timeintervals: channel setup time and buffering delay. During channel setup, a peerlooks for peers that are watching the same stream and that can serve as suppliersof the stream. After channel setup a peer does not start to play out the receivedcontent immediately, but it initially buffers the content. Buffering is required inorder to overcome variations in packet delivery times and increase the probabilityof seamless playback. A metric, similar to the startup delay, is the zapping delay,which is the time it takes from the moment a user switches channel until the newchannel projects onto her screen.Playback delay: it is the time difference between the time that a video chunk isgenerated at the server and the time this chunk is rendered at a peer. The lowerthe playback delay is, the more realtime is the viewing experience of the users.Playback lag: it is the time difference between the rendering of the same chunk intwo different peers in the overlay. Playback lag is not an issue when it comes tostreaming pre-recorded video, but is a significant dissatisfaction factor when livestreaming is considered.

2.1 Challenges for p2p streaming systems

The construction of a peer-to-peer streaming system that is able to deliver highquality video to the participating peers requires achieving good overall performancewith respect to the aforementioned metrics. To this end, there is a number ofchallenges that have to be dealt with and which are related to the operation ofa peer-to-peer system. First, a peer-to-peer system has to be resilient to churn,which is the joining and leaving of peers in the overlay. Churn can affect theplayback continuity of the stream since departure of supplying neighbors may leadto unrecoverable loss of data at a peer. Therefore, the overlay maintenance protocolhas to locate new suppliers as fast as possible to alleviate the impact of a departureon the playback continuity of a peer.

Second, a peer-to-peer streaming system should scale well with the number ofparticipating peers. As the overlay increases in size, the delay of delivering videodata to all peers increases, and so does the playback delay, since the video has to beforwarded from one peer to another until it reaches all peers. As far as scalabilityis concerned the challenge is two-fold. First, the playback delay has to scale wellwith the number of peers, meaning that the increase in the average playback delayas the overlay size increases should be such that it does not have a severe impacton the streaming experience of the peers. Second, the system should maintain asmall playback lag among peers, so as not to destroy the live experience.

A third challenge of a peer-to-peer streaming system design is the utilizationof heterogeneous bandwidth resources. The upload bandwidth contribution of the

Page 13: P2P Live Video Streaming - DiVA Portal

2.1. CHALLENGES FOR P2P STREAMING SYSTEMS 5

peers determines the feasibility of streaming to all peers at a given rate. Streamingfeasibility depends on the so-called resource index, which is the ratio of the averageupload bandwidth contribution over the video encoding rate. If the resource indexis larger or equal to 1, then streaming is theoretically feasible. In today’s Internet,the upload bandwidths of the peers can be very different with respect to the streamrate and, moreover, the asymmetric nature of some access technologies can lead tolow resource index values. Therefore, a peer-to-peer system should leverage peercontribution and maintain a high resource index, in order to ensure streamingfeasibility.

Apart from physical limitations, the resource index can also be constrainedby the unwillingness of peers to contribute. Peers that want to receive data butnot participate in the video dissemination are called free-riders. Free-riders area threat to the system because they consume its resources without contributingany, thus lowering the resource index. Therefore, it is important to design peer-to-peer systems that provide incentives to contribute and that prioritize contributingpeers.

Page 14: P2P Live Video Streaming - DiVA Portal
Page 15: P2P Live Video Streaming - DiVA Portal

Chapter 3

Tree-based streaming

The first overlay architecture proposed for p2p streaming was that of the singletree. In this case all peers are organized in a tree rooted at the server node, whichis the source of the stream. Each node in the tree can have as many children asits capacity with respect to the streaming rate allows. The tree construction andthe parent-child relations are determined by factors such as the end-to-end latencybetween peers [2], available bandwidth, or the underlying physical topology [3]. Apacket is sent out from the source to its children in the first layer and they, in turn,push it to their child-peers until all the peers in the tree receive it. Though it isa structure simple to construct, the single tree architecture has many drawbacks.First, few peers bear the load of forwarding, while most of the peers are leaf nodesand do not contribute to the overlay at all. Second, a peer that does not have uploadcapacity at least as high as the streaming rate cannot be used for forwarding, andhas to become a leaf node. This leads to suboptimal utilization of the availableresources. Third, the single tree structure is vulnerable to peer departures. Whena peer in the higher layers of the tree departs, all of its descendants, that is thepeers in the subtree rooted at the departed peer, will be cut off from the overlayand they will not receive anything until they are reconnected to the tree. Fourth,the depth of the overlay can become quite large, which leads to peers in the lastlayers having a large playback lag compared to the ones in the layers close to theroot.

To increase the resilience of the overlay and to improve the capacity utiliza-tion, multiple-tree solutions have been proposed. Peers are organized in an overlayconsisting of more than one trees. Each peer becomes member and receives datain all trees. The server is the root of all the trees and in each tree a peer is as-signed a different parent. A peer is an internal node and forwards data in someof the trees and is a leaf node and only receives data in the rest of the trees. Thestream is divided into sub-streams and different parts of the stream are sent downdifferent trees. In the following sections we present the general characteristics of amultiple-tree based overlay. We investigate the efficiency of the construction and

7

Page 16: P2P Live Video Streaming - DiVA Portal

8 CHAPTER 3. TREE-BASED STREAMING

maintenance of the overlay in dynamic scenarios. Then, we address the issue ofdata propagation in multiple-tree overlays. We also investigate the impact of peerheterogeneity. At the end of each section, we state the contributions of this thesiswith respect to the subject covered by the section.

3.1 Tree construction and maintenance

In multiple-tree overlays, the tree construction has to fulfil two requirements. First,it has to exploit path diversity in delivering data [4], that is, peers should receivedata through different overlay paths in different trees, alleviating thus the effect ofpeer departures. Second, a tree construction algorithm has to create trees that areas shallow as possible. This requirement is significant since the number of layers ofthe tree is mapped to playback delay at the peers. Peers that are situated far awayfrom the root experience large delays compared to the ones that are high up in thetree. The fulfillment of these requirements is especially challenging for an overlayunder churn.

In the first multiple-tree construction algorithm proposed in [5], each peer be-comes member of all trees and forwards data in each tree. In each tree a peerreceives and forwards a sub-stream. Whenever a peer needs to be inserted in atree, the overlay construction algorithm returns the peer with available capacitysituated closest to the root. Available capacity refers to the ability of a peer to for-ward the sub-stream in that tree. Since using this algorithm, peers have one childper tree, these trees are called minimum breadth trees. An example of such anarchitecture for a small overlay of 12 peers, organized in 3 trees and with the serverhaving 3 children per tree, is shown in Fig. 3.1. Minimum breadth tree architectureoffers the advantage of easy maintenance, even in periods of high churn. However,the depth of the formed trees grows linearly with N , the number of peers in theoverlay (O(N)). Due to the long paths from the source to all peers, a peer departureaffects on average many peers, even if the the time needed for tree reconstructionis very short. Furthermore, the playback delay for peers that are in the last layersof the overlay can be large, which is undesirable for a streaming architecture.

Lower delays and high diversity can be achieved when peers are internal nodeswith many children in one tree and leaf nodes in the others. When peers have alltheir children in one tree, trees in the overlay have the minimum possible depth,therefore they are referred to as minimum depth trees. An example of a minimumdepth tree overlay is shown in Fig. 3.2, where we show an overlay of 12 peers,organized in 3 trees and with the server having 3 children per tree. In minimumdepth trees the depth of the trees is O(logN), which yields a shorter average play-back delay and better scalability in the number of peers, compared to the minimumbreadth trees. Peers forward the sub-stream that they receive in the tree wherethey are internal nodes. In the rest of the trees they only receive data but do notforward it further. Such overlays were initially introduced in [5] and [6]. In the firstwork the construction of the overlay is conducted by a centralized node, while in

Page 17: P2P Live Video Streaming - DiVA Portal

3.1. TREE CONSTRUCTION AND MAINTENANCE 9

1

s

1110

7 8 9

4 5 6

32

12

1

s

1211

9 7 8

5 6 4

32

10

1

s

1012

8 9 7

6 4 5

32

11

Figure 3.1: A minimum-breadth tree overlay of 12 peers organized in 3 trees andwith the server having 3 children per tree

65 28

s

741

9 3 121110 61 47

s

825

9 3 1210 11

71 28

s

396

10 4 511 12

: forwarding peer

: leaf peer

Figure 3.2: A minimum-depth tree overlay of 12 peers organized in 3 trees and withthe server having 3 children per tree

the latter it is coordinated by a distributed protocol.The overlay construction and maintenance under churn for minimum depth

overlays is more involved compared to the one of minimum breadth trees. Main-taining the overlay under churn introduces two challenges. The first challenge isto maintain a balanced capacity allocation over all trees. When a peer joins theoverlay, it increases the capacity in the tree where it is forwarding and decreasesthe capacity in the trees where it is only receiving. Therefore it is not necessarythat all trees have the same capacity at all times, even though trees have the samenumber of peers. Similarly, when an internal node departs from a tree, there mightnot be enough capacity to reconnect all its children in that tree, leading thus to

Page 18: P2P Live Video Streaming - DiVA Portal

10 CHAPTER 3. TREE-BASED STREAMING

6 8

s

741

9 3 1211106

1 4

7

s

8

9

3 12

10

11

71 8

s

396

10 411 12

: disconnected peer

: forwarding peer

: leaf peer

Figure 3.3: Disconnection of peers after the consecutive departures of internal nodesfrom the same tree of the overlay

some peers being disconnected. This phenomenon is depicted in Fig. 3.3, whereafter the departure of peers 2 and 5, that were forwarding in the second tree, thereis not enough capacity for peer 6 to be connected to the tree. At the same time,there is an excess of capacity in the first and third trees that could be used to servepeer 6. Disconnected peers have to remain in this state until a new forwardingpeer arrives in that tree or some leaf peer departs. Alternatively, the overlay has tobe re-organized to balance the available capacity among the trees. The streamingquality is affected in both cases. Therefore, one of the targets of the constructionalgorithm is to keep the available capacity balanced over all trees.

The second challenge of the tree maintenance algorithm is to keep the trees at alltimes as shallow as possible. Whenever a peer needs to be connected, or a subtree re-connected, the tree construction algorithm has to locate the available position thatis closest to the source of the stream. When trees are optimally maintained, the leafnodes are in the same layer at each tree in the overlay. Optimal tree maintenancerequires reorganizing the overlay at each peer departure. After the departure of aninternal peer, its children along with their descendants have to be reconnected tothe tree. Optimal maintenance with respect to the depth of the tree suggests thateach peer in the disconnected subtrees, rooted at the children of the departed peer,issues a separate reconnection request and is individually reconnected to the tree[7]. However, this incurs a large overhead, specially when the departed peer is highup the tree. Therefore a more practical method that sacrifices tree optimality forlower overhead reconnects only the children of the departed peer to the tree, whilethe whole subtree below them remains unchanged [8].

By the above discussion on the two types of multiple-tree overlays we can seea trade-off between the maintenance cost of a shallow overlay and the existence ofdisconnected peers. Driven by this trade-off, we propose in this thesis the use of a

Page 19: P2P Live Video Streaming - DiVA Portal

3.2. DATA FORWARDING 11

generalized multiple-tree overlay, where peers can forward in a limited number oftrees. In the generalized overlay the depth of the trees is between that of the min-imum depth and minimum breadth trees, but it still remains O(logN). However,the fact that peers can become internal nodes in more than one tree, adds resilienceto the overlay since it allows transfer of available capacity from one tree to anotherwhen necessary.

In paper A, we address the overlay stability issue for the generalized overlay.We define three different policies regarding the allocation of a peer’s bandwidthover the trees where the peer is forwarding. We present a markovian model thatapproximates the evolution of the available capacity under churn and yields theprobability of a peer being disconnected. We show that the increase in the numberof forwarding trees of a peer results in a more stable overlay since the probabilityof disconnection drops.

3.2 Data forwarding

Packets disseminated on an overlay path can be lost due to congestion in the under-lying physical network, or due to the departure/failure of intermediate peers. Theloss of a packet on an overlay link does not only affect the recipient peer attachedto that link but also all of its descendants. As the loss propagates to the layersbelow the one where it occurred, it reduces the stream quality for a potentiallylarge fraction of peers.

One way to deal with loss propagation in an overlay is through the use ofretransmissions [9]. Whenever a peer perceives loss of packets in its incoming linkit requests retransmission of the missing packets by its parents. This solution,though, acts against the stringent delay constraints that streaming applicationsimpose and therefore has not received much attention. The other way of protectingthe overlay against loss propagation is through the use of channel coding, or jointsource channel coding schemes. Implementation of such coding schemes seems tofit naturally multiple-tree based overlays, due to the path diversity that they offer.These schemes include multi-layered coding, multiple description coding (MDC)and forward error correcting codes (FEC). The use of such schemes in multiple-treebased overlays is based on the expectation that a peer will be able to partially orcompletely recover data that was lost on the path from the source to itself, as longas the peer is not directly connected to the congested physical link.

Under multi-layered coding (for an overview of the scalable extension of H.264/AVCsee [10]) the video is segmented and encoded into a base and a number of enhance-ment layers. The base layer provides a basic level of quality and each enhancementlayer - successfully received and decoded - enhances the quality of the stream. With-out the reception of the base layer enhancement layers are useless. When the videois segmented into layers then each layer can be error protected using redundantinformation proportional to the significance of the layer [11]. Using MDC (for anoverview see [12]) , the video is coded into descriptions, where each description can

Page 20: P2P Live Video Streaming - DiVA Portal

12 CHAPTER 3. TREE-BASED STREAMING

be independently decoded and has more or less the same impact on the receivedquality of the video. The more descriptions a peer is able to receive, the higher itsvideo quality is going to be. MDC has been combined with multiple-tree architec-tures in order to overcome errors in the overlay, provide resilience to churn and toaccount for peers that do not possess the adequate bandwidth to receive at the fullstreaming rate [6, 13].

When FEC is employed, e.g. Reed-Solomon codes [14], data is segmented intopackets and for each k packets another c redundant ones are added in order toform a block of n = k + c packets. When used with multiple-tree based streaming,packets of a block are sent down the trees in a round-robin way. If a peer receivesany k out of the n packets in a block, it can reconstruct the rest. It is shown thatfor any loss probability over an overlay link there is a level of redundancy thatcan ensure delivery of data to layers arbitrarily far away from the server with aprobability greater than zero [15, 16].

In this thesis we extend [15, 16] to study the data distribution in a generalizedmultiple-tree overlay using forward error correction and assuming homogeneous andindependent link losses. In paper B, we present a model that derives the packetpossession probability of an arbitrary peer as a function of the layer where it issituated in its forwarding trees. We identify the existence of a stability region withrespect to the link loss probability. Within this region, the packet possession prob-ability remains high and is not affected by the number of forwarding trees. Outsidethe stable region though, the performance degradation is high and is negativelyaffected by the number of forwarding trees of a peer. Moreover, we derive asymp-totic bounds on the packet possession probability when the overlay consists of avery large number of peers. We also conclude that the standard deviation of thereceived packets in a block is an adequate measure to control the adaptation of theFEC to the overlay conditions.

3.3 Peer heterogeneity

Early works in multiple-tree based streaming assumed homogeneous peers in termsof upload bandwidth. More specifically it has been assumed that peers receiveand contribute the same bandwidth, equal to the stream rate. This simplifyingassumption has been crucial to model the tree construction and data distributionin the overlay. However, it does not reflect the bandwidth distribution of the peersin a real world scenario.

In today’s Internet, peers are far from homogeneous. There exist peers whoseupload capacity can be many times higher than the streaming rate, others withupload capacities a couple of times the stream rate and a considerable fractionof peers with upload capacities lower than the stream rate or no upload capacityat all. As an indication of the bandwidth heterogeneity, in Table 3.1, we showresults obtained by a measurement study corresponding to a large streaming eventconsisting of more than 100000 peers [7]. The degree of each peer category is

Page 21: P2P Live Video Streaming - DiVA Portal

3.3. PEER HETEROGENEITY 13

Table 3.1: Indicative bandwidth distribution for a streaming event [7]

Type Degree Number of hostsFree-riders 0 58646 (49.3%)Contributors 1 22264 (18.7%)Contributors 2 10033 (8.4%)Contributors 3-19 6128 (5.2 %)Contributors 20 8115 (6.8 %)Unknown - 13735 (11.6 %)Total - 118921 (100%)

defined as the ratio of upload bandwidth over the stream encoding rate. Thevery large number of low and non-contributing peers can be partly explained bythe asymmetric nature of access technologies for many residential users. Usersconnected through aDSL lines have fast downlink, enabling them to watch a videoat a high encoding rate, but not allowing them to forward it to other peers atthis rate. Furthermore, peers behind firewalls and NAT-enabled routers constituteanother factor that could explain these figures. Although, there have been manyfirewall and NAT traversal schemes proposed ([17, 18] and references therein), theyhave not been widely implemented.

Optimal streaming is achieved when the overlay delivers the stream to all peerswith the smallest possible playback delay. Basically, optimal streaming incorporatestwo tasks: to maintain streaming feasibility and to achieve minimum delivery delay.Feasibility depends on the sum of available upload capacities in the overlay withrespect to the stream rate. The playback delay depends on the depth of the treesin the overlay. The more shallow these trees are, the lower is the average playbackdelay. So, achieving optimal streaming consists of two tasks: forming an efficientoverlay and maintaining a peer contribution high enough to make streaming feasible.

For a given composition of the overlay in terms of peer upload contribution,minimum delay streaming occurs when data is diffused to the peers in descendingorder with respect to upload bandwidth [19]. That is, faster peers receive packetsearlier than slower ones. Therefore, to minimize the delay for an individual treewould require a fast peer being able to replace a slower one at its position in the treestructure [20, 21]. The slower peer is then reconnected as a child of the faster oneor as a child of another peer with available capacity. We refer to the replacementof a peer in a tree structure by a faster peer as preemption. When considering amultiple-tree overlay as a whole though, preemption in a tree must not be basedon the contribution in one specific tree only. In [20], the authors using simulationsbased on real and synthetic traces, show that preemption should depend on thecontribution of a peer in all trees and not on its contribution in an individual tree.

Besides overlay construction, optimality of streaming depends on achieving anadequate level of contribution that allows transmitting the stream to all peers.

Page 22: P2P Live Video Streaming - DiVA Portal

14 CHAPTER 3. TREE-BASED STREAMING

The contribution of peers with their upload bandwidth can be regarded in two as-pects. The first is the willingness of the peers to contribute and the second is thephysical limitation on the contributed capacity of the peers. As far as the willing-ness is concerned, there are a number of schemes proposed to enforce cooperation,mostly inspired by file sharing peer-to-peer systems. In [13], the authors consider amultiple-tree based overlay consisting of peers with various capacities ranging fromzero contribution (free-riding) up to many times the stream rate. A taxation schemeis proposed so that peers with high capacities, contribute more than they receivein order to make streaming feasible to all peers. An incentive scheme that relates apeer’s contribution to its received stream quality is presented in [22], where peersmaintain a number of backup parents that is proportional to their contribution. Apeer can switch parents if receiving the stream from a backup parent incurs a lowerplayback delay than the one it currently perceives. Thus, under this scheme peersthat contribute more, receive the stream at a low delay with high probability.

However, in the absence of reputation or incentive based systems that enforcecooperation, when the upload capacity is not enough to stream to all peers, therecan be two options for providing seamless streaming to all peers at a given rate. Thefirst one is to lower the streaming rate to a sustainable one given the compositionof the overlay. The second option is to implement an admission control policy thatdoes not allow the demand to exceed the available supply of resources in the overlayfor a given streaming rate. Both schemes require fast and efficient adaptation tothe dynamic network conditions.

In this thesis, we address the issue of providing seamless streaming in dynamicpeer-to-peer overlays through admission control. In paper C, we consider the prob-lem of providing seamless streaming at a given rate to all peers in an overlayconsisting of contributing and non-contributing peers. We develop a model thatdescribes the evolution of the overlay capacity over time. We propose two admis-sion control schemes that block or drop non-contributing peers when the overlayresources decrease to a point where streaming to all peers becomes infeasible. Weimplement our scheme to a multiple-tree overlay and show that it leads to highresource utilization, while at the same time it ensures that, once admitted, peersexperience high streaming quality.

Page 23: P2P Live Video Streaming - DiVA Portal

Chapter 4

Mesh-based streaming

Considering churn as the main factor that impedes seamless streaming, mesh-basedsystems focus on creating an overlay that adapts fast to network changes. Therationale is that peers must not waste time in maintaining the overlay and peerdepartures should be dealt with promptly. So, the overlay construction in meshsystems is simple and fast. This nature of the mesh-based systems, though, has animpact on the forwarding behavior of the peers. In the lack of a rigid structure,data forwarding becomes a task that requires intelligence on the side of the peers.

This reveals the contrast between tree-based and mesh-based systems. In theformer, the overlay construction is more sophisticated and costly in terms bothof time and complexity, while data forwarding is trivial. Whereas in the latter,building the overlay is simple, inexpensive and fast but forwarding is more complex.In this chapter we discuss the characteristics of the main components of a mesh-based system: overlay construction and data forwarding. We also address the issueof maximizing the streaming quality in heterogeneous mesh overlays by providingpeers with incentives to contribute.

4.1 Overlay construction

In a mesh overlay, the goal of a peer is to maintain a large enough number ofincoming connections, so that it can overcome potential neighbor departures. Theoverlay is built in a distributed way and each peer is only aware of a small subset ofparticipants, which constitutes its neighbors. The neighbor selection policy differsfrom system to system but the intent is to keep the neighbor selection processsimple and fast. The simplest policy to select a neighbor is at random. A peerreceives a randomly generated list of peers already connected to the overlay andtries to establish connections to them. This approach, though, does not take intoaccount any parameters of the underlying network topology that could optimize thedata exchange. More complex neighbor selection policies base the establishment ofneighbor relationships on criteria such as available bandwidth and latency [23].

15

Page 24: P2P Live Video Streaming - DiVA Portal

16 CHAPTER 4. MESH-BASED STREAMING

In the context of this thesis we assume an overlay where the neighbor selectionis random and the only limitation is on the maximum number of neighbors that apeer may have.

4.2 Data distribution

In contrast to tree architectures, forwarding in mesh overlays is not a straightfor-ward process. The lack of a concrete structure that defines the flow of data from apeer to its neighbors makes it impossible to determine in advance the path throughwhich data is diffused. In mesh systems, video data is segmented into data units,which are sent from the server and then relayed by the peers. The data units areusually referred to as packets, chunks, or segments. We will refer to them as pack-ets, but in order to avoid confusion, we emphasize that, by that term, we referto the application layer data unit. Packets are forwarded based on decisions takenlocally at the peers. These decisions are based on information about the availabilityof packets in neighboring peers.

In mesh overlays, data packets can be exchanged following the push or pullapproach. In either case a peer has to make a decision of which packet to sendto which neighbor (push scheme), or which packet to ask from which neighbor(pull scheme). Both approaches come with their pros and cons. A push approachis expected to work better for uplink constrained peers, since it avoids multiplerequests for packets at a peer. On the other hand, a pull approach is a goodchoice for downlink constrained peers since a peer can control the incoming rateof packets from its neighbors. For both schemes however, the lack of coordinationamong peers that emerges in such a distributed environment creates inefficienciesin the data propagation. In a push based system, this is translated to multiplecopies of packets sent to the same peer by its neighbors. In pull systems, a peercan be flooded with a number of packet requests from its neighbors that is largerthan the maximum number of requests that it can serve. Both phenomena lead tosuboptimal performance of the forwarding schemes.

Regardless of the forwarding logic employed, each packet is sent out from theserver and it reaches all peers by forming a spanning tree over the overlay graph.Since, the forwarding decisions are taken locally at each peer, the degree and depthof the tree for each packet cannot be known a priori. Moreover, the trees that areformed for each packet can be very different, as depicted in Fig. 4.1, where weplot the paths for two packets in a stream over an overlay of 9 peers. The non-deterministic tree structure that is formed for the delivery of each data packet tothe peers creates two issues worth exploring. First, to determine whether a packetcan be delivered to all peers in the presence of a forwarding algorithm. Second, tofind an upper bound on the time it takes from the moment the packet is sent outfrom the source until it reaches all peers. A perfect forwarding algorithm guaranteesthe reception of a packet by all peers and, for a given overlay, gives a deterministicbound on the time to deliver a packet to all peers [24]. However, such an algorithm

Page 25: P2P Live Video Streaming - DiVA Portal

4.2. DATA DISTRIBUTION 17

S

31

827

645

9

9

1 3

7 8

5 64

S

2

packet i

packet i+1

2

3

9

6

84

S

5

7

1 2

3

9

6

84

S

5

7

1

Figure 4.1: Spanning trees that are formed for the packet delivery of two packetsin a mesh overlay consisting of 9 peers

is not feasible due to the distributed nature of forwarding in mesh-based systems.Instead, the efficiency of a realistic forwarding algorithm in delivering the streamon time is expressed by the playback delay and playout continuity characteristiccurve.

Numerous works address the issue of data propagation in mesh-based overlaysby proposing and evaluating different scheduling algorithms. In [25] it is shown thatoptimal streaming is possible in fully connected meshes and the authors proposescheduling algorithms for the cases when the bottleneck is at the uplink or at thedownlink of the peers. In [26], the authors derive the playback delay – continuitycurves for various push forwarding algorithms assuming a fully connected meshand perfect coordination among the peers. In [27, 28, 29], the authors suggest acombination of push and pull approaches to coordinate the packet exchange and toavoid collisions of data packets at the receiving peers, or of request packets at thesending peers.

Besides the analytic approaches, an insight on the performance of live peer-to-peer streaming systems is also obtained by carrying out measurements on exist-ing systems. In the recent years, there have been numerous popular peer-to-peerstreaming applications that were able to attract millions of viewers and most ofwhich are proprietary. Measurement studies are thus the only way to evaluate their

Page 26: P2P Live Video Streaming - DiVA Portal

18 CHAPTER 4. MESH-BASED STREAMING

performance, including the effect of parameters that are not easy to evaluate ana-lytically. Measurement studies help us to obtain an understanding about the peermembership and forwarding logic of these applications. There, one can see differentapproaches as far as forwarding is concerned. In [30], the authors conclude thatthere are applications, such as PPLive, where peers receive the video mostly froma small set of peers, while in other applications (e.g. SopCast), peers receive datafrom many other peers at the same time. Furthermore, measurement studies enableus to evaluate the performance of streaming systems with respect to metrics thatcannot easily be captured via analytical approaches, such as startup delays. In[31], the authors find that startup delays can vary from some seconds to a coupleof minutes depending on the stream popularity, which reveals a major problem ofpeer-to-peer streaming in general.

In this thesis we address the issue of playback delay and playback continu-ity trade-off by building a general framework for evaluating different forwardingschemes. In paper D, we propose a model to describe the data propagation in anoverlay consisting of peers with an upload capacity equal to the stream rate. Weassume that the overlay is a regular graph and there is no coordination amongpeers. Based on the model and simulations we derive the playback delay - continu-ity characteristics for various forwarding algorithms and show that random packetforwarding exhibits good delay characteristics and scalability. Moreover, we in-vestigate the impact of the number of neighbors of a peer and conclude that it ispositively correlated to the playout probability for small values but after it reachesa threshold value, it no longer affects the playout probability. We also deal withthe issue of the imperfect information at the peers and show that even small delaysin the control information exchange lead to fast decrease of the playout probability.

4.3 Streaming in heterogeneous meshes

One of the reasons why mesh-based streaming has become the predominant solutionfor delivering live video is its flexibility in handling different contribution levels. Amesh overlay is adequate for streaming using peers with various and also varyingupload bandwidths. At any point in time a peer uploads with as much capacityas it has available and bandwidth variations do not require reorganization of theoverlay structure.

As already stated in section 3.3, optimal streaming in heterogeneous overlaysdepends both on the structure of the overlay and the level of peer contribution.The difference in the mesh overlay, compared to the multiple-tree overlay is that itsdistributed nature makes the fulfillment of these two requirements more difficult.Maintaining the trees as shallow as possible by hierarchically placing the peers inthe trees based on their upload bandwidth is not a trivial task, since the shape of thetrees over which packets are forwarded depend on local decisions taken at the peersand is not known a priori. Furthermore, the implementation of a central incentivescheme that enforces peer cooperation is difficult and opposes the intention to keep

Page 27: P2P Live Video Streaming - DiVA Portal

4.3. STREAMING IN HETEROGENEOUS MESHES 19

the system distributed and simple. However, several works have dealt with theissue of optimal streaming in mesh overlays by addressing the above mentionedchallenges.

According to [19], faster peers have to receive packets earlier than slower ones.Using that as a basis, the authors in [32] propose a low delay IPTV system wherepeers with high contribution are pushed closer to the server, improving thus thedelay performance of the overlay. A similar approach is presented in [33], wherepeers select their parents based on the measure of power, which takes into accountboth the bandwidth of the peer as well as the latency between the two peers.

Besides the construction of the overlay, maintaining a contribution level ade-quate to sustain streaming to all peers is not an easy task in a mesh-based system.The absence of a centralized monitoring scheme can neither guarantee nor enforcepeer cooperation through the implementation of an admission control scheme, incontrast to a tree based solution. Therefore, most of the proposed solutions to en-force cooperation are implemented in a distributed way by the peers. The majorityof these schemes are inspired by the incentive mechanisms for peer-to-peer file dis-tribution and relate a peer’s contribution to the stream quality that it receives.In [34], a rank-based tournament is proposed, where peers are ranked accordingto their total upload contribution and each peer can choose as neighbor any peerthat is below itself in the ranked list. Thus, peers that have high contribution havealso higher flexibility in selecting their neighbors. In [35], the authors propose apayment-based incentive mechanism, where peers earn points by uploading to otherpeers. The supplier peer selection is performed through first price auctions, that is,the supplier chooses to serve the peer that offers her the most points. This meansthat peers that contribute more, accumulate more points and can make high bids,thus increasing their probability of winning an auction for a parent. Differentiatedstreaming quality can be obtained by using joint source-channel coding techniquesand a distributed incentive mechanism on the peers, as in [36] with layered videocoding and in [37] using multiple description coding.

Nevertheless, the incentive mechanisms proposed in the literature start, to alarge extent, from the assumption that peers have the ability to contribute but re-frain from doing so. However, peers might be unable to have a substantial contribu-tion with respect to the stream rate because of their last-mile connection technologyand not their unwillingness to contribute. Most DSL and cable Internet connec-tions are asymmetric, hence peers may have sufficient capacity to, e.g., downloadhigh definition video but insufficient capacity for forwarding it. Similarly, in high-speed mobile technologies, such as High Speed Downlink Packet Access (HSDPA),the download rates are an order of magnitude higher than the upload rates [38].Incentive schemes that relate a peer’s contribution to its streaming quality, fail toprovide adequate quality for peers that have limited contribution. It is reasonable,though, for one to argue that these peers should not be denied service by the overlayas long as there is available capacity to serve them as well.

In this thesis we study the data propagation in heterogeneous mesh overlays. Inpaper E, we consider overlays consisting of contributing and non-contributing peers.

Page 28: P2P Live Video Streaming - DiVA Portal

20 CHAPTER 4. MESH-BASED STREAMING

We model the behavior of the contributing peers with respect to their generosityagainst their non-contributing neighbors and study the social welfare of the system.We show that when contributors are selfish the social welfare is sub-optimal. There-fore, we propose an incentive mechanism to maximize the social welfare, which usesthe server’s capacity as an incentive for contributors to upload to non-contributingpeers as well. We prove that our mechanism is both individually rational andincentive compatible.

Page 29: P2P Live Video Streaming - DiVA Portal

Chapter 5

Summary of original work

Paper A: On the Performance of Multiple-tree-basedPeer-to-peer Live Streaming

György Dán, Viktória Fodor and Ilias Chatzidrossos. In Proceedings of IEEEINFOCOM, Anchorage, Alaska, May 2007.

Summary: In this work we address the problem of maintaining a well con-nected overlay under peer dynamics. We propose and analyze a generalized multiple-tree-based overlay architecture. We develop a mathematical model that describesthe available capacity in the trees and yields the probability of peer disconnection.We show how the connectivity of the overlay improves with the proper allocation ofthe upload bandwidths of the peers among the trees without compromising stream-ing quality.

My contribution to this work was the construction of a simulator and the simulation-based performance evaluation of the proposed multiple-tree based architecture underchurn.

Paper B: Streaming Performance in Multiple-tree-based Overlays

György Dán, Viktória Fodor and Ilias Chatzidrossos. In Proceedings of IFIP Net-working, Atlanta, Georgia, May 2007.

Summary: In this work we evaluate the data transmission performance of thegeneralized multiple-tree-based overlay architecture for peer-to-peer live streamingthat employs multipath transmission and forward error correction. We give math-ematical models to describe the error recovery in the presence of packet losses. Weevaluate the data distribution performance of the overlay, its asymptotic behavior,the stability regions for the data transmission, and analyze the system behavioraround the stability threshold. We argue that the composed measure of the mean

21

Page 30: P2P Live Video Streaming - DiVA Portal

22 CHAPTER 5. SUMMARY OF ORIGINAL WORK

and the variance of the packet possession probability can support adaptive forwarderror correction.

My contribution to this work was the construction of a simulator and the simulation-based performance evaluation of the data transmission using FEC under a multiple-tree based architecture.

Paper C: On the effect of free-riders in P2P streaming systems

Ilias Chatzidrossos and Viktória Fodor. In Proceedings of the 4th Telecommunica-tion Networking Workshop on QoS in Multiservice IP Networks, pages 8-13, Venice,Italy, February 2008.

Summary: Peer-to-peer applications exploit the users willingness to contributewith their upload transmission capacity, achieving this way a scalable system wherethe available transmission capacity increases with the number of participating users.Since not all the users can offer upload capacity with high bitrate and reliability,it is of interest to see how these non-contributing users can be supported by apeer-to-peer application. In this paper we investigate how free-riders, that is, non-contributing users can be served in a peer-to-peer streaming system. We considerdifferent policies of dealing with free-riders and discuss how performance parameterssuch as blocking and disconnection of free-riders are influenced by these policies,the overlay structure and system parameters as overlay size and source uploadcapacity. First we present a model that describes the performance of optimizedoverlays under the different policies, then we evaluate via simulations how morerigid overlay structures such as multiple-trees behave under the same conditions.The results show that while the multiple-tree structure may affect the performancefree-riders receive, the utilization of the transmission resources is still comparableto that of an optimized overlay.

My contribution to this work was the modelling of the available capacity in theoverlay as well as the performance evaluation of the proposed schemes through theuse of analytical modelling and simulations. The main part of the paper was writtenby the second co-author.

Paper D: Delay and playout probability trade-off in mesh-basedpeer-to-peer streaming with delayed buffer map updates

Ilias Chatzidrossos, György Dán and Viktória Fodor. In P2P Networking andApplications, May 2009.

Summary: In mesh-based peer-to-peer streaming systems data is distributedamong the peers according to local scheduling decisions. The local decisions affecthow packets get distributed in the mesh, the probability of duplicates and con-sequently, the probability of timely data delivery. In this paper we propose an

Page 31: P2P Live Video Streaming - DiVA Portal

23

analytic framework that allows the evaluation of scheduling algorithms. We con-sider four solutions in which scheduling is performed at the forwarding peer, basedon the knowledge of the playout buffer content at the neighbors. We evaluate theeffectiveness of the solutions in terms of the probability that a peer can play outa packet versus the playback delay, the sensitivity of the solutions to the accuracyof the knowledge of the neighbors’ playout buffer contents, and the scalability ofthe solutions with respect to the size of the overlay. We also show how the modelcan be used to evaluate the effects of node arrivals and departures on the overlay’sperformance.

My contribution to this work was the development of the analytical model for thedata propagation in the mesh-based overlay as well as the performance evaluationthrough modelling and simulations. The paper was written in collaboration with thetwo co-authors.

Paper E: Server Guaranteed Cap: An incentive mechanism formaximizing streaming quality in heterogeneous overlaysIlias Chatzidrossos, György Dán and Viktória Fodor. Technical Report TRITA-EE2009:059. In Proc. of the 9th IFIP Networking 2010, to appear.

Summary: We address the problem of maximizing the social welfare in a peer-to-peer streaming overlay given a fixed amount of server upload capacity. We showthat peers’ selfish behavior leads to an equilibrium that is suboptimal in terms of so-cial welfare, because selfish peers are interested in forming clusters and exchangingdata among themselves. In order to increase the social welfare we propose tunablescheduling algorithms and a novel incentive mechanism, Server Guaranteed Cap(SGC ), that uses the server capacity as an incentive for high contributing peers toupload to low contributing ones. We prove that SGC is individually rational andincentive compatible. We also show that under very general conditions, there existsexactly one server capacity allocation that maximizes the social welfare under SGC,hence simple gradient based method can be used to find the optimal allocation.

My contribution to this work was part of the system definition, the developmentof the model for the data propagation in the heterogeneous overlay and the per-formance evaluation of the proposed system through simulations. The paper waswritten in collaboration with the two co-authors.

Page 32: P2P Live Video Streaming - DiVA Portal

24 CHAPTER 5. SUMMARY OF ORIGINAL WORK

Publications not included in this thesis

• Gy. Dán, I. Chatzidrossos, V. Fodor and G. Karlsson,“On the Performanceof Error-resilient End-point-based Multicast Streaming”, in Proc. of 14thInternational Workshop on Quality of Service (IWQoS), pp. 160-168, June2006

• V. Fodor and I. Chatzidrossos, “Playback delay in mesh-based peer-to-peersystems with random packet forwarding”, in Proc. of International Con-ference on Next Generation Mobile Applications, Services and Technologies(NGMAST), pp. 550-555, September 2008

• V. Fodor and I. Chatzidrossos, “Playback delay in mesh-based Peer-to-Peersystems with random packet forwarding and transmission capacity limita-tion”, in International Journal of Internet Protocol Technology, Vol. 3 , no.4, pp. 257-265, December 2008

Page 33: P2P Live Video Streaming - DiVA Portal

Chapter 6

Future work

In the context of this thesis we covered a significant part of the evolution of p2pstreaming systems, that is multiple trees and mesh-based streaming systems. De-spite the existing fundamental results on the design and evaluation of such systems,there are still challenges to be addressed in order to achieve optimal streaming inrealistic scenarios.

Although an extensive comparative study of the two architectures is not avail-able, the research community has mainly focused over the last few years on meshstreaming systems only. The reason for that is the low overhead in maintainingthe overlay under churn as well as the possibility for exploiting the peer bandwidthmore efficiently.

Within the area of mesh-based streaming, there has been extensive work onforwarding algorithms and their properties using analytical tools, simulations andprototype implementations. The results show that there are algorithms that exhibitgood playback delay – playout continuity characteristics, but are still far from whatis theoretically feasible. So it remains as an open question, although a difficult oneto answer, whether there exists a forwarding scheme, or a combination of existingforwarding schemes that can achieve minimum delay seamless streaming in practice.

Besides data forwarding, achieving low delay streaming depends also on theoverlay construction. This is a field that has not received much attention as faras mesh systems are concerned. Research work is mostly focused on the studyof forwarding algorithms over simple graph structures such as complete or regulargraphs. Therefore, it is still unclear what the impact of different topologies is onthe system performance. The topological properties would also yield an insight asto whether optimal streaming is only a question of finding an optimal forwarding al-gorithm, or whether it requires joint optimization of the overlay and the forwardingalgorithm given the set of participating peers.

Furthermore, the impact of heterogeneity of upload capacities on the streamingperformance is a subject still not fully explored. In our last work, we proposeda new approach to make data delivery more efficient in an overlay consisting of

25

Page 34: P2P Live Video Streaming - DiVA Portal

26 CHAPTER 6. FUTURE WORK

contributing and non-contributing peers. As a next step, we intend to extend thiswork to overlays where peers have upload contributions taken from a continuousdistribution. Let us also note that the issue of providing low delay streamingunder upload bandwidth heterogeneity is also closely related to the overlay topologyconstruction. It is clear that data should flow from high uploading peers to lowones, but the convergence of the overlay to such a topology under churn requiresfurther investigation.

Finally, given the research results thus far, p2p streaming does not appear asa competitor for traditional TV, or even IP-multicast based IPTV systems. It cansatisfy the demand for video streaming for a niche market, but it does not seemto have the potential to substitute existing broadcasting systems for the generalpublic. However, it has great potential as an auxiliary component of a hybridmulticast-broadcast system. The cost of offering live and on demand streamingfor a content provider, or ISP, can be alleviated through the use of a p2p systemthat offloads the streaming servers. This can give rise to new business models forsubscription-based streaming services, in the context of which viewers are givenmonetary incentives to upload and temporarily store video content.

Page 35: P2P Live Video Streaming - DiVA Portal

Bibliography

[1] Akamai, http://www.akamai.com/html/technology/products/streaming.html.

[2] S. Banerjee, B. Bhattacharjee, and C. Kommareddy. Scalable application layermulticast. In Proc. of ACM SIGCOMM, 2002.

[3] Yang hua Chu, Sanjay G. Rao, Srinivasan Seshan, and Hui Zhang. A case forend system multicast. IEEE Journal On Selected Areas in Communications,20(8), 2003.

[4] J. G. Apostolopoulos and M. D. Trott. Path diversity for enhanced mediastreaming. IEEE Communications Magazine, 42:80–87, 2004.

[5] V. N. Padmanabhan, H. J. Wang, P. A. Chou, and K. Sripanidkulchai. Dis-tributing streaming media content using cooperative networking. In Proc.NOSSDAV, 2002.

[6] M. Castro, P. Druschel, A.-M. Kermarrec, A. Nandi, A. Rowstron, andA. Singh. Splitstream: High-bandwidth multicast in a cooperative environ-ment. In Proc. of ACM Symposium on Operating Systems Principles (SOSP),2003.

[7] K. Sripanidkulchai, A. Ganjam, B. Maggs, and H. Zhang. The feasibility ofsupporting large-scale live streaming applications with dynamic applicationend-points. In Proc of ACM SIGCOMM, 2004.

[8] T. Qiu, I. Nikolaidis, and F. Li. On the design of incentive-aware p2p streaming.Journal of Internet Engineering, 1:61–71, October 2007.

[9] E. Setton, J. Noh, and B. Girod. Congestion-distortion optimized peer-to-peer video streaming. In Proc. of IEEE International Conference on ImageProcessing, 2006.

[10] 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 andSystems for Video Technology, 17:1103–1120, 2007.

27

Page 36: P2P Live Video Streaming - DiVA Portal

28 BIBLIOGRAPHY

[11] B. Girod, K. Stuhlmüller, M. Link, and U. Horn. Packet loss resilient inter-net video streaming. In Proc. of IEEE International Conference on ImageProcessing, 2000.

[12] V. K. Goyal. Multiple description coding: Compression meets the network.IEEE Signal Processing Magazine, 18:74–93, 2001.

[13] Y. Chu, J. Chuang, and H. Zhang. A case for taxation in peer-to-peer streamingbroadcast. In Proc. of the ACM SIGCOMM workshop on Practice and theoryof incentives in networked systems, 2004.

[14] I.S. Reed and G. Solomon. Polynomial codes over certain finite fields. SIAMJournal of Applied Mathematics, 8:300–304, 1960.

[15] Gy. Dán, V. Fodor, and G. Karlsson. On the asymptotic behavior of end-point-based multimedia streaming. In Proc. of International Zurich seminaron Communication, 2006.

[16] Gy. Dán, V. Fodor, and G. Karlsson. On the stability of end-point-basedmultimedia streaming. In Proc. of IFIP Networking, 2006.

[17] STUN - Simple traversal of user datagram protocol (UDP) through networkaddress translators (NATs) - IETF RFC 3489, March 2003.

[18] S. Guha and P. Francis. Characterization and measurement of TCP traversalthrough NATs and firewalls, 2005.

[19] T. Small, B. Liang, and B. Li. Scaling laws and tradeoffs in peer-to-peer livemultimedia streaming. In Proc. of ACM Multimedia, 2006.

[20] M. Bishop, S. Rao, and K. Sripanidkulchai. Considering priority in overlaymulticast protocols under heterogeneous environments. In Proc. of IEEE IN-FOCOM, 2006.

[21] Y. Sung, M. Bishop, and S. Rao. Enabling contribution awareness in an overlaybroadcasting system. In ACM SIGCOMMf, 2006.

[22] K. Park, S. Pack, and T. Kwon. Climber: An incentive-based resilient peer-to-peer system for live streaming services. In Proc. of International Workshopon Peer-to-Peer Systems (IPTPS), 2008.

[23] M. Zhang, L. Zhao, Y. Tang, J.-G. Luo, and S.-Q. Yang. Large-scale livemedia streaming over peer-to-peer networks through global internet. In Proc.of ACM Multimedia, 2005.

[24] Y. Liu. On the minimum delay peer-to-peer video streaming: how realtimecan it be? In Proc. of ACM Multimedia, 2007.

Page 37: P2P Live Video Streaming - DiVA Portal

BIBLIOGRAPHY 29

[25] L. Massoulie et al. Randomized decentralized broadcasting algorithms. InProc. of IEEE INFOCOM, 2007.

[26] T. Bonald, L. Massoulié, F. Mathieu, D. Perino, and A. Twigg. Epidemic livestreaming: Optimal performance trade-offs. In Proc. of ACM SIGMETRICS,2008.

[27] F. Picconi and L. Massoulié. Is there a future for mesh-based live video stream-ing? In IEEE International Conference on Peer-to-Peer Computing, 2008.

[28] C. Liang, Y. Guo, and Y. Liu. Is random scheduling sufficient in p2p videostreaming? In Proc. of the 28th International Conference on Distributed Com-puting Systems (ICDCS), 2008.

[29] Y. Guo, C. Liang, and Y. Liu. Adaptive queue-based chunk scheduling for p2plive streaming. In Proc. of IFIP Networking, 2008.

[30] T. Silverston and O. Fourmaux. Measuring P2P IPTV systems. In Proc. ofNOSSDAV, 2007.

[31] X. Hei, C. Liang, Y. Liu, and K.W. Ross. A measurement study of a large-scalep2p IPTV system. IEEE Transactions on Multimedia, 9:1672–1687, December2007.

[32] R. J. Lobb, A. P. Couto da Silva, E. Leonardi, M. Mellia, and M. Meo. Adaptiveoverlay topology for mesh-based P2P-TV systems. In Proc. of NOSSDAV,2009.

[33] D.-N. Ren, Y.-T. H. Li, and S.-H. Chan. On reducing mesh delay for peer-to-peer live streaming. In Proc. of IEEE INFOCOM, 2008.

[34] A. Habib and J. Chuang. Service differentiated peer selection: An incentivemechanism for peer-to-peer media streaming. IEEE Transactions on Multime-dia, 8:610–621, June 2009.

[35] G. Tan and S. A. Jarvis. A payment-based incentive and service differentiationmechanism for peer-to-peer streaming broadcast. In Proc. of 14th InternationalWorkshop on Quality of Service (IWQoS), 2006.

[36] Z. Liu, Y. Shen, S. S. Panwar, K. W. Ross, and Y. Wang. Using layeredvideo to provide incentives in p2p live streaming. In Proc. of Workshop onPeer-to-Peer Streaming and IP-TV, 2007.

[37] Z. Liu, Y. Shen, S. S. Panwar, K. W. Ross, and Y. Wang. P2P video livestreaming with MDC: Providing incentives for redistribution. In Proc. ofIEEE International Conference on Multimedia and Expo (ICME), 2007.

Page 38: P2P Live Video Streaming - DiVA Portal

30 BIBLIOGRAPHY

[38] T. Chahed, E. Altman, and S.E. Elayoubi. Joint uplink and downlink admis-sion control to both streaming and elastic flows in CDMA/HSDPA systems.Performance Evaluation, 65:869–882, November 2008.

Page 39: P2P Live Video Streaming - DiVA Portal

Paper A

On the Performance of Multiple-tree-basedPeer-to-peer Live Streaming

Gyorgy Dan, Viktoria Fodor and Ilias Chatzidrossos.In IEEE Infocom, Anchorage, Alaska, May 2007.

Page 40: P2P Live Video Streaming - DiVA Portal
Page 41: P2P Live Video Streaming - DiVA Portal

On the Performance of Multiple-tree-based

Peer-to-peer Live Streaming

Gyorgy Dan, Viktoria Fodor and Ilias ChatzidrossosLaboratory for Communication Networks

School of Electrical EngineeringKTH, Royal Institute of Technology

E-mail: {gyuri,vfodor,iliasc}@ee.kth.se

Abstract

In this paper we propose and analyze a generalized multiple-tree-basedoverlay architecture for peer-to-peer live streaming that employs multipathtransmission and forward error correction. We give mathematical models todescribe the stability properties of the overlay and evaluate the error recoveryin the presence of node dynamics and packet losses. We show how the stabilityof the overlay improves with the proper allocation of the outgoing bandwidthsof the peers among the trees without compromising its error correcting capa-bility.

1 Introduction

The increasing input and output bandwidth of end-hosts in the Internet and thehigh incidence of flat rate charging gave rise to various peer-to-peer content deliv-ery networks in recent years. Several peer-to-peer live streaming architectures havebeen proposed and also implemented following the tree based push or the meshbased pull approach (see [1, 2, 3, 4, 5] and references therein). In this paper wefocus on push based streaming solutions where the streaming content is forwardedalong distribution trees constructed at the beginning of the streaming sessions andmaintained as the overlay membership changes. Robustness in these architecturesis achieved by applying multiple distribution trees together with some form of mul-tiple description coding based on forward error correction (FEC) [2, 1] or delaylimited retransmission [3], and priority schemes [4]. While there are several designsproposed and also implemented the evaluation of these solutions is mostly based onsimulations and measurements, giving little insight on general characteristics.

1This work was in part supported by the Swedish Foundation for Strategic Research throughthe projects Winternet and AWSI.

1

Page 42: P2P Live Video Streaming - DiVA Portal

A-2

Previously, we proposed mathematical models to describe the behavior of Coop-Net [2] like architectures in [6, 7]. Our results showed that the two architecturesproposed in the literature, and used as a basis in recent works (e.g., [4]) are straight-forward but not optimal. Minimum depth trees minimize the number of affectedpeers at peer departure, minimize the effect of error propagation from peer to peer,and introduce low transmission delay. Nevertheless, the overlay is unstable andmay become disconnected when one of the trees runs out of available capacity afterconsecutive peer departures. Tree disconnection leads to data loss unless resolvedby reconstructing the trees which, however, adds management overhead [2, 1]. Min-imum breadth trees are stable and easy to manage, but result in long transmissionpaths.

In this paper, we evaluate how a generalized architecture performs and suggestparameters for further system design. Specifically, we evaluate the probability oftree disconnection in general multiple-tree-based overlays and investigate how thetree architecture affects the data distribution performance if forward error correctionis applied.

The rest of the paper is organized as follows. Section 2 describes the proposedoverlay structure and error correction scheme. We evaluate the feasibility of theoverlay and give an analytical model describing the evolution of the available ca-pacity in the overlay in the case of node dynamics in Section 3. Section 4 discussesthe performance of the overlay based on the mathematical models and simulationsand we conclude our work in Section 5.

2 System description

2.1 Overlay structure

The overlay we propose in the following is a generalization of the multiple treebased overlays presented in [2, 1]. The aim of the proposed design is to improve thestability of the overlay in the case of node departures while keeping the length ofthe transmission paths in the overlay low.

The overlay consists of a root node and N peer nodes. The peer nodes areorganized in t distribution trees, and in each tree they have a different parent nodefrom which they receive data. We denote the maximum number of children of theroot node in each tree by m, and we call it the multiplicity of the root node. Weassume that nodes do not contribute more bandwidth towards their children asthey use to download from their parents, which means, that each node can haveup to t children to which it forwards data. (See Fig. 1.) Minimum depth trees aregenerated if nodes have children in one tree only and minimum breadth trees aregenerated if nodes have one child in each tree [2, 1].

In this work we assume that, instead of the two extreme cases, every node canhave children in up to d of the t trees, called the fertile trees of a node. A node issterile in all other trees, that is, it does not have any children. We say that each

Page 43: P2P Live Video Streaming - DiVA Portal

A-3

node has a total of t cogs in its fertile trees and has no cogs in its sterile trees.We distinguish three different policies that can be followed to allocate cogs in thefertile trees. With the unconstrained cog allocation (UCA) policy a node can haveup to t cogs in any of its fertile trees. With the reserving cog allocation (RCA)policy a node can have up to t − d + 1 cogs in any of its fertile trees (i.e., everynode has at least one cog in every fertile tree). With the balanced cog allocation(BCA) policy a node can have up to dt/de cogs in any of its fertile trees. If wedenote the maximum number of layers in the trees by L, then in a well maintainedtree each node is 1 ≤ i < L hops away from the root node in its fertile trees, andL− 1 ≤ i ≤ L hops away in its sterile trees.

2.2 Tree management

The results presented in this paper are not dependent on the particular tree man-agement algorithm used, our focus is on the performance of the overlay rather thanthe efficiency of the tree building algorithm. Nevertheless, we describe briefly thecentralized algorithm used for the simulations. We assume that the overlay is main-tained by the streaming server, also the root of the distribution trees.

Before discussing the tree management we define the notion of eligible parent.For a node in its sterile tree, an eligible parent is a node that has at least one freecog and is not parent of the node in any other tree. For a node in its fertile treean eligible parent is a node that either has a free cog or a sterile child and is notparent of the node in any other tree.

The objective of the tree management is to keep the number of free cogs balancedacross the trees and to push the sterile nodes to the lower layers of the trees. Tokeep the number of free cogs balanced, the fertile trees of a node joining the overlaywill be the d trees with the lowest number of free cogs. In the case of equal numberof free cogs the trees are selected at random. To build minimum depth trees,the node connects in each tree to one of the eligible parents closest to the root.If a selected parent does not have a free cog but a sterile child, the new nodetakes the place of the sterile child and the sterile child is connected to the newnode. In the case of a node departure, the disconnected children together withtheir subtrees try to reconnect following the same process. If the tree runs out ofavailable capacity after node departures, some of the children cannot reconnect andthe tree becomes disconnected. Disconnected children reattempt to connect to thetree after a reconnection interval T until they manage to reconnect. Fig. 1 showsan overlay for t = 3, m = 3 and d = 2, and shows how the overlay changes when anew node joins.

2.3 Data transmission and error resilience

The root uses block based FEC, e.g., Reed-Solomon codes [8], so that nodes canrecover from packet losses due to network congestion and node departures. To every

Page 44: P2P Live Video Streaming - DiVA Portal

A-4

a,

R

1 4 3

6

R

7 37 6 5 8

1 2 4

8 6

R

2 3 5

17 8

Tree 1 Tree 2 Tree 3

2

5

4

b,

R

1 4 3

6

R

7

37

6 5 8

1 2 4

8 6

R

2 3 5

17 8

Tree 1 Tree 2 Tree 3

2

5

49 9

3

Figure 1: a) Overlay with N = 8, t = 3,m = 3 and d = 2, b) the same overlay withN = 9. Identification numbers imply the chronological order of arrival, squares indicatethat the node is fertile.

k packets of information c packets of redundant information are added resulting in ablock length of n = k+ c. If the root would like to increase the ratio of redundancywhile maintaining its bitrate unchanged, then it has to decrease its source rate. Wedenote this FEC scheme by FEC(n,k). Using this FEC scheme one can implementUXP, PET, or the MDC scheme considered in [2]. Lost packets can be reconstructedas long as no more than c packets are lost out of n packets. The root splits the datastream into t stripes, with every tth packet belonging to the same stripe, and it sendsevery tth packet to its children in a given tree. Peer nodes relay the packets uponreception to their respective child nodes. Once a node receives at least k packets ofa block of n packets it recovers the remaining c packets. If a packet belonging to afertile tree is recovered, then it is sent to the respective children.

3 Feasibility and overlay stability

3.1 Evaluation of the overlay feasibility

We call an overlay feasible for given m, t and N if it can be constructed. A necessaryand a sufficient condition for the overlay to be feasible was shown in [1]. Thoseconditions were based on the number of cogs that nodes want to use and are willingto offer. The condition shown here relates the parameters of the overlay to eachother.

Proposition 1. If the overlay following the BCA policy is feasible for arbitrary N ,then m ≥ dt/de − 1.

Proof. To show that this condition is necessary, we show that if the condition is notsatisfied then there exists N for which the number of cogs in a particular tree canbe less than N , in which case some nodes cannot connect to the tree. The totalnumber of offered cogs in the t trees of the overlay is mt+Nt. Hence there has tobe at least one tree where the number of cogs is m + bNd/tct/d. The offered cogs

Page 45: P2P Live Video Streaming - DiVA Portal

A-5

have to be enough for all N nodes of the overlay in that tree, so that

N ≤ m+ b Nt/dc td. (1)

We can rearrange the inequality to get

m ≥ N − b Nt/dc td. (2)

Since N − dt/de+ 1 ≤ b Nt/dc td ≤ N , the right hand side of (2) is bounded fromabove by N − (N − dt/de+ 1).

The condition is only sufficient for feasibility for well maintained trees. In thepresence of node departures the overlay cannot always be kept well maintained andhence in general the condition is not sufficient.

3.2 Evolution of the available capacity

We define the available capacity in the overlay as the sum of the unused offered cogsof fertile nodes minus the number of disconnected nodes, hence it can be negative.For example, if there are f fertile nodes that have no children then the availablecapacity is ft. We use induction to calculate the available capacity in the overlay.Initially, the available capacity in the overlay is mt, since the root node can supportm nodes in each tree. Upon the arrival of a node the available capacity remains mt,since the node consumes one available cog in each of the t trees and adds a totalof t available cogs in its d fertile trees. Similarly, a departure does not change theavailable capacity in the overlay. Since the available capacity in the overlay is mt,the available capacity per tree is m on average. In the following we investigate theevolution of the available capacity for the BCA policy. For simplicity we assumethat t/d is an integer.

Upon departure of a node the available capacity decreases by t/d − 1 in thedeparting node’s d fertile trees and increases by one in its t − d sterile trees. Theavailable capacity in some of the departing node’s fertile trees can decrease belowzero, in which case the tree becomes disconnected. In the following we show how theprobability of disconnection depends on the parameters t, m and d of the overlay.

We consider the stationary state of the system, when the arrival and departurerates are equal. We assume that the interarrival times of nodes are exponentiallydistributed, this assumption is supported by measurement studies [9]. We approx-imate the distribution of the session holding times by an exponential distribution.The distribution of the session holding times was shown to fit the log-normal distri-bution [9], however, using the exponential distribution makes modeling easier. Forthe simulations we use the log-normal distribution, and as we will see, the modelgives a good match with the results of the simulations. For a given arrival intensity

Page 46: P2P Live Video Streaming - DiVA Portal

A-6

λ, the mean number of nodes in the overlay is N = λ/µ, where 1/µ is the meansession holding time.

To model the evolution of the available capacity, we use a two-dimensionalMarkov process with state (ν, ι), corresponding to the number of nodes in the over-lay and the available capacity in an arbitrary tree respectively. The state space ofthe process is {Nl . . . Nu} × {cl . . . cu}. The parameters Nl and Nu are the lowerand the upper bounds on the number of nodes in the overlay that the model con-siders. Similarly, cl and cu are the lower and the upper bounds on the availablecapacity that the model considers. We set Nl = 0.9N , Nu = 1.1N , cl = −(m− 1)tand cu = mt, so that the model is computationally feasible but the probability ofν /∈ {Nl . . . Nu} and ι /∈ {cl . . . cu} is negligible. The model is approximate, sincethe available capacity in an arbitrary tree is not independent of the available ca-pacity in the other trees (since their sum is constant). A model that considers theevolution of all trees would be t + 1 dimensional, and hence computationally notfeasible. Another approximation is the use of a limited state space.

We denote by qk,li,j the transition intensity from state (i, j) to state (k, l) anda(j) is the probability that an arriving node is assigned to be fertile in the chosentree given that the available capacity is j in that tree. The transition intensities arethen given as (Nl ≤ i ≤ Nu and cl ≤ j ≤ cu)

qmax(i−1,Nl),min(j+1,cu)i,j = (t− d)iµ/t

qmax(i−1,Nl),max(j−t/d+1,cl)i,j = diµ/t

qmin(i+1,Nu),max(j−1,cl)i,j = (1− a(j))λ

qmin(i+1,Nu),min(j+t/d−1,cu)i,j = a(j)λ

For the distribution of a(j) we use

a(j) =d∑

u=1

(t− 1u− 1

)F (

j −mt/(2d)− 1

)(u−1)(1− F (j −m

t/(2d)− 1))t−u, (3)

where F () is the standard normal distribution function. The rationale behind thedistribution of a(j) is the following. An arriving node is chosen to be fertile in thed trees with least available capacity among all t trees. We assume independence ofthe available capacity in the trees and model their distribution by a normal randomvariable with mean m and standard deviation t/(2d)− 1. A node is then assignedto be fertile in a tree with available capacity j if there are at least t− d trees withavailable capacity higher than j.

Fig. 2 shows a(j) from (3) and obtained via simulations. For j < 0 the modelassumes a(j) to be higher, while for j close to m to be lower than it is accordingto the simulations. The probability of j < 0 is however small, and hence (3) isa pessimistic estimate. It will be subject of future work to derive a more precisedistribution for a(j).

Page 47: P2P Live Video Streaming - DiVA Portal

A-7

−40 −30 −20 −10 0 10 200

0.2

0.4

0.6

0.8

1

Available capacity (j)

a(j)

t=4,m=4,d=1t=8,m=8,d=1t=8,m=4,d=2t=8,m=8,d=2t=16,m=16,d=1t=16,m=4,d=4

−40 −30 −20 −10 0 10 200

0.2

0.4

0.6

0.8

1

Available capacity (j)

a(j)

Figure 2: a(j) vs. available capacity. Analytical model (upper) and simulation results(lower) with the BCA policy.

We can calculate the steady state distribution ψ(i, j) of the Markov processusing the transition intensity matrix Q = (qk,li,j ). The reconnection failure proba-bility is then the ratio of the failed reconnection attempts and the total number ofreconnection attempts per time unit,

pf =1λ

Nl≤i≤Nu

cl≤j<t/dψ(i, j)

(t/d)(min(t/d, t/d− j)− 1). (4)

From the model we see that it is the ratio t/d and its relation to m that determinepf : increasing t/d increases, increasing m decreases it.

4 Performance evaluation

In the following we analyze the behavior of the overlay using the analytical modelspresented in the previous sections and via simulations. For the simulations wedeveloped a packet level event-driven simulator. We assume that the session holdingtimes follow a log-normal distribution with mean 1/µ = 306s, as shown in [9]. Weuse the arrival rate λ to change the mean number of nodes in the overlay N . Weused the GT-ITM [10] topology generator to generate a transit-stub model with10000 nodes and average node degree 6.2. We placed each node of the overlayat random at one of the 10000 nodes and used the one way delays given by thegenerator between the nodes. The delay between overlay nodes residing on thesame node of the topology was set to 1 ms. Losses on the paths between the nodesof the overlay occur independent of each other with probability p. The reconnectioninterval T is 1 s unless otherwise stated.

We consider the streaming of a 112.8 kbps data stream to nodes with link ca-pacity 128 kbps. The packet size is 1410 bytes. Nodes have a playout buffer capable

Page 48: P2P Live Video Streaming - DiVA Portal

A-8

0 5 10 15 20 25 30 35 400

0.05

0.1

0.15

Number of trees (t)

p f

d=1,m=td=2,m=t,BCAd=2,m=t,UCAd=1,m=1.5td=1,m=2td=2,m=t/d,BCAd=2,m=t/d,UCAd=4,m=t/d,BCAd=4,m=t/d,UCA

0 5 10 15 20 25 30 35 400

0.05

0.1

0.15

0.2

0.25

Number of trees (t)

p f

Figure 3: pf vs. t for N = 10000. Analytical results (upper diagram, no curves for UCA)and simulations (lower diagram).

of holding 140 packets, which corresponds to 14 s delay with the given parameters.Each node has an output buffer of 80 packets to absorb the bursts of outgoing pack-ets in its fertile tree. To obtain the results for a given overlay size N , we start thesimulation with N nodes in its steady state as described in [11]. We set λ = Nµand let nodes join and leave the overlay for 5000 s. The measurements are madeafter this warm-up period for 1000 s and the presented results are the averages of10 simulation runs. The results have less than 5 percent margin of error at a 95percent level of confidence.

4.1 Tree management

Fig. 3 shows the reconnection failure probability as a function of the number oftrees for N = 10000 and m = t. The model overestimates pf , partially due tothe pessimistic choice of a(j). The results obtained with the model show howeversimilar tendencies as the simulations. The reconnection failure probability increasesas t increases. Increasing d for a given t and m decreases the reconnection failureprobability significantly (d = 1,m = t vs. d = 2,m = t, BCA). The decrease isorders of magnitude bigger when using the UCA policy according to the simulations.The reconnection failure decreases sharply as m/t increases (d = 1,m = t vs.d = 1,m = 2t), and d = 1,m = 2t gives the same pf as m = t, d = 2 using the BCApolicy. The reconnection failure does not change if t/d and m are kept constantusing the BCA policy (e.g.,t=4 on d = 1,m = t vs. t=8 on d = 2,m = t/d vs.t=16 on d = 4,m = t/d ). Hence, one can increase t and n without increasing pfby keeping t/d constant. The UCA policy decreases pf significantly compared tothe BCA policy for the same t/d ratio and value of m.

Fig. 4 shows the reconnection failure probability as a function of the mean num-

Page 49: P2P Live Video Streaming - DiVA Portal

A-9

0 5 10 150

0.05

0.1

Reconnection interval (T)[s]

Rec

onne

ctio

n fa

ilure

pro

babi

lity

(pf)

(b)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

x 104

0

0.05

0.1

Number of nodes (N)

(a)

t=4,d=1t=8,d=2,BCAt=8,d=2,RCAt=8,d=2,UCAt=16,d=4,BCAt=16,d=4,RCAt=16,d=4,UCA

Figure 4: (a) pf vs. N for T = 1 and m = 4 (b) pf vs. T for N = 10000 and m = 4.Simulation results.

ber of nodes and the reconnection interval for the three cog allocation policies. Thefigure shows that increasing the number of nodes and increasing the reconnectioninterval slightly decrease pf for all policies. The reason for this phenomenon is thatthe longer a node waits between reconnection attempts or the higher the arrivalintensity, the higher the probability that a fertile node arrives to the disconnectedtree during the reconnection interval. A higher value of T means of course thatnodes have to wait longer between reconnection attempts and hence loose morepackets, so that there should be an optimal value of T for given m, t, d and FECparameters. Among the three cog allocation policies the UCA policy performs bestin terms of reconnection failure probability, with the RCA policy performing nearlyas good. The results with BCA coincide with the results with d = 1 for the samet/d and m values.

4.2 Data distribution

We evaluate the performance of the data distribution in the overlay by consideringthe probability π that an arbitrary node possesses (i.e., receives or can reconstruct)an arbitrary packet as function of p, the probability that a packet is lost betweentwo adjacent nodes. We have extended the mathematical model of minimum depthtrees presented in [7] for the BCA case. While the model considers homogeneous,independent losses between the adjacent peers, it can be modified to deal withheterogeneous and correlated losses and also node departures as shown in [6]. Asit was shown in [6], for every (n, k) there is a loss probability pmax above which πapproaches 0 as the number of layers increases. We refer to the data distributionas stable if p < pmax and call it unstable otherwise.

Fig. 5 shows π as a function of p obtained with the model for m = 4 and n = t.

Page 50: P2P Live Video Streaming - DiVA Portal

A-10

0 0.05 0.1 0.15 0.2 0.25 0.30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Loss probability (p)

Pack

et p

osse

ssio

n pr

obab

ility

(π)

t=4,d=1,N=500t=4,d=1,N=50000t=4,d=1,π

f(∞)

t=8,d=2,N=500t=8,d=2,N=50000t=8,d=2,π

f(∞)

t=16,d=4,N=500t=16,d=4,N=50000t=16,d=4,π

f(∞)

Figure 5: π vs. p for m = 4, n = t, k/n =0.75. BCA policy.

0 0.05 0.1 0.15 0.2 0.25 0.30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Loss probability (p)

Pack

et p

osse

ssio

n pr

obab

ility

(π)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 6: π vs. p for m = 4, n = t, k/n =0.75. BCA policy, simulation results.

The vertical bars show the values π(1) at the upper end and π(L− 1) at the lowerend. We included them for d = 1 only to ease readability, but they show the sameproperties for other values of d as well. The figure shows that π remains highand is practically unaffected by N and d as long as p < pmax. It drops howeveras the packet loss probability crosses the threshold pmax. The drop of the packetpossession probability gets worse as the number of nodes and hence the numberof layers in the overlay increases. At the same time, for p > pmax, the differencebetween π(1) and π(L − 1) (the packet possession probability of nodes that arefertile in the first and the penultimate layers, respectively) increases. Furthermore,increasing t (and hence n) increases π in a stable system, but the drop of the packetpossession probability gets faster in the unstable state due to the longer FEC codes.

0 0.05 0.1 0.15 0.2 0.25 0.30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Loss probability (p)

Pack

et p

osse

ssio

n pr

obab

ility

(π)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 7: π vs. p for m = 4, n = t, k/n =0.75. UCA policy, simulation results.

To validate our model we firstpresent simulation results for the BCApolicy. After the 5000 s warm-up pe-riod with node arrivals and departureswe send 1000 packets through the over-lay and measure the ratio of the pos-sessed packets per block. Fig. 6 showsπ as a function of p for the same scenar-ios as Fig. 5. Fig. 6 shows a good matchof the simulation results with the ana-lytical results.

To see how the cog allocation policyinfluences the results, we show π as afunction of p in Fig. 7 for the same sce-narios as in Fig. 6 but for the UCA policy. Comparing the figures we see that π isthe same for p < pmax, but is higher in the unstable state of the overlay. The better

Page 51: P2P Live Video Streaming - DiVA Portal

A-11

performance of the UCA policy is due to that the overlay has less layers than usingthe BCA policy. With the UCA policy nodes tend to have more children in thefertile tree where they are closest to the root, so that the tree structure is similarto the d = 1 case and the number of layers is lower than using BCA.

Hence, the data distribution performance of an overlay with t trees and d = 1can be closely resembled with an overlay with d > 1 and td trees by employing amechanism that promotes parents close to the root, such as the UCA policy. Doingso allows the use of longer FEC codes and at the same time one can decrease thereconnection failure probability.

5 Conclusion

In this paper, we proposed and analyzed a peer-to-peer live streaming solutionbased on multiple distribution trees and FEC. We proposed the free allocation ofthe outgoing bandwidth of the peers across several trees. The aim of this designis to avoid tree disconnections after node departures, which can happen with highprobability in overlays where all the peers can forward data in one tree only.

We analyzed the balanced (BCA), the reserving (RCA) and the unconstrainedcog allocation (UCA) policies. Based on analytic models and simulations we con-cluded that increasing the number of fertile trees increases the overlay stability,with the UCA policy giving the highest increase. Furthermore, the number of treesof the overlay can be increased without worsening the overlay’s stability if the ratioof the number of trees and the number of fertile trees is kept constant.

We showed that the number of fertile trees and the allocation policy does notinfluence the performance of the data transmission in the stable region of the overlay,and with the UCA policy the data distribution performance can be close to thatof the minimum depth trees also in the unstable region. Our results indicate thatadjusting the number of fertile trees can be a means to improve the overlay stabilitywithout decreasing the performance of the data transmission.

References

[1] M. Castro, P. Druschel, A-M. Kermarrec, A. Nandi, A. Rowstron, and A. Singh,“SplitStream: High-bandwidth multicast in a cooperative environment,” inProc. of ACM SOSP, 2003.

[2] V. N. Padmanabhan, H.J. Wang, and P.A Chou, “Resilient peer-to-peerstreaming,” in Proc. of IEEE ICNP, 2003, pp. 16–27.

[3] E. Setton, J. Noh, and B. Girod, “Rate-distortion optimized video peer-to-peermulticast streaming,” in Proc. of ACM APPMS, 2005, pp. 39–48.

Page 52: P2P Live Video Streaming - DiVA Portal

A-12

[4] M. Bishop, S. Rao, and K. Sripanidkulchai, “Considering priority in overlaymulticast protocols under heterogeneous environments,” in Proc. of IEEEInfocom, April 2006.

[5] X. Liao, H. Jin, Y. Liu, L.M. Ni, and D. Deng, “Anysee: Scalable live streamingservice based on inter-overlay optimization,” in Proc. of IEEE Infocom, April2006.

[6] Gy. Dan, V. Fodor, and G. Karlsson, “On the stability of end-point-basedmultimedia streaming,” in Proc. of IFIP Networking, May 2006, pp. 678–690.

[7] Gy. Dan, I. Chatzidrossos, V. Fodor, and G. Karlsson, “On the performance oferror-resilient end-point-based multicast streaming,” in Proc. of IWQoS, June2006, pp. 160–168.

[8] I.S. Reed and G. Solomon, “Polynomial codes over certain finite fields,” SIAMJ. Appl. Math., vol. 8, no. 2, pp. 300–304, 1960.

[9] E. Veloso, V. Almeida, W. Meira, A. Bestavros, and S. Jin, “A hierarchicalcharacterization of a live streaming media workload,” in Proc. of ACM IMC,2002, pp. 117–130.

[10] Ellen W. Zegura, Ken Calvert, and S. Bhattacharjee, “How to model an inter-network,” in Proc. of IEEE Infocom, March 1996, pp. 594–602.

[11] J-Y. Le Boudec and M. Vojnovic, “Perfect simulation and stationarity of aclass of mobility models,” in Proc. of IEEE Infocom, March 2004.

Page 53: P2P Live Video Streaming - DiVA Portal

Paper B

Streaming Performance in Multiple-tree-basedOverlays

Gyorgy Dan, Viktoria Fodor and Ilias Chatzidrossos.In Proceedings of IFIP Networking, Atlanta, Georgia, May 2007.

Page 54: P2P Live Video Streaming - DiVA Portal
Page 55: P2P Live Video Streaming - DiVA Portal

Streaming Performance in Multiple-tree-based

Overlays

Gyorgy Dan, Viktoria Fodor and Ilias ChatzidrossosLaboratory for Communication Networks

School of Electrical EngineeringKTH, Royal Institute of Technology

E-mail: {gyuri,vfodor,iliasc}@ee.kth.se

Abstract

In this paper we evaluate the data transmission performance of a gener-alized multiple-tree-based overlay architecture for peer-to-peer live stream-ing that employs multipath transmission and forward error correction. Wegive mathematical models to describe the error recovery in the presence ofpacket losses. We evaluate the data distribution performance of the overlay,its asymptotic behavior, the stability regions for the data transmission, andanalyze the system behavior around the stability threshold. We argue thatthe composed measure of the mean and the variance of the packet possessionprobability can support adaptive forward error correction.

1 Introduction

The success of peer-to-peer overlays for live multicast streaming depends on theirability to maintain acceptable perceived quality at all the peers, that is, to providedata transmission with low delay and information loss. Live streaming solutionsusually apply multiple distribution trees and some form of error control to dealwith packet losses due to congestion and peer departures. In these systems peershave to relay data to their child nodes with low delay, which limits the possibilitiesof error recovery. Consequently, the main problem to be dealt with is the spatialpropagation and thus the accumulation of losses, which results in low perceivedquality for peers far from the source.

Several works deal with the management of the overlay, with giving incentivesfor collaboration, with peer selection and tree reconstruction considering peer het-

1This work was in part supported by the Swedish Foundation for Strategic Research throughthe projects Winternet and AWSI, and by Wireless@KTH

1

Page 56: P2P Live Video Streaming - DiVA Portal

B-2

erogeneity and the underlying network topology ([1, 2, 3, 4, 5, 6] and referencestherein).

In [7] the authors propose time shifting and video patching to deal with lossesand discuss related channel allocation and group management issues. In [8] ro-bustness is achieved by distributing packets to randomly chosen neighbors outsidethe distribution tree. In [9] retransmission of the lost data is proposed to limittemporal error propagation. CoopNet [10] and SplitStream [11] propose the use ofmultiple distribution trees and a form of multiple description coding (MDC) basedon forward error correction (FEC). In the case of packet losses peers can stop errorpropagation by reconstructing the video stream from the set of received substreamsusing error correcting codes.

There are several designs proposed and also implemented, the evaluation of thesesolutions is however mostly based on simulations and measurements. Our goal is todefine abstract models of peer-to-peer streaming overlays that help us to understandsome basic characteristics of streaming in multiple transmission trees and thus, cansupport future system design.

Previously, we proposed mathematical models to describe the behavior of Coop-Net like architectures in [12, 13, 14]. Our results showed that the two architecturesproposed in the literature, and used as a basis in recent works (e.g., [2, 15]) arestraightforward but not optimal. Minimum depth trees minimize the number ofaffected peers at peer departure, minimize the effect of error propagation from peerto peer, and introduce low transmission delay. Nevertheless, the overlay is unstableand may become disconnected when one of the trees runs out of available capacityafter consecutive peer departures. Minimum breadth trees are stable and easy tomanage, but result in long transmission paths. Thus many nodes are affected if apeer leaves, there may be large delays, and the effect of error propagation may besignificant.

In [16] we proposed a generalized multiple-tree-based architecture and showedthat the stability of the overlay can be increased significantly by the flexible allo-cation of peer output bandwidth across several transmission trees. In this paper,we evaluate the performance of this generalized architecture. First we show howthe allocation of peer output bandwidth affects the data distribution performanceand discuss whether proper bandwidth allocation can lead to both increased overlaystability and good data distribution performance. We show that the packet posses-sion probability at the peers decreases ungracefully if the redundancy level is notadequate, and evaluate how the variance of the packet possession probability canpredict quality degradation.

The rest of the paper is organized as follows. Section 2 describes the consideredoverlay structure and error correction scheme. We evaluate the stability of the datadistribution in Section 3. Section 4 discusses the performance of the overlay basedon the mathematical models and simulations and we conclude our work in Section 5.

Page 57: P2P Live Video Streaming - DiVA Portal

B-3

2 System description

The peer-to-peer streaming system discussed in this paper is based on two key ideas:the overlay consists of multiple transmission trees to provide multiple transmissionpaths from the sender to all the peers, and data transmission is protected by blockbased FEC.

2.1 Overlay structure

The overlay consists of the streaming server and N peer nodes. The peer nodes areorganized in t distribution trees with the streaming server as the root of the trees.The peers are members of all t trees, and in each tree they have a different parentnode from which they receive data. We denote the maximum number of childrenof the root node in each tree by m, and we call it the multiplicity of the root node.We assume that nodes do not contribute more bandwidth towards their children asthey use to download from their parents, which means, that each node can have upto t children to which it forwards data.

A node can have children in up to d of the t trees, called the fertile trees of thenode. A node is sterile in all other trees, that is, it does not have any children. Wediscuss two different policies that can be followed to allocate output bandwidth inthe fertile trees. With the unconstrained capacity allocation (UCA) policy a nodecan have up to t children in any of its fertile trees. With the balanced capacityallocation (BCA) policy a node can have up to dt/de children in any of its fertiletrees.

By setting d = t one gets the minimum breadth tree described in [10], and bysetting d = 1 one gets the minimum depth tree evaluated in [2, 6, 10, 15]. For1 < d < t the number of layers in the overlay is O(logN) as for d = 1.

The construction and the maintenance of the trees can be done either by adistributed protocol (structured, like in [11] or unstructured, like in [9]) or by acentral entity, like in [10]. The results presented in this paper are not dependenton the particular solution used. Nevertheless, we defined a centralized overlayconstruction algorithm in [16]. The objective of the algorithm is to minimize thedepth of the trees and the probability that trees run out of free capacity after nodedepartures. This is achieved by pushing sterile nodes to the lower layers of the treesand by assigning arriving nodes to be fertile in trees with the least available capacity.If we denote the number of layers in the trees by L, then in a well maintained treeeach node is 1 ≤ i ≤ L hops away from the root node in its fertile trees, andL − 1 ≤ i ≤ L hops away in its sterile trees. As shown in [16], increasing thenumber of fertile trees increases the overlay stability, with significant gain alreadyat d = 2, and the UCA policy giving the highest increase.

Fig. 1 shows an overlay constructed with the proposed algorithm for t = 3,m = 3 and d = 2, also showing how the overlay changes when a new node joins.

Page 58: P2P Live Video Streaming - DiVA Portal

B-4

R

1 4 3

6

R

7 37 6 5 8

1 2 4

8 6

R

2 3 5

17 8

Tree 1 Tree 2 Tree 3

2

5

4

R

1 4 3

6

R

7

37

6 5 8

1 2 4

8 6

R

2 3 5

17 8

Tree 1 Tree 2 Tree 3

2

5

49 9

3

a) b)

Figure 1: a) Overlay with N = 8, t = 3,m = 3 and d = 2, b) the same overlay withN = 9. Identification numbers imply the order of arrival, squares indicate that the nodeis fertile.

2.2 Data distribution with forward error correction

The root uses block based FEC, e.g., Reed-Solomon codes [17], so that nodes canrecover from packet losses due to network congestion and node departures. Toevery k packets of information it adds c packets of redundant information, whichresults in a block length of n = k + c. We denote this FEC scheme by FEC(n,k).If the root would like to increase the ratio of redundancy while maintaining itsbitrate unchanged, then it has to decrease its source rate. Lost packets can bereconstructed as long as at most c packets are lost out of n packets. The root sendsevery tth packet to its children in a given tree in a round-robin manner. If n ≤ tthen at most one packet of a block is distributed over the same distribution tree.Peer nodes relay the packets upon reception to their respective child nodes. Oncea node receives at least k packets of a block of n packets it recovers the remainingc packets and forwards the ones belonging to its fertile trees.

3 Data distribution model

We use two metrics to measure the performance of the data distribution in theoverlay. The first metric is the probability π that an arbitrary node receives or canreconstruct (i.e., possesses) an arbitrary packet. If we denote by ρr the numberof packets possessed by node r in an arbitrary block of packets, then π can beexpressed as the average ratio of packets possessed in a block over all nodes, i.e.,π = E[

∑r ρr/n/N ]. The second metric is σ, the average standard deviation of ρr/n

over all nodes, i.e., σ2 = E[∑r (ρr/n)2/N ]− π2.

The mathematical model we present describes the behavior of the overlay inthe presence of independent packet losses and without node dynamics. We denotethe probability that a packet is lost between two adjacent nodes by p. We assumethat the probability that a node is in possession of a packet is independent of thata node in the same layer is in possession of a packet. We also assume that nodescan wait for redundant copies to reconstruct a packet for an arbitrary amount oftime. For the model we consider a tree with the maximum number of nodes in thelast layer, hence nodes are fertile in layers 1..L − 1 and are sterile in layer L. Forsimplicity, we assume that n = t and t/d is an integer. We will comment on thepossible effects of our assumptions later. The model assumes the BCA policy. By

Page 59: P2P Live Video Streaming - DiVA Portal

B-5

modifying the weights in (1) the model can be used to consider other policies aswell. For brevity we restrict the analytical evaluation to this case, and compare theresults to simulations with other policies.

Hence, our goal is to calculate π(z)= E[∑r (ρr/n)(z)/N ] =

∑r E[(ρr/n)(z)]/N ,

the average of the zth moment (z ∈ {1, 2}) of the ratio of possessed packets. Weintroduce π(i)(z), the zth moment of the ratio of possessed packets for a node thatis in layer i in its fertile trees. For simplicity we assume that nodes are in the samelayer in their fertile trees. We can express π(z) by weighting the π(i)(z) with theportion of nodes that are in layer i of their fertile trees.

π(z) =L−1∑

i=1

(t/d)i−1

((t/d)L−1 − 1)/(t/d− 1)π(i)(z). (1)

To calculate π(i)(z) we have to calculate the probabilities πf (i) that a node, whichis in layer i in its fertile tree, receives or can reconstruct an arbitrary packet in itsfertile tree. Since the root node possesses every packet, we have that πf (0) = 1. Theprobability that a node in layer i receives a packet in a tree is πa(i) = (1−p)πf (i−1).A node can possess a packet in its fertile tree either if it receives the packet or ifit can reconstruct it using the packets received in the other trees. Reconstructioncan take place if the number of received packets is at least k out of the remainingn− 1, hence we can write for 1 ≤ i ≤ L− 1

πf (i) = πa(i) +

(1− πa(i))

n−1∑

j=k

min(j,d−1)∑

u=max(0,j−n+d)

(d− 1u

)πa(i)u(1− πa(i))d−1−u

(n− dj − u

)πa(L)j−u(1− πa(L))n−d−j+u

}. (2)

Based on the probabilities πf (i) we can express π(i)(z) (1 ≤ i ≤ L − 1). If a nodereceives at least k packets in a block of n packets then it can use FEC to reconstructthe lost packets, and hence possesses all n packets. Otherwise, FEC cannot be usedto reconstruct the lost packets. Packets can be received in the d fertile trees and inthe t− d sterile trees. Hence for π(i)(z) we get the equation

π(i)(z) =1n

n−d∑

j=1

d∑u=1

τ(j + u)z(du

)πa(i)u(1− πa(i))d−u (3)

(n− dj

)πa(L)j(1− πa(L))n−d−j ,

where τ(j) indicates the number of packets possessed after FEC reconstruction if jpackets have been received:

τ(j) ={j 0 ≤ j < kn k ≤ j ≤ n.

Page 60: P2P Live Video Streaming - DiVA Portal

B-6

We use an iterative method to calculate the probabilities πf (i). First, we set πf (L−1)(0) = (1 − p)L−1 and calculate the probabilities πf (i)(1), 1 ≤ i < L. Then, initeration r, we calculate πf (i)(r), 1 ≤ i < L using πf (L − 1)(r−1). The iterationstops when |πf (L−1)(r−1)−πf (L−1)(r)| < ε, where ε > 0. The π(i)(z) can then becalculated using (3). The calculation of π and σ are straightforward, since π = π(1),and σ2 = π(2) − π2

3.1 Asymptotic behavior for large N

In the following we give an asymptotic bound on π to better understand its evolu-tion. It is clear that πf (i) is a non-increasing function of i and πf (i) ≥ 0. Hence, wecan give an upper estimate of πf (i) by assuming that the nodes that forward datain layer i are sterile in the same layer. Then, instead of (2) we get the followingnonlinear recurrence equation

πf (i+ 1) = πa(i+ 1) + (4)

(1− πa(i+ 1))n−1∑

j=n−c

(n− 1j

)πa(i+ 1)j(1− πa(i+ 1))n−1−j .

This equation is the same as (2) in [13], and thus the analysis shown there canbe applied to describe the evolution of πf (i). For brevity, we only state the mainresults regarding πf (i), for a detailed explanation see [13]. For every (n, k) there isa loss probability pmax below which the packet possession probability πf (∞) > 0and above which πf (∞) = 0. Furthermore, for any 0 < δ < 1 there is (n, k) suchthat πf (∞) ≥ δ.

Consequently, in the considered overlay if p > pmax, then limN→∞ π = 0, be-cause πf (i+ 1) ≥ πf (i+ 1) ≥ π(i+ 1)(1), and limN→∞ πf (L−1) = 0. For p < pmaxstability depends on the number of layers in the overlay and the FEC block lengthdue to the initial condition πf (L − 1)(0) = (1 − p)L−1, but not directly on thenumber of nodes. This explains why placing nodes with large outgoing bandwidthsclose to the root improves the overlay’s performance [2, 6]. In the case of stabilityπf (i) ≥ πf (∞) > 0 and π(i)(1) ≥ πf (∞) > 0.

3.2 Discussion of the assumptions

In the following we discuss the validity of certain assumptions made in the model.The model does not take into account the correlations between packet losses in theInternet. Nevertheless, it can be extended to heterogeneous and correlated lossesby following the procedure presented in [13] for the minimum breadth trees. Lossesoccurring in bursts on the output links of the nodes influence the performance ofthe overlay if several packets of the same block are distributed over the same tree,that is, if n > t. Bursty losses in the backbone influence the performance if packetsof different distribution trees traverse the same bottleneck. The analysis in [13]

Page 61: P2P Live Video Streaming - DiVA Portal

B-7

showed that loss correlations on the input links and heterogeneous losses slightlydecrease the performance of the overlay.

The model can be extended to nodes with heterogeneous input and output band-widths. The procedure is similar to that followed when modeling heterogeneouslosses [13], but the effects of the heterogeneous bandwidths on the trees’ structurehave to be taken into account. We decided to show equations for the homogeneouscase here to ease understanding.

In the analysis we assume that the number of nodes in the last layer of the treeis maximal. If the number of nodes in the last layer of the tree is not maximal thensome nodes are in layer L − 1 in their sterile trees, and the overlay’s performancebecomes slightly better. The results of the asymptotic analysis still hold however.

Our results for block based FEC apply to PET and the MDC scheme consideredin [10], where different blocks (layers) of data are protected with different FECcodes. The packet possession probability for the different layers depends on thestrength of the FEC codes protecting them, and can be calculated using the model.

We do not model the temporal evolution of the packet possession probability.We use simulations to show that the performance predicted by the model is achievedwithin a time suitable for streaming applications.

The model does not take into account node departures, an important sourceof disturbances for the considered overlay. Following the arguments presented in[13] node departures can be incorporated in the model as an increase of the lossprobability by pω = Nd/N × θ, where Nd is the mean number of departing nodesper time unit and θ is the time nodes need to recover (discovery and reconnection)from the departure of a parent node. The simulation results presented in [13] showthat for low values of pω this approximation is accurate.

The results of the model apply for n < t without modifications, and a similarmodel can be developed for n > t by considering the distribution of the numberof packets possessed by the nodes in their fertile trees. However, for n > t nodedepartures lead to correlated losses in the blocks of packets, which aggravates theireffect on the performance.

4 Performance evaluation

In the following we analyze the behavior of the overlay using the analytical modelpresented in the previous section and via simulations. For the simulations we de-veloped a packet level event-driven simulator.

We used the GT-ITM [18] topology generator to generate a transit-stub modelwith 10000 nodes and average node degree 6.2. We placed each node of the overlayat random at one of the 10000 nodes and used the one way delays given by thegenerator between the nodes. The mean delay between nodes of the topology is44 ms. The delay between overlay nodes residing on the same node of the topologywas set to 1 ms. Losses on the paths between the nodes of the overlay occur

Page 62: P2P Live Video Streaming - DiVA Portal

B-8

independent of each other according to a Bernoulli model with loss probability p.We consider the streaming of a 112.8 kbps data stream to nodes with link capacity128 kbps. The packet size is 1410 bytes. Nodes have a playout buffer capable ofholding 140 packets, which corresponds to 14 s of playout delay. Each node has anoutput buffer of 80 packets to absorb the bursts of packets in its fertile trees.

0 2 4 6 8 10 12 140.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Layer (i)π(

i)

N=500,d=1,p=0.06N=500,d=1,p=0.12N=500,d=1,p=0.14N=500,d=2,p=0.06N=500,d=2,p=0.12N=500,d=2,p=0.14N=50000,d=1,p=0.06N=50000,d=1,p=0.12N=50000,d=1,p=0.14N=50000,d=2,p=0.06N=50000,d=2,p=0.12N=50000,d=2,p=0.14

Figure 2: π(i) vs. i for m = t = n = 4,c = 1.

We assume that session holdingtimes follow a log-normal distributionwith mean 1/µ = 306s and that nodesjoin the overlay according to a Poissonprocess with λ = Nµ, supported bystudies [19, 20]. To obtain the resultsfor a given overlay size N , we start thesimulation with N nodes in its steadystate as described in [21] and let nodesjoin and leave the overlay for 5000 s.The measurements are made after thiswarm-up period for a static tree over1000 s and the presented results are theaverages of 10 simulation runs. The re-sults have less than 5 percent margin oferror at a 95 percent level of confidence.

Fig. 2 shows π(i) as a function of ifor t = n = 4, c = 1, and different overlay sizes and values of d as obtained bythe mathematical model (i.e., the BCA policy). The value of the threshold forthe FEC(4,3) code is pmax = 0.129. The figure shows that when the overlay isstable (e.g., ∀d,N at p = 0.06), neither its size nor d has a significant effect on π(i).However, in the unstable state (d = 2, N = 50000 at p = 0.12; ∀d,N at p = 0.14)both increasing N and increasing d decrease π(i), as the number of layers in theoverlay increases in both cases.

Fig. 3 shows π as a function of p obtained with the mathematical model form = 4 and n = t. The vertical bars show the values π(1) at the upper end andπ(L − 1) at the lower end. We included them for d = 1 only to ease readability,but they show the same properties for other values of d as well. The figure showsthat π remains high and is unaffected by N and d as long as the overlay is stable.It drops however once the overlay becomes unstable, and the drop of the packetpossession probability gets worse as the number of nodes and hence the numberof layers in the overlay increases. At the same time the difference between π(1)and π(L− 1) (the packet possession probability of nodes that are fertile in the firstand the penultimate layers, respectively) increases. Furthermore, increasing t (andhence n) increases π in a stable system, but the stability region gets smaller andthe drop of the packet possession probability gets faster in the unstable state dueto the longer FEC codes. The curves corresponding to πf (∞) show the value of theasymptotic bound calculated using (4).

Page 63: P2P Live Video Streaming - DiVA Portal

B-9

0 0.05 0.1 0.15 0.2 0.25 0.30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Loss probability (p)

Pack

et p

osse

ssio

n pr

obab

ility

(π)

t=4,d=1,N=500t=4,d=1,N=50000t=4,d=1,π

f(∞)

t=8,d=2,N=500t=8,d=2,N=50000t=8,d=2,π

f(∞)

t=16,d=4,N=500t=16,d=4,N=50000t=16,d=4,π

f(∞)

Figure 3: π vs. p for m = 4, n = t,k/n = 0.75.

0 0.05 0.1 0.15 0.2 0.25 0.30

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Loss probability (p)

Stde

v of

Pac

ket p

osse

ssio

n pr

obab

ility

(σπ)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 4: σπ vs. p for m = 4, n = t,k/n = 0.75.

0 0.05 0.1 0.15 0.2 0.25 0.30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Loss probability (p)

Pack

et p

osse

ssio

n pr

obab

ility

(π)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 5: π vs. p for m = 4, n = t, k/n =0.75. BCA policy, simulation results.

0 0.05 0.1 0.15 0.2 0.25 0.30

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Loss probability (p)

Stde

v of

Pac

ket p

osse

ssio

n pr

obab

ility

( σ

π)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 6: σπ vs. p for m = 4, n = t,k/n = 0.75. BCA policy, simulation re-sults.

Due to the ungraceful degradation of π it is difficult to maintain the stabilityof the overlay in a dynamic environment by measuring the value of π. Hence, welook at the standard deviation of the packet possession probability. Fig. 4 showsthe standard deviation σπ as a function of p obtained with the mathematical modelfor m = 4 and n = t. The standard deviation increases rapidly even for low valuesof p and reaches its maximum close to pmax. Increasing the value of t decreases thestandard deviation of π, i.e., the number of packets received in a block varies lessamong the nodes of the overlay. Its quick response to the increase of p makes σπmore suitable for adaptive error control than π itself.

To validate our model we first present simulation results for the BCA policy.Figs. 5 and 6 show π and σπ respectively as a function of p for the same scenarios asFigs. 3 and 4. Both figures show a good match with the analytical model and confirmthat the increase of the standard deviation is a good indicator of the increasing

Page 64: P2P Live Video Streaming - DiVA Portal

B-10

0 0.05 0.1 0.15 0.2 0.25 0.30

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Loss probability (p)

Pack

et p

osse

ssio

n pr

obab

ility

(π)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 7: π vs. p for m = 4, n = t, k/n =0.75. UCA policy, simulation results.

0 0.05 0.1 0.15 0.2 0.25 0.30

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Loss probability (p)

Stde

v of

Pac

ket p

osse

ssio

n pr

obab

ility

( σ

π)

t=4,d=1,N=500t=4,d=1,N=50000t=8,d=2,N=500t=8,d=2,N=50000t=16,d=4,N=500t=16,d=4,N=50000

Figure 8: σπ vs. p for m = 4, n = t,k/n = 0.75. UCA policy, simulation re-sults.

packet loss probability. For long FEC codes the simulation results show slightlyworse performance close to the stability threshold compared to the analytical results.The difference is due to late arriving packets, i.e., FEC reconstruction is not possiblewithin the time limit set by the playout buffer’s size.

0 5 10 15 20 250

0.2

0.4

0.6

0.8

1

Layer (i)

P(A

nod

e is

ste

rile

in la

yer

≤ i)

t=4,m=4,d=1,Analyticalt=4,m=4,d=1t=8,m=4,d=2,UCAt=8,m=4,d=2,BCAt=16,m=4,d=4,UCAt=16,m=4,d=4,BCAt=16,m=16,d=1

Figure 9: CDF of the layer where nodes aresterile for N = 50000. Simulation results.

To see the effects of the capacity al-location policy, we show π as a func-tion of p in Fig. 7 for the same scenar-ios as in Fig. 5 but for the UCA pol-icy. Comparing the figures we see thatπ is the same in the stable state, but ishigher in the unstable state of the over-lay. Furthermore, the region of stabilityis wider. Comparing the results for σπshown in Fig. 8 we can observe that forN = 50000 and d > 1 the standard de-viation is somewhat higher compared tothe BCA policy and is similar in shapeto the d = 1 case. This and the widerregion of stability using the UCA pol-icy is due to that the overlay has lesslayers than using the BCA policy as itis shown in Fig. 9. The figure shows the cumulative distribution function (CDF) ofthe layer where the nodes of the overlay are in their sterile trees.

There is practically no difference between the distributions for d = 1 and theBCA policy with d > 1 for the same t/d value. With the UCA policy nodes tend tohave more children in the fertile tree where they are closest to the root due to theparent selection algorithm, so that the trees’ structure is similar to the d = 1 case

Page 65: P2P Live Video Streaming - DiVA Portal

B-11

and the number of layers is lower than using BCA (compare the results for t = 16,d = 1 vs. t = 16, d = 4, UCA vs. t = 16, d = 4, BCA).Hence, the data distribution performance of an overlay with t trees and d = 1can be closely resembled with an overlay with d > 1 and td trees by employinga (centralized or distributed) mechanism that promotes parents close to the root,such as the UCA policy. Doing so allows the use of longer FEC codes, hence betterperformance in the stable region but a similar stability region due to the lowernumber of layers. At the same time one can decrease the probability that a nodefails to reconnect to the overlay after the departure of a parent node [16]. LongerFEC codes decrease the variance of the packet possession probability and allowa smoother adaptation of the redundancy as a function of the measured networkstate.

5 Conclusion

In this paper, we analyzed a peer-to-peer live streaming solution based on multipletransmission trees, FEC and free allocation of the output bandwidth of the peersacross several trees. The aim of this design is to avoid tree disconnections after nodedepartures, which can happen with high probability in resource scarce overlays ifall the peers can forward data in one tree only.

We presented a mathematical model to express the packet possession probabilityin the overlay for the case of independent losses and the BCA policy. We deter-mined the stability regions as a function of the loss probability between the peers,of the number of layers and of the FEC block length, and analyzed the asymptoticbehavior of the overlay for a large number of nodes. We calculated the variance ofthe packet possession probability to study the overlay around the stability thresh-old. We concluded that the variance increases significantly with the packet lossprobability between the peers and consequently it is a good performance measurefor adaptive forward error correction. It will be subject of future work to design arobust stabilizing controller that can maintain a target packet possession probabilityin a dynamic environment.

We concluded that as long as the overlay is stable, the performance of the datatransmission is not influenced by the number of fertile trees and the allocationpolicy, while longer FEC codes improve it. Increasing the number of fertile treesdecreases however the packet possession probability in the overlay in the unstableregion due to longer transmission paths. Nevertheless, with the UCA policy onecan increase the number of trees, that of the fertile trees and the FEC block length,while the performance can be close to that of the minimum depth trees, becausethe UCA policy leads to shallow tree structures. These results show that adjustingthe number of fertile trees can be a means to improve the overlays’ stability withoutdeteriorating the performance of the data distribution.

Page 66: P2P Live Video Streaming - DiVA Portal

B-12

References

[1] Liao, X., Jin, H., Liu, Y., Ni, L., Deng, D.: Anysee: Scalable live streamingservice based on inter-overlay optimization. In: Proc. of IEEE INFOCOM.(April 2006)

[2] Bishop, M., Rao, S., Sripanidkulchai, K.: Considering priority in overlay mul-ticast protocols under heterogeneous environments. In: Proc. of IEEE INFO-COM. (April 2006)

[3] Cui, Y., Nahrstedt, K.: Layered peer-to-peer streaming. In: Proc. of NOSS-DAV. (2003) 162–171

[4] Cui, Y., Nahrstedt, K.: High-bandwidth routing in dynamic peer-to-peerstreaming. In: Proc. of ACM APPMS. (2005) 79–88

[5] Tan, G., S.A., J.: A payment-based incentive and service differentiation mech-anism for peer-to-peer streaming broadcast. In: Proc. of IEEE IWQoS. (2006)41–50

[6] Sung, Y., Bishop, M., Rao, S.: Enabling contribution awareness in an overlaybroadcasting system. In: Proc. of ACM SIGCOMM. (2006) 411–422

[7] Guo, M., Ammar, M.: Scalable live video streaming to cooperative clientsusing time shifting and video patching. In: Proc. of IEEE INFOCOM. (2004)

[8] Banerjee, S., Lee, S., Braud, R., Bhattacharjee, B., Srinivasan, A.: Scalableresilient media streaming. In: Proc. of NOSSDAV. (2004)

[9] Setton, E., Noh, J., Girod, B.: Rate-distortion optimized video peer-to-peermulticast streaming. In: Proc. of ACM APPMS. (2005) 39–48

[10] Padmanabhan, V., Wang, H., Chou, P.: Resilient peer-to-peer streaming. In:Proc. of IEEE ICNP. (2003) 16–27

[11] Castro, M., Druschel, P., Kermarrec, A., Nandi, A., Rowstron, A., Singh,A.: SplitStream: High-bandwidth multicast in a cooperative environment. In:Proc. of ACM SOSP. (2003)

[12] Dan, G., Fodor, V., Karlsson, G.: On the asymptotic behavior of end-point-based multimedia streaming. In: Proc. of Internat. Zurich Seminar on Com-munication. (2006)

[13] Dan, G., Fodor, V., Karlsson, G.: On the stability of end-point-based multi-media streaming. In: Proc. of IFIP Networking. (May 2006) 678–690

[14] Dan, G., Chatzidrossos, I., Fodor, V., Karlsson, G.: On the performance oferror-resilient end-point-based multicast streaming. In: Proc. of IWQoS. (June2006) 160–168

Page 67: P2P Live Video Streaming - DiVA Portal

B-13

[15] Sripanidkulchai, K., Ganjam, A., Maggs, B., Zhang, H.: The feasibility ofsupporting large-scale live streaming applications with dynamic applicationend-points. In: Proc. of ACM SIGCOMM. (2004) 107–120

[16] Dan, G., Chatzidrossos, I., Fodor, V.: On the performance of multiple-tree-based peer-to-peer live streaming. In: Proc. of IEEE INFOCOM. (May 2007)

[17] Reed, I., Solomon, G.: Polynomial codes over certain finite fields. SIAM J.Appl. Math. 8(2) (1960) 300–304

[18] Zegura, E.W., Calvert, K., Bhattacharjee, S.: How to model an internetwork.In: Proc. of IEEE INFOCOM. (March 1996) 594–602

[19] Veloso, E., Almeida, V., Meira, W., Bestavros, A., Jin, S.: A hierarchicalcharacterization of a live streaming media workload. In: Proc. of ACM IMC.(2002) 117–130

[20] Sripanidkulchai, K., Maggs, B., Zhang, H.: An analysis of live streamingworkloads on the Internet. In: Proc. of ACM IMC. (2004) 41–54

[21] Le Boudec, J.Y., Vojnovic, M.: Perfect simulation and stationarity of a classof mobility models. In: Proc. of IEEE INFOCOM. (March 2004)

Page 68: P2P Live Video Streaming - DiVA Portal

Paper C

On the Effect of Free-riders in P2P StreamingSystems

Ilias Chatzidrossos, Viktoria Fodor.In Proceedings of the 4th International Workshop on QoS inMultiservice IP Networks (QoS-IP), Venice, Italy, February 2008.

Page 69: P2P Live Video Streaming - DiVA Portal
Page 70: P2P Live Video Streaming - DiVA Portal

On the Effect of Free-riders in

P2P Streaming Systems

Ilias Chatzidrossos, Viktoria Fodor

Wireless@KTH, KTH, Royal Institute of TechnologyOsquldas vag 10, 100 44 Stockholm, Sweden

[email protected]

[email protected]

Abstract

Peer-to-peer applications exploit the users willingness to contribute withtheir upload transmission capacity, achieving this way a scalable system wherethe available transmission capacity increases with the number of participat-ing users. Since not all the users can offer upload capacity with high bitrateand reliability, it is of interest to see how these non-contributing users canbe supported by a peer-to-peer application. In this paper we investigate howfree-riders, that is, non-contributing users can be served in a peer-to-peerstreaming system. We consider different policies of dealing with free-ridersand discuss how performance parameters such as blocking and disconnectionof free-riders are influenced by these policies, the overlay structure and sys-tem parameters as overlay size and source upload capacity. The results showthat while the multiple-tree structure may affect the performance free-ridersreceive, the utilization of the transmission resources is still comparable to thatof an optimized overlay.

1 Introduction

A media streaming system following the peer-to-peer approach is based on the col-laboration of users, that is, their willingness to contribute with their own resourcesto achieve common welfare. In a peer-to-peer system users form an applicationlayer overlay network. Users joining the overlay can receive media streams “fromthe overlay” and distribute data they possess “to the overlay”. Specifically, it meansthat users build up point-to-point supplier-receiver relations to distribute the mediastream. As a result, the availability of the stream and the transmission resourcesincrease with the number of users in the overlay. This makes the system scalable.

While many of the users in a peer-to-peer streaming system are willing to col-laborate and offer their upload capacity to serve other peers, there might be users

1

Page 71: P2P Live Video Streaming - DiVA Portal

C-2

that do not contribute to the transmission resources of the overlay. These usersare commonly called as free-riders. While there are various solutions to make free-riders collaborate [1, 2], it might be of interest of peer-to-peer systems to serve theones who have not enough upload capacity to contribute to the system resourcessignificantly, or are not reliable enough to serve as supplier, like residential userswith asymmetric connection [3] or mobile users connected through wireless links.

In this paper we discuss different policies an overlay can follow when servingthese goodwill free-riders. We evaluate the system performance under churn, thatis when nodes join and leave the overlay dynamically during the streaming session.First we consider optimized overlays when all transmission capacity is available forthe users and evaluate the system performance based on Markovian models. Thenwe evaluate how the performance characteristics of the overlay changes if tree basedstreaming is applied.

A similar analysis is presented in [4] considering an overlay with high and lowcontributors. It is assumed that all users are accepted by the overlay and share theavailable capacity equally, that is, the overlay is optimized after each peer arrivalor departure. It is shown that under churn the overlay performance in terms ofdelivering the full stream to all the users can be characterized by a critical ratio ofhigh contributors. If the ratio of high contributors is above the critical value thesystem performs well, otherwise the system performs poor. This critical value issensitive to the overlay size and to the playback delay.

Our work contributes to these results by considering a set of policies to dealwith free-riders and comparing the performance of optimized and more realisticoverlays. The rest of the paper is organized as follows. In Section 2 we overviewsome of the studies closely related to this work. Section 3 describes the policies weconsider to control the number of free-riders in the streaming system. In section4 we describe the Markovian model of optimized overlays. Section 5 describesthe multiple-tree overlay we consider for comparison. Section 6 evaluates how thestreaming performance changes in the case of push based streaming with rigid treestructures. Finally, Section 7 concludes our work.

2 Related Work

The architectures proposed for peer-to-peer streaming generally fall into one of twocategories: push based or pull based [5]. First, the push method was proposed forlive media streaming in [6, 7]. It follows the traditional approach of IP multicast,as streaming data is forwarded along multiple disjoint transmission trees, with thesource of the stream as the root.

The pull method (also called swarming) was proposed recently, and aims atefficient streaming in highly heterogeneous or dynamic environments [8, 9, 10]. Itfollows the approach of off-line peer-to-peer content distribution. There is no globalstructure maintained, and neighbor relations are determined locally on the fly as

Page 72: P2P Live Video Streaming - DiVA Portal

C-3

the overlay membership or the network environment changes. Peer nodes considerthe reception of a block of consecutive packets (or larger segments) at a time andschedule to pull those packets from some of their neighbors.

The first analytical study of peer-to-peer streaming presented in [11] considersthe delay performance of single tree architectures. The loss and delay characteristicsof multiple-tree based systems is evaluated in [12, 13]. The first mathematicalmodels of pull based systems are given in [14, 15]. An asymptotic model of optimizedoverlays, that can be applied for both pull and push based systems, also addressingthe effect of low contributors is presented in [4].

3 Policies for Admitting Free-riders

In this paper we consider resource sharing policies where nodes receive always withfull streaming rate. Instead, peers that do not offer significant upload capacity areadmitted to the system only if there is available transmission capacity in the overlay,otherwise are denied to join the streaming session. For simplicity we will considerhigh contributors that offer upload capacity that is multiples of the streaming rateand free-riders that do not offer any upload capacity. Specifically, we evaluate twopolicies to control the participation of free-riders in the streaming sessions.

With the Block and Drop (BD) policy free-riders that would like to join thestreaming session are blocked if the free upload capacity in the overlay is less thanthe streaming rate. Once admitted, the same users can be dropped if the overlaycapacity decreases due to the consecutive departure of contributors. All peers inthe overlay receive with full streaming rate. The BD policy can be characterized bythe probability that a free-rider will be blocked when it attempts to join the system,and by the probability that once admitted the free-rider will be dropped from theoverlay.

Under the Block and Wait (BW) policy free-riders are blocked if the overlaydoes not have enough available capacity as in the case of BD. The same users canbe temporarily disconnected and have to wait to reconnect if there is not enoughcapacity to serve all peers. All connected peers receive with full streaming rate.We characterize the BW policy by the blocking probability of free-riders and theaverage number of free-riders waiting to reconnect.

Note that blocking, dropping and disconnecting free-riders do not require so-phisticated admission control in an overlay. A contributor can always connect tothe overlay by taking the position of a peer (or peers depending on the overlaytopology) already in the overlay and serve those peers with its own upload capacity.Instead, free-riders can join or reconnect to the overlay only if there are contrib-utors with not fully utilized upload capacity. Otherwise free-riders are blocked ordropped, alternatively temporarily disconnected.

Page 73: P2P Live Video Streaming - DiVA Portal

C-4

4 The Performance of Optimized Overlays

We call an overlay optimized if it can utilize all upload capacity. This in turn mayrequire that the overlay is reorganized at each node arrival and departure. In thissection we evaluate the performance free-riders receive in such optimized overlaysunder churn.

We consider the stationary state of the system, when the arrival and departurerates are equal. We assume that the interarrival times of peers are exponentially dis-tributed, this assumption is supported by several measurement studies [16, 17]. Weassume that contributors and free-riders arrive independently. We approximate thesession holding times of contributors and free-riders by the same exponential distri-bution. The distribution of the session holding times was shown to fit the log-normaldistribution [16], however, using the exponential distribution makes modeling easier.We evaluate the effect of this assumption via simulations.

We denote the arrival intensity by λ and consider the system performance as αthe ratio of free-rider users changes. The arrival intensity of contributors and free-riders is λc = (1 − α)λ and λf = αλ respectively. The mean session holding timesare 1/µ = 1/µc = 1/µf . The offered load in the overlay is A = λc/µc, Ac = (1−α)Aand Af = αA.

For simplicity, we assume that all contributors offer the same upload capacitythat supports the transmission of c copies of the stream (we say the contributorsupload capacity is c). The source of the stream can have different (often significantlyhigher) upload capacity and can transmit m copies of the stream. We call parameterm source multiplicity.

4.1 Overlay feasibility

As it is shown in [4], it is possible to construct an overlay for a static set of peersif the sum of the reception rates at the peers does not exceed the sum of theupload capacities of the source and all the peers. This feasibility constraint holdsif the stream can be divided to arbitrary number of sub-streams and the nodes canmaintain a very high number of neighbors.

For the BD and BW policies the feasibility constraint in [4] limits Nf the numberof free-riders, given the number of contributors Nc in the overlay as

Nf ≤ m+ (c− 1)Nc. (1)

We define the feasibility limit for the overlay with churn similarly as

Af ≤ m+ (c− 1)Ac. (2)

4.2 Overlay evolution

We model the evolution of the optimized overlay under the BD and BW policies witha Markov-chain. The system state has to reflect not only the number of nodes in the

Page 74: P2P Live Video Streaming - DiVA Portal

C-5

i+1,i+1+mi+1,0 i+1,i+m

i,i+mi,0

c(i+1)µ

c c(i+1)µ

c

…..

…..

ciµ

c ciµ

c

f

fff

f

µf

µf

(i+m)µf

(i+m)µf (i+1+m)µ

f

i+2,i+1+mi+2,0 i+2,i+m….. i+2,i+2+m

c (i+3)µc c (i+3)µ

c c (i+3)µc c (i+3)µ

c

fff

µf

(i+m)µf (i+1+m)µ

f (i+2+m)µf

c (i+2)µc c

(i+2)µc c (i+2)µc

f

(i+2)µc

(i+1)µc

…..

…..

…..

…..

…..

…..

…..

…..…..….. …..

(i+3)µc

: blocking state

Figure 1: Markov-chain describing the overlay under the Block and Drop policy

overlay, but also the capacity available for arriving nodes. We have chosen to definethe system state by (i, j), the number of contributors and free-riders in the overlay.The state transition intensities are determined by c, the upload capacity of thecontributors, and the arrival and departure intensities. The number of contributorsis not limited, while the number of free-riders that receive the stream is limited bythe feasibility constraint given by (1).

Figures 1 and 2 show a part of the the Markov-chains with the state transitionintensities for c = 2 and m = 4.

i+1,i+1+mi+1,0 i+1,i+m

i,i+m+1i,i+mi,0

c(i+1)µ

c c(i+1)µ

c

…..

…..

i,i+m+2

i+1,i+m+2

…..

…..

…..

…..

…..

…..

ciµ

c

c (i+2)µc c

(i+2)µc c (i+2)µ

c c(i+2)µ

c

ciµc c

iµc c

iµc

f

fff

f

µf

µf

(i+m+1)µf

(i+m)µf

(i+m)µf (i+m+1)µ

f

(i+m+2)µf

(i+m+2)µf

(i+m+3)µf

(i+m+3)µf

…..

…..

…..

…..

…..…..….. …..

…..…..….. …..

c(i+1)µc c

(i+1)µc

: blocking state : disconnected state

Figure 2: Markov-chain describing the overlay under the Block and Wait policy

We consider first the BD policy. The state space S is S := {(i, j) : j =

Page 75: P2P Live Video Streaming - DiVA Portal

C-6

0, 1, ...,m+ (c− 1)i, i = 0, 1, 2, ...∞}Arriving free-riders are blocked if the overlay does not have free upload capacity.

We denote the set of blocking states as B := {(i,m+ (c− 1)i) : i = 0, 1, 2, ...∞}.Once pij , the state probabilities in steady state are calculated, the performance

parameters are derived as follows.The probability that a free-rider is blocked upon arrival is

P (block)BD =∑

(i,j)∈Bpij . (3)

A free-rider is dropped from the overlay if a contributor leaves when the systemis in blocking state. Then, the probability that a free-rider, that has already beenadmitted in the overlay is later dropped is

P (drop)BD =

(i,j)∈Biµcpij

λf (1− P (block)BD). (4)

The average number of nodes in the overlay is

NBD =∑

(i,j)∈S(i+ j)pij . (5)

In the case of the BW policy, the system space is infinite in both dimensions,S := {(i, j) : i, j = 0, 1, 2, ...∞}. An arriving free-rider is blocked if it arrives whenthe system is in states B, or when there is at least one disconnected free-rider. Theset of states where there is at least one disconnected free-rider is D := {(i, j) :j > m + (c − 1)i, i = 0, 1, 2, ...∞}. We can calculate the probability of blockingP (block)BW similarly to (3)

P (block)BW =∑

(i,j)∈B∪Dpij . (6)

The average number of free-riders waiting to be reconnected to the overlay is

Nwait,BW =∑

(i,j)∈D(j − (m+ (c− 1)i))pij . (7)

and we can calculate the average time it takes for such a reconnection to occur usingLittle’s form as

Twait,BW =Nwait,BW∑

(i,j)∈B∪Diµcpij

. (8)

Finally, the average number of nodes in the overlay is

NBW =∑

(i,j)∈S(i+ min(j,m+ (c− 1)i))pij . (9)

Page 76: P2P Live Video Streaming - DiVA Portal

C-7

To see the effect of churn on the utilization of the overlay resources we defineoverlay utilization as the ratio of the average number of nodes and the maximumnumber of nodes a static overlay could support for given Nc = Ac and α, that is,

U =N

(Ac + min(Af ,m+ (c− 1)Ac). (10)

To be able to calculate the state probabilities pi,j numerically, we limit thestate space of the process. First we limit the number of contributors consideredto {N l

c, Nuc } as follows. We model the number of contributors in the system as an

M/M/∞ queue, and calculate the state probabilities p′i. Then we select a statespace symmetric to N c = λc

µc, such that

∑Nuci=N lc

p′i ≥ 0.95.Similarly, we limit the number of free-riders considered. First we set the limits

as for the contributors, then we extend the limits if necessary to include the 50(c−1)neighboring states of the blocking states (i,m+ (c− 1)i).

5 Overlay Evolution in Multiple-tree Based Over-lays

To see the difference between the behavior of an optimized and a more practicalsystem, we consider multiple-tree based overlays (e.g., [6, 7]). The evolution of thetransmission trees in a multiple-tree overlay is strongly correlated. This correlationmakes analytical modeling complex, since the dimension of the Markov-chain de-scribing the overlay increases linearly with the number of trees [12]. Therefore weevaluate the performance of the multiple-tree overlays via simulations.

5.1 The Multiple-tree Overlay

We assume that peer nodes are organized in t distribution trees. All the nodes aremembers of all t trees, and in each tree they have a different parent node from whichthey receive data to ensure multipath transmission. The source of the stream is theroot of the trees. Since the root multiplicity is m, the root has m children in eachof the trees. A contributor can have up to ct children to which it forwards data.(See Fig. 3.) We assume that nodes can have children in d = 2 trees if t > 1. Thisoverlay architecture and the related overlay management is discussed in detail in[12].

We assume that nodes can not join a part of the trees only. It means that anarriving node is blocked if it can not get a parent in at least one tree. Similarly, anode is dropped or disconnected from all the trees if it can not reconnect after aparent departure in any of the trees.

Note, that a single transmission tree overlay with the contributors as nodes andfree-riders as leaves is an optimized overlay if all contributors have the same upload

Page 77: P2P Live Video Streaming - DiVA Portal

C-8

R

851

11794 36 10

: peer forwarding in the tree

: peer not forwarding in the tree

: free-rider

R

5

11 792 10

3

81

6

4

92114

R

105

361

7 28

Figure 3: An overlay with t = 3, m = 3, d = 2 and c = 2

capacity. A single tree however does not provide multiple transmission path to thenodes, and therefore is not a good architecture for peer-to-peer streaming. We usesingle-tree simulation results to justify the analytical model.

5.2 Simulation Setup

To evaluate the multiple-tree based overlay we developed a packet level event-drivensimulator. We assume that the session holding times follow an exponential distribu-tion with mean 1/µ = 306s (µ = µc = µf ), [16]. We use the arrival rate λ = λc+λfto change A the offered load to the overlay. Under the BW policy nodes waiting toreconnect to the overlay make reconnection attempts with 0.1s intervals. Since weare interested in the evolution of the overlay structure we simulate only the nodearrivals and departures and do not simulate the traffic flow. To obtain the resultsfor a given offered load A and ratio of free-riders α, we start the simulation bybuilding a static overlay. First we add Nc = (1−α)A contributors then as many ofαA free-riders as possible. We set λ = Aµ and let nodes join and leave the overlayfor 10000 s. The measurements are made after this warm-up period for 10000 s andthe presented results are the averages of 100 simulation runs. The results have lessthan 5 percent margin of error at a 95 percent level of confidence.

6 Numerical Results

In this section we evaluate the service the peer-to-peer system can offer to thefree-riders. We consider the probability that free riders are blocked, dropped orhave to wait for reconnection. Note that contributors are never blocked, droppedor disconnected, neither in the optimized, nor in the multiple-tree overlays withflexible upload capacity allocation[12]. First we use the mathematical model toanalyze the behavior of an optimized overlay, then we compare the performance of

Page 78: P2P Live Video Streaming - DiVA Portal

C-9

0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Ratio of free−riders (α)

Blo

ckin

g pr

obab

ility

(p b)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40A=3000, m=40, Log−Normal

Figure 4: Block and Drop policy. Block-

ing probability versus α the ratio of free-

riders. A=100,3000, m=4,40.

0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

Ratio of free−riders (α)

Pro

babi

lity

that

a fr

ee−

rider

is d

ropp

ed (

pd)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40A=3000, m=40, Log−Normal

Figure 5: Block and Drop policy. Drop-ping probability versus α the ratio offree-riders. A=100,3000, m=4,40.

the optimized system to the one based on the less flexible multiple transmission treestructure.

0.4 0.5 0.6 0.7 0.8 0.9 10.9

0.91

0.92

0.93

0.94

0.95

0.96

0.97

0.98

0.99

1

Ratio of free−riders (α)

Util

izat

ion

(U)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40

Figure 6: Block and Drop policy. Overlayutilization versus α the ratio of free-riders.A=100,3000, m=4,40.

Figures 4-6 show the system behav-ior under the BD policy as a functionof α, the ratio of free-riders. Since thecontributors’ upload capacity is c = 2the feasibility limit is around α = 0.5,depending on the ratio of offered loadand m. Both the blocking and thedropping probability increase rapidlyaround the feasibility limit. Below thislimit the blocking and dropping valuesare close to zero, which means that evensmall systems are rather efficient. ForA = 100 increasing the source capacityto m = 40 increases the feasibility limitto α = 0.7 but the characteristics of theperformance curves do not change.

We can also see that both the prob-ability of blocking and the probability of dropping increase rapidly with α, that is,free-riders that were admitted are dropped with high probability at high α.

To evaluate the effect of the assumption on exponential holding times we showsimulation results with log-normal holding times, t = 1, A = 3000 and m = 40.With log-normal holding times the blocking and dropping probabilities are slightlylower, that is, the model underestimates the performance free-riders receive.

The utilization values on Figure 6 show that in large overlays the overlay re-

Page 79: P2P Live Video Streaming - DiVA Portal

C-10

0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Ratio of free−riders (α)

Blo

ckin

g pr

obab

ility

(p b)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40A=3000, m=40, Log−Normal

Figure 7: Block and Wait policy.Blocking probability versus α the ratioof free-riders. A=100,3000, m=4,40.

0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Ratio of free−riders (α)

Ave

rage

num

ber

of p

eers

wai

ting

to r

econ

nect

(N

W)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40A=3000, m=40, Log−Normal

Figure 8: Block and Wait policy. Aver-age number of peers waiting to recon-nect versus α the ratio of free-riders.A=100,3000, m=4,40.

sources are stable despite churn. In small overlays the fluctuation of transmissionresources decreases the utilization significantly around the feasibility limit.

Next we evaluate the BW policy. Figures 7-8 show how the blocking probabilityand the average number of nodes waiting for reconnection change in an optimizedoverlay. The simulation results with t = 1 and log-normal holding times fit theanalytical results on the blocking probability. Simulations give higher values forthe average number of nodes waiting than the model due to the deterministic timeintervals of reconnection attempts. If we decrease the reconnection interval thedifference decreases as well. Figure 9 shows the average time nodes have to wait toreconnect, normalized by the average holding time µf . The normalized reconnectiontime is very low for all cases.

Comparing the BD and BW policies, we can see that under the BW policy free-riders are blocked with higher probability, while even at high ratio of free-ridersthere are very few nodes waiting for reconnection and the waiting time to reconnectis very low. From this we can conclude that under the BW policy free-riders thatare admitted will receive the stream with little disturbances. As figure 10 showsthe utilization of the overlay resources are very similar under the BD and the BWpolicies, despite the different characteristics of blocking.

Finally, we compare the performance of the optimized overlays and of overlaysbased on multiple-tree structure. Figure 11 compares the utilization of single tree(t = 1) and multiple-tree overlays for t = 8 under the BD policy. As t increases,the probability that free-riders are dropped increases as well, since nodes that cannot reconnect to even one tree are dropped. This generates free capacity in theoverlay, which in turn leads to decreasing blocking probability for increasing t. As aresult, the utilization of overlay resources is not sensitive to the number of trees in

Page 80: P2P Live Video Streaming - DiVA Portal

C-11

0.4 0.5 0.6 0.7 0.8 0.9 10

0.02

0.04

0.06

0.08

0.1

0.12

Ratio of free−riders (α)

Nor

mal

ized

wai

ting

time

(T Wai

t*µ)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40

Figure 9: Block and Wait policy. Av-erage waiting time versus α the ratio offree-riders. A=100,3000, m=4,40.

0.4 0.5 0.6 0.7 0.8 0.9 10.9

0.91

0.92

0.93

0.94

0.95

0.96

0.97

0.98

0.99

1

Ratio of free−riders (α)

Util

izat

ion

(U)

A=100, m=4A=100, m=40A=3000, m=4A=3000, m=40

Figure 10: Block and Wait policy.Overlay utilization versus α the ratioof free-riders. A=100,3000, m=4,40.

large overlays (A = 3000). In small overlays (A = 100) there can be a loss of 20%,increasing with t. Figure 12 shows the overlay utilization for the same scenarios,but for the BW policy. Comparing figures 11 and 12, the BW policy seems to bemore efficient, but its efficiency depends on the interval of reconnection attempts.

0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.90.7

0.75

0.8

0.85

0.9

0.95

1

Ratio of free−riders (α)

Util

izat

ion

(U)

t=1, A=100t=1, A=3000t=4, A=100t=4, A=3000t=8, A=100t=8, A=3000

Figure 11: Multiple-tree overlay, Blockand Drop policy. The effect of multipletrees on the overlay utilization. Simu-lation results.

0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.90.7

0.75

0.8

0.85

0.9

0.95

1

Ratio of free−riders (α)

Util

izat

ion

(U)

t=1, A=100t=1, A=3000t=4, A=100t=4, A=3000t=8, A=100t=8, A=3000

Figure 12: Multiple-tree overlay, Blockand Wait policy. The effect of multipletrees on the overlay utilization. Simu-lation results.

Page 81: P2P Live Video Streaming - DiVA Portal

C-12

7 Conclusion

In this paper we evaluated the performance goodwill free-riders receive in a peer-to-peer streaming overlay. We compared two policies to limit the number of free-ridersin the system, the Block and Drop and the Block and Wait policies. We showed an-alytically that under the Block and Drop policy both the blocking and the droppingprobabilities can be high, which means that the free-riders already admitted to thesystem are often dropped. Under the BW policy, however, the number of free-riderswaiting to be reconnected is very low for all parameter settings, which suggests thatonce admitted, free-riders receive the stream without interruption with high prob-ability. This feature makes the BW policy a good candidate to control free-riders.

We compared the performance of optimized overlays and overlays based on rigidmultiple-tree structures. We showed that in a multiple-tree overlay the blockingand dropping probabilities and the average number of free-riders waiting depend onthe number of distribution trees, but the resulting overlay utilization approachesthe one of the optimized overlay.

References

[1] G. Tan and S.A. Jarvis. A payment-based incentive and service differentiationmechanisms for peer-to-peer streaming broadcast. In Proceedings of IWQoS,2006.

[2] Y. Sung, M. Bishop, and S. Rao. Enabling contribution awareness in an overlaybroadcasting system. In ACM Sigcomm, 2006.

[3] X. Hei, Ch. Liang, Y.Liu, and K.W. Ross. A measurement study of a large-scalep2p iptv system. IEEE Transactions on Multimedia, 2007.

[4] R. Kumar, Y. Liu, and K. Ross. Stochastic fluid theory for p2p streamingsystems. In IEEE INFOCOM, 2007.

[5] V. Fodor and Gy. Dan. Resilience in live peer-to-peer streaming. IEEE Com-munications Magazine, 45(6), 2007.

[6] Miguel Castro, Peter Druschel, Anne-Marie Kermarrec, Animesh Nandi,Antony Rowstron, and Atul Singh. Splitstream: High-bandwidth multicastin a cooperative environment. In Proceedings of ACM Symposium on Operat-ing Systems Principles (SOSP), 2003.

[7] Venkata N. Padmanabhan, Helen J. Wang, and Philip A. Chou. Resilient peer-to-peer streaming. In Proceedings of the 11th IEEE International Conferenceon Network Protocols, 2003.

Page 82: P2P Live Video Streaming - DiVA Portal

C-13

[8] X. Zhang, J. Liu, B. Li, and T-S. P. Yum. Coolstreaming/donet: a data drivenoverlay network for efficient live media streaming. In Proceedings of IEEEINFOCOM, 2005.

[9] N. Magharei, R. Rejaie, and Y. Guo. Mesh or multiple-tree: A comparativestudy of live p2p streaming approaches. In Proceedings of IEEE INFOCOM,2007.

[10] R. Rejaie N. Magharei. Prime: Peer-to-peer receiver-driven mesh-based stream-ing. In Proceedings of IEEE INFOCOM, 2007.

[11] T. Small, B. Liang, and B. Li. Scaling laws and tradeoffs in peer-to-peer livemultimedia streaming. In Proceedings of ACM Multimedia, 2006.

[12] Gy. Dan, V. Fodor, and I. Chatzidrossos. On the performance of multiple-tree-based peer-to-peer live streaming. In Proceedings of IEEE INFOCOM,2007.

[13] Gy. Dan and V. Fodor. An analytical study of low delay multi-tree-basedoverlay multicast. In Proceedings of ACM Peer-to-peer Streaming and IPTVWorkshop, 2007.

[14] L. Massoulie, A. Twigg, Ch. Gkantsidis, and P. Rodriguez. Randomized decen-tralized broadcasting algorithms. In Proceedings of IEEE INFOCOM, 2007.

[15] D. Carra, R. Lo Cigno, and E.W. Biersack. Graph based modeling of p2pstreaming systems. In Proceedings of IFIP Networking, 2007.

[16] E. Veloso V. Almeida W. Meira A. Bestavros and S. Jin. A hierarchical char-acterization of a live streaming media workload. In Proceedings of ACM IMC,2002.

[17] K. Sripanidkulchai, B. Maggs, and H. Zhang. An analysis of live streamingworkloads on the internet. In Proceedings of ACM IMC, 2004.

Page 83: P2P Live Video Streaming - DiVA Portal

Paper D

Delay and playout probability trade-off inmesh-based peer-to-peer streaming with delayedbuffer map updates

Ilias Chatzidrossos, Gyorgy Dan, Viktoria Fodor.In P2P Networking and Applications, May 2009.

Page 84: P2P Live Video Streaming - DiVA Portal
Page 85: P2P Live Video Streaming - DiVA Portal

Delay and playout probability trade-off in

mesh-based peer-to-peer streaming with delayed

buffer map updates

Ilias Chatzidrossos, Gyorgy Dan, Viktoria FodorKTH, Royal Institute of Technology,

School of Electrical Engineeringe-mail: {iliasc, gyuri, vfodor}@ee.kth.se

Abstract

In mesh-based peer-to-peer streaming systems data is distributed amongthe peers according to local scheduling decisions. The local decisions affecthow packets get distributed in the mesh, the probability of duplicates andconsequently, the probability of timely data delivery. In this paper we proposean analytic framework that allows the evaluation of scheduling algorithms.We consider four solutions in which scheduling is performed at the forwardingpeer, based on the knowledge of the playout buffer content at the neighbors.We evaluate the effectiveness of the solutions in terms of the probability thata peer can play out a packet versus the playback delay, the sensitivity of thesolutions to the accuracy of the knowledge of the neighbors’ playout buffercontents, and the scalability of the solutions with respect to the size of theoverlay. We also show how the model can be used to evaluate the effects ofnode arrivals and departures on the overlay’s performance.

1 Introduction

Recent years have seen the proliferation of peer-to-peer (P2P) systems for the de-livery of live streaming content on the Internet [1, 2, 3]. These systems are popularbecause they allow content providers to save on infrastructure costs: users con-tribute with their upload bandwidth resources to the distribution of the content.Whether P2P streaming systems will become an alternative to commercial, opera-tor managed IPTV solutions depends on whether they can offer a comparable userexperience.

The user experience in a streaming system is typically determined by two in-terdependent performance measures [4]: the playback delay and the playout prob-ability. The playback delay determines how real-time streaming can be, but also

1

Page 86: P2P Live Video Streaming - DiVA Portal

D-2

a) Scheduling at the transmitting node

[2,4,6,7]

12

34

5

[1,2,4,5]

[2,3,7]

[1,3,4,5,7] streaming traffic

control trafficbuffer map[n,n,n,n]

455213packet

343231neighbor

Forwarding schedule for node 5

S

1 2

4 3

5

Schedule 1minimum breadth

Schedule 2minimum depth

S

1 2

4 3

5

streaming traffic

packet 1packet 2

[1,2,3,4,5]

b) Distribution trees formed trough local decisions

Figure 1: Mesh based streaming with local scheduling decision. a) Forwarding node 5

schedules neighbors and packets based on the received buffer maps. b) The distribution

trees are formed through local decisions.

the zapping times, that is, the delays experienced when users switch channel. Theplayout probability is the ratio of packets successfully played out at the receiver.Additionally, the performance of a P2P streaming system can be evaluated withrespect to two other metrics. First, the playback lag between the peers has to below to provide similar real-time experience to all users. Second, the performance interms of the previous three metrics has to scale well with the overlay’s size.

P2P streaming systems proposed in the literature generally fall into one of twocategories: multiple-tree based and mesh-based solutions [5]. Mesh-based solutionsare considered to be more robust to dynamic overlay membership and fluctuatingtransmission capacities between the nodes, hence they are prevalent in commercialsystems. Nevertheless as a consequence of their dynamic nature, there is a limitedanalytical understanding of the performance trade-offs of mesh-based solutions.

In a mesh-based system neighbor relations between the peers are determinedlocally, and consequently, there is no global structure maintained. The forwardingof data packets (or often a set of data packets) is decided locally at the peers, eitheron the transmitting or on the receiving side. As shown in Figure 1.a, the packetscheduling is based on information exchanged between the neighboring peers: peersreport the packets they already possess, with the so called buffer map. Clearly,scheduling algorithms can be more efficient if they utilize detailed and timely infor-mation, and therefore the trade-off of streaming performance and control overheadhas to be considered.

As a result of local scheduling decisions, the packets of the stream will reach thepeers via different trees over the mesh. We call these trees the distribution trees.

Page 87: P2P Live Video Streaming - DiVA Portal

D-3

The structure of the distribution trees is determined by the local decisions at thepeers. Figure 1.b shows two examples where the distribution trees are minimumbreadth and minimum depth trees respectively, with a depth of 5 and 3 overlay hops.The challenge of modelling mesh-based streaming comes then from the followingclosed loop: on one side the scheduling decisions determine the distribution treesformed over the mesh, and thus the availability of the packets at the peers, on theother side, the packet availability at the peers affects the scheduling decisions thatcan be made.

In this paper we propose an approach to cut this loop. We assume that the peers’positions in the distribution trees are statistically the same, and consequently, theprobability that a peer receives a packet with given delay is the same for all peers.We validate our assumption with simulation and build then an analytic model todescribe the packet reception process. We propose an analytic framework that canbe used to evaluate the performance of different scheduling strategies. In this paperwe consider four specific scheduling strategies, where scheduling is performed atthe transmitting peers. We evaluate how the playout probability is affected by thenumber of neighbors, the playback delay and the frequency of buffer map updates.Then we evaluate the scalability of the solutions in terms of overlay size and deriveconclusions on the structure of the distribution trees. We also use the model toevaluate the effects of node churn on the overlay performance.

The rest of the paper is organized as follows. In Section 2 we overview relatedwork. Section 3 describes the P2P streaming systems we consider in this paper. Wegive the analytic model in Section 4, and evaluate the performance of the consideredsolutions in Section 5. Section 6 concludes our work.

2 Related Work

Several measurement studies deal with the analysis of commercial, mesh-based P2Pstreaming systems [6, 7, 8]. The goal of these studies is to understand the pro-prietary protocol used by the streaming system or to understand the effects of thenetworking environment and the user behavior. There are also several works inwhich solutions for mesh-based streaming are proposed and evaluated through sim-ulations [9, 10, 11, 12, 13, 14]. These works often consider a different set of inputparameters and performance measures, and therefore the proposed systems are hardto compare. There are however few works that address the streaming performancewith analytic models. In [15] the minimum playback delay is derived for givensource and peer transmission capacities, by considering the trade-off between thedepth of the distribution trees and the time a peer needs to forward a packet toall of its downstream neighbors. The performance of BitTorrent-based streamingis addressed in [16], deriving relation between the achievable utilization of uploadbandwidth and the number of segments or packets considered for sharing, which inturn is related to the playback delay peers will experience. Rate-optimal streaming

Page 88: P2P Live Video Streaming - DiVA Portal

D-4

in complete meshes is considered in [17] using a queueing theoretic approach. Theauthors show that rate-optimal streaming is possible in a distributed manner andderive scheduling algorithms for the cases when the bottleneck is at the uplink or atthe downlink of the peers. This work is extended in [18] where the authors proposedifferent algorithms, and evaluate their delay-throughput performance in overlaysforming a complete graph, using mean-field approximations. We extended this workby relaxing the assumption on complete overlay graph in [20]. We derived analyticalexpressions for the data propagation in a mesh-based overlay with random packetforwarding given that peers always have perfect knowledge of the buffer contents oftheir neighbors. The present work extends [20] by capturing the effect of outdatedbuffer map information at the sender peer, by considering a larger set of forwardingschemes and by including the case of overlays with node churn.

The scalability properties of P2P streaming systems are addressed in [19] by useof large deviations theory. The paper proves for a large set of node-to-node delaydistributions that in order to keep the same playout probability, the playback delayhas to be increased in proportion to the increase of the overlay path lengths. We usethis result to assess the structure of the distribution trees, even if they are formedin a distributed manner through the local decisions of the transmitting peers.

3 System overview

We consider a peer-to-peer live streaming system consisting of a streaming serverand N peers. The peers form an overlay such that each peer knows about up to dother peers, called neighbors, and about the streaming server. In the case of nodechurn, arriving peers become neighbors of d peers that have less than d neighbors.We assume that once a peer leaves the overlay its neighbors do not actively lookfor new connections but wait until a newly joining peer connects to them.

The system is time slotted, with one slot being equal to the packet contentduration. At the beginning of each time slot a new packet is generated at the serverand is forwarded to m randomly chosen peers. Peers distribute the data to theirneighbors according to some scheduling algorithm. At the beginning of every time-slot every peer makes a forwarding decision, i.e., chooses a neighbor and a packet,and sends the chosen packet to the chosen neighbor. Packets that are sent at thebeginning of a time-slot reach their destination at the end of the same slot. Theupload capacity of peers is equal to the stream rate, i.e., one packet per slot, whiletheir download capacity is unlimited, i.e., they can receive up to d packets fromtheir neighbors in one slot.

Each peer maintains a playout buffer of B packets in which it stores the packetsreceived from its neighbors before playing them out. A peer that joins the overlaybefore the beginning of time slot i starts playout with packet i at the beginning oftime slot i + B. Consequently, the playback is synchronized among all peers, andboth the startup delay and the playback delay are B time slots.

Page 89: P2P Live Video Streaming - DiVA Portal

D-5

The nodes’ decisions on forwarding a packet are based on the information theyhave about the packets that their neighbors possess in their playout buffers. Nodesknow about the contents of their neighbors’ playout buffers via exchanging buffermaps. In a scenario with perfect information, each peer would have full knowledgeof the buffer contents of its neighbors upon taking a forwarding decision. However,such a scheme would be infeasible in a real peer-to-peer system due to the overheadrelated to the buffer map exchange among all the peers in the overlay. Consequently,we consider that nodes send updated buffer maps to their neighbors every u timeslots, and hence, forwarding decisions are made based on outdated information. Theshorter the update interval, the more accurate is the information in the buffer maps,but at the same time the higher is the overhead due to message exchange in theoverlay.

3.1 Push-based forwarding schemes

In this paper we consider four push-based forwarding schemes. All schemes takeas input the buffer maps of all the neighbors and return as output the forwardingdecision, i.e., a (neighbor, packet) pair. Before describing the forwarding schemes,we define the notion of eligible packet and that of eligible neighbor. We say that apacket is eligible with respect to a neighbor if the peer has the packet in its playoutbuffer but the packet is not present in the most recently received buffer map fromthe neighboring peer. Similarly, we say that a neighbor of a peer is eligible if thepeer has at least one eligible packet with respect to that neighbor.

Random peer - Random packet (RpRp): The peer constructs the set ofeligible neighbors based on the buffer maps received from its neighbors, and picksuniformly at random one neighbor from the set. The peer then creates the set ofeligible packets with respect to the chosen neighbor, and picks a packet uniformlyat random from the set.

Determined peer - Random packet (DpRp): The peer calculates the num-ber of eligible packets for all of its eligible neighbors based on the buffer maps. Itselects a neighbor with a probability proportional to the number of eligible packetswith respect to that neighbor. The packet to be sent to the selected neighbor is thenchosen uniformly at random from the set of eligible packets with respect to thatneighbor. By following this scheme a peer forwards data with higher probability toa neighbor to which it has many eligible packets.

Latest blind packet - Random useful peer (LbRu): The peer choosesthe packet with the highest sequence number in its playout buffer independent ofwhether the packet is eligible with respect to any of its neighbors. It then choosesuniformly at random one of its neighbors that are missing the chosen packet. Theunconditional selection of the packet implies that there might be cases when a peercannot forward the last packet because all the neighbors already have it, while someneighbor might be missing a packet with lower sequence number that the forwardingpeer has.

Page 90: P2P Live Video Streaming - DiVA Portal

D-6

Latest useful packet - Useful peer (LuUp): The peer chooses the packetthat has the highest sequence number among the packets that are eligible withrespect to at least one neighbor. It then picks uniformly at random among theneighbors that are eligible with respect to the chosen packet. The chosen packet isnot necessarily the last packet in the buffer, which is the difference of this schemecompared to the LbRu forwarding scheme.

We will refer to the two first schemes as random-packet schemes as they pickthe packet to be forwarded at random, and we refer to the two latter schemesas fresh-data-first schemes because they always try to forward the data with thehighest sequence numbers. RpRp was previously evaluated for the specific case ofper slot buffer map exchange [20] and fresh-data-first schemes were analyzed in [18]for the case when the overlay forms a complete graph and with the assumptionthat local scheduling decisions at the transmitting peers are immediately known inthe neighborhood of the receiving peer, that is, transmission of duplicates is fullyavoided.

4 Analytical Model - Data dissemination

In this section we first describe the analytical model of an overlay without churn,then we show how this model can be used to approximate the effects of node churn.While the model considers a slot synchronized system, we argue that it describeswell also the behavior of unsynchronized systems, referring to results in [20].

The key assumption of our model is that the contents of the playout buffers ofneighboring peers are independent and statistically identical. The assumption isbased on the observation that if peers maintain a fair number of neighbors thenthe local forwarding decisions will lead to per packet distribution trees that arevery different, and as a result the position of the peers in the distribution trees isstatistically the same. We validate this assumption by simulations in Section 5.

We number packets according to their transmission time at the server, i.e., packetj is transmitted in slot j. Packet j is played out at the beginning of slot j + B ateach peer. Since playout occurs at the beginning of the time slots, a peer can playout packet j if the packet is in the playout buffer of the peer by the end of time slotj +B − 1.

Let us denote by `(i) the lowest packet sequence number that peers would po-tentially forward in time slot i. Since in slot i a peer would not forward the packetthat is to be played out in that slot, `(i) = max{0, i−B + 1}. The highest packetsequence number that can be forwarded by any peer in slot i is i− 1, because onlythe source has packet i in slot i.

We denote by Bri ∈ 2{`(i),...,i−1} the set of packets that peer r has in its playoutbuffer at the beginning of slot i, i.e., the set of packets that it could potentiallyforward in slot i. In Figure 2 we show an example of a peer’s playout buffer atthe beginning of three consecutive time slots. The packet in the bold cell is the

Page 91: P2P Live Video Streaming - DiVA Portal

D-7

packet that should be played out at the given slot. At the beginning of slot i = 9the playout of the packets has not started and all the packets present in the bufferbelong to the set Bi. At the beginning of slot i = 10, packet 0 is to be played out,so it cannot be eligible for sending and the same holds for packet 1 at time i = 11.

854210

0 9854321

i=9

i=10

1 9865432i=11

B9 = {0,1,2,4,5,8}

B10 = {1,2,3,4,5,8,9}

B11 = {2,3,4,5,6,8,9}

Figure 2: Example of a playout buffer of a peer and the set of packets that the peer could

forward for three consecutive time-slots. Cell with bold edges contains the packet that is

to be played out during the specific slot. In slot i=9 the peer receives packet 3 from a

neighbor and packet 9 from the source. In slot i=10 it receives packet 6 from a neighbor.

Let us denote by P ji the probability that a peer is in possession of packet j bythe end of time-slot i, i.e., P (j ∈ Bi) = P ji−1. Hence, packet j will be successfully

played out with probability P jj+B−1. Similarly, let us denote by Pj

i the probabilitythat a peer possesses packet j at the end of slot i as known by one of its neighbors atthe end of slot i. Since buffer map updates do not occur instantaneously, P

j

i = P jidoes not necessarily hold. We consider that buffer map updates occur every u timeslots, with the first exchange at the end of slot i = 0, so that we can express P

j

i asa function of P ji

Pj

i ={

0 u =∞P jbi/ucu 1 ≤ u <∞. (1)

In the following we derive recursive formulae to calculate the probability of success-ful playout in an overlay overlay without and with node churn.

4.1 Overlay without node churn

Let us consider an overlay in which peers do not join nor leave and there are nolosses in the overlay links between peers. Our goal is to calculate the probabilityP ji for an arbitrary peer r in the overlay. The peer has packet j at the end of sloti either if it already had it at the end of slot i − 1, or if it did not have it at theend of slot i − 1 but received it from some neighbor s during slot i. This can beexpressed by a general recursive equation introduced in [20]

P ji =

0 i < jmN i = j

P ji−1 + (1− P ji−1)(1− (1− πji )d) i > j.(2)

Page 92: P2P Live Video Streaming - DiVA Portal

D-8

where πji is the probability that some neighbor s forwards packet j in slot i to peer r,given that peer r does not have packet j. P jj is the probability that a node receivesthe packet directly from the server. P ji is determined by πji , i.e, it depends on theforwarding scheme used. In the following subsections we will derive expressions forthe πji for the RpRp, DpRp, LbRu and LuUp forwarding schemes. When describingthe four schemes we refer to the peer that makes the forwarding decision as peer s,and to the peer that is to receive packet j as peer r.

4.1.1 Random peer - Random packet

In the RpRp scheme peer s first chooses a peer, and then it chooses a packet to besent. Let us define the corresponding events

A := {s has packet j and r does not have it},C := {s chooses to send a packet to r},D := {s chooses to send packet j}.

Using these events the probability πji can be written as

πji = P (s sends packet j to r|j /∈ Bri )= P (s sends packet j to r|j /∈ Bri , j ∈ Bsi ) · P (j ∈ Bsi )= P (C|A) · P (D|A · C) · P (j ∈ Bsi ). (3)

By definition P (j ∈ Bsi ) = P ji−1, so we proceed to the calculation of P (C|A).Under the RpRp scheme, peer s transmits to one of its eligible neighbors. Giventhe condition that node r is eligible, the probability that node s selects node r totransmit to is

P (C|A) =d−1∑

k=0

1k + 1

(d− 1k

)pke(1− pe)d−k−1, (4)

where pe is the probability that a neighbor is eligible

pe = (1− P ji−1) + Pj

i−1(1−∏i−1w=`(i),w 6=j(1− Pwi−1(1− Pwi−1))).

(5)

Finally, we calculate P (D|A · C), the probability that s will send packet j and notanother eligible packet to r. Let us denote by the r.v. K the number of packetsthat are eligible to be sent from s to r including packet j. Clearly, K ≥ 1 becausepacket j is eligible with respect to node r. Then the probability that packet j issent is

P (D|A · C) =i−`(i)∑

k=1

1kP (K = k). (6)

Page 93: P2P Live Video Streaming - DiVA Portal

D-9

In the following define a recursion to calculate the distribution of K.We define the probability vector

Q = {P `(i)i · · ·P j−1i , 1, P j+1

i · · ·P i−1i },

which contains the probabilities that node s has packets at the different bufferpositions, given that it has packet j. Similarly, we define the probability vector

Qr = {P `(i)i · · ·P j−1

i , 0, Pj+1

i · · ·P i−1

i },which represents the information that the sending peer s has about the buffer con-tents of peer r, given that peer r does not have packet j.

We initialize the recursion by setting L0,0 = 1 and Lk,0 = 0 for k < 0. Therecursion is then defined by

Lk,l = Lk,l−1(1−Q(l)(1−Qr(l))) +Lk−1,l−1Q(l)(1−Qr(l)). (7)

The recursion is executed for l = 1 . . . i − `(i) and for every l for k = 0 . . . l. Thedistribution of K is then given as P (K = k) = Lk,i−`(i) for for k = 1 . . . i− `(i). Byplugging (4) and (6) into (3) we obtain the probability πji .

4.1.2 Determined peer - Random packet

Similar to the RpRp forwarding scheme, and using the events introduced there, wecan write

πji = P (s sends packet j to r|j /∈ Bri )= P (s sends packet j to r|A) · P (j ∈ Bsi ). (8)

Nevertheless, for the DpRp forwarding scheme the choice of a peer and the choiceof a packet are correlated. Hence we calculate the joint probabilities directly.

Let us denote by the r.v. K the total number of forwarding decisions that nodes can make with respect to any of its neighbors (i.e., node-packet pairs), given thats possesses j and r does not possess j. Clearly, K ≥ 1 because packet j is eligiblewith respect to node r. Given the distribution of K the conditional probability thatpacket j is sent to r is expressed as

P (s sends packet j to r|A) =d(i−`(i))∑

k=1

1kP (K = k). (9)

In the following we define a recursion to calculate the distribution of K. Apart fromthe vectorsQ andQr defined in the previous section, we define the probability vector

Q = {P `(i)i · · ·P i−1

i },

Page 94: P2P Live Video Streaming - DiVA Portal

D-10

which represents the information that the sending peer s has about the buffer con-tents of its neighboring peers apart from node r.

As before, we initialize the recursion by setting L0,0 = 1 and Lk,0 = 0 for k 6= 0.The recursion is however defined by

Lk,l = Lk,l−1

{(1−Q(l)) +Q(l)Q(l)d−1Qr(l)

}

+d−1∑z=1

Lk−z,l−1Q(l){(

d− 1z

)Q(l)d−1−z(1−Q(l))zQr(l)

+(d− 1z − 1

)Q(l)d−z(1−Q(l))z−1(1−Qr(l))

}

+ Lk−d,l−1

{Q(l)(1−Q(l))d(1−Qr(l))

}. (10)

The recursion is executed for l = 1, . . . i− `(i), and for every l for k = 0 . . . ld. Thedistribution of K is then given by P (K = k) = Lk,i−`(i) for k = 1 . . . (i− `(i))d.

4.1.3 Latest blind packet - Random useful peer

The probability that r will receive packet j from s in time slot i is equal to theprobability that j is the latest packet in the buffer of s, times the probability that swill choose r among its neighbors that do not have packet j. We define the events

E := {j is the latest packet in the buffer of s}, andF := {s chooses to send packet j to r }.

The expression for πji can then be written as

πji = P (E) · P (F|E ·A) · P (j ∈ Bsi ). (11)

Again we have P (j ∈ Bsi ) = P ji−1, and proceed to the calculation of P (E).Event E occurs if there are no packets in the buffer of s that have a higher sequencenumber than j

P (E) =i−1∏

v=j+1

P vi−1. (12)

Finally, we calculate the probability P (F|E ·A). We define the r.v. K as the numberof neighbors of s other than r that are missing packet j. Then, we get that

P (F |E ·A) =d−1∑

k=0

1k + 1

· P (K = k)

=d−1∑

k=0

1k + 1

·(d− 1k

)(1− (P

j

i ))k · (P ji )d−1−k.

(13)

Combining the above equations we get the probability πji .

Page 95: P2P Live Video Streaming - DiVA Portal

D-11

4.1.4 Latest useful packet - Random useful peer

In addition to the events defined in the previous subsections let us define the event

G := {j is the latest useful packet in the buffer of s}.

Using the same rationale as in the previous case, we can express πji as

πji = P (s sends pkt j to r|j /∈ Bri )= P (s sends pkt j to r|A) · P (j ∈ Bsi )= P (C|A ·G) · P (G) · P (j ∈ Bsi ).

(14)

Again, we have P (j ∈ Bsi ) = P ji−1, so we turn to the probabilities P (G) andP (D|A · G). Packet j is latest useful if there is no packet with higher sequencenumber that some of the neighbors of s are in need of

P (G) =i−1∏

v=j+1

(1− P vi−1(1− (Pv

i−1)d)). (15)

Then we calculate the probability P (C|A·G), that s will choose r to send the packetto, among all its neighbors

P (C|G ·A) =d−1∑

k=0

1k + 1

·(d−1k

)(1− (P

j

i ))k · (P ji )d−1−k.

(16)

Plugging equations (15) and (16) into (14) yields the probability πji . Note that thecomplexity of the presented models does not depend on the overlay size N , andtherefore they provide excellent tools to evaluate the scalability of the schedulingschemes.

4.2 Overlays in the presence of node churn

Node-churn can affect the performance of a push-based system in three ways. First,if a peer does not know that some of its neighbors departed from the overlay, itmight forward packets to non-existing neighbors, which leads to a loss of forwardingcapacity. We do not explicitly consider this artifact, as it can be easily modelledas the decrease of the forwarding rate of the peers. Second, a peer that arrivesbefore the beginning of time slot i starts playback with packet i at time slot i+B,consequently the peer does not request packets with a sequence number lower thani. Third, the number of neighbors a peer has is not constant, but varies over timeas nodes join and leave. In the following we show how to estimate the effects of thechange of the number of neighbors on the overlay’s performance.

Page 96: P2P Live Video Streaming - DiVA Portal

D-12

0 dd-11

d)1(d

Np

d

d)1(Np

d

d)1(Np

d

d)1(

Figure 3: Markov process used to model the evolution of the number of neighbors of a

peer.

For simplicity we consider that nodes arrive to the overlay according to a Poissonprocess with intensity λ and their lifetime follows an exponential distribution withmean 1/µ. Each peer joining the overlay is assigned d neighbors uniformly atrandom from the nodes that have less than d neighbors. Let us denote by the r.v.D(t) the number of neighbors of a peer at time t (D(t) ∈ {0, . . . , d}, t ∈ [0,∞))and by the r.v. Di the number of neighbors of a peer at the beginning of time sloti (Di ∈ {0, . . . , d}). In the following we derive the distribution of Di in the steadystate of the system, which is the same as the steady state distribution of D(t), i.e.,the probabilities pz = limt→∞ P (D(t) = z), z ∈ {0, . . . , d}.

The average number of peers in the overlay in steady state is N = λ/µ andwe can approximate the evolution of D(t) with a one dimensional continuous timeMarkov process as shown in Figure 3. We can approximate the arrival rate ofthe neighbors to a peer already in the overlay by λ · d/(N(1 − pd)), i.e., in thedenominator we use the average of the number of peers with less than d neighborsinstead of its actual value. We use an iterative method to calculate the steady statedistribution of the Markov process: we start with an initial value of pd = 0 to derivethe next value of the steady state probability of pd until the value converges.

The evolution of P ji for an arbitrary peer r depends on the number of neighborsof the node itself and on πji , which in turn depends on the number of neighbors ofthe neighboring peers of node r. The exact calculation of P ji has a complexity of dd

and is computationally not feasible. Hence we make three approximations. First,we approximate the number of neighbors of all the neighboring peers of r with E[Di]when calculating πji . Second, we assume that the content of the playout buffer ofthe arriving nodes is statistically identical to that of the nodes already present inthe overlay, i.e., can be described by P ji . Third, to calculate the probability thatthe peer receives a packet directly from the root we use N instead of the actualoverlay size in time-slot i. We evaluate the effect of these approximations in Section5 by simulation.

The distribution of the number of neighbors of peer r in an arbitrary slot is givenby the steady state distribution of Di, hence for an arbitrary peer in a dynamic

Page 97: P2P Live Video Streaming - DiVA Portal

D-13

overlay instead of (2) we can write

P ji =

0 i < jm/N i = jd∑z=0

P (Di = z) · {P ji−1+

(1− P ji−1) · (1− πji )z} i > j

(17)

5 Performance Evaluation

In the following we first validate our modelling assumptions via simulations, thenwe evaluate the performance of the four forwarding schemes based on analyticaland simulation results.

5.1 Simulation methodology

For the simulations we developed a packet level event-driven simulator. We con-struct the overlay as follows. Each peer wishing to join sends a connection requestmessage to the boot-strap node, which may be the source node. The boot-strapnode responds with a list of randomly selected peers that are already part of theoverlay. The joining peer contacts the peers in this list in order to establish neighborrelationships with at least dmin but not more than d of them, where dmin = 0.85d.If it cannot find dmin neighbors, the peer issues a new request to the boot-strapnode. If, after the second request, the peer still cannot connect to dmin neighbors,it issues a force connection request to random peers in the overlay; those peers areforced to drop one of their neighbors and replace it with the joining peer.

For the simulations we first construct an overlay with N peers, thereafter thedata distribution starts. For simulations with node churn, nodes join the overlayaccording to a Poisson process, and the life time distribution is exponential. Werun the simulations for 2000 time slots, and the simulation results shown are theaverages of 10 simulation runs.

5.2 Model validation

As a first step we validate our assumption that buffer maps are statistically identical,which means that all peers have the same probability of possessing any particularpacket at any time. Instead of evaluating the entire buffer map, we compare theprobabilities that a packet is played out successfully, that is, it is received by theplayout time.

In Figure 4 we show the histogram of the probability of successfully played outpackets across the peers, considering the four forwarding schemes and the case ofperfect information (u = 1). The vertical line shows the mean value of the play-out probability averaged over all peers, while in the legend we show its standard

Page 98: P2P Live Video Streaming - DiVA Portal

D-14

0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 10

20

40

60

Num

ber

of p

eers

RpRp, d=2 − std= 0.021732

0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 10

20

40

60

Num

ber

of p

eers

RpRp, d=15 − std= 0.011347

0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 10

20

40

60

Playout probability (Ppl

)

Num

ber

of p

eers

RpRp, d=50 − std= 0.010549

0.16 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.340

10

20

30

40

Num

ber

of p

eers

DpRp, d=2 − std= 0.030483

0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.830

10

20

30

40

Num

ber

of p

eers

DpRp, d=16 − std= 0.011226

0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.830

10

20

30

40

Playout probability (Ppl

)

Num

ber

of p

eers

DpRp, d=50 − std= 0.0095138

0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.260

10

20

30

40

Num

ber

of p

eers

LbRu, d=2 − std= 0.014385

0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.90

10

20

30

40

Num

ber

of p

eers

LbRu, d=16 − std= 0.009537

0.85 0.86 0.87 0.88 0.89 0.9 0.910

10

20

30

40

Playout probability (Ppl

)

Num

ber

of p

eers

LbRu, d=50 − std= 0.007443

0.1 0.15 0.2 0.25 0.3 0.350

10

20

30

40

Num

ber

of p

eers

LuUp, d=2 − std= 0.043705

0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.910

10

20

30

40

Num

ber

of p

eers

LuUp, d=15 − std= 0.011242

0.85 0.86 0.87 0.88 0.89 0.9 0.910

10

20

30

40

Playout probability (Ppl

)

Num

ber

of p

eers

LuUp, d=50 − std= 0.0072706

Figure 4: Histogram of the playout probability for the considered forwarding schemes for

an overlay of N = 500, m = 11, B = 40 and for d = 2, 15 and 50 respectively.

deviation. When the number of neighbors of a peer is very low, such as d = 2,the probabilities are dispersed over a wide range, as can be seen both visually aswell as by the standard deviation. It means that our assumption on statisticallyidentical buffer maps does not hold. As d increases, the probabilities for differentpeers approach the mean. This shows that for reasonably high values of d our mod-elling assumption holds and the results obtained by the model should be accurate.Figure 5 shows the histogram of the playout probability for the four algorithms andfor the case where nodes have outdated information about their neighbors’ playoutbuffers with parameters u = 4 and d = 50. Compared to the perfect informationcase the standard deviation is higher for all schemes. We see significant effect ofdelayed buffer maps in the case of fresh-data-first schemes, where the initial statisti-cal difference among the playout buffers is amplified due to the rather deterministicforwarding decisions.

To investigate the impact of the neighborhood size, d, on the overlay perfor-mance, we show in Figure 6 the probability of successful play out versus the numberof neighbors d for all considered schemes. The figure contains both analytical andsimulation results. For small values of d there is a discrepancy between the model

Page 99: P2P Live Video Streaming - DiVA Portal

D-15

0.6 0.65 0.7 0.75 0.8 0.85 0.90

10

20

30N

umbe

r of

pee

rs

RpRp, d=50, u=4 − std= 0.016066

0.6 0.65 0.7 0.75 0.8 0.85 0.90

10

20

30

Num

ber

of p

eers

LbRu, d=50, u=4 − std= 0.0106

0.6 0.65 0.7 0.75 0.8 0.85 0.90

10

20

30

Playout probability (Ppl

)

Num

ber

of p

eers

LuUp, d=50, u=4 − std= 0.010096

0.6 0.65 0.7 0.75 0.8 0.85 0.90

10

20

30

Playout probability (Ppl

)

Num

ber

of p

eers

DpRp, d=50, u=4 − std= 0.011508

Figure 5: Histogram of the playout probability in the presence of delayed buffer map

updates. Overlay of N = 500, m = 11, B = 40 and u = 4.

and the simulations, since in this region the assumption on statistically identicalbuffer maps does not hold. Nevertheless, as d increases the analytical results ap-proach the simulation results. For the case of perfect information, u = 1, and forvalues of d > 10 the approximation is very good for all schemes, whereas for u > 1the analytical and the simulations results converge at a higher value of d. We expe-rience slower convergence in the case of fresh-data-first schemes as expected fromthe standard deviation values on Figure 5.

Based on the figures we can also draw the important conclusion that the playoutprobability is insensitive to the increase of the neighborhood size above a certainvalue of d. This suggests that a peer can reach the best achievable performancein terms of playout probability by maintaining a reasonable number of neighbors,and a slight variation of d caused by churn would not lead to variations in theperformance.

5.3 Playout probability and playback delay

Next, we investigate the performance of the four forwarding schemes in terms of theratio of successfully played out packets for static overlays. We consider an overlayof size N = 500, and the number of neighbors is d = 50. In Figure 7 we showthe ratio of successfully played out packets versus the playback delay in the case ofperfect information. In all the cases, we can see that the analytical results are veryclose to the simulation results. For the fresh-data-first and the DpRp schemes thereis a perfect match, while for RpRp the model slightly underestimates the playoutprobability for small playback delays.

For small buffer lengths the fresh-data-first schemes perform considerably betterthan the random-packet schemes, which is in accordance with the results presentedin [18, 21] and confirms the low diffusion delays achieved by the fresh-data-first

Page 100: P2P Live Video Streaming - DiVA Portal

D-16

0 5 10 15 20 25 30 35 40 45 500.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Number of neighbors (d)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

RpRp

u=1, Modelu=1, Simulationsu=4, Modelu=4, Simulations

0 5 10 15 20 25 30 35 40 45 500.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Number of neighbors (d)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

DpRp

u=1, Modelu=1, Simulationsu=4, Modelu=4, Simulations

0 5 10 15 20 25 30 35 40 45 500.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Number of neighbors (d)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

LbRu

u=1, Modelu=1, Simulationsu=4, Modelu=4, Simulations

0 5 10 15 20 25 30 35 40 45 500.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Number of neighbors (d)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

LuUp

u=1, Modelu=1, Simulationsu=4, Modelu=4, Simulations

Figure 6: Probability of successfully played out packets vs number of neighbors. Overlay

with N = 500, m = 11, B = 40. Model and simulations.

schemes. The ratio of successfully played out packets remains however low for LbRuand LuUp even at high playback delays. The reason of this limited performance isthe packet selection scheme: since only fresh packets are considered for transmission,the probability that more than one neighbor of a peer transmits the same packet inthe same time slot is relatively high and is not affected by the size of the playoutbuffer. This result does not contradict the results of [18], since there the sameschemes are considered assuming that scheduling decisions are shared without delay.As collision is avoided with this assumption, the playout probability reaches one.

The playout probability increases with the playback delay for the RpRp andthe DpRp schemes, and converges to one. In these cases the randomness of packetselection increases with B and consequently the probability of peers sending thesame packet to the same peer in the same time slot approaches zero.

The LbRu and LuUp schemes yield almost the same performance for all bufferlength values, except for large values of B, when the performance of LuUp ismarginally better. Similarly, DpRp slightly outperforms RpRp for large valuesof B as it makes maximum use of the increase of the set of eligible packets.

Next we investigate why data diffusion is slower in the random-packet schemes.

Page 101: P2P Live Video Streaming - DiVA Portal

D-17

0 10 20 30 40 50 600.7

0.75

0.8

0.85

0.9

0.95

1

Playback delay (B)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P Pl)

RpRp, ModelDpRp, ModelLbRu, ModelLuUp, ModelRpRp, SimulationsDpRp, SimulationsLbRu, SimulationsLuUp, Simulations

Figure 7: Ratio of successfully played

out packets vs playback delay for four for-

warding schemes. Overlay with N = 500,

m = 11, d = 50 and u = 1. Model and

simulations.

1 2 3 4 5 6 7 8 9 10 110

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Number of hops

CD

F

RpRpDpRpLbRuLuUp

Figure 8: CDF of the number of hops

from the source. Overlay with N = 500,

m = 11, d = 50, B = 10 and u = 1. Simu-

lations.

Figure 8 shows the cumulative distribution function of the number of overlay hopsfrom the source node for a specific packet. The results shown here are obtainedby tracking one randomly selected packet in 10 simulation runs over 10 differentoverlays. We observe that using the fresh-data-first schemes peers receive packetsafter somewhat fewer hops, which indicates that the trees that packets traverse toreach the peers have slightly higher fanout. This small difference alone does notexplain the better delay performance of fresh-data-first schemes. The main reasonis that in these schemes the time between receiving a packet and forwarding itto a neighbor is shorter as well. Nevertheless, the random-packet schemes mightdisseminate the data at a lower pace, but at relaxed playout delay constraints itreaches a larger portion of the peers in the overlay.

5.4 Playout probability and outdated buffer maps

Intuitively, the outdated information contained in a buffer map leads to sub-optimalforwarding decisions, and hence to the decreased efficiency of the forwarding algo-rithms. We show results that confirm this intuition in Figure 9 for RpRp andLbRu. We observe that the curves that correspond to the case of outdated infor-mation (u > 1) are similar in shape to the case with perfect information (u = 1),but the playout probability is always lower. For small playback delays the impactof outdated information seems to be rather small, however at larger delays thedifference becomes significant. Figure 10 shows how fast the playout probabilityconverges to the lower bound, when scheduling decisions are made without buffermap information (that is when u→∞ in the analytical model). The playout prob-

Page 102: P2P Live Video Streaming - DiVA Portal

D-18

5 10 15 20 25 30 35 40 45 50 55 600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Playback delay (B)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P Pl)

RpRp, u=1RpRp, u=2RpRp, u=4LbRu, u=1LbRu, u=2LbRu, u=4

Figure 9: Ratio of successfully played out packets vs playback delay in the presence of

outdated buffer maps. Overlay with N = 500, m = 11, d = 50. Model.

ability decreases fast with the increase of u, which indicates that the efficiency ofthe forwarding algorithms is very sensitive to the timeliness of the buffer contentinformation. The faster decrease in the case of LbRu is again due to the fresh-data-first nature of the scheme. Between buffer map updates information about olderpackets is still available in the buffer, but those old packets are not considered fortransmission.

5.5 Scalability

In this subsection we evaluate the scalability of the considered schemes in terms ofthe overlay’s size. Figure 11 shows the minimum playback delay required to achievea playout probability of 0.85 as a function of the overlay size N for the RpRp andthe LbRu schemes. The DpRp and the LuUp schemes give similar results. Thehorizontal axis is in logarithmic scale. We see that the increase of the necessaryplayback delay is proportional to log(N) for both schemes and even for u > 1 ifthe considered playout probability is achievable. In [19] the authors showed thatthe increase of the playback delay required to maintain the playout probabilityunchanged is proportional to the increase of the depth of the overlay. Hence, wecan conclude that all the considered push-based scheduling schemes lead to datadistribution trees with a depth that is logarithmic in the number of peers in theoverlay.

5.6 Effects of node churn

Page 103: P2P Live Video Streaming - DiVA Portal

D-19

10 20 30 40 50 60 70 80 90 1000.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Buffer map lag (u)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

RpRp

B=10B=10, lower boundB=40B=40, lower bound

10 20 30 40 50 60 70 80 90 1000.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Buffer map lag (u)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

LbRu

B=10B=10, lower boundB=40B=40, lower bound

Figure 10: Ratio of successfully played out packets vs buffer map update lag. Overlay

with N = 500, m = 11, d = 50. RpRp and LbRu schemes. Model.

102

103

104

105

0

10

20

30

40

50

60

Size of overlay (N)

Min

imum

pla

ybac

k de

lay

RpRp, u=1RpRp, u=4LbRu, u=1

Figure 11: Minimum playback delay re-

quired to achieve a playout probability of 0.85

versus overlay size. RpRp and LbRu schemes.

Model.

In this subsection we evaluate the ef-fects of node churn on the system per-formance. Figure 12 shows the playoutprobability as a function of the play-back delay for the RpRp and the LbRuschemes with and without node churn.The figure shows that the playout prob-ability is only slightly affected by nodechurn. This result is in accordance withFigure 6: node churn does not decreasethe performance of the overlay as longas peers are able to maintain a certainnumber of neighbors. A consequenceof the insensitivity to the evolution ofthe number of neighbors is that the as-sumption on the node life time distri-bution does not affect our results (thesteady state probability distribution ofthe M/G/∞ queue is known to be insensitive to the service time distribution).

Surprisingly however, the simulation results show that the overlay may performslightly better in the presence of node churn. Clearly, the improved performancecannot be a consequence of the variation of the number of neighbors of the nodes.In order to understand the reason for the improved performance we ran simula-tions with altruistic peers. An altruistic peer behaves slightly different than theconservative peers considered until now. An altruistic peer that arrives before thebeginning of slot i requests packets with a sequence number at least i − B/2 fromits neighbors in order to help the data distribution, even though itself starts playoutonly at slot i+B with packet i.

Page 104: P2P Live Video Streaming - DiVA Portal

D-20

0 10 20 30 40 50 600.7

0.75

0.8

0.85

0.9

0.95

1

Playback delay (B)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P Pl)

RpRp

Dynamic, ModelDynamic, SimulationsStatic, ModelStatic, Simulations

0 10 20 30 40 50 600.8

0.81

0.82

0.83

0.84

0.85

0.86

0.87

0.88

0.89

0.9

Playback delay (B)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P Pl)

LbRu

Dynamic, ModelDynamic, SimulationsStatic, ModelStatic, Simulations

Figure 12: Ratio of successfully played out packets vs playback delay under churn. Overlay

with N=500, m=11 and d=50, 1µ

=50 slot. Model and Simulations.

The results of the simulations performed with the altruistic peers and the con-servative peers can be seen in Figure 13, which shows the playout probability asa function of the mean lifetime of peers measured in time-slots. The static case isshown as reference. The lower the mean lifetime, the higher the churn rate, i.e.,the more dynamic is the scenario. Contrary to what one would expect, the overlaymay benefit from high churn rates if peers are conservative, but high churn leadsto decreased performance if peers are altruistic. We explain this phenomenon byconsidering an arbitrary neighbor s of a conservative peer that joins the overlay atslot i. The peer is interested in packets that are generated at or after slot i. Con-sequently, the neighboring nodes of s that were already in the overlay have fewercontestants for the packets that were generated before slot i, and may get thosepackets sooner.

100 150 200 250 300 350 400 450 500 550 6000.7

0.75

0.8

0.85

0.9

0.95

1

Mean holding time

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P pl)

RpRp, ConservativeRpRp, AltruisticRpRp, Static overlayLbRu, ConservativeLbRu, AltruisticLbRu, Static overlay

Figure 13: Ratio of successfully played out packets versus mean holding time for the

RpRp and LbRu schemes. Simulations.

Page 105: P2P Live Video Streaming - DiVA Portal

D-21

6 Conclusion

In this paper we proposed an analytic framework to assess the performance of var-ious scheduling algorithms for mesh-based P2P streaming systems. The modellingframework is based on the observation that with peers maintaining a fair number ofneighbors, the local scheduling decisions may generate per packet distribution treesthat are very different and as a result the position of the peers in the trees is statis-tically the same. Using this framework, we derived analytic performance measuresfor four forwarding schemes. We proved that fresh-data-first schemes, though ableto diffuse data fast, have a limit on the ratio of peers that they can deliver datato. In contrast, the random-packet schemes can achieve a good playout probabilityand playback delay trade-off. We also evaluated the performance of the forward-ing algorithms under outdated information and showed that outdated informationquickly leads to a significant decrease of the system’s performance. Furthermore,we developed a model that shows that in a dynamic overlay the variation of thenumber of the peers’ neighbors does not affect the overlay performance as long aspeers are able to maintain a fair number of neighbors. We also showed that in adynamic environment, newly arriving nodes can actually act in a beneficial wayfor the system, by properly adjusting their initial interest window: node arrivalsincrease slightly the average playout probability compared to a static overlay withthe same characteristics. The analytic framework of this paper can be used toevaluate various forwarding solutions and their combinations, and also the effectof network parameters. In our future work we will extend the framework to pro-pose and evaluate scheduling solutions for overlays with heterogeneous uplink anddownlink capacities.

References

[1] PPLive, http://www.pplive.com/en/about.html.

[2] Octoshape, http://www.octoshape.com.

[3] UUSee, http://www.uusee.com.

[4] X. Hei, Y. Liu, and K. Ross. IPTV over p2p streaming networks: The mesh-pull approach. IEEE Communications Magazine, 46(2):86–92, February 2008.

[5] V. Fodor and Gy. Dan. Resilience in live peer-to-peer streaming. IEEE Com-munications Magazine, 45(6):116–123, June 2007.

[6] S. Birrer and F. Bustamante. A comparison of resilient overlay multicast ap-proaches. IEEE Journal on Selected Areas in Communications, 25:1695–1705,December 2007.

Page 106: P2P Live Video Streaming - DiVA Portal

D-22

[7] B. Li, S. Xie, G.Y. Keung, J. Liu, I. Stoica, H. Zhang, and X. Zhang. Anempirical study of the coolstreaming+ system. IEEE Journal on Selected Areasin Communications, 25:1627–1639, December 2007.

[8] X. Hei, C. Liang, Y. Liu, and K.W. Ross. A measurement study of a large-scalep2p IPTV system. IEEE Transactions on Multimedia, 9:1672–1687, December2007.

[9] R. Rejaie N. Magharei. Prime: Peer-to-peer receiver-driven mesh-based stream-ing. In Proc. of IEEE INFOCOM, 2007.

[10] X. Zhang, J. Liu, B. Li, and T-S. P. Yum. Coolstreaming/donet: a data drivenoverlay network for efficient live media streaming. In Proc. of IEEE INFOCOM,2005.

[11] K. Nahrstedt J. Liang. Dagstream: Locality aware and failure resilient peer-to-peer streaming. In Multimedia Computing and Networking (MMCN), 2006.

[12] Y. Tang M. Zhang, L. Zhao, J-G. Luo, and S-Q. Yang. Large-scale live mediastreaming over peer-to-peer networks through the global internet. In Proc.ACM Workshop on Advances in peer-to-peer multimedia streaming (P2PMMS),2005.

[13] L. Bracciale, F. Lo Piccolo, D. Luzzi, S. Salsano, G. Bianchi, and N. Blefari-Melazzi. A push-based scheduling algorithm for large scale p2p live streaming.In Proc. of QoS-IP, 2008.

[14] M. Faloutsos A. Vlavianos, M. Iliofotou. Bitos: Enhancing BitTorrent forsupporting streaming applications. In Proc. of IEEE INFOCOM, 2006.

[15] Y. Liu. On the minimum delay peer-to-peer streaming: how realtime can itbe? In Proc. of MM’07, 2007.

[16] S. Tewari and L. Kleinrock. Analytical model for bittorrent-based live videostreaming. In Proc. of IEEE NIME 2007 Workshop, 2007.

[17] L. Massoulie et al. Randomized decentralized broadcasting algorithms. In Proc.of IEEE INFOCOM, 2007.

[18] T. Bonald, L. Massoulie, F. Mathieu, D. Perino, and A. Twigg. Epidemic livestreaming: Optimal performance trade-offs. In Proc. of ACM SIGMETRICS,2008.

[19] Gy. Dan and V. Fodor Delay Asymptotics and Scalability for Peer-to-peer LiveStreaming In IEEE Trans. on Parallel and Distributed Systems,to appear

Page 107: P2P Live Video Streaming - DiVA Portal

D-23

[20] V. Fodor and I. Chatzidrossos. Playback delay in mesh-based peer-to-peer sys-tems with random packet forwarding. In Proc. of 1st International Workshopon Future Multimedia Networking (FMN), 2008.

[21] C. Liang, Y. Guo, and Y. Liu. Is random scheduling sufficient in p2p videostreaming? In Proc. of the 28th International Conference on Distributed Com-puting Systems (ICDCS), 2008.

Page 108: P2P Live Video Streaming - DiVA Portal

Paper E

Server Guaranteed Cap: An incentive mechanismfor maximizing streaming quality in heterogeneousoverlays

Ilias Chatzidrossos, Gyorgy Dan, Viktoria Fodor.In Proc. of IFIP Networking 2010, to appear.

Page 109: P2P Live Video Streaming - DiVA Portal
Page 110: P2P Live Video Streaming - DiVA Portal

Server Guaranteed Cap: An incentive mechanism

for maximizing streaming quality in heterogeneous

overlays

Ilias Chatzidrossos, Gyorgy Dan, Viktoria FodorLaboratory for Communication Networks

School of Electrical EngineeringKTH, Royal Institute of Technology

Abstract

We address the problem of maximizing the social welfare in a peer-to-peerstreaming overlay given a fixed amount of server upload capacity. We showthat peers’ selfish behavior leads to an equilibrium that is suboptimal in termsof social welfare, because selfish peers are interested in forming clusters andexchanging data among themselves. In order to increase the social welfare wepropose a novel incentive mechanism, Server Guaranteed Cap (SGC ), thatuses the server capacity as an incentive for high contributing peers to uploadto low contributing ones. We prove that SGC is individually rational andincentive compatible. We also show that under very general conditions, thereexists exactly one server capacity allocation that maximizes the social welfareunder SGC, hence simple gradient based method can be used to find theoptimal allocation.

1 Introduction

The goal of peer-to-peer (p2p) streaming systems is to achieve the maximum pos-sible streaming quality using the upload capacities of the peers and the availableserver upload capacity. In general, the achievable streaming quality depends heav-ily on the aggregate upload capacity of the peers [1]. Hence, a key problem of p2pstreaming systems is how to give incentives to selfish peers to contribute with alltheir upload capacity. Numerous schemes were proposed to solve this problem (e.g.,[2, 3]). These schemes relate peers’ contribution with the streaming quality theyreceive: the more a peer contributes, the better streaming quality it can potentiallyreceive. The correlation of peer contribution to the quality it receives is based onthe assumption that all peers are capable of contributing but refrain from doing so.

1

Page 111: P2P Live Video Streaming - DiVA Portal

E-2

Nevertheless, peers might be unable to have a substantial contribution withrespect to the stream rate because of their last-mile connection technology. MostDSL and cable Internet connections are asymmetric, hence peers may have sufficientcapacity to, e.g., download high definition video but insufficient for forwarding it.Similarly, in high-speed mobile technologies, such as High Speed Downlink PacketAccess (HSDPA), the download rates are an order of magnitude higher than theupload rates [4]. Peers using assymetric access technologies would receive poorquality under incentive schemes that offer a quality proportional to the level of peercontribution.

Furthermore, using such incentive schemes high contributing peers maximizetheir streaming quality if they prioritize other high contributing peers when up-loading data. As a consequence, peers with similar contribution levels form clustersand exchange data primarily among themselves. While high contributing peerscan achieve excellent streaming quality this way, the quality experienced by lowcontributing peers is low, and the average streaming quality in the p2p system issuboptimal.

In order to increase the average streaming quality in the system, we propose amechanism that gives incentives to high contributing peers to upload to low con-tributing ones. The mechanism relies on reserving a portion of the server capacityand providing it as a safety resource for high contributing peers who meet certaincriteria. We show that high contributing peers gain by following the rules set by theincentive mechanism, and they fare best when they follow the rules truthfully. Wealso show that due to some basic properties of p2p streaming systems our mecha-nism can easily be used to maximize the streaming quality.

The rest of the paper is organized as follows. In Section 2, we motivate ourwork by studying the effect of selfish peer behavior in a push-based p2p streamingoverlay. In Section 3, we describe our incentive mechanism and provide analyticalresults. We show performance results in Section 4. In Section 5 we discuss previousworks on incentives in peer-to-peer streaming systems. Finally, Section 6 concludesour paper.

2 Motivation

In order to understand the effects of selfish peer behavior on the performance of p2pstreaming systems, in the following we study a mesh-based p2p streaming system.Mesh-based systems have received significant attention in the research community[5, 6, 7, 8, 9], and are underlying the majority of commercial streaming systems(e.g., [10], [11]).

2.1 Case study: a mesh-based p2p streaming system

The streaming system we use as an example was proposed in [8] and was subse-quently analyzed in [9, 12]. The system consists of a server and N peers. The

Page 112: P2P Live Video Streaming - DiVA Portal

E-3

upload capacity of the server is mt times the stream rate. For simplicity we con-sider two types of peers: peers with high upload capacity, called contributors, andpeers without upload capacity, called non-contributors. The upload capacity of thecontributors is c times the stream rate, while that of non-contributors is zero. Wedenote by α the ratio of non-contributors in the overlay.

Each peer is connected to d other peers, called its neighbors. The server isneighbor to all peers. Every peer maintains a playout buffer of recent packets,and exchanges information about its playout buffer contents with its neighborsperiodically, via so called buffer maps. The server sends a copy of every packet tomt randomly chosen peers. The peers then distribute the packets among each otheraccording to a forwarding algorithm. The algorithm takes as input the informationabout packet availability in neighboring peers (known from the buffer maps) andproduces a forwarding decision, consisting of a neighbor and a packet sequencenumber. In this work we consider the Random Packet - Random Peer (RpRp)forwarding algorithm. This algorithm has been shown to have a good playbackcontinuity - playback delay tradeoff ([8, 12]). According to this algorithm, a sendingpeer first chooses randomly a neighbor that is missing at least one packet that itselfhas and it sends to that neighbor a random packet that it is missing. Peers playout data B time after they were generated by the server, and we refer to this as theplayback delay.

2.2 Playout probability, individual utility and social welfare

The performance of p2p streaming systems is usually measured in terms of theplayout probabilities of the peers, i.e., the probability pi that peer i receives packetsupon their playout deadlines [8, 12, 9]. The impact of the playout probability pion the peers’ satisfaction is, however, typically influenced by the loss resilience ofthe audiovisual encoding. To allow for a wide range of encodings, we use utilityfunctions to map the playout probability to user satisfaction. Formally, the utilityfunction is a mapping u : [0, 1]→ [0, 1]. We consider three kinds of utility functions.Linear function: Utility function of the form y = a · pi + b. An improvement inthe playout probability yields the same increase in utility regardless of the alreadyachieved playout probability.Concave function: Utility is a concave function of the playout probability, that is,the marginal utility is a non-increasing function of the playout probability.Step function: There is an instantaneous transition from a zero utility to a utility ofa unit upon reaching a threshold p∗i . The peer is only satisfied above the thresholdplayout probability.

We measure the aggregate utility of the peers, called the social welfare, usingthe utilitarian welfare model. In the utilitarian welfare model the social welfare isthe sum of the utilities, which is equivalent to the average peer utility

SWF = (1− α) · u(pc) + α · u(pnc), (1)

Page 113: P2P Live Video Streaming - DiVA Portal

E-4

where pc and pnc denote the playout probability of contributors and non-contributorsrespectively.

2.3 Modelling peer behavior

To study the impact of peer cooperation in the overlay, we introduce the notionof generosity factor, which we denote by β. This parameter shows how generous apeer is towards its non-contributing neighbors. The generosity factor takes values inthe interval [0, 1]. When β = 1, the peers are completely generous and they uploadto their neighbors regardless of whether they, on their turn, are uploading or not.When β = 0, peers are not generous at all, or equivalently completely selfish, andwill only upload to peers that upload as well. Values of the generosity level in theset (0, 1) correspond to intermediate generosity levels.

The generosity level affects the playout probabilities of the contributing andnon-contributing peers. Since the major source of capacity for the non-contributorsare the contributors, the generosity level of contributors determines their playoutprobability. When β = 1, then contributors share equally their capacity betweentheir contributing and non-contributing neighbors. As β decreases, capacity is sub-tracted from the non-contributors and added to the contributors. This means thatthe playout probability of the contributors increases, while that of non-contributorsdecreases.

2.4 The effects of selfish behavior

In the following we show the effects of selfish behavior on the social welfare. Thenumerical results we show were obtained using an analytical model and via simu-lations. The analytical model is an extension of our previous work [12], where wedeveloped a model of the playout probability in a push-based system with homoge-neous peer upload capacities. We extended the model to incorporate two types ofpeers, contributors and non-contributors. The extended model can be found in [13].The simulation results were obtained using the packet-level event-driven simulatorused in [12]. In the simulations, nodes join the overlay at the beginning of thesimulation, and are organized into a random, d-regular graph. After the overlaywith N peers is built, the data distribution starts according to the forwarding al-gorithm described in Section 2.1. The algorithm is executed in time slots in a waythat contributors with capacity c make c forwarding decisions per slot. All resultspresented in the following refer to an overlay of N = 500 peers, where each peer isconnected to d = 30 neighbors and contributors have an upload capacity of c = 2times the stream bitrate.

Fig. 1a and 1b show the effect of the generosity factor on the playout proba-bility of the contributors and the non-contributors obtained using the model andsimulations. The figures also show the average playout probability in the overlay(dotted lines). The share of non-contributors is α = 0.5. Fig. 1a shows a system

Page 114: P2P Live Video Streaming - DiVA Portal

E-5

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Generosity factor (β)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P Pl)

(a)

Contributors, ModelNon−Contributors, ModelAverage, ModelContributors, SimulationsNon−Contributors, SimulationsAverage, Simulations

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Generosity factor (β)

Rat

io o

f suc

cess

fully

pla

yed

out p

acke

ts (

P Pl)

(b)

Contributors, ModelNon−Contributors, ModelAverage, ModelContributors, SimulationsNon−Contributors, SimulationsAverage, Simulations

Figure 1: Ratio of successfully played out packets vs generosity factor β for playbackdelay of (a) B = 10 and (b) B = 40. Analytical and simulation results.

where the playback delay is small. Clearly, contributors maximize their playoutprobabilities for β = 0, but the average playout probability is suboptimal in thiscase. Surprisingly, the average playout probability is suboptimal for β = 1 as well.This shows that when β is small, the upload capacity is better utilized when allo-cated to non-contributors, but for large β values it is better utilized by contributors.Nevertheless, for a larger playback delay (Fig. 1b) the average playout probabilityis maximized for β = 1. This is because for such a large playback delay the uploadcapacity is better utilized when used to feed the non-contributors for all β. Fromthese two figures we draw the conclusion that average playout probability dependson the contributors’ generosity, but β = 1 is not necessarily optimal.

0 0.2 0.4 0.6 0.8 10

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Generosity factor (β)

Rat

io o

f dup

licat

e pa

cket

s (P

d)

α=0.5, B=10α=0.5, B=40α=0.7, B=10α=0.7, B=40

Figure 2: Ratio of duplicate transmissionsvs generosity factor (β) for B = 10 andB = 40. Simulations.

The performance degradation whenpeers act selfishly is a general charac-teristics of mesh-based p2p streamingsystems. The inefficiencies in data de-livery are due to the lack of coordina-tion between peers [14], which prohibitsseamless streaming. In push-based al-gorithms [8, 12] the lack of coordinationleads to duplicate packet receptions atpeers, i.e., a peer receives the same datafrom more than one of its neighbors.Fig. 2 supports that the decrease inthe average playout probability is actu-ally due to the clustering of contribu-tors, which leads to the increase in theratio of duplicate transmissions. In thecase of pull-based systems the lack of coordination leads to multiple requests fordata at sending peers, also a source of inefficient bandwidth use. While coordi-nation can mitigate the inefficiency [14], it leads to higher delay in delivering the

Page 115: P2P Live Video Streaming - DiVA Portal

E-6

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Generosity factor (β)

Soc

ial w

elfa

re fu

nctio

n (S

WF

)

(a)

Linear

LogStep − x

0 =0.95

0 0.2 0.4 0.6 0.8 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Generosity factor (β)

Soc

ial w

elfa

re fu

nctio

n (S

WF

)

(b)

Linear

LogStep − x

0 =0.95

Figure 3: Social welfare vs. generosity factor β for playback delays of (a) B = 10and (b) B = 40. Overlay with α = 0.5. Analytical results.

data, which in turn leads to lower playout probabilities for any fixed playback de-lay. Based on these findings, we argue that performance degradation due to peerclustering is not restricted to push systems only, but is intrinsic to uncoordinatedp2p dissemination algorithms.

Next, we proceed with our utility based analysis of the overlay. For linearutility function we use u(pi) = pi, so the utility curve coincides with the curvepresented in Fig. 1a and 1b. For concave utility we use a logarithmic function,u(pi) = log10(1 + 9pi). For the step function we set the threshold to p∗i = 0.95. Ourconclusions do not depend on the the particular values of the parameters and thechoice of the logarithmic function.

Fig. 3a and 3b show the social welfare versus the generosity factor for the threekinds of utility functions and for playback delays of B = 10 and B = 40 respectively.In the case of small playback delay (B = 10) the social welfare for the linear andthe concave utility functions attains its maximum for β < 1. For the step functionthe social welfare equals 0 for high values of β, when contributors are not able toreceive at least with probability p∗i = 0.95. As β decreases, there is a transition inutility, but the contributors do not gain anything by becoming more selfish after thetransition, and the social welfare remains constant. In the case of large playbackdelay (B = 40), we see that the social welfare for linear and concave utility functionsattains its maximum for β = 1. For the step function we observe a similar transitionof the social welfare as for B = 10, but at a higher value of the generosity factorβ. The transition occurs where the contributors achieve a playout probability ofp∗i = 0.95. To understand the importance of the threshold value, let us considerp∗i = 0.8. It is easy to see based on Fig. 1b that in this case the social welfarewould be maximal for β ≥ 0.8, as both contributors and non-contributors achieveplayout probabilities above the threshold. To summarize, we draw two conclusionsfrom these figures. First, for the linear and concave utility functions the value of βthat maximizes the social welfare is a function of the playback delay, but in general

Page 116: P2P Live Video Streaming - DiVA Portal

E-7

β = 0 is far from optimal. Second, for the step function the threshold value p∗i playsan important role in whether β = 0 is optimal.

3 The SGC incentive mechanism

Our work is motivated by the observation that the peers’ selfish behavior leads toa loss of social welfare. In our solution, we exploit the inability of contributors toachieve the maximum playout probability by being selfish and offer them seamlessstreaming if they increase their generosity, that is if they serve non-contributors aswell. In the following, we describe our incentive mechanism, called Server Guaran-teed Cap (SGC ).

Under SGC, there are two types of data delivery: p2p dissemination and directdelivery from the server. Fresh data is distributed in the overlay using p2p dis-semination: the peers forward the data according to some forwarding algorithm.Contributors can also request data that they miss directly from the server if theydo not exceed a threshold playout probability of Tp via p2p dissemination. In ourscheme the server ensures that by combining p2p dissemination and direct deliverythe contributors possess all data with probability 1. In order to be able to serve therequests for direct delivery, the server reserves mr of its total upload capacity mt

for direct delivery. mr has to be large enough to cap the gap between the thresholdprobability Tp and 1. Given the number of contributors in the overlay and thereserved capacity mr, the server can calculate the threshold value of the playoutprobability below which it would not be able to cap all contributors

Tp = 1− mr

(1− α) ·N (2)

The server advertises the threshold value Tp as the maximum playout probabil-ity that contributors should attain through p2p dissemination. Peers report theirplayout probabilities pi achieved via p2p dissemination. Based on the reports, theserver knows which are the contributors with pi ≤ Tp, that is, which contributorsare entitled for direct delivery.

3.1 Properties of SGC

In the following we show two important properties of the proposed mechanism:ex-post individual rationality and incentive compatibility. Ex-post individual ra-tionality means that a contributing peer does not achieve inferior performance byfollowing the rules of the mechanism irrespective of the playout probability it wouldachieve without following the mechanism.

Proposition 1. The SGC mechanism is ex-post individually rational.

Proof. Consider that the server advertises a threshold probability of Tp. All con-tributors that receive up to pi ≤ Tp via p2p dissemination are entitled to pull the

Page 117: P2P Live Video Streaming - DiVA Portal

E-8

remaining 1− Tp directly from the server. Hence a peer with pi = Tp receives datawith probability Pi = pi+(1−Tp) = 1, which is at least as much as it would achieveby not following the rules of the mechanism.

Since SGC relies on peers reporting their playout probabilities to the server,it is important that peers do not have an incentive to mis-report their playoutprobabilities. In the following we show that SGC satifies this criterion, i.e., it isincentive compatible.

Proposition 2. The SGC mechanism is incentive compatible.

Proof. Let us denote the playout probability of peer i by pi and the probability itreports by pi. Tp is the threshold probability that the contributors must not exceedin order to be directly served by the server, and mr is the corresponding reservedcapacity at the server. Contributors can thus receive mr/(1− α)N = 1− Tp shareof the stream from the server directly if they report pi ≤ Tp. Consequently, if peer iachieves pi ≤ Tp and reports it truthfully (pi = pi), it receives data with probabilityPi = min(1, pi + (1− Tp)). If pi > Tp and peer i reports truthfully, it receives withprobability Pi = pi.

Clearly, peer i can not benefit from over-reporting its playout probability, so weonly have to show that it has no incentive for under-reporting it either. In order toshow this we distinguish between three cases.

• p < p ≤ Tp: the playout probability that the peer will finally receive will bePi = min(1, p+ 1−Tp) ≤ 1, which is the same that it would receive if it weretelling the truth

• p ≤ Tp < p: the playout probability that the peer will finally receive will bePi = min(1, p + 1 − Tp) = 1. The peer could achieve the same by havingp = Tp and reporting p = p.

• Tp < p < p: the peer is not entitled to direct delivery, so Pi = pi.

We note that apart from not gaining, peer i can actually lose by declaring thatit does not have packets it already has: it can reduce the probability of receivingpackets from its neighbors that it does not possess in reality. We did not have toaccount for this to prove incentive compatibility, however.

3.2 Optimal server capacity allocation

A key question for the implementation of the mechanism is how to determine theadvertised probability threshold Tp, that is, how to find the reserved capacity mr.Since the server capacity is fixed, the choice of mr affects the server capacity avail-able for the p2p dissemination, and hence the efficiency of the data delivery through

Page 118: P2P Live Video Streaming - DiVA Portal

E-9

p2p dissemination. To study the effect of server resource allocation on the playoutprobability of the peers, we express the success of a forwarding algorithm in deliv-ering the stream as a function of the overlay size and the capacity allocated to thepeers. We define the mapping f : (N,R) → [0, 1] of number of peers in an overlayand the aggregate capacity allocated to them, to the average playout probability ofthe peers.

In the following we show that for a wide class of p2p streaming systems there isa unique value of mr that maximizes the social welfare. This class of p2p streamingsystems is characterized by the fact that the marginal gain of increasing the uploadcapacity in the system is non-increasing.

Definition 1. A p2p streaming system is called efficient if the playout probabilityof the peers is a concave function of the overlay capacity.

We only consider systems where the efficiency of the forwarding algorithm doesnot depend on the overlay size for a given ratio of peers over total upload capacity,that is for systems where it holds that f(k · N, k · C) = f(N,C), ∀k ∈ R. Giventhat, we formulate the following proposition.

Proposition 3. The construction of an efficient p2p streaming system is alwaysfeasible regardless of the characteristics of the forwarding algorithm used.

Proof. Let us consider a system with N peers and total upload capacity C. Supposethat f is strictly convex on an interval in its domain. Formally, there exist uploadcapacity values C1, C2, with C1 < C2, for which it holds

λf(N,C1) + (1− λ)f(N,C2) > f(N,λC1 + (1− λ)C2),∀λ ∈ (0, 1) (3)

We split the overlay into two partitions, one with size λN and server capacity λC1

and the other with (1 − λ)N peers and (1 − λ)C2 server capacity. For the twooverlays we have that

f(λN, λC1) = f(N,C1) (4)f((1− λ)N, (1− λ)C2) = f(N,C2) (5)

By combining (4) and (5) we get f(N,λC1 + (1 − λ)C2) = λf(N,C1) + (1 −λ)f(N,C2), which contradicts (3). Hence, by splitting the overlay we can create anefficient p2p streaming system.

For a given server capacity, mt, SGC requires that the server caps the gapbetween the playout probability pi achieved via p2p dissemination and 1. Therefore,the value of mr should be such that contributors can achieve Tp for some β ∈ [0, 1].The feasible range for the implementation of SGC is then defined as Mr = {mr ∈(0,mt) : mr ≥ (1− f((1− α) ·N,Ct

)) · (1− α) ·N}, where Ct is the total capacity

of the contributors and the server capacity used for the p2p dissemination.

Page 119: P2P Live Video Streaming - DiVA Portal

E-10

Proposition 4. For an efficient system, a feasible range of server upload capacitiesMr and a concave utility function, the social welfare is a concave function of thereserved server capacity mr.

Proof. The social welfare of the system is given as

SWF = (1− α) · u(f((1− α) ·N,Cc) +

mr

(1− α) ·N)

+ α · u(f(α ·N,Cnc)

)(6)

where Cc and Cnc are the upload capacities allocated to contributors and to non-contributors respectively (as a function of β), and Ct = Cc + Cnc. Under the SGCmechanism, the contributors receive the stream with probability 1, so the aboveequation becomes

SWF = (1− α) · u(1) + α · u(f(α ·N,Cnc)

). (7)

In the following we show that Cnc is a concave function of mr. Since our systemis efficient the playout probability pi is concave with respect to Cc, or equivalentlyCc is convex in pi=Tp. Since Cnc = Ct − Cc, Cnc is concave in 1 − Tp, which onits turn is linear in mr. Therefore, Cnc is a concave function with respect to mr.Consequently the composite function f(Cnc) is concave as well with respect to mr,as a composition of non-decreasing concave functions [15]. For the same reason u◦fis concave with respect to mr, which proves the proposition.

A consequence of Proposition 4 is that the social welfare function SWF hasexactly one, global, maximum on Mr. Hence, the server can discover the optimalamount of reserved capacity mr by using a gradient based method starting fromany mr ∈Mr.

4 Numerical results

In the following we show numerical results that quantify the gain of the proposedincentive mechanism. The social welfare with respect to the reserved capacity bythe server is shown in Fig. 4. The total capacity of the server is mt = 11. We cansee that the feasible region of SGC depends on the playback delay for the system.For B=10, it holds that mr ∈ [2, 9], while for larger playback delays mr ∈ [1, 10].The increase of mr triggers two contradicting effects. On one side, it increases theplayout probability of contributors through the direct delivery. On the other side, itdecreases the efficiency of the p2p dissemination phase, since the amount of servercapacity dedicated to that type of dissemination is decreased. The social optimumis at the allocation where the rate of decrease of the efficiency of p2p disseminationbecomes equal to that of the increase achieved through the direct delivery.

Finally, we note that even using SGC there is a loss of social welfare comparedto the hypothetical case when β is optimized by generous peers to maximize the

Page 120: P2P Live Video Streaming - DiVA Portal

E-11

1 2 3 4 5 6 7 8 9 100.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Reserved server capacity (mr)

Soc

ial w

elfa

re fu

nctio

n (S

WF

)

(a)

B=10

B=20

B=30

B=40

1 2 3 4 5 6 7 8 9 100.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Reserved server capacity (mr)

Soc

ial w

elfa

re fu

nctio

n (S

WF

)

(b)

B=10

B=20

B=30

B=40

Figure 4: Social welfare versus reserved server capacity for different playback delays.Linear (a) and logarithmic (b) utility functions. Overlay with N = 500, d = 30 andm = 11.

social welfare. We can observe this loss by comparing the maximum social welfareobtained in Figs. 4 to that in Fig. 3 (for B = 10 and B = 40). This loss of socialwelfare is the social cost of the selfishness of peers.

5 Related work

A large number of incentive mechanisms was proposed in recent years to solve theproblem of free-riding in p2p streaming systems. These mechanisms are either basedon pairwise incentives or on global incentives.

Pairwise incentive schemes were inspired by the tit-for-tat mechanism used inthe BitTorrent protocol [3, 16]. However, tit-for-tat, as used in BitTorrent, wasshown not to work well in live streaming with random neighbor selection [3, 16].The authors in [16] proposed an incentive mechanism for neighbor selection based onplayback lag and latency among peers, achieving thus better pairwise performance.In [17], the video was encoded in layers and supplier peers favored neighbors thatuploaded back to them, achieving thus service differentiation as well as robustnessagainst free-riders.

Global incentive schemes take into account the total contribution of a peer to itsneighbors. In [2], a rank-based tournament was proposed, where peers are rankedaccording to their total upload contribution and each peer can choose as neighborany peer that is below itself in the ranked list. Thus, peers that have high contri-bution have also higher flexibility in selecting their neighbors. In [18], the authorsproposed a payment-based incentive mechanism, where peers earn points by up-loading to other peers. The supplier peer selection is performed through first priceauctions, that is, the supplier chooses to serve the peer that offers her the mostpoints. This means that peers that contribute more, accumulate more points andcan make high bids, increasing thus their probability of winning an auction for aparent.

Page 121: P2P Live Video Streaming - DiVA Portal

E-12

All the aforementioned incentive mechanisms assume that peers are always ca-pable of contributing but, due to selfishness, refrain from doing so. We, on thecontrary, consider peers that are unable to contribute because of their access tech-nologies. Associating streaming quality with contribution unnecessarily punishesthese weak peers. Therefore our goal is to maximize the social welfare in the sys-tem, by having the high contributing peers upload to low contributing peers aswell. In this aspect, our work is closely related to [19], where a taxation scheme wasproposed, based on which high contributing peers subsidize low contributing onesso that the social welfare is maximized. However, in contrast to [19], where it isassumed that peers voluntarily obey to the taxation scheme and they can only reactto it by tuning their contribution level, we prove that our mechanism is individu-ally rational and incentive compatible. To the best of our knowledge our incentivescheme is unique in these two important aspects.

6 Conclusion

In this paper we addressed the issue of maximizing the social welfare in a p2p stream-ing system through an incentive mechanism. We considered a system consisting ofcontributing and non-contributing peers and studied the playout probability for thetwo groups of peers. We showed that when contributing peers are selfish the systemoperates in a state that is suboptimal in terms of social welfare. We proposed anincentive mechanism to maximize the social welfare, which uses the server’s capac-ity as an incentive for contributors to upload to non-contributing peers as well. Weproved that our mechanism is both individually rational and incentive compatible.We introduced the notiona of efficient p2p systems and proved that for any efficientsystem there exists exactly one server resource allocation that maximizes the socialwelfare. An extension of our scheme to several classes of contribution levels will besubject of our future work.

References

[1] Kumar, R., Liu, Y., Ross, K.: Stochastic fluid theory for p2p streaming sys-tems. In: IEEE INFOCOM. (2007)

[2] Habib, A., Chuang, J.: Service differentiated peer selection: An incentivemechanism for peer-to-peer media streaming. IEEE Transactions on Multime-dia 8 (June 2009) 610–621

[3] Silverston, T., Fourmaux, O., Crowcroft, J.: Towards an incentive mechanismfor peer-to-peer multimedia live streaming systems. In: IEEE InternationalConference on Peer-to-Peer Computing. (2008)

Page 122: P2P Live Video Streaming - DiVA Portal

E-13

[4] Chahed, T., Altman, E., Elayoubi, S.: Joint uplink and downlink admissioncontrol to both streaming and elastic flows in CDMA/HSDPA systems. Per-formance Evaluation 65 (November 2008) 869–882

[5] N. Magharei, R.R.: Prime: Peer-to-peer receiver-driven mesh-based streaming.In: Proc. of IEEE INFOCOM. (2007)

[6] M. Zhang, L. Zhao, Y.T., Luo, J.G., Yang, S.Q.: Large-scale live media stream-ing over peer-to-peer networks through the global internet. In: Proc. ACMWorkshop on Advances in peer-to-peer multimedia streaming (P2PMMS).(2005)

[7] A. Vlavianos, M. Iliofotou, M.F.: Bitos: Enhancing BitTorrent for supportingstreaming applications. In: Proc. of IEEE INFOCOM. (2006)

[8] Bonald, T., Massoulie, L., Mathieu, F., Perino, D., Twigg, A.: Epidemic livestreaming: Optimal performance trade-offs. In: Proc. of ACM SIGMETRICS.(2008)

[9] Liang, C., Guo, Y., Liu, Y.: Investigating the scheduling sensitivity of p2pvideo streaming: An experimental study. IEEE Transactions on Multimedia11 (April 2009) 348–360

[10] PPLive: http://www.pplive.com/en/about.html.

[11] UUSee: http://www.uusee.com

[12] Chatzidrossos, I., Dan, G., Fodor, V.: Delay and playout probability trade-offin mesh-based peer-to-peer streaming with delayed buffer map updates. P2PNetworking and Applications (May 2009)

[13] Chatzidrossos, I., Dan, G., Fodor, V.: Server Guaranteed Cap: An incentivemechanism for maximizing streaming quality in heterogeneous overlays. Tech-nical Report TRITA-EE 2009:059, KTH, Royal Institue of Technology (Dec2009)

[14] Picconi, F., Massoulie, L.: Is there a future for mesh-based live video stream-ing? In: IEEE International Conference on Peer-to-Peer Computing. (2008)

[15] Boyd, S., Vandenberghe, L.: Convex Optimization. Cambridge UniversityPress (2004)

[16] Pianese, F., Perino, D.: Resource and locality awareness in an incentive-based P2P live streaming system. In: Proc. of the Workshop on Peer-to-peerStreaming and IP-TV. (2007)

Page 123: P2P Live Video Streaming - DiVA Portal

E-14

[17] Liu, Z., Shen, Y., Panwar, S.S., Ross, K.W., Wang, Y.: Using layered video toprovide incentives in p2p live streaming. In: Proc. of Workshop on Peer-to-PeerStreaming and IP-TV. (2007)

[18] Tan, G., Jarvis, S.A.: A payment-based incentive and service differentiationmechanism for peer-to-peer streaming broadcast. In: Proc. of 14th Interna-tional Workshop on Quality of Service (IWQoS). (2006)

[19] Chu, Y., Chuang, J., Zhang, H.: A case for taxation in peer-to-peer streamingbroadcast. In: Proc. of the ACM SIGCOMM workshop on Practice and theoryof incentives in networked systems. (2004)

Appendix: Data Propagation Model

We denote by P ji the probability that an arbitrary peer has packet j at the end oftime-slot i. Each peer buffers packets for a number of slots before it plays them outin order to increase the probability of uninterrupted playback. The buffer size isthe playback delay (B) of the peer. Thus, a packet that is generated at time-slot jwill be played out at time slot j+B. In order for a packet to be successfully playedout, it has to be at the buffer of the peer by the end of the time-slot that precedesits playout slot. Namely the playout probability of packet j is expressed as P jj+B−1.

The forwarding of packets by contributors depends on the generosity factor β,which shows how generous contributors are towards their non-contributing neigh-bors. We denote by p, the probability that at any given slot a contributor willchoose to forward a packet to one of its non-contributing neighbors. Then, thegenerosity factor can be defined as β = p/α. Intuitively, the generosity factorcan be considered as the fraction of time that a contributing peer is forwarding tonon-contributing neighbors over the ratio of its non-contributing neighbors.

A peer can have packet j at the end of time-slot j only if it received it directlyfrom the server. At the end of any time-slot i, with i > j, a peer can have packet jif it already had it at the end of time-slot i− 1 or if it received it during time-slot ifrom any of its contributing neighbors. This is expressed by the following equation:

P ji =

0 i < jmN i = j

P ji−1 + (1− P ji−1)(1− (1− πji )Dc

) i > j.(8)

where Dc is the number of contributing neighbors of a peer and πji is the probabilitythat packet j was sent by a contributing neighbor during time-slot i.

Since the overlay is a random regular graph, the average number of contributingneighbors of contributors and non-contributors is the same. However, for values ofthe generosity factor β of less than 1, the probability πji differs between contributorsand non-contributors, resulting in a different probability P ji . Therefore, in order to

Page 124: P2P Live Video Streaming - DiVA Portal

E-15

describe the data propagation in a heterogeneous overlay, we need two equationsof the form of (8), one for the contributors and another for the non-contributors.We denote by ξji and φji the probability P ji for a contributor and a non-contributorrespectively.

Next, we proceed with the calculation of the probability πji . For that, we consideran arbitrary peer r, who does not have packet j at the beginning of time-slot i, andone of its contributing neighbors, s. Since contributors may forward up to c packetsper slot, we divide the slot in c sequential selections of a pair (neighbor,packet).For the sake of simplicity we assume that s does not keep memory of the pairs thatit has chosen in the previous selections within a time-slot. That means, we allows to choose the same pair of neighbor and packet more than once in a time-slot.The probability that r will receive packet j from s, is the probability that in oneof these selections s will choose the pair (r,j). Let us denote by `(i) the lowestpacket sequence number that peers would potentially forward in time slot i. Sincein slot i a peer would not forward the packet that is to be played out in that slot,`(i) = max{0, i − B + 1}. The highest packet sequence number that any peer canforward in slot i is i− 1, because only the source has packet i in slot i.To calculate πji , we define the events:

A := {s has packet j},C := {s chooses to send a packet to r},D := {s chooses to send packet j to r},E := {s sends to contributor during slot i},Hn := {s sends packet j to r at the nth selection in time-slot i}.

The probability πji can then be expressed as

πji = 1−c∏

n=1

(1− P (Hn|E) · P (E)) =

= 1− ·c∏

n=1

(1− P (D|C · E ·A) · P (C|E ·A) · P (A) · P (E)).(9)

We have that P (A) = ξji−1. Let us now calculate πji assuming that r is a contributor.We then have that P (E) = 1− p, so we proceed in finding the value of P (C|E ·A).The probability that r will be chosen by s depends on the total number of eligiblecontributing neighbors of s, since given E, s will only consider contributors aspossible recipients at slot i. A contributing neighbor of s is eligible if it does nothave packet j, or if it has packet j but it misses at least one other packet that spossesses. So, the probability pe is written as

pe = 1− ξji−1 + ξji−1 ·(

1−i−1∏

z=`(i),z 6=j

(1− ξzi−1 · (1− ξzi−1)

))(10)

Page 125: P2P Live Video Streaming - DiVA Portal

E-16

Let us denote by K the r.v. denoting the number of eligible neighbors of s excludingr. Given that s has Dc contributing neighbors in total, the probability that r willbe chosen by s as a recipient of the next packet is expressed as

P (C|E ·A) =Dc−1∑

k=0

1k + 1

· P (K = k), (11)

where K follows the binomial distribution with parameters (pe, Dc − 1).Next, we calculate P (D|E · C · A), the probability that s will send packet j to r,given that s has packet j and it chooses to send a packet to r. This probability isindependent of the rank that r was chosen within the slot. We denote by Z ther.v. representing the number of eligible packets of peer s with respect to r. Theprobability, then, that packet j is sent is

P (D|C · E ·A) =i−`(i)∑z=1

1zP (Z = z). (12)

In the following define a recursion to calculate the distribution of Z. We define theprobability vector

Qs = {ξ`(i)i · · · ξj−1i , 1, ξj+1

i · · · ξi−1i },

which contains the probabilities that node s has packets at the different bufferpositions, given that it has packet j. Similarly, we define the probability vector ofpeer r, given that it is a contributor.

Qr = {ξ`(i)i · · · ξj−1i , 0, ξj+1

i · · · ξi−1i }

We initialize the recursion by setting L0,0 = 1 and Lz,0 = 0 for z < 0. The recursionis then defined by

Lz,n = Lz,n−1(1−Qs(n)(1−Qr(n))) +Lz−1,n−1Qs(n)(1−Qr(n)). (13)

The recursion is executed for n = 1 . . . B − 1 and for every n for z = 0 . . . l. Thedistribution of Z is then given as P (Z = z) = Lz,i−`(i) for for z = 1 . . . i− `(i).We can calculate πji for the case where r is non-contributor following the same stepsas we did for the case where r is a contributor. In that case, however, we have that:

• P (E) = p

• pe = 1− φji−1 + φji−1 ·(

1−∏i−1z=`(i),z 6=j

(1− φzi−1 · (1− φzi−1)

))

• Qr = {φ`(i)i · · ·φj−1i , 0, φj+1

i · · ·φi−1i }

By plugging these values into eq. (9), (10), (13), we derive πji for a non-contributing peer r.