The Journal of China Universities of Posts and Telecommunications October 2011, 18(5): 76–86 www.sciencedirect.com/science/journal/10058885
http://jcupt.xsw.bupt.cn
Model of downloading strategy from peers and server for saving server bandwidth in P2P VoD system WEI Ting1 ( ), DENG Guang-qing1, CHEN Chang-jia1, ZHU Wei2 1. School of Electronic and Information Engineering, Beijing Jiaotong University, Beijing 100044, China 2. Department of PPLive P2P-CDN R&D, Shanghai 201203, China
Abstract
In peer-to-peer (P2P) video on demand (VoD) system, once the P2P downloading rate cannot satisfy the need of playback, server is quickly referred to for help in providing enough bandwidth. Thus the switch of downloading from other peers (P2P) and server (HTTP) exists. This paper uses the proportion of P2P downloading amount (PPDA) during the video watching process to measure server load. This article is interested in finding a better strategy or switch rule between P2P and HTTP downloading for saving server bandwidth. The authors suggest and model a kind of switch rule based on local buffer amount, using mathematical theory of Brownian motion. It can effectively alleviate the impact of P2P rate fluctuation, reduce the switch times and improve the PPDA by at least 3%–5% on the basis of the former switch rule, which means substantial cost can be saved. Particularly the PPDA is related with the ratio of playback bit rate to the HTTP downloading rate which means the PPDA can be restricted by controlling the ratio in the real-world system. Though the result comes from constant bit rate (CBR) video supposition, it provides perspective and method for variable bit rate (VBR) application, and valuable insights for the future development of P2P VoD system. Keywords P2P, VoD, downloading, server load
1
Introduction
Currently servers with high and stable bandwidth play a crucial role in P2P systems in order to satisfy diverse demands and assure nice experience. Many P2P systems are now actually P2SP systems such as QQ xuanfeng offline download application and especially P2P streaming systems like PPLive. It has reasons. Although P2P system has a higher scalability property, the P2P architecture may fail to provide high and sustainable bandwidth to all peers due to high peer churn. In addition, unlike live streaming, the P2P-based VoD application has less synchrony in the users sharing video contents. Therefore it is more likely that peers cannot download the needed video contents from other peers in the system, though a small storage is contributed by every peer for compensation. In this circumstance, playback stagnancy
Received date: 24-05-2011 Corresponding author: WEI Ting, E-mail:
[email protected] DOI: 10.1016/S1005-8885(10)60107-0
may occur. In order to assure the playback continuity and reduce the interruption rate, peers have to turn to server for enough bandwidth. Here we define two downloading states during the whole video watching process: P2P downloading from other peers in the network and HTTP downloading from server (via HTTP). In this paper, we are exploring ways to find a better strategy or switch rule between the two downloading states for better system performance. As we know, the reason that P2P approaches are so popularly applied nowadays is that they are able to scale to large system with low costs, significantly reducing server load which is definitely one of the most important metrics of system performance. Service developers take pains all the time to alleviate server load in order to reduce the operation cost. Special for the streaming system, the playback continuity is another crucial metric for system performance from the point of user experience. Thus the switch rule is a critical design issue of the P2P VoD system and a good switch rule should be able to assure playback
Issue 5
WEI Ting, et al. / Model of downloading strategy from peers and server for saving server bandwidth in…
quality and effectively save server bandwidth. In this paper, we give the definition of PPDA as the proportion of P2P downloading amount (namely byte, denoted by AP2P ) during the video watching process to measure server load. It can be expressed as follows: AP2P RPPDA AP2P AHTTP
(1)
Though server load can be objectively defined in terms of bandwidth resources needed from the server, the PPDA defined above exactly reflects the server load from the complementary point of view. Currently, a switch mechanism based on P2P downloading rate is generally used in P2P VoD systems. Peers are supposed to download video chunks in terms of P2P or HTTP according to the relationship between P2P downloading rate and a supposed threshold related with playback bit rate. However the problem is that peers may experience variable P2P downloading rates in the whole video watching process. The rate fluctuation probably contributes to frequent switch between the two states, increasing the network overhead and making relatively low PPDA and high server load. And it cannot effectively assure the playback continuity. In this paper, we suggest a new switch rule based on peer’s local buffer amount. Peers can make the most of P2P downloading bandwidth according to its local buffer amount on the premise of continuous playback. Thus the new switch rule may effectively couple with the P2P rate fluctuation and improve the PPDA. In this paper, we intend to give model analysis of the two switch rules using mathematical theory of Brownian motion. Based on the discussion of the validity of the parameters, we make numerical evaluation and comparison of two switch rules. We also conduct an in-depth measurement analysis of VoD application on a real P2P streaming system deployed by PPLive. Peers are kept track of when the system adopts the two switch mechanisms. Based on the colleted log files of hundreds of gigabytes, we analyze the PPDA of peers so as to evaluate the performance of the two mechanisms in the real-world system. Our contributions are as follows: 1) We define downloading behavior from peers and server as two downloading states during the entire video watching process. To the best of our knowledge, this is the first study that concerns downloading scheme in the view of state switch in P2P VoD streaming system. We present model analysis of the former switch mechanism and point out that this mechanism produces relatively low PPDA due to that the P2P rate fluctuation makes the state switch frequently.
77
2) In order to increase the inertia of the downloading state and simultaneously assure normal playback, we come up with a new switch design based on the local buffer amount and develop a model using theory of Brownian motion. Particularly, we introduce an indicative function to substantially simplify the deduction of state switch times. According to the analysis of the model we find this new mechanism can effectively alleviate the impact of P2P rate fluctuation and further reduce the state switching times, increasing the PPDA. 3) We have numerical evaluation of the two switch mechanisms through empirical parameter discussion. We also compare the two mechanisms based on analysis of large scale data collected from the real-world system. Both of the results show the new mechanism can indeed increase the PPDA by approximately 3%–5% which makes the server save about 10 GB bandwidth resource each month, namely over 5 u 105 RMBs can be saved each month. This is an obvious improvement of the PPDAˈsaving substantial cost for the developers. 4) In our new mechanism, the PPDA is particularly related with the ratio of playback bit rate to the HTTP downloading rate. This implies that the PPDA can be restricted through controlling the ratio in the real-world system. Though the result comes from constant bit rate (CBR) video supposition, it provides perspective and method for VBR application, and valuable insights for the future development of P2P VoD system. The remainder of this paper is organized as follows: because the problem of downloading state switch is practical and concrete for the system operation, and is particularly not open to public, there is no directly related work. However we survey a few works about P2P VoD system in Sect. 2. In Sect. 3, we introduce and model the former switch rule. In Sect. 4, we present the new mechanism designed to improve the PPDA. The comparison and evaluation of the two mechanisms are given in Sect. 5. We give the conclusion and discuss the future work in Sect. 6.
2
Related work
A number of P2P streaming technologies and research have attracted great interest these years. There have been many large-scale industrial deployments of P2P live video systems such as UUSee (http://www.uusee.com), AnySee [1] and Joost (http://www.joost.com) which come after the emergence of CoolStreaming [2], PPLive (http://www.pptv.com) and
78
The Journal of China Universities of Posts and Telecommunications
PPStream (http://www.ppstream.com). Former measurement studies have verified that hundreds of thousands of users can be simultaneously participating in these systems [3–4]. After the publication of [5], a swarm of studies start to concern the P2P VoD system as well as a number of these systems were deployed. In Ref. [6], Huang et al. describes and discusses the challenges and the architectural design issues of a large-scale P2P VoD system. In P2P VoD system, peers have less synchrony in sharing video contents than in live streaming system. Thus server is more likely to be resorted to. But there is only a few theoretical works concentrating on saving server bandwidth. In Ref. [7], Bhattacharya et al. develops a novel and efficient way of organizing peers to form an overlay network for supporting efficient streaming and neighbor lookup for continuous playback or fast forward/fast backward (FF/FB) video cassette recorder (VCR) operations. In Ref. [8], Lin et al. proves the existence of the optimal schedule and provides a linear programming method to calculate theoretical results of the optimal server bandwidth. In Ref. [9], Choe et al. shows intelligent piece picking and persistent client seeding allow Toast to be quite effective, offloading 70%–90% of the network traffic from the VoD server. In this context, we concern a model to make the most of P2P bandwidth during the video downloading process. As for modeling the P2P streaming system, In Ref. [10], Wu et al. has applied queuing theory and stochastic fluid process to model a living system. In Ref. [11], Kumar et al. develops a simple stochastic fluid model that seeks to expose the fundamental characteristics and limitations of living systems. In this paper, we use Brownian motion process with drift to model the P2P downloading process.
2011
a video is normally distributed. The reason of the supposition is given in Sect. 4. Let vh and vp denote a peer’s HTTP and P2P downloading rate respectively. We express: vh N (vh ,V h 2 ) , vp N (vp ,V p 2 ) where vh and vp denote the corresponding
V
2 h
and V
2 p
mean rate;
are corresponding derivations. Then we can
write: vh vh G h ; G h N (0,V h 2 )
(2)
vp G p ; G p N (0,V p )
(3)
vp
2
where G h and G p are stochastic variables. Then the HTTP and P2P downloading amount during time interval t can be expressed: Lh vh t M h ; Mh N (0,V h 2t ) (4) Lp
vpt M p ; M p N (0,V p 2t )
(5)
where Mh and Mp are stochastic processes. Lh and Lp are Brownian motions. 3.2
Mathematical model
In this subsection, we develop a model based on the above rule. As we suppose the HTTP downloading is implemented at the very start of watching process in order to quickly cache video contents before playback deadline. And the P2P downloading is also implemented simultaneously. As the P2P rate fluctuates, the average P2P rate during the supposed probing time T is computed to decide whether the P2P downloading is implemented or not in next T as Fig. 1 shows. Here we suppose the video length L is approaching to infinite, for the deduction of finite video length can be substantially complex.
3 P2P rate based switch mechanism Currently, the state switch mechanism adopted by service providers is based on the P2P downloading rate (denoted by vp). It works as follows: when vp ! cP , P2P downloading is used; when vp İcP , HTTP downloading is used. Here P denotes
Fig. 1 The scheme of state switch based on P2P downloading rate
playback bit rate, and c is a constant. In real-world system, a probing time T is counted as the granularity to compute the average P2P downloading rate during it. According to the switch rules above, the computed rate is then used to decide what way of downloading is implemented in next T.
We explain the parameters as follows: Tpj : the total time of the jth P2P downloading; Thj : the total time of the jth HTTP downloading. It is easy to know that {Tpj , j=1,2,…} and {Thj , j 1,2,...} are series of independent identically
3.1
Preliminaries
We suppose that a peer’s downloading rate when watching
distributed (i.i.d) random variables respectively. This implies that {Tpj+Thj, j=1,2,…} can be generally regarded as a renewal process. According to Eq. (1), we compute the PPDA as follows:
Issue 5
WEI Ting, et al. / Model of downloading strategy from peers and server for saving server bandwidth in… Np
Nh
¦L ¦L pj
RPPDA
j 1
Np
Nh
Nh
j 1
j 1
j 1
( 6)
¦ Lpj ¦ Lhj _ p ¦ Lhj
where Np and Nh denote the number of times that the P2P and HTTP downloading are implemented. Lpj and Lhj denote the finished amount of the jth P2P and HTTP downloading respectively. Lhj_p denotes the finished amount of P2P downloading which is synchronous with the jth HTTP downloading. According to Eqs. (4) and (5), Lhj_p can be expressed: Lhj _ p vpThj Mhj _ p ; Mhj _ p N (0,V p 2Thj ) Since we consider the video length approaches to infinite for mathematical simplicity, and both of the P2P and HTTP downloading states are recurrent, Np and Nh can be reduced in fraction Eq. (6). Thus we get the expectation of the PPDA: vp E(Tpj ) vp E(Thj ) E( RPPDA ) vp E(Tpj ) vp E(Thj ) vh E(Thj )
vpTE(np( j ) ) vpTE(nh( j ) ) vpTE(np( j ) ) vpTE(nh( j ) ) vhTE(nh( j ) ) ( j) h
( j) p
and n
where n
(7)
denote the number of probing time T
in the period of P2P and HTTP downloading of the jth renewal respectively. Let vh(kj_) p denote the average P2P downloading rate during the kth probing time T in the state of HTTP downloading of the jth renewal. Then we give the distribution of nh( j ) : ( j) P (vh1_ p ! cP )
P (nh( j ) 1) P (nh( j )
2)
( j) ( j) P(vh1_ p cP ) P (vh 2 _ p ! cP )
P (nh( j )
3)
( j) ( j) ( j) P(vh1_ p cP ) P (vh 2 _ p c P ) P ( vh3 _ p ! cP )
# Since vpT M h( kj )_ p
L(hkj )_ p
Mh(kj )_ p
, M h(kj )_ p N (0,V p 2T ) T T T and {vh(kj_) p } are i.i.d. random variables, we get: vh(kj_) p
vp
k 1
ª § cP vp · º ª § cP vp · º » «1 ) ¨ » (8) P(n k ) «) ¨ ¸ ¨ V p / T ¸¸ » «¬ ¨© V p / T ¸¹ »¼ «¬ © ¹¼ where ) ( ) denotes the cumulative distribution function ( j) h
(CDF) of standard normal distribution. Obviously, nh( j ) has the geometric ª ) ¬ cP vp V p
distribution T º¼ .
1 ½ § cP vp · ° ° 1 ) ¨ Vp ¸° ¨¨ ¸¸ T ¹ °° © (9) ¾ 1 ° E(np( j ) ) § cP vp · ° ) ¨ V p ¸ °° ¨¨ ¸¸ T ¹ ¿° © Then we substitute Eq. (9) in Eq. (7) and reduce as follows: vp E( RPPDA ) (10) § cP vp · vp vh) ¨ V p ¸ ¨¨ ¸¸ T ¹ © The constant c is specified as 1.1 in real-world system which comes from empirical tests. If c is too large, the downloading state will easily but unnecessarily switch to HTTP according to the rules, making the PPDA decrease. However If c is too small, the downloading from server may not be implemented in time, making the playback stagnate. E(nh( j ) )
hj _ p
j 1
79
with
parameter
Thus the expectation of nh( j ) and np( j ) is:
1
4
Local buffer amount based switch mechanism
The self-similarity property of traffic was first observed in local area networks [12–13] and subsequently had a great impact on the theoretical developments in the domain of Internet traffic characterization. Another key characteristic of Internet traffic is long range dependence. This phenomenon has been observed, maybe for the first time in the networking community, by Garrett and Willinger [14]. These two properties are good candidates for modeling traffic. However, In Ref. [15], Azzouna et al. shows that predominance of P2P traffic tends to remove long range dependence as well as self-similarity in IP networks carrying traffic due to residential customers. This property is intimately related to the way P2P protocols are running. Another cause for this smoothing effect is that the total size of files shared by P2P protocols are only a few hundreds of Mbyte large and are segmented into chunks of limited size, which can be asynchronously downloaded by peers. Moreover, connections carrying P2P traffic have small bit rates and their superposition process can be well approximated by a smooth Gaussian process. Thus in this paper, we model the downloading process (from server or peers) with Brownian motion which is a stochastic process mathematically nice and has some of the essential statistical properties. In this paper, we only consider videos with CBR in order to simply and conveniently handle
80
The Journal of China Universities of Posts and Telecommunications
2011
the mathematical model. 4.1
Preliminaries
We suppose that a peer’s downloading rate when watching a video is normally distributed. Let D(t) be the size of video data downloaded by a peer during time interval t. The downloading process {D(t), tı0 } is supposed to be a Brownian motion with drift Ȝ and derivation parameter V 2 [16]. Then we have: D (t ) Ot X (t ) (11) where X(t) ~ N (0,V 2t ) is a Wiener process. O is the average downloading rate and V 2 is the derivation. Thus if a peer requests video chunks from other peers during time interval t, we express the P2P downloading process as: Dp (t ) Opt X p (t ) (12) where Xp(t) ~ N (0,V p2t ) is a Wiener process. Op is the
Fig. 2 The diagram of state switch based on local buffer amount
We describe the rule as follows: when B (t )ıM , state switches to P2P downloading; when B (t )İm , state switches to HTTP downloading; when m B (t ) M , state keeps unchanged. We give an intuitive description of the above rules in Fig. 3. Obviously, according to Eq. (14), the local buffer amount B(t) can also be regarded as a Brownian motion process. The two thresholds, M and m of B(t) separate time interval into different parts as Fig. 3 shows. Similar with Sect. 3, Tpj denotes the total time of the jth P2P downloading; Thj denotes the total time of the jth HTTP downloading.
average P2P downloading rate and V p2 is the derivation. Similarly, if a peer operates downloading from server during time interval t, we express the HTTP downloading process as: Dh (t ) Oh t X h (t ) (13) where Xh(t) ~ N (0,V h2t ) is a Wiener process. Oh is the average HTTP downloading rate and V h2 is the derivation. After video chunks are downloaded, they will be temporally stored in buffer, waiting to be played. Both the downloading process {D(t), tı0 }and playback process {W(t), tı0 } contribute to the variation of local buffer amount, which we define as the size of video chunks stored in buffer. Let B(t) be the local buffer amount of a peer at time point t. According to the mention above, we have: B (t ) D(t ) W (t ) b0 rt X (t ) (14) where r
O P and P denotes the average playback bit
rate of the CBR video. b0 is the initial local buffer amount. 4.2
Mathematical model
1) Description Since the P2P downloading rate is not stable in the watching process, peers may frequently resort to server on condition of the former state switch mechanism. This may bring loss of PPDA, and increase server load. In order to keep the inertia of downloading state and reduce the switch probability, we propose a new state switch rule based on local buffer amount as Fig. 2 shows:
Fig. 3 The downloading process based on local buffer amount
In real-world system, it costs seconds for P2P downloading rate to rise from nearly zero to the value equivalent to playback bit rate. Here we ignore the time inside Tpj for simplicity. Since the P2P downloading rate is relatively unstable due to peer neighbor churn and other unknown factors of network, we can imagine that certain local buffer amount can effectively buy time for the P2P rate to increase, assuring playback continuity and making the most of P2P upload bandwidth. 2) Model We formulate the mathematical model according to the above description in this subsection. In Fig. 3, it is easy to know that Th1 is in fact the first passage time (FPT) of the Brownian motion process B(t) roaming from 0 to M; likewise, Thj (j=2,3,…) is the FPT of B(t) from m to M, while Tpj (j=1, 2,…) is the FPT of B(t) from M to m According to the conclusions on FPT of Brownian motion [16–20], we summarize the following expressions: When B(t) roams from 0 to M, P (Th1 f) 1 (15)
Issue 5
E(Th1 )
WEI Ting, et al. / Model of downloading strategy from peers and server for saving server bandwidth in… M ; rh rh
Th1 f h (t ;0, M )
Oh P
(16)
§ ( M rh t ) 2 · exp ¨ ¸ 2V h 2t ¹ 2ʌt ©
M
Vh
(17)
3
E(Thj )
(18)
M m rh
Thj f h (t ; m, M )
(19) § ( M m rh t ) 2 · exp ¨ ¸ 2V h 2t 2ʌt 3 © ¹
M m
Vh
When B(t) roams from M to m, § 2rp ( M m) · P (Tpj f) exp ¨¨ ¸¸ ; rp V p2 © ¹ E(Tpj ) f; i 1,2,...
Tpj f p (t ; M , m)
Vp
Op P
§ ( M m rpt ) exp ¨ ¨ 2V p2t 2ʌt ©
M m
3
premise of limited video length. Thus we turn to the other way to compute the PPDA and its expectation in terms of Lhj as follows: L
When B(t) roams from m to M, P (Thj f) 1; j 2,3,...
(20)
(21) (22) 2
· ¸¸ ¹
(23)
where fh (t ; 0, M), fh (t ; m, M), and fp (t ; M, m) denote the corresponding density function. Considering that video length can be limited or notˈwe have the discussion in following two cases: one is video with limited length L Thj as Fig. 4 shows; the other is video with infinite length. We analyze the PPDA of this model. a) Video with limited length L Thj In this scenario, the last downloading state can be P2P or HTTP before video downloading is finished. We first suppose that the P2P downloading is the last as Fig. 4 shows. TL denotes the time point video is completely downloaded. Similar with Sect. 3, {Tpj+Thj, j=1,2,…} can be generally regarded as a renewal process.
Fig. 4 The diagram of state switch based on local buffer amount with limited video length L
Let NTL denote the renewal times before TL. Let Lhj and Lpj denote the HTTP and P2P downloading amount during Thj and Tpj respectively. According to Eq. (14) and Fig. 3, we get: Lh1 M PTh1 (24)
Lhj
M m PThj ; j
2,3,...
(25)
Lpj
m M PTpj ; j 1,2,...
(26)
Due to the property of Eqs. (21) and (22) of Brownian motion, it is hard to obtain the expectation of Tpj on the
81
NTL 1
¦L
hj
j 1
(27) L In order to estimate the PPDA, we first estimate the renewal times. In fact no mater what downloading state is at the last, we can compute the Renewal function E( NTL ). First RPPDA
we define an indicative function: 1; the nth renewal happens during [0,TL ] In ® ¯0; or else It is easy to get: NTL
f
¦I
n
(28)
and
n 1
f § f · f E ¨ ¦ I n ¸ ¦ E( I n ) ¦ P( I n 1) n 1 ©n 1 ¹ n 1 f n Lm· § (29) ¦ ¨ PTh1 Tp1 ¦ (Thj Tpj ) P ¸¹ n 1© j 2 According to the property of convolution, we substitute Eqs. (15)–(23) into Eq. (29), we get the result:
E( NTL )
E( NTL )
f
¦P n 1
n
(Tpj f) ³
Lm
P 0
f h (t ;0, M )
f p (t ; M , m)
f
ª¬ f h (t ; m, M )
f p (t ; M , m) º¼ dt ¦ P n (Tpj f) n 1 n 1
f
° 2(Op P )( M m)n °½ ¾ V p2 ¯° ¿°
¦ exp ® n 1
(30)
The mark [ ]n here denotes n times convolution for the expression in the brackets. It is substantially complicated to compute the convolution and its integral. For simplicity we give estimation for the renewal times in terms of inequality in Eq. (30) since the integral of probability density function inside a fixed interval is less than 1. b) Discussion of the parameters We observe that the renewal times is substantially related with the difference of P2P downloading rate and playback bit rate Op P and also the P2P rate fluctuation V p2 . However the difference of the local buffer amount M m can effectively alleviate the impact of the fluctuation. Thus after the initial HTTP downloading switches to P2P, it will probably keep going and hardly switch back to HTTP any more, as long as M m reaches a properly high value on the premise of the current P2P rate conditions. In real-world system, the advertisement at the very beginning of the video playback is generally at least 15 s. In this process, the HTTP downloading is implemented to fill the
82
The Journal of China Universities of Posts and Telecommunications
peer’s local buffer for the initial continuous playback. Thus, we heuristically specify M 1 u 60 P (kbit) and m 0.5 u 60P (kbit) which denote the thresholds of the local buffer amount can satisfy 90 s playback respectively and is reasonable for the real-world application. We suppose 500 kbit/s as the CBR bit rate for the majority of videos in P2P VoD system has the average playback bit rate around P = 500 kbit/s. In addition, we have ever done statistics about maximum P2P and HTTP rate of downloading chunks in different ISPs. The result shows that over 80% of the chunks downloading events have maximum P2P rate from 0 kbit/s to 150 kB/s and maximum HTTP rate from 0 kbit/s to 200 kB/s. Here we choose a reasonable range from 550 kbit/s to 1 Mbit/s (which is specified to be ! P = 500 kbit/s to assure the playback continuity) for both the average P2P and HTTP downloading rate. We have mentioned at the start of Sect. 4 that the downloading process carrying P2P traffic can be well approximated by a smooth Gaussian process. According to the property of normal distribution, about 99.74% of values are within the range of three times of the standard deviations away from the mean valueˈnamely the confidence interval is [Op 3V p , Op 3V p ] . If the standard derivation V p is specified as one third of Op , the P2P rate can be 0 kbit/s to 2 Mbit/s when the mean value Op is equivalent to 1 Mbit/s out of its range 0.55 Mbit/s–1 Mbit/s, which is reasonable for 2 Mbit/s ADSL users. We substitute the above parameters into Eq. (30), and find the renewal times is in fact easy to be substantially small, approaching to zero, E( NTL ) o 0 as Fig. 5 shows. This indicates that the downloading state may switch only once. It makes clear that the proper local buffer amount can effectively reduce the state switching times in the current real-world system.
Then substituting E( NTL ) o 0 and Eqs. (16) and (24) into Eq. (27), we get: 1 LM P 1 Oh E( RPPDA ) (31) L In the real-world system, there is no playback at the very beginning of the initial HTTP downloading during the watching process. As the local buffer amount increases from 0 to M at the beginning, the HTTP downloading may first finish the amount of kM (0
c) Video with infinite length Because of the property expressions Eq. (21) and (22) of Brownian motion, it is easy to know that Tpj approaches to infinite with relatively high probability. Thus the last downloading state must be P2P on the premise of video with infinite length. In this case, we can get E(RPPDA) o 1 without question.
5 5.1
Fig. 5 Numerical estimation of the renewal times
2011
Comparison and evaluation Numerical evaluation
In this section we first present numerical evaluation of our mathematical models discussed in Sect. 3 and Sect. 4. Later we will exhibit their comparison based on the analysis of data collected from real-world system. In fact, it is intuitive to estimate that the PPDA will perform worse in rate based switch mechanism due to the fluctuation of the P2P downloading rate in the whole
Issue 5
WEI Ting, et al. / Model of downloading strategy from peers and server for saving server bandwidth in…
downloading process. The expression Eq. (10) has proved the estimation. The PPDA is related with the derivation V p and it decreases as the fluctuation V p intensifies. However the PPDA in buffer based switch mechanism has overcome the impact of the rate fluctuation as Eqs. (30) and (34) shows, which shall perform much better. As we have mentioned, the playback bit-rate is supposed to be P = 500 kbit/s. The derivation V p is specified to be one third of average P2P downloading rate. The discussed range is from 550 kbit/s to 1 Mbit/s for both average P2P and HTTP downloading rate. Since we discuss CBR video in this paper, we use the ratio of P vp and P vh as horizontal axis for utility. First we see how the PPDA of the rate based switch rule goes with the average P2P and HTTP downloading rate respectively in Figs. 6(a) and 6(b). We observe that the PPDA increases as vp increases, while decreases as vh increases.
83
How can the value of probing time T be properly decided? Though relatively larger probing time T will result in high PPDA as Fig. 6 shows, it is not the truth that the larger the probing time T is, the better, considering the playback continuity. If T is too large, it may not be probed that the P2P downloading rate fluctuates to substantially small value which cannot probably cope with the continuous playback Suppose that the buffer amount at the beginning of every probing time T is a random variable B0. Let ta denotes the FPT of buffer amount from B0 to zero. We hope the playback interruption occurs during probing time T with extremely low probability, namely P(ta
)¨
This is because the larger vp is, the more downloading
where
amount of P2P during probing time T will be, which contributes to high PPDA; while the larger vh is, the more
distribution. It is easy to understand that the probability P(ta
downloading amount of HTTP during probing time T will be, which contributes to low PPDA.
(a) PPDA varies with the ratio of P vp
(a) B0
100 kB
(b) B0
200 kB
(b) PPDA varies with the ratio of P vh Fig. 6 Numerical evaluation of the P2P rate based PPDA
84
The Journal of China Universities of Posts and Telecommunications
2011
In addition, we suppose the video length to be L=800 MB, which is approximately a movie’s average length. We discussed the ratio of k for the buffer based switch mechanism. We consider the value of 0, 0.15, 0.2, and 0.25 in Fig. 8 which correspond to 0 s, 9 s, 12 s, and 15 s long of HTTP downloading respectively without playback. We observe that the PPDA increases as the ratio decreases. This is easy to understand. Since the HTTP and P2P downloading amount are related with the corresponding spent time as the expressions Eqs. (24)–(26) shown, the larger the average HTTP downloading rate vh is, the smaller the time (c) B0
300 kB
(d) B0
400 kB
Fig. 7 Probability P(ta
small value of 100 kB, which means the buffer amount at the beginning of the probing time T can provide only a little more than one second time playback, the probability P(ta
spent on HTTP downloading is, thus the higher the PPDA is. Besides, the PPDA is large when k is large. This means that if the HTTP downloading at the very start of the video watching process is implemented for a longer time without any amount of playback, the PPDA can reach a higher value which is related with the threshold of M. This is because the larger data amount is stored initially without playback, the faster the HTTP downloading state switches to P2P according to the model. To facilitate comparison, the numerical evaluation of the rate based switch rule with T=5 s mentioned before is also presented in Fig. 8 and the ratio of playback bit rate to the average HTTP downloading rate is used for horizontal axis. We observe that the buffer based switch rule performs much better. Though the rate based switch rule is likely to perform relatively well when the ratio is close to 1 (namely the average HTTP downloading rate is very close to the playback rate), in this circumstance, playback interruption is likely to occur. In our model of buffer based mechanism, according to Eqs. (21) and (22), the probability of interruption is substantially low as long as the P2P or HTTP downloading rate is larger than playback bit rate. Thus the PPDA can be restricted through controlling the ratio. For example, the PPDA can be improved through providing higher sever bandwidth to peers. Besides, the buffer based switch mechanism may perform better when there is small number of peers in the system and the server is relatively idle, since the PPDA is larger when the HTTP downloading rate is higher. This result provides valuable insights for the future development of P2P VoD application. 5.2
Fig. 8 Numerical evaluation of the PPDA of the two switch mechanisms
Experimental comparison
For June of 2010, hundreds of thousands of videos were published on-line simultaneously, including movies, TV series, short videos and etc. A total of approximately more than five
Issue 5
WEI Ting, et al. / Model of downloading strategy from peers and server for saving server bandwidth in…
million independent users had tried the PPLive VoD streaming system every day and produced hundreds of million viewing times in terms of video chunks every day. Because of the large scale data size, we only choose four days in June and collect the log files of hundreds of gigabytes. The buffer based switch mechanism was begun to be tentatively operated on June 17th. Thus, to facilitate comparison, we choose two days before and after the day respectively which are all Fridays in June and thus have equivalent number of videos, independent users and chunk viewing times. We compute the PPDA of 24 h on the chosen four days in Fig. 9.
Fig. 9 Experimental compariosn of the PPDA of the two switch mechanisms in real-world system
We observe that the PPDA can be improved by at least 2% comparing to that before June 17th. It is a substantial improvement of the PPDA which will reduce a substantial cost for system developers. This indicates that the local buffer amount based mechanism does effectively save the server bandwidth of the current real-world system In particular, the PPDA emerges a deep drop during the period of 2 a.m–5 a.m of the day as Fig. 9 shows. This is because during that time there are a very small number of users in the system and the P2P downloading rate can be very small, even much smaller than the playback bit-rate. This results to that the P2P downloading state switches more easily and more frequently (the switching times are larger than 1) to the HTTP during the time of 2 a.m–5 a.m than the other periods of the day, though the average HTTP downloading rate during that time can be larger. This case is different from the assumption of our mathematical model in which the average P2P and HTTP downloading rate are supposed to be larger than the playback bit-rate in order to take pains to ensure playback continuity. However, our buffer based switch rule still improves the PPDA by much more percent during the time of 2 a.m–5 a.m than the other periods of the day, like Fig. 9 shows. Besides, though the values in Fig. 8 are not completely the
85
same as that in Fig. 9 because of the various video lengths and the variable playback bit-rate, it can still be concluded that our buffer based mechanism does effectively improve the PPDA theoretically and practically
6 Conclusions and future works P2P VoD streaming systems have generated a great attention on how to optimize these applications. Since the systems involve many complicated design issues, formulating models to address these issues is important. In this paper, we focus on the design issue of the downloading state switch between ways of P2P and HTTP. We regard the proportion of P2P downloading amount (PPDA) as a metric for server load and system performance. The higher PPDA the system reaches, the more server bandwidth the system saves. We come up with a new mechanism in which the downloading state switches according to peers local buffer amount. We model and analyze the two state switch rules based on mathematical theory of Brownian motion. We find that the new switch rule can effectively alleviate the impact of P2P rate fluctuation, improve the PPDA and simultaneously assure normal playback. We also find that the PPDA can be restricted through controlling the HTTP downloading rate in the real-world system. Finally we give the numerical evaluation of both the two models through parameters discussion. And we also give comparison of the two mechanisms in the real-world system through analyzing the data collected from the log files of hundreds of GBs. The results show that our new mechanism can indeed effectively improve the PPDA, especially in the case that there is small number of users in the system when server is relatively idle. In this paper, we only consider CBR videos for simplicity. However it can provide valuable insights for the VBR video study and future development of P2P VoD technology. The parameters discussed in our model are specified to be empirical values which we will analyze theoretically in the future. In addition, the time spent on P2P rate rising is ignored and the playback interruption model is not contained though it is considered in the parameter discussion. However both of them may do help to decide the optimal values in the future theoretical analysis of the parameters and thus can perfect our model theoretically. There are valuable lessons to be learned by analyzing the state switch problem. Our model conforms to the intuition and
86
The Journal of China Universities of Posts and Telecommunications
also gives insights and perspectives for researchers for future optimizing studies. One can use this general model work to further study various design choices. Acknowledgements This work was supported by PPLive company, and the National Basic Research Program of China (2007CB307101-1), the National Natural Science Foundation of China (60672069, 60772043).
Appendix A Deduction for the expression Eqs. (24)–(26) According to the expression Eq. (20), when B (t ) roams from 0 to M, we get: M 0 rhTh1 X (Th1 ) X (Th1 )
M rhTh1
The HTTP downloading amount Lh1 can be expressed as:
OhTh1 X (Th1 ) OhTh1 M rhTh1 M PTh1 Likewise, when B (t ) roams from m to M, we get:
Lh1 M
m rhThj X (Thj ) X (Thj )
M m rhThj ; j
Then, Lhj OhThj X (Thj ) OhThj M m rhThj
2,3,...
M m PThj
When B(t ) roams from M to m, we get: m
M rpTpj X (Tpj ) X (Tpj ) m M rpTpj ; j 1,2,...
Then, Lpj OpTpj X (Tpj ) OpTpj m M rpTpj
m M PTpj
Appendix B Deduction for the expression Eq. (35) According to the Reason 2 in Ref. [21]: for arbitrary yİx where x denotes the initial position of the nonlinear Brownian Motion process X (t ) m(t ) V B (t ) , namely B (t ) 0 , m(t ) x , the following expression can be obtained: § y m(t ) · § y m(t ) 2 x · P (mtX İy ) ) ¨ ¸ ) ¨ ¸ V t © V t ¹ © ¹ m(t ) x · § exp ¨ 2( y x) ¸ V 2t ¹ © where B (t ) is a standard Brownian motion. And mtX is defined as mtX
min{ X s ,0İsİt} .
Then we can get the cumulative distribution of ta : P (ta T )
§ B (vp P )T · P( mTX İB0 ) ) ¨ 0 ¸ ¨ ¸ Vp T © ¹ § B (vp P )T · § 2 B0 (vp P ) · ¸ exp ¨¨ )¨ 0 ¸¸ ¨ ¸ V p2 Vp T © ¹ © ¹
2011
References 1. Liao X F, Jin H, Liu Y H, et al. Anysee: peer-to-peer live streaming. Proceedings of the 25th IEEE International Conference on Computer Communications (INFOCOM’06): Vol 6, Apr 2329, 2006, Barcelona, Spain. Piscataway, NJ, USA: IEEE, 2006: 10p 2. Zhang X Y, Liu J C, Li B, et al. Coolstreaming/donet: a data-driven overlay network for efficient live media streaming. Proceedings of the 24th International Conference on Computer Communications (INFOCOM’05): Vol 3, Mar 1317, 2005, Miami, FL, USA. Piscataway, NJ, USA: IEEE, 2005: 21022111 3. Hei X J, Liang C, Liang J, et al. A measurement study of a large-scale P2P IPTV system. IEEE Transactions on Multimedia, 2007, 9(8): 16721687 4. Hei X J, Liu Y, Ross K. Inferring network-wide quality in P2P live streaming systems. IEEE Journal on Selected Areas in Communications, 2007, 25(9): 16401654 5. Huang C, Li J, Ross K W. Can Internet video-on-demand be profitable? Proceedings of the Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications (SIGCOMM’07), Aug 2731, 2007, Kyoto, Japan. New York, NY, USA: ACM, 2007: 133144 6. Huang Y, Fu T Z J, Chiu D M, et al. Challenges, design and analysis of a large-scale P2P VoD system. Proceedings of the Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications (SIGCOMM’08), Aug 17-22, 2008, Seattle, WA, USA. New York, NY, USA: ACM, 2008: 375–388 7. Bhattacharya A, Yang Z Y, Pan D. COCONET: co-operative cache driven overlay network for P2P VoD streaming. Proceedings of the 6th International ICST Conference on Heterogeneous Networking for Quality, Reliability, Security and Robustness (QSHINE’09), Nov 2326, 2009, Las Palmas de Gran Canaria, Spain. Berlin, Germany: Springer-Verlag, 2009: 5268 8. Lin S, Wu J P, Xu K, et al. The minimum server bandwidth in peer-assisted VoD systems. Proceedings of the 19th IEEE International Conference on Computer, Communications and Networks (ICCCN’10), Aug 25, 2010, Zurich, Switzerland. Los Alamitos, CA, USA: IEEE Computer Society, 2010: 7p 9. Choe Y R, Schuff D L, Dyaber J M, et al. Improving VoD server efficiency with bittorrent. Proceedings of the 15th ACM International Conference on Multimedia, Sep 2429, 2007, Augsburg, Germany. New York, NY, USA: ACM, 2007: 117126 10. Wu D, Liu Y, Ross K. Queuing network models for multichannel P2P live streaming systems. Proceedings of the 28th IEEE International Conference on Computer Communications (INFOCOM’09), Apr 1925, 2009, Riode Janeiro, Brazil. Piscataway, NJ, USA: IEEE, 2009: 7381 11. Kumar R, Liu Y, Ross K. Stochastic fluid theory for P2P streaming systems. Proceedings of the 26th IEEE International Conference on Computer Communications (INFOCOM’07), May 612, 2007, Anchorage, AK, USA. Piscataway, NJ, USA: IEEE, 2007: 919927 12. Fowler H J, Leland W E. Local area network traffic characteristics, with implications for broadband network congestion management. IEEE Journal on Selected Areas in Communications, 1991, 9(7):11391149 13. Leland W, Taqqu M, Willinger W, et al. On the self-similar nature of Ethernet traffic. IEEE/ACM Transactions on Networking, 1994, 2(1): 115 14. Garrett M, Willinger W. Analysis, modeling and generation of self-similar VBR video traffic. Proceedings of the Conference on Applications, Technologies, Architectures, and Protocols for Computer Communication (SIGCOMM’94), Aug 31Sep 2, 1994, London, UK. New York, NY, USA: ACM, 1994: 269280 15. Azzouna N B, Guillemin F. Experimental analysis of the impact of peer-to-peer applications on traffic in commercial IP networks. European Transactions on Telecommunications, 2004,15(6): 511522 16. Kao E P C. An introduction to stochastic processes. Houston, TX, UUSA: University of Houston, 2007 To p. 101
Issue 5
LIU Yuan-ni, et al. / Model for cascading network failures based on the nodes with different tolerance parameter
1999, 286: 509512 3. Moreno Y, Pastor-Satorras R. Vazquez A, et al. Critical load and traffic instabilities in scale-free networks. Europhysics Letters, 2003, 62(2): 292298 4. Albert R, Jeong H, Barabasi A.L. Statistical mechanics of complex networks. Reviews of Modern Physics, 2002, 74(1): 4797 5. Jeong H, Tombor B, Albert R, et al. The large-scale organization of metabolic networks. Nature, 2000, 407: 651655 6. Holme P, Kim B J. Edge overload breakdown in evolving networks. Physical Review E: Statistical, Nonlinear and Soft Matter Physics, 2002, 66(2): 036119 7. Motter A E, Lai Y C. Cascade-based attacks on complex networks. Physical Review E: Statistical, Nonlinear and Soft Matter Physics, 2002, 66(6): 065102 8. Crucitti P, Latora V, Marchiori M. Model for cascading failures in complex networks. Physical Review E: Statistical, Nonlinear and Soft Matter Physics, 2004, 69(4): 045104 9. Holme P, Kim B J, Yoon C N, et al. Attack vulnerability of complex networks. Physical Review E: Statistical, Nonlinear and Soft Matter Physics, 2002, 65(5): 056109
From p. 86 17. Karlim S, Taylor H M. A first course in stochastic processes. 2nd ed. New York, NY, USA: Academic Press,1975 18. Cox D R, Miller H D. The theory of stochastic processes. London, UK: Methuen, 1965 19. Dixit A K. The art of smooth pasting. London, UK: Routledge, 2002 20. Ingersoll J E. Theory of financial decision making. Totowa, NJ, USA:
101
10. Crucitti P, Latora V, Marchiori M, et al. Efficiency of scale-free networks: Error and attack tolerance. Physica A: Statistical Mechanics and Its Applications, 2003, 320(1/2/3/4): 622642 11. Girvan M, Newman M E J. Community structure in social and biological networks. Proceedings of the National Academy of Sciences, 2002, 99(12): 82718276 12. Smith J. Characterizing computer performance with a single number. Communications of the ACM, 1988, 31(10): 12021206 13. Erdös P, Rényi A, Math P. On random graphs: I. Publicationes Mathematicae, 1959, 6: 290297 14. Saaty T L. The fundamentals of decision making and priority theory with the analytic hierarchy process. Pittsburgh, PA, USA: RWS Publications, 2000 15. Siganos G, Faloutsos M, Faloutsos P, et al. Power laws and the AS-level Internet topology. IEEE/ACM Transactions on Networking, 1999, 11(4): 514524
(Editor: ZHANG Ying)
Rowman & Littlefield, 1987 21. Liu G Y, Lu M. The distributions of extreme value for Brownian motion with nonlinear drift. Journal of Mathematics, 2010, 30(2): 315320 (in Chinese˅
(Editor: WANG Xu-ying)