Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems...

8
Appl. Math. Inf. Sci. 9, No. 3, 1549-1556 (2015) 1549 Applied Mathematics & Information Sciences An International Journal http://dx.doi.org/10.12785/amis/090351 Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,, Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications, Chongqing, P. R. China 2 University of Electronic Science and Technology of China, Chengdu, P. R. China Received: 21 Aug. 2014, Revised: 21 Nov. 2014, Accepted: 22 Nov. 2014 Published online: 1 May 2015 Abstract: We study the issue of P2P streaming system with transcoding and expose the fundamental characteristics and mathematical theory of the system in the two-class network structure. We find out and prove that, in a two-class P2P streaming system, to provide peers receiving data above some given flow rate, there is a lower bound of source server load. We give an algorithm to achieve this minimal server load. We also compare the minimal server load by our algorithm with typical traditional design without transcoding in various situations in our simulation experiments, and analyze how much benefit system can get from the utilization of transcoding technique. The results show that, if transcoding technique is utilized appropriately, better performance of two-class P2P streaming system can be achieved. Keywords: streaming system, P2P network, transcoding, heterogeneous network, content distribution 1 Introduction With the development of P2P live streaming technology, the approach of multimedia streaming systems have evolved from unicast, tree, and multi-tree to mesh [1, 2, 3, 4]. Peers become more and more complex. From bandwidth, memory to CPU, more and more resources of peers have been exploited for relieving the source server load and utilizing the systems resource more effectively. These clients, such as PC, TV, tablet, PDA, cellphone, and so on, have various screen sizes, color depth and video qualities. Specially, they may have different video coding with heterogeneous hardware and software, and they may have different bandwidth with heterogeneous network [3, 4, 5, 6, 7, 8, 9]. In traditional P2P multimedia streaming systems, the peers, which receive the same program with different video coding algorithm, cannot share their upload capacity in single overlay network. However more networks or video sources may need more resources. In recent years, there are some literatures [6, 7, 8, 9, 10, 11, 12] that focus on transcoding technique utilized in P2P streaming systems. [6] proposes a multimedia streaming architecture in which transcoding services coordinate to transform the streaming data into different formats in P2P systems. [7] proposes a system named PAT (Peer-Assisted Transcoding) to enable effective online transcoding and seek to reduce the bandwidth consumption and computing overhead in P2P network. In [8], the transcoding technique is used in some total new network environments. The paper discusses issues that are relevant to enabling P2P streaming in networked consumer electronics, NAT/firewall traversal, and codec inflexibility. [10] also discusses the video transcoding in P2P network of IPTV system. [9] proposes a P2P transcoding method for heterogeneity mobile streaming. The paper seeks to increase the flexibility of coding data, which is based on diverse display size, computing power, memory, and media capabilities in devices. [11] presents a P2P streaming system named CloudStream, which is a cloud-based video proxy that can deliver streaming videos by transcoding the original video in real time to a scalable codec. And [12] proposes a collaborative strategy that leverages the peering architecture of P2P networks and makes the computational resources of peers sharable and collaborative. These researches announce that, in the some situations, compared with traditional systems, P2P streaming systems with transcoding have better performances. Nevertheless, existent studies just focus on network protocols design and video coding algorithm, which lacks of mathematically investigate and deeply understand their systems. Furthermore, there exists no relative research that focuses on what network environment the transcoding systems suits and how much benefit in quantity the new technique taken to the systems. Corresponding author e-mail: [email protected] c 2015 NSP Natural Sciences Publishing Cor.

Transcript of Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems...

Page 1: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

Appl. Math. Inf. Sci.9, No. 3, 1549-1556 (2015) 1549

Applied Mathematics & Information SciencesAn International Journal

http://dx.doi.org/10.12785/amis/090351

Transcoding in Two-class P2P Streaming Systems

Shuai Zeng1,∗, Lemin Li2 and Dan Liao2

1 Chongqing University of Posts and Telecommunications, Chongqing, P. R. China2 University of Electronic Science and Technology of China, Chengdu, P. R. China

Received: 21 Aug. 2014, Revised: 21 Nov. 2014, Accepted: 22 Nov. 2014Published online: 1 May 2015

Abstract: We study the issue of P2P streaming system with transcoding and expose the fundamental characteristics and mathematicaltheory of the system in the two-class network structure. We find out and prove that, in a two-class P2P streaming system, toprovidepeers receiving data above some given flow rate, there is a lower bound of source server load. We give an algorithm to achieve thisminimal server load. We also compare the minimal server loadby our algorithm with typical traditional design without transcodingin various situations in our simulation experiments, and analyze how much benefit system can get from the utilization of transcodingtechnique. The results show that, if transcoding techniqueis utilized appropriately, better performance of two-class P2P streamingsystem can be achieved.

Keywords: streaming system, P2P network, transcoding, heterogeneous network, content distribution

1 Introduction

With the development of P2P live streaming technology,the approach of multimedia streaming systems haveevolved from unicast, tree, and multi-tree to mesh [1,2,3,4]. Peers become more and more complex. Frombandwidth, memory to CPU, more and more resources ofpeers have been exploited for relieving the source serverload and utilizing the systems resource more effectively.These clients, such as PC, TV, tablet, PDA, cellphone, andso on, have various screen sizes, color depth and videoqualities. Specially, they may have different video codingwith heterogeneous hardware and software, and they mayhave different bandwidth with heterogeneous network [3,4,5,6,7,8,9]. In traditional P2P multimedia streamingsystems, the peers, which receive the same program withdifferent video coding algorithm, cannot share theirupload capacity in single overlay network. However morenetworks or video sources may need more resources.

In recent years, there are some literatures [6,7,8,9,10,11,12] that focus on transcoding technique utilized in P2Pstreaming systems. [6] proposes a multimedia streamingarchitecture in which transcoding services coordinate totransform the streaming data into different formats in P2Psystems. [7] proposes a system named PAT (Peer-AssistedTranscoding) to enable effective online transcoding andseek to reduce the bandwidth consumption and

computing overhead in P2P network. In [8], thetranscoding technique is used in some total new networkenvironments. The paper discusses issues that are relevantto enabling P2P streaming in networked consumerelectronics, NAT/firewall traversal, and codecinflexibility. [ 10] also discusses the video transcoding inP2P network of IPTV system. [9] proposes a P2Ptranscoding method for heterogeneity mobile streaming.The paper seeks to increase the flexibility of coding data,which is based on diverse display size, computing power,memory, and media capabilities in devices. [11] presentsa P2P streaming system named CloudStream, which is acloud-based video proxy that can deliver streamingvideos by transcoding the original video in real time to ascalable codec. And [12] proposes a collaborative strategythat leverages the peering architecture of P2P networksand makes the computational resources of peers sharableand collaborative. These researches announce that, in thesome situations, compared with traditional systems, P2Pstreaming systems with transcoding have betterperformances. Nevertheless, existent studies just focus onnetwork protocols design and video coding algorithm,which lacks of mathematically investigate and deeplyunderstand their systems. Furthermore, there exists norelative research that focuses on what networkenvironment the transcoding systems suits and how muchbenefit in quantity the new technique taken to the systems.

∗ Corresponding author e-mail:[email protected]

c© 2015 NSPNatural Sciences Publishing Cor.

Page 2: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

1550 S. Zeng et. al. : Transcoding in Two-class P2P Streaming Systems

At the same time, the research on P2P networkstructure pay more attention to the two-class model [13,14,15] [17], which means peers in the system are broadlyclassified into two classes, with each class havingapproximately the same upload capacity. These studiesare reasonable as there are roughly two classes of peers,which are super and ordinary ones, in P2P streamingsystems. In this paper, we are interested in the basicnetwork fluid model for P2P streaming systems withtranscoding in two-class P2P streaming systems. Ourpaper seeks to expose some fundamental characteristicsand limitations of two-class P2P streaming systems withtranscoding. There are some literatures [13,14,15,16,17]that discusses and analyzes the issues of P2P streamingsystems capacity by mathematic fluid model in two-classP2P streaming systems without transcoding. [13]develops a basic stochastic model and fluid theory for theP2P streaming systems and discusses the theory intwo-class systems. [14][14] derives and proves theperformance bounds for minimum server load andmaximum streaming rate in two-class P2P streamingsystems. And in [17], the authors develop a fluid modelfor two-class P2P streaming systems with network codingand mathematically analyze the performance of this kindof systems.

In this paper, our analysis and results are based onboth previous research and the features of two-class P2Pstreaming systems with transcoding. And, withoutsacrificing realistic assumptions of systems scale, wemainly investigate the minimal demand of video sourceserver upload capacity, which also calls minimal serverload, in two-class P2P streaming systems withtranscoding. Furthermore, basing on our mathematicalanalysis and simulation experiment, we compare theperformance of transcoding system with no transcodingone in two-class P2P streaming systems, and seek toanswer the following questions.

1. How could transcoding technique be helpful in two-class P2P streaming systems? What situations are properfor using this technique?

2. What is the condition to make peers receiving datafrom system above some given flow rate? Can we find andachieve the minimal server load?

3. Compared with systems without transcoding, howmuch better the transcoding technique taken? What are thekey parameters that make their difference performance?

The remainder of the paper is organized as follows.Section 2 describes and insights the basic features oftwo-class P2P streaming systems with transcoding and notranscoding. In Section 3, we compute and prove theminimal server load for some given flow rate of each peer,and we give an algorithm to achieve this minimal load inthe proof. In section 4, we give our simulation experimentand compare system performance between transcodingand no transcoding. And. Finally, we conclude this paperin Section 5.

Fig. 1: An example of two-class P2P streaming system.

2 Two-class P2P Streaming Systems withTranscoding

Before we expose our theoretical analysis and model oftwo-class P2P streaming systems with transcoding, in thissection, we first summarize some fundamentalcharacteristics and overview design principles of thetraditional design and transcoding cases.

As shown in Figure 1(a), this is a typical example oftwo-class P2P streaming system. There are six peers (A,B, C, D, E and F) and one source server (S) in the system.A and B are PCs with 1000 Kbps upload capacityrespectively, which are seen as super peers, and C, D, Eand F are cellphones with 200 Kbps upload capacityrespectively, which are seen as ordinary peers. And, wefurther assume that the download bandwidth andcomputing capability is not the bottleneck of the system,which is a common setting of previous studies. There is avideo program in S with some video coding rate. The goalof P2P streaming system design is to ensure peersreceiving data above the video coding rate, and, at thesame time, minimize the server load.

To illustrate clearly, the P2P network in Figure 1(a) isredrawn as an overlay complete network as Figure 1(b).In next subsection, based on the example of Figure 1, wedescribe how two-class P2P streaming system andtraditional system work.

2.1 Traditional Designs without Transcoding

In a two-class P2P streaming system, the traditionaldesigns without transcoding almost basically base on the

c© 2015 NSPNatural Sciences Publishing Cor.

Page 3: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

Appl. Math. Inf. Sci.9, No. 3, 1549-1556 (2015) /www.naturalspublishing.com/Journals.asp 1551

model in [13][14][17], which is close to the realitysituations of P2P streaming systems in the practice. Inthese systems, peers in the system are classified into twoclasses depending on their different hardware. As theexample shown in Figure 2(a), A and B are super peers,which belong to class 1, while C, D, E and F are ordinaryones, which belong to class 2. In this two-class P2Pstreaming system, super peers and ordinary peers havetheir own video coding rates respectively. When a videoprogram needs to send to all of these peers, two kinds ofvideo coding data are transported by networkindependently. This means, as drawn by different colorsin Figure 2(a), the whole P2P streaming system is dividedinto two subsystems. Every subsystem is an independentP2P streaming system, each of which has its differentvideo coding rate, and no data exchange among them. Wecall this kind of systems No Transcoding Systems (OTS)in the rest of this paper.

Consider the situation of OTS in the setting of Figure2(a). In this example, to support the video coding rates,super peer requires 800Kbps bandwidth and ordinary peerrequires 300Kbps bandwidth. If the system needs all peersin class 1 get data no less than the rate 800Kbps and allpeers in class 2 get data no less than the rate 300Kbps, asshown in Figure 2(a), the total upload capacity is at least2800Kbps, and the source server load is at least 1200Kbps.

2.2 Two-class P2P Streaming Systems withTranscoding

Based on [3,7,17], utilizing transcoding technique, P2Pstreaming systems can support multiple video codingrates and exchange their data in one overlay network.Especially, in a two-class P2P streaming system, as thesame as OTS, there are two video coding data in thenetwork. They have different video quality with differentcoding rate. In general, the high quality video data, whichhave high coding rate, is sent to the super peers (the peersin class 1) firstly. Super peers are responsible fortranscoding this video data from high coding rate to lowone. And send video data with low coding rate to theordinary peers at last. We call this kind of systemsTranscoding Systems (TS) in the rest of this paper.

Back to the example and consider the situation of TSin the setting of Figure 2(a). If the system needs all superpeers get data no less than the rate 800Kbps and allordinary peers getting data no less the rate 300Kbps. Theoriginal data could be pushed to A and B from S firstly,and A and B, which are marked ’T’ in the figure,transcode these data to the format and coding rate for theordinary peers, Then, the transcoded data is pushed to C,D, E and F from A and B. So, calculating the result, asshown in Figure 2(b), we conclude that the necessity oftotal upload capacity is reduced to 2800Kbps and thenecessity of source server load is reduced to 800Kbps.

It seems we can easily conclude that, compared withOTS, TS has better performances. But there are still some

Fig. 2: Example of OTS and TS.

questions. First, is the server load of TS always betterthan OTS in any two-class P2P streaming systems?Second, how does transcoding technique affect thesystems exactly? What is the essential relation betweentranscoding and no transcoding systems? Third, notintuitively, but mathematically, how many performancesimprovement of TS are compared with traditionalsystems? We discuss these questions in next section.Before that, for the sake of mathematical tractability, wemake a few assumptions in TS. First, our study bases onthe scenario of two-class P2P streaming system, which isdescribed in many previous papers [13,14,15] [17].Second, upload capacity is the only bottleneck of system.This assumption is according to most existing studies [13,14,15,16,17] of P2P systems. Specially, in our study, italso means that peers can transcode their received data toother coding data, which has the same or lower videoquality, and the transcoded data is always enough foruploading. This paper just discusses the networkbandwidth model and seeks the basic fluid theory, anddoes not restrict the specific network protocols or videocoding algorithm.

3 Model and Algorithm

3.1 Notations and Expressions

Before modeling and analyzing two-class P2P streamingsystems with transcoding, introduce some necessarynotations and expressions firstly.

c© 2015 NSPNatural Sciences Publishing Cor.

Page 4: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

1552 S. Zeng et. al. : Transcoding in Two-class P2P Streaming Systems

Denote byn for total number of peers in the system.Let n1 be the number of super peers andn2 be the numberof ordinary peers. Denote byP for the set of all peers. LetP1 be the set of super peers andP2 be the set of ordinarypeers. Denote bys for the source server ,pi j for peer inclassi. We have

P1 ={

p1 j}

, f or j = 1, ...,n1

P2 ={

p2 j}

, f or j = 1, ...,n2

P = P1∪P2 ={

pi j}

, f or i = 1,2; j = 1, ...,ni

n = n1+n2 = |P1|+ |P2|= |P|

Furthermore, we adopt a network flow model andfocus on the bufferless and instantaneous rate at whichpeers transmit bits. A super peer can playback the videowhenever it receives fresh content bits at rater1, and anordinary peer can playback the video whenever it receivesfresh content bits at rater2. Denote byR for the set ofrequired rate in the system, which isR = {r1, r2}. Denoteby us for the upload capacity ofs andui j for the uploadcapacity of pi j. Let u(·) be the function of uploadcapacity summation. For example,

u(P) = ∑P

ui j =n1

∑j=1

u1 j +n2

∑j=1

u2 j. Let u be the average

upload capacity of all peers. Letu1 andu2 be the averageupload capacity of peers in class 1 and class 2. We have

u =u(P)|P|

=u(P1)+u(P2)

|P1|+ |P2|=

n1

∑j=1

u1 j +n2

∑j=1

u2 j

n1+n2

u1 =u(P1)

|P1|=

n1

∑j=1

u1 j

n1

u2 =u(P2)

|P2|=

n2

∑j=1

u2 j

n2

Notice the definition of universal streaming (US) in[13]. Similarly, in a two-class P2P streaming system,when all peers inP1 receiving video data no less thanr1and all peers inP2 receiving video data no less thanr2,we say that the system provides universal streaming intwo-class system (UST) or the system runs on UST.Denote byusmin for the minimal server load ofs to ensuresystem running on UST. Notations introduced in thispaper are summarized in Table 1.

3.2 Minimal Server Load

We give the proof ofusmin in this subsection. The proof isdivided into two parts. We give a lower bound forusmin inpart one and prove UST can be supported with this boundin part two. Notice that part two is also an algorithm to

Table 1: Main notations used in this paper.s Source server.

pi j Peerj in the classj.n Total number of peers in the system.ni Total number of peers in the classi.P Set of all peers.Pi Set of peers in the classi.ri Required rate in the classi.R Set of required rate in the system.us Source server upload capacity.ui j Upload capacity ofpi j.u(·) Function of upload capacity Summation.

u Average upload capacity of all peers.ui Average upload capacity of peers in the classi.

usmin Minimal server load for system running on UST.u′s Rest ofs available upload capacity.u′gh Rest ofpgh available upload capacity.u′all Total rest of available upload capacity.soi j The flow rate of video substream froms to pi j.

sghi j The flow rate of video substream frompgh to pi j.

tri j The total rate ofpi j receiving video data.

achieve the minimal server load. We call this algorithmminimal server load algorithm (MSL) in the rest of thispaper. Let usmin denote minimal server load for atwo-class P2P streaming system with transcodingproviding UST, then

usmin = maxi

(

ri+i−1

∑k=0

nk (rk −uk)

)

, (1)

n0 = r0 = u0 = r3 = 0, i = 1,2,3.

Proof:Part one:Notice that for the whole systemP = P1∪P2, it is

obviouslyusmin ≥ r1 andusmin+2∑

i=1ni (ui − ri) ≥ 0. And,

for the subsystemP2, usmin+n1 (u1− r1) ≥ r2, where thepeers in class 1 at least costsn1 (r1−u1) bandwidth.

Therefore

usmin ≥ r1usmin ≥ r2+n1 (r1−u1)

usmin ≥2∑

i=1ni (ri−ui)

(2)

For convenience, letn0 = r0 = u0 = r3 = 0. Then,combining these three inequalities gives

usmin ≥ maxi

(

ri+i−1

∑k=0

nk (rk −uk)

)

, (3)

n0 = r0 = u0 = r3 = 0, i = 1,2,3

It remains to show that if

us = maxi

(

ri+i−1

∑k=0

nk (rk −uk)

)

, (4)

n0 = r0 = u0 = r3 = 0, i = 1,2,3

c© 2015 NSPNatural Sciences Publishing Cor.

Page 5: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

Appl. Math. Inf. Sci.9, No. 3, 1549-1556 (2015) /www.naturalspublishing.com/Journals.asp 1553

then UST can be supported.Part two:Let P0 = {s}. Consider the subsystemP0

P1 firstly.Whenr1 ≥ n1 (r1−u1), i.e.r1 ≤

n1 u1n1−1.

Consider a video stream of rater1. Divide this videostream inton1 substreams, with thejth substream havingrate

so1 j =

u1 j r1

u(P1)=

u1 j r1

n1 u1, f or j = 1, ...,n1

Notice thatn1

∑j=1

so1 j = r1 ≤ us. So the source server can

copy the jth substream to thep1 j respectively.Furthermore, because

(n1−1)so1 j =

(n1−1)u1 j

n1 u1· r1 ≤

(n1−1)u1 j

n1 u1·

n1 u1

(n1−1)= u1 j

p1 j can copy its stream to each of the othern1−1 peersin the class 1. Thus each super peer receives a substreamfrom the source server and also receivesn1−1 additionalsubstreams from the othern1−1 super peers. The total rateat whichp1 j receives is

tr1 j = so1 j + ∑

k:k 6= j

so1k =

n1

∑j=1

so1 j = r1

Hence, whenr1 ≥ n1 (r1−u1), the rater1 can be supportedin the class 1.

Whenr1 < n1 (r1−u1).In this situation, divide the video stream inton1+1

substreams, withjth substream having rate{

so1 j =

u1 jn1−1, f or j = 1, ...,n1

so1n1+1 = r1−

u(P1)n1−1 = r1−

n1 u1n1−1

And the source server copy two substreams to each peerj in the class 1: thejth substreamso

1 j and the substreamso1n1+1. The source server can do this becausen1

∑j=1

so1 j + n1 so

1n1+1 =n1 u1

n1−1+ n1

(

r1−n1 u1

n1−1

)

= n1 (r1−u1)≤ us

Furthermore, because

(n1−1)so1 j = (n1−1) ·

u1 j

n1−1= u1 j,

f or j = 1, ...,n1

p1 j can copy its streamso1 j to each of the othern1−1

peers in the class 1. Thus each super peer receives twosubstreams from the source server and also receivesn1−1additional substreams from the othern1−1 super peers.The total rate at whichp1 j receives is

tr1 j = so1n1+1+so

1 j + ∑k:k 6= j

so1k = so

1n1+1+n1

∑j=1

so1 j

=

(

r1−n1 u1

n1−1

)

+n1 u1

n1−1= r1

Hence, whenr1 < n1 (r1−u1), the rater1 can be supportedin the class 1 too.

Then, by above algorithm, whetherr1 ≥ n1 (r1−u1) orr1 < n1 (r1−u1), each super peer can get video data at rater1, and the total rest of available upload capacity is

u′all = u′s+n1

∑h=1

u′1h = us+n1 (u1− r1)≥ r2

Next, we consider the whole system2⋃

k=0Pk.

Whenr2 ≥ n2 (r2−u2), i.e.r2 ≤n2u2n2−1.

Consider a video stream of rater2, which can get fromsource server and super peers. Divide this video streaminto n2 substreams, with thejth substream having rate

so2 j =

u2 j

u(P2)·

u′su′all

· r2 =u2 j

n2 u2·

u′sus+n1 (u1− r1)

· r2

, f or j = 1, ...,n2

And divide this video stream intoni substreams, with thejth substream having rate

s1h2 j =

u2 j

u(P2)·

u′1h

u′all· r2 =

u2 j

n2 u2·

u′1h

us+n1 (u1− r1)· r2

, f or j = 1, ...,n2

Notice that

n2

∑j=1

so2 j =

n2

∑j=1

u2 j

u(P2)·

u′su′all

· r2 = u′s ·r2

u′all

As u′all ≥ r2, we haven2

∑j=1

so2 j ≤ u′s. So the source server

can copyso2 j to thep2 j( j = 1, ...,n2) respectively. And, as

n2

∑j=1

s1h2 j =

n2

∑j=1

u2 j

u(P2)·

u′1h

u′all· r2 = u′1h ·

r2

u′all≤ u′1h

p1h(h = 1, ...,n1) can copy s1h2 j to p2 j( j = 1, ...,n2)

respectively. Sop2 j( j = 1, ...,n2) gets

so2 j +

n1

∑h=1

s1h2 j =

u2 j r2

u(P2)

Furthermore, because

(n2−1) ·

(

so2 j+

n1

∑h=1

s1h2 j

)

=(n2−1)u2 j

u(P2)· r2

=(n2−1)u2 j

n2 u2· r2 ≤

(n2−1)u2 j

n2 u2·

n2 u2

n2−1= u2 j

p2 j( j = 1, ...,n2) can copyso2 j +

n1

∑h=1

s1h2 j to each of the

othern2−1 peers in the class 2. Thus each ordinary peer

c© 2015 NSPNatural Sciences Publishing Cor.

Page 6: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

1554 S. Zeng et. al. : Transcoding in Two-class P2P Streaming Systems

receives a substream from each super peer and the sourceserver, and also receivesn2−1 additional substreamsfrom the othern2−1 ordinary peers. The total rate atwhich p2 j receives is

tr2 j =n2

∑j=1

(

so2 j +

n1

∑h=1

s1h2 j

)

=

n2

∑j=1

u2 j

u(P2)· r2 = r2

Hence, whenr2 ≥ n2 (r2−u2), the rater2 can be supportedin the class 2.

Whenr2 < n2 r2−n2 u2.Consider a video stream of rater2, which can get from

source server and super peers. Divide this video streaminto n2+1 substreams, with thejth substream having rate

so2 j =

u2 jn2−1 ·

u′su′all

=u2 j

n2−1 ·u′s

us +n1(u1−r1),

f or j = 1, ...,n2

so2n2+1 =

(

r2−u(P2)n2−1

)

·(

u′su′all

)

=(

r2−n2 u2n2−1

)

·(

u′sus+n1(u1−r1)

)

And divide this video stream inton2+1 substreams, withthe jth substream having rate

s1h2 j ==

u2 jn2−1 ·

u′1hu′all

=u2 j

n2−1 ·u′1h

us+n1(u1−r1),

f or j = 1, ...,n2

s1h2n2+1 =

(

r2−u(P2)n2−1

)

·(

u′1hu′all

)

=(

r2−n2 u2n2−1

)

·(

u′1hus+n1(u1−r1)

)

Notice that

n2

∑j=1

so2 j + n2 so

2n2+1 =n2 (r2−u2)

us+n1 (u1− r1)·u′s

As (4), we haveus ≥2∑

k=1nk (rk −uk), i.e.

us+n1 (u1− r1)≥ n2 (r2−u2)

Son2

∑j=1

so2 j+n2 so

2n2+1 ≤ u′s, which means the source server

can copyso2 j +so

2n2+1 to thep2 j( j = 1, ...,n2) respectively.And, as

n2

∑j=1

s1h2 j + n2 s1h

2n2+1=n2 (r2−u2)

us+n1 (u1− r1)·u′1h ≤ u′1h

p1h(h = 1, ...,n1) can copy s1h2 j +s1h

2n2+1 top2 j( j = 1, ...,n2) respectively. Sop2 j( j = 1, ...,n2) gets

(

so2 j +

n1

∑h=1

s1h2 j

)

+

(

so2n2+1+

n1

∑h=1

s1h2n2+1

)

Furthermore, because

(n2−1) ·

(

so2 j +

n1

∑h=1

s1h2 j

)

= (n2−1) ·

u2 j

n2−1·

u′su′all

+u2 j

n2−1·

n1

∑h=1

u′1h

u′all

= u2 j

p2 j( j = 1, ...,n2) can copyso2 j +

n1

∑h=1

s1h2 j to each of the

othern2−1 peers in the class 2. Thus each ordinary peerreceives two substreams from each super peer and thesource server, and also receivesn2−1 additionalsubstreams from the othern2−1 ordinary peers. The totalrate at whichp2 j receives is

tr2 j =n2

∑j=1

(

so2 j +

n1

∑h=1

s1h2 j

)

+ so2n2+1+

n1

∑h=1

s1h2n2+1

=n2

∑j=1

u2 jn2−1 ·

u′su′all

+u2 j

n2−1 ·

n1∑

h=1u′1h

u′all

+(

r2−u(P2)n2−1

)

·(

u′su′all

)

+(

r2−u(P2)n2−1

)

·

n1∑

h=1u′1h

u′all

= r2

Hence, whenr2 < n2 (r2−u2), the rater2 can be supportedin the class 2 too.

To sum up, whenus satisfies (4), by the MSLalgorithm, the system can provide video data at rater1 foreach super peer and at rater2 for each ordinary peer,which means the whole system can run on UST.Considering (3), we have

usmin = maxi

(

ri+i−1

∑k=0

nk (rk −uk)

)

,

n0 = r0 = u0 = r3 = 0, i = 1,2,3

4 Simulation Experiment and PerformanceAnalysis

In the simulation experiment, we implement P2Pstreaming system with transcoding and traditional notranscoding design described in the paper in C++. Thenetwork environment in the simulation follows GeorgiaTech’s Internet Topology Generator [18]. To conductrigorous quantitative analysis of the systems under widerange of working conditions, we implement ourexperiments to emulate the characteristics of realisticsystems with different parameters and a large number oftest times. The practical algorithm in the simulation ofOTS is based on [13,14,17], and TS is based on MSL. Wemainly investigate the server load of TS using MSLalgorithm, and compare the performance with OTS in

c© 2015 NSPNatural Sciences Publishing Cor.

Page 7: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

Appl. Math. Inf. Sci.9, No. 3, 1549-1556 (2015) /www.naturalspublishing.com/Journals.asp 1555

Fig. 3: Random test. (unit: Kbps)

various settings. For brevity, denote byuTAsmin for the

minimal server load in OTS simulation system usingtraditional algorithm (TA), and byuMSL

smin for TS usingMSL.

First, we take an overlook for theuTAsmin anduMSL

smin incomplete random settings. The experiment tests two-classP2P streaming systems with all random settings, whichrandomly choosesni from 5 to 100,ri from 200Kbps to1600Kbps, andui from 100Kbps to 2000Kbps. We testOTS and TS 1000 times respectively. The results areshown in Figure 3. We can see that, with the randomsettings,uTA

smin and uMSLsmin spread all over the figure, but,

notice of the lower part,uTAsmin is hardly less than

400Kbps, while uMSLsmin descends to 200Kbps in some

situations. TS shows some advantages in this random test.

Table 2: Initial setting of systems.Class Type Upload Number RateSuper LAN 2M 20 1600Kbps

Ordinary ADSL 300K 20 800KbpsSuper WIFI 1M 20 500Kbps

Ordinary CDMA 100K 20 200Kbps

For more details, next, we simulate and test twopractical two-class systems: the system 1 bases on LANand ADSL, and the system 2 bases on WIFI and CDMA.The initial setting of the systems is on Table 2. In this test,we seek to know how server load changes by the differentsystem scale. The peer number in any class is 20 initially.Then we add peer number in only one class every time,and measure the corresponding minimal server load. Forexample, as the green short dot curve in Figure 4, first, wetest the System 2 and measure minimal server load in theinitial setting as Table 2, after that, ordinary peer numberis added to 30, 40, and so on, while other parameters areheld constant, and we measure the minimal server loadorderly. In the experiment, we compare the minimal

40 80 120 160 200100

1000

10000

100000

System 2Boost in Class1:

TA MSL

Boost in Class2: TA MSL

serv

er lo

ad

scale

System 1Boost in Class 1:

TA MSL

Boost in Class 2: TA MSL

Fig. 4: uTAsmin anduMSL

smin change in different scales. (unit: Kbps)

server load in OTS and TS from the boost of both superand ordinary peers. The results are shown in Figure 4.The performance of server load in TS is better than theone in OTS, which follows the previous analysis.

5 Conclusion

In this paper, we have mathematically studied theperformance of two-class transcoding P2P streamingsystems. We have derived the performance bounds ofminimal server load for this kind of systems, and given analgorithm to achieve the minimal server load. Besidesmathematical investigation, we have also done somesimulation experiments to compare the minimal serverload of transcoding system with traditional situation, andto know how much benefit new design takes in varioussituations. The results have shown the advantage oftranscoding system by our algorithm.

Acknowledgement

This work is partially supported by The National BasicResearch Program of China (973 Program)(2012CB315803, 2012CB315806), The National NaturalScience Foundation of China (61402065, 61379159), andNatural Science Foundation Project of Chongqing(cstc2012jjA40060). The authors are grateful to theanonymous referee for a careful checking of the detailsand for helpful comments that improved this paper.

References

[1] J. Li, P. A. Chou, and C. Zhang, Mutualcast: an efficientmechanism for content distribution in a p2p network, Proc.ACM SIGCOMM Conference, (2005).

[2] N. Magharei, R. Rejaie, and Y. Guo, Mesh or multiple-tree: A comparative study of P2P live streaming approaches,Proc. IEEE INFOCOM, (2007).

c© 2015 NSPNatural Sciences Publishing Cor.

Page 8: Transcoding in Two-class P2P Streaming Systems · Transcoding in Two-class P2P Streaming Systems Shuai Zeng 1,∗ , Lemin Li 2 and Dan Liao 2 1 Chongqing University of Posts and Telecommunications,

1556 S. Zeng et. al. : Transcoding in Two-class P2P Streaming Systems

[3] T. Wolf, In-network service for customization in nextgeneration networks, vol. 24, no. 4, 6-12 (IEEE Network,2010).

[4] M.-T. Lu, J.-C. Wu, K.-J. Peng, P. Huang, J. J. Yao,and H. H. Chen, Design and evaluation of a P2P IPTVsystem for heterogeneous networks, vol. 9, no. 8, 1568-1579(Multimedia, IEEE Trans., 2007).

[5] X. Hei, C. Liang, J. Liang, Y. Liu, and K. Ross, AMeasurement Study of a Large-Scale P2P IPTV System,vol. 9, no. 8, 1672-1687 ( Multimedia, IEEE Trans., 2007).

[6] F. Chen, T. Repantis, and V. Kalogeraki, Coordinated mediastreaming and transcoding in peer-to-peer systems, Proc.IEEE Int. Parallel Distributed Process. p. 56b (2005).

[7] D. Liu, E. Setton, B. Shen, and S. Chen, PAT: Peer-assistedtranscoding for overlay streaming to heterogeneous devices,Proc. Int. Workshop Netw. Oper. Syst. Support Dig. AudioVideo (2007).

[8] S. R. Narayanan, D. Braun, J. Buford, R. S. Fish, A. D.Gelman, A. Kaplan, R. Khandelwal, E. Shim, and H. Yu,Peer-to-peer streaming for networked consumer electronics,vol. 45, no. 6, 124-131 (Commun., IEEE Mag., 2007).

[9] J. Noh, M. Makar, and B. Girod. Streaming to mobileusers in a peer-to-peer network. Proc. International MobileMultimedia Communications Conference (2009).

[10] Atenas M, Canovas A, Garcia M, Lloret J. IPTV transcodingto avoid network congestion. Proc. The Sixth InternationalConference on Networking and Services (2010).

[11] Zixia Huang, Chao Mei, Li Erran Li and ThomasWoo, CloudStream: delivering high-quality streaming videothrough a cloud-based H.264/SVC proxy, Proc. IEEEINFOCOM, (2011).

[12] J.-C. Wu, P. Huang, J. J. Yao, and H. H. Chen, Acollaborative transcoding strategy for live broadcastingover peer-to-peer IPTV networks, vol. 21, no. 2, 220-224(Circuits Syst. Video Technol, IEEE Trans., 2011).

[13] R. Kumar, Y. Liu, and K. W. Ross, Stochastic Fluid Theoryfor P2P Streaming Systems, Proc. IEEE INFOCOM, (2007).

[14] S. Liu, R. Z. Shen, W. Jiang, J. Rexford, and M. Chiang,Performance Bounds for Peer-Assisted Live Streaming,Proc. ACM SIGMETRICS (2008).

[15] C. Zhao, X. Lin, and C Wu, The streaming capacity ofsparsely-connected P2P systems with distributed control,Proc. IEEE INFOCOM, 1449-1457 (2011).

[16] S. Sengupta, S. Liu, M. Chen, M. Chiang, J. Li, and P.A.Chou, Peer-to-Peer Streaming Capacity, vol. 57, no. 8, 5072-5087 (Information Theory, IEEE Trans., 2011).

[17] C. Feng and B. Li, On large-scale peer-to-peer streamingsystems with network coding, Proc. The 16th ACMinternational conference on Multimedia, 269-278 (2008).

[18] E. W. Zegura, K. L. Calvert, and S. Bhattacharjee, Howto model an internetwork, Proc. IEEE INFOCOM, 594-602(1996).

Shuai Zeng was born in1982. He received the Ph.D.degree in communicationand information engineeringfrom University of ElectronicScience and Technologyof China in 2013. He isnow a lecturer at ChongqingUniversity of Posts andTelecommunications. His

research interests include mobile communication,future Internet, content distribution, P2P and networkoptimization.

Lemin Li was bornin 1932. He is a professorand doctoral supervisor withthe School of Communicationand InformationEngineering, UESTC. Heis an Academician of ChineseAcademy of Engineering.His researches areas coverscommunication networks and

data communications.

Dan Liao received thePh.D. degree from Universityof Electronic Scienceand Technology of Chinain 2007. He has been anassociate professor at UESTCsince 2009. His currentresearch interests include P2Pnetworks, wireless networksand cloud computing.

c© 2015 NSPNatural Sciences Publishing Cor.