Skip to main content
Log in

Peer startup process and initial offset placement in peer-to-peer (P2P) live streaming systems

  • Published:
Peer-to-Peer Networking and Applications Aims and scope Submit manuscript

Abstract

We measure and study the peer startup process in P2P live streaming systems and focus on a critical issue in this aspect: How a peer initializes its buffer status when it joins a channel, i.e., initial offset placement of the peer’s buffer in the startup stage. We build a general model of peer startup process in chunk-based P2P streaming systems and present two initial offset placement schemes we inferred from the measurement results of real systems: Fixed padding (FP) scheme and proportional placement (PP) scheme. With FP scheme, the initial buffer offset is simply set to the offset reported by the reference neighbor peer of the new peer plus a fixed padding. With PP scheme, the initial buffer offset is set to the offset of the reference neighbor peer plus an advance proportional to the reference neighbor peer’s offset lag or buffer width. We evaluate the performance of these two schemes, and find that the FP scheme, although simple, is not practical to be adopted in real P2P live streaming systems, and PP scheme is stable when the placement is based on offset lag, but will be unstable when it is based on buffer width if the chunk fetching strategy and neighbor peer selection mechanism are not properly designed. We then report our detailed measurement results of PPLive and UUSee, two popular commercial P2P streaming systems. The measurement results show that PPLive adopts the PP scheme based on buffer width and has good performance. UUSee, however, adopts FP scheme in its early version and has relatively low performance, and it later upgrades to use the PP scheme in its new version and consequently obtains better performance. These results show that initial offset placement is a critical design issue in P2P live streaming systems, and the PP scheme presented in this paper is a good algorithm for this purpose. Our analytical and measurement results could be useful for guiding the analysis and design of buffering protocols for P2P live streaming systems.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Notes

  1. Some further explanations are as follows. In (10), we have |L h − L*| = (1−α)| L p − L*|. This implies L h − L*| < | L p − L*| since 0<α<1. Eq. (11) can be similarly explained.

References

  1. Zhang X, Liu J, Li B, Yum T (2005) Coolstreaming/donet: A data-driven overlay network for peer-to-peer live media streaming. In Proc. INFOCOM’05, Miami, FL, pp 2102–2111

  2. Hei X, Liang C, Liang J, Liu Y, Ross K (2007) A measurement study of a large-scale P2P IPTV system. IEEE Trans Multimed 9(8):1672–1687

    Article  Google Scholar 

  3. Hei X, Liang C, Liang J, Liu Y, Ross K (2006) Insights into PPLive: A measurement study of a large-scale P2P IPTV system. In Proc. IPTV workshop (in conjunction with WWW2006), Edinburgh, Scotland

  4. Ali S, Mathur A, Zhang H (2006) Measurement of commercial peer-to-peer live video streaming. In Proc. First Workshop on Recent Advances in Peer-to-Peer Streaming, Waterloo, ON, Canada

  5. Vu L, Gupta I, Nahrstedt K, Liang J (2010) Understanding the overlay characteristics of a large-scale peer-to-peer IPTV system. ACM Trans Multimed Comput Commun Appl 6(4):2010–2035

    Article  Google Scholar 

  6. Hei X, Liu Y, Ross K (2007) Inferring network-wide quality in P2P live streaming systems. IEEE J Sel Areas Commun 25(9):1640–1654

    Article  Google Scholar 

  7. Hall Y, Piemonte P, Weyant M. Joost: A measurement study. Available: http://www.patrickpiemonte.com/15744-Joost.pdf

  8. Chen Y, Chen C (2008) A measurement study of cache rejection in P2P live streaming system. In Proc. 28th IEEE International Conference on Distributed Computing Systems Workshops, Beijing, China, pp 12–17

  9. Kumar R, Liu Y, Ross K (2007) Stochastic fluid theory for P2P streaming systems. In Proc. INFOCOM’07, Anchorage, AK, pp 919–927

  10. Tewari S, Kleinrock L (2007) Analytical model for BitTorrent-based live video streaming. In Proc. CCNC’07, Las Vegas, NV, pp 976–980

  11. Vlavianos A, Iliofotou M, Faloutsos M (2006) BiToS: Enhancing BitTorrent for supporting streaming applications. In Proc. INFOCOM’06, Barcelona, Catalunya, Spain, pp 1–6

  12. Li C, Chen C (2009) Inferring playback rate and rate resets of P2P video streaming transmissions by piecewise line envelope approximation. J China Univ Posts Telecommun 16(2):58–62

    Article  Google Scholar 

  13. PPLive Inc. Homepage (Online). Available: http://www.pptv.com/aboutus/en/

  14. Zhou Y, Chiu D, Lui J (2007) A simple model for analyzing P2P streaming protocols. In Proc. ICNP’07, Beijing, China, pp 226–235

  15. Xu D, Chai H, Rosenberg C, Kulkarni S (2003) Analysis of a hybrid architecture for cost-effective streaming media distribution. In Proc. SPIE/ACM Conf. on Multimedia Computing and Networking (MMCN’03), Santa Clara, CA, pp 87–101

  16. Tu Y, Sun J, Hefeeda M, Prabhakar S (2005) An analytical study of peer-to-peer media streaming systems. ACM Trans Multimed Comput Commun Appl 1(4):354–376

    Article  Google Scholar 

  17. Small T, Liang B, Li B (2006) Scaling laws and tradeoffs of peer-to-peer live multimedia streaming. In Proc. ACM Multimedia’06, Santa Barbara, CA, pp 539–548

  18. Lou D, Mao Y, Yeap T (2007) The production of peer-to-peer video-streaming networks. In Proc. Peer-to-Peer Streaming and IP-TV Workshop (in conjunction with ACM SIGCOMM’07), Kyoto, Japan, pp 346–351

  19. Contraction Mapping. Homepage (Online). Available: http://en.wikipedia.org/wiki/Contraction_mapping

  20. Wireshark. Homepage (Online). Available: http://www.wireshark.org/

  21. Silverston T, Fourmaux O (2007) Measuring P2P IPTV systems. In Proc. ACM NOSSDAV’07, Urbana-Champaign, IL, USA, pp 83–88

  22. UUSee Inc. Homepage (Online). Available: http://download.uusee.com

  23. Chapter 9, Central limit theorem, pp 325–364. URL: http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter9.pdf

Download references

Acknowledgments

The authors thank James Seng, David Zhang, and Elnino Wang, all with PPLive, on instructive discussions on the PPlive architecture.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cheng Li.

Additional information

This work was supported in part by the National Natural Science Foundation of China under Grant Nos. 61271199, 61101133, 61173158, and 61301082, the National Grand Fundamental Research 973 Program of China under Grant No. 2007CB307101, the Fundamental Research Funds in Beijing Jiaotong University under grant W11JB00630 and W13RC00040, the Natural Sciences and Engineering Research Council (NSERC) of Canada (Discovery Grant DG 293264-12 and Strategic Project Grant STPGP Q3 397491-10), and the China Scholarship Fund.

Appendix

Appendix

1.1 Appendix A: stability condition for PP based on buffer width

In this Appendix, we will first show that unbounded offset lag will happen for PP scheme based on buffer width, at least theoretically, if a peer’s buffer cannot be filled properly. We name this as an unstable placement. We then derive the necessary buffer filling status for a stable placement.

Suppose f 1(t), f 2(t) …, f n (t),…be the offset chosen by sequentially joined peers p 1, p 2, …, p n ,…., we first prove that the PP scheme based on buffer width cannot guarantee bounded offset lag L n  = s(t) − f n (t) as n → ∞.

Let t h be the time instant when the reference neighbor peer of host h reports its buffer message to h. For simplicity, we call t h as the host startup time of host h. Then the offset setup duration (to ease description, we use notation τ h instead of τ here) is defined as the time interval from the host startup time t h to the time instant t off when host h starts to drain its buffer. That is,

$$ {\tau}_h={t}_{off}-{t}_h{}_{.} $$
(A1)

The offset curve of host h can be expressed as follows.

$$ \begin{array}{cc}\hfill {f}_h(t)=r\left(t-{t}_h-{\tau}_h\right)+{\theta}_h,\hfill & \hfill \mathrm{for}\kern0.5em t\ge {t}_h-{\tau}_h.\hfill \end{array} $$
(A2)

Suppose that peers {1, …, n,…} are sorted in the increasing order of their joining time instants. Let I(n) denote the reference neighbor peer of host n. From (A2), we can get the offset curve of the n th joined peer:

$$ \begin{array}{c}{f}_n(t)=r\left(t-{t}_n-{\tau}_n\right)+{\theta}_{n\ }\hfill \\ {}=r\left(t-{t}_n-{\tau}_n\right)+{f}_I{}_{(n)}\left({t}_n\right)+\alpha {W}_I{}_{(n)}\left({t}_n\right)\hfill \\ {}={f}_I{}_{(n)}(t)+\alpha {W}_I{}_{(n)}\left({t}_n\right)-r{\tau}_n.\hfill \end{array} $$
(A3)

Define the scope factor β p (t) for a peer p as the ratio of its buffer width to its offset lag:

$$ {\beta}_p(t)={W}_p(t)/{L}_p. $$
(A4)

As shown in Fig. 1, L p is always larger than W p (t). Thus, the scope factor β p (t) is between 0 and 1 at any time. Compared with buffer width, offset lag is a more important system parameter. Thus, we rewrite (A3) to an offset lag equation.

$$ \begin{array}{c}\hfill {L}_n(t)-{L}_I{}_{(n)}(t)=s(t)-{f}_n(t)-\left(s(t)-{f}_I{}_{(n)}(t)\right)\hfill \\ {}\hfill =r{\tau}_n-\alpha {W}_I{}_{(n)}\left({t}_n\right)\hfill \\ {}\hfill =r{\tau}_n-\alpha {\beta}_I{}_{(n)}\left({t}_n\right){L}_I{}_{(n)}\left({t}_n\right).\hfill \end{array} $$
(A5)

After simplification, we have an equation similar to (11), which is expressed as follows.

$$ {L}_n(t)=\left(1-\alpha {\beta}_I{}_{(n)}\left({t}_n\right)\right){L}_I{}_{(n)}\left({t}_n\right)+r{\tau}_n. $$
(A6)

Next, we will try to express the offset lag of the n th joined peer by using the parameters of the peers joined previously. For a real system, the following two aspects will make the expression messy. First, the reference neighbor of the n th joined peer is not necessarily the (n − 1)th joined peer in the system. Second, the reference neighbor of a newly joined host is often chosen randomly or using certain criteria. Thus, we deal with the reference neighbor chain first.

Denote the reference neighbor chain for the n th joined peer by C(n). C(n) is a list of peers, which contains the reference neighbor peer of the n th joined peer, the reference neighbor of the reference neighbor of the n th joined peer, and so on. For example, if the reference neighbor of the n th joined peer is the k th joined peer, the reference neighbor of the k th joined peer is the 1st joined peer, then the reference neighbor chain (or the neighbor chain, in short) in this case has only three peers {n, k, 1}. Obviously, a neighbor chain C(n) for the n th joined peer has n as its first element and 1 at its last element. Since the reference neighbor of any given host should have joined the system earlier than the host, the elements in a chain should be in a decreasing order of joining times (from the latest to the earliest). In contrast, any decreasing positive integer sequence with 1 in its rightmost is a potential legal reference neighbor chain to the n th joined peer, where n is the leftmost element of this sequence. In fact, the reference neighbor selection in a real system can be viewed as a random process. If we use I(⋅) to express the random reference neighbor selection operator. In other words, I(n) is the reference neighbor of the n th joined peer. The neighbor chain C(n) will be a cascade process. For the n-th joined peer, the reference neighbor selection operator I(⋅) produces I(n) = I 1(n) as its reference neighbor. For the I 1(n)-th joined peer, the neighbor selection operator I(⋅) produces I(I 1(n)) = I 2(n) as its reference neighbor. This process continues until I(I |C(n)|−1(n)) = 1, which can be more conveniently written as a random sequence C(n) = {I 0(n), I 1(n), …, I |C(n) |(n)} with a random length |C(n)|, which represents the size of chain C(n). As mentioned before, I 0(n) = n and I |C(n)|(n) = 1.

The placement of offset lag of a peer using the PP scheme is affected by the selection of its reference neighbor peer when the peer joins the system. Different reference neighbor peer selection rules will result in different reference neighbor chains and thus different offset lags. In this paper, we will have the following definitions regarding the stability of a proportional placement scheme.

Definition (a stable scheme)

A proportional placement scheme is stable if, for any peer which follows any possible reference neighbor chain, there is a constant L *, such that the offset lag L n for the n th joined peer is less than L *.

$$ \begin{array}{ccc}\hfill \exists {L}^{*}\hfill & \hfill \mathrm{such}\kern0.5em \mathrm{that}\kern0.5em {L}_n\le {L}^{*}\hfill & \hfill \mathrm{for}\kern0.5em \forall \left(n,C(n)\right)\hfill \end{array} $$
(A7)

Following this definition, the PP scheme based on offset lag is stable with L* = /α.

Definition (an unstable scheme)

A proportional placement scheme is unstable if for any given L, there exists a neighbor chain C(n) such that the resulted offset lag L n larger than L:

$$ \begin{array}{cc}\hfill \forall L\hfill & \hfill \exists \left(n,C(n)\right)\hfill \end{array}\mathrm{such}\kern0.5em \mathrm{that}\kern0.5em {L}_n>L $$
(A8)

In the remainder of this subsection, we will try to find a specific chain which will result in an unbounded offset lag. For a neighbor chain C(n) = {I 0(n), I 1(n), …, I |C(n) |(n)}, let \( \left\{{t}_n,{t}_{I(n)},\cdots, {t}_{I^{\left|C(n)\right|}(n)}\right\} \) be the host startup time list and \( \left\{{\tau}_n,{\tau}_{I(n)},\cdots, {\tau}_{I^{\left|C(n)\right|}(n)}\right\} \) be the list of offset setup durations of those peers in this chain. We have:

$$ \begin{array}{c}{L}_n(t)=\left(1-\alpha {\beta}_{I(n)}\left({t}_n\right)\right){L}_{I(n)}\left({t}_n\right)+r{\tau}_n\hfill \\ {}\hfill =\left(1-\alpha {\beta}_{I(n)}\left({t}_n\right)\right)\left(1-\alpha {\beta}_{I^2(n)}\left({t}_{I(n)}\right)\right){L}_{I^2(n)}\left({t}_{I(n)}\right)\hfill \\ {}\hfill +r\left({\tau}_n+\left(1-\alpha {\beta}_{I(n)}\left({t}_n\right)\right){\tau}_{I(n)}\right)\hfill \\ {}\hfill ={W}_{tk}{\displaystyle \prod_{i=1}^{\left|C(n)\right|}\left(1-\alpha {\beta}_{I^i(n)}\left({t}_{I^{i-1}(n)}\right)\right)}\hfill \\ {}+r{\displaystyle \sum_{i=1}^{\left|C(n)\right|}{\tau}_{I^{i-1}(n)}{\displaystyle \prod_{j=1}^{i-1}\left(1-\alpha {\beta}_{I^j(n)}\left({t}_{I^{j-1}(n)}\right)\right)}}\hfill \end{array} $$
(A9)

For ease of the discussion, we first assume the offset setup duration is a constant value τ for all peers and the chain length |C(n)| tends to infinite when n → ∞. If we write \( {\beta}_{I^i(n)}\left({t}_{I^{i-1}(n)}\right) \) as β i , then (A9) is simplified to a limiting form:

$$ {L}^{*}={W}_{tk}{\displaystyle \prod_{i=1}^{\infty}\left(1-\alpha {\beta}_i\right)}+ r\tau {\displaystyle \sum_{i=1}^{\infty }{\displaystyle \prod_{j=1}^{i-1}\left(1-\alpha {\beta}_j\right)}}. $$
(A10)

Eq. (A10) indicates that the limiting offset lag L * could be unbounded in a PP scheme based on buffer width. For example, let β i  = 1/i 2, we have the following well-known bound (See Appendix C for a proof)

$$ {\displaystyle \prod_{j=1}^i\left(1-\alpha {\beta}_j\right)}={\displaystyle \prod_{j=1}^i\left(1-\alpha /{j}^2\right)}\ge \left(1-\alpha \right)\left(2-\sqrt{\alpha}\right)/i $$
(A11)

Substituting (A11) into (A10) will result in an unbounded offset lag L * = ∞.

$$ {L}^{*}\ge r\tau {\displaystyle \sum_{i=1}^{\infty }{\displaystyle \prod_{j=1}^{i-1}\left(1-\alpha {\beta}_j\right)}}\ge r\tau \left(1-\alpha \right)\left(1-\sqrt{\alpha}\right){\displaystyle \sum_{i=1}^{\infty }1/i}\to \infty . $$
(A12)

The following lemma gives a sufficient condition for resulting in a bounded offset lag.

Lemma 2

For PP scheme based on buffer width, the limiting offset lag L * is always lower bounded by L * ≥ /α. Furthermore, if the scope factors {β i } are uniformly lower bounded above zero, the limiting offset lag L * is also upper bounded. More precisely, if there is a constant ω > 0 such that

$$ {\beta}_i\ge \omega, \forall i. $$
(A13)

Then we have

$$ r\tau /\alpha \le {L}^{*}\le r\tau /\alpha \omega $$
(A14)

Proof

Since 1 − α ≤ 1 − αβ i  ≤ 1 − αω < 1, we have

$$ r\tau /\alpha = r\tau {{\displaystyle {\sum}_{i=0}^{\infty}\left(1-\alpha \right)}}^i\le {L}^{*}\le r\tau {{\displaystyle {\sum}_{i=0}^{\infty}\left(1-\alpha \omega \right)}}^i= r\tau /\alpha \omega . $$

The above discussions give us two insights. The first insight is that, if the initial offset is placed based on the buffer width of the reference neighbor peer, the larger the buffer width, the more chances a stable placement will be resulted. Thus, if a newly joined peer finds the buffer width of its first connected neighbor is too small, it could wait for a better neighbor, if still within certain pre-determined startup time interval. We call such a waiting and selection mechanism as the good neighbor peer selection mechanism, which prefers to return a good reference neighbor peer. The second insight is that, the stability in a buffer-width-based placement cannot be ensured by only using the good peer selection process. A proper chunk fetching strategy is necessary to ensure the existence of good peers. In fact, the buffer occupancy is more relevant to the fetching strategy than to the initial offset placement. Studying the offset lag more precisely must involve in the study of buffer occupancy. We will put this into our future research. In the following Appendix B, we will try to find the average buffer occupancy level, which is required by a stable PP scheme based on buffer width.

1.2 Appendix B: Average buffer width by PP based on buffer width

As defined, a stable scheme requires uniformly bounded offset lags for all possible neighbor chains C(n)s. The lag difference associated with a chain C(n), denoted by ΔL C(n), is defined to be the difference between the lag of the last peer in the chain and that of the first peer in the chain. That is,

$$ \varDelta {L}_C{}_{(n)}={L}_n(t)-{L}_1(t). $$
(B1)

A stable initial offset placement needs the lag difference ΔL C(n) be bounded on all chains C(n)s uniformly.

For a given chain C(n) = {I 0(n), I 1(n), …, I |C(n) |(n)}, we can rewrite the chain as C = {c 0 , c 1 ,…,c |C|}, where host c i joins the system at time t i , has an offset setup duration τ i , and has a buffer width W i for i = 0,1,…,|C|. With these notations, Eq. (A5) can be rewritten into the following form:

$$ \begin{array}{c}\hfill \varDelta {L}_{C(n)}={L}_n(t)-{L}_1(t)=\left(s(t)-{f}_n(t)\right)-\left(s(t)-{f}_1(t)\right)\hfill \\ {}\hfill =r{\displaystyle {\sum}_{i=1}^{\left|C(n)\right|}{\tau}_{I^{i-1}(n)}}-\alpha {\displaystyle {\sum}_{i=1}^{\left|C(n)\right|}{W}_{I^i(n)}\left({t}_{I^{i-1}(n)}\right)}\hfill \\ {}\hfill =r{\displaystyle {\sum}_{i=1}^{\left|C\right|}{\tau}_{i-1}}-\alpha {\displaystyle {\sum}_{i=1}^{\left|C\right|}{W}_i\left({t}_{i-1}\right)}\hfill \end{array} $$
(B2)

Eq. (B2) indicates that the lag difference of a chain is a function of both the accumulated offset setup durations and the accumulated buffer widths of peers in the chain. It is natural to name \( {\scriptscriptstyle \frac{1}{\left|C\right|}}{\displaystyle {\sum}_{i=1}^{\left|C\right|}{\tau}_{i-1}} \) as the average offset setup duration. Furthermore, if both the offset setup durations of peers and the reference neighbor chain are random variables, \( {\scriptscriptstyle \frac{1}{\left|C\right|}}{\displaystyle {\sum}_{i=1}^{\left|C\right|}{\tau}_{i-1}} \) is also the average offset setup duration in a probabilistic sense. Hence, we define the average offset setup duration E{τ|C}as follows.

$$ E\left\{\tau |C\right\}={\scriptscriptstyle \frac{1}{\left|C\right|}}{\displaystyle {\sum}_{i=1}^{\left|C\right|}{\tau}_{i-1}}. $$
(B3)

Similarly, the average peer buffer width E{W|C, t C } sampled at peer startup time t C is defined as

$$ E\left\{W|C,{t}_C\right\}={\scriptscriptstyle \frac{1}{\left|C\right|}}{\displaystyle {\sum}_{i=1}^{\left|C(n)\right|}{W}_i\left({t}_{i-1}\right)} $$
(B4)

With the above definition in (B3) and (B4), Eq. (B2) can be rearranged into the following expression if we divide the two side of it by α|C|:

$$ E\left\{W|C,{t}_C\right\}=\frac{r}{\alpha }E\left\{\left.\tau |C\right)-\frac{\varDelta {L}_C}{\alpha \left|C\right|}\right., $$
(B5)

We can use the following lemma to summarize the above discussions.

Lemma 3

On any given neighbor chain C, the average peer buffer width is equal to the sum of both the average lag difference and the average offset setup duration on C scaled by a factor of r/α:

$$ E\left\{W\Big|C,{t}_C\right\}=\frac{r}{\alpha }E\left\{\tau \Big|C\right\}+O\left(\frac{\varDelta {L}_C}{\left|C\right|}\right) $$
(B6)

Furthermore, since a stable system has uniformly bounded offset lag differences ΔL C , in this case, we have:

$$ E\left\{W|C,{t}_C\right\}=\frac{r}{\alpha }E\left\{\tau \Big|C\right\}+O\left(\frac{1}{\left|C\right|}\right). $$
(B7)

If we assume the offset setup duration {τ n } are approximately i.i.d. random variables and uniformly bounded. By the central limiting theorem [23], we have a limiting form for the offset setup duration

$$ E\left\{\tau |C\right\}={\scriptscriptstyle \frac{1}{\left|C\right|}}{\displaystyle {\sum}_{c\in C}{\tau}_c}\to {\tau}_s,\kern0.5em \left|C\right|\to \infty, $$
(B8)

where τ s is a normal distributed random variable.

Furthermore, we assume the buffer width for any given peer is a stationary process. Homogenous chunk fetching strategy usually results in stationary buffer occupation in a system [14]. Even though we do not discuss this issue in this paper, it is a good approximation to the real system after peers go stable. The time for a peer enters stable state is relatively short in a P2P live streaming system, the selected peer will be in its stable range if the inter-arriving time between new joined peers is not too small. Under this assumption, we can omit the time instances in (B7) and rewrite the average peer buffer width with the chain C only.

$$ E\left\{W|C\right\}=E\left\{W\Big|C,{t}_C\right\}. $$
(B9)

Thus, we have proved following lemma.

Lemma 4

The peer buffer width averaged on any reference neighbor chain with an infinite length is the same in a probabilistic sense.

$$ E\left\{W|C\right\}= r\tau /\alpha, \kern0.5em \left|C\right|\to \infty . $$
(B10)

Not all reference peer selection mechanisms result in infinite length of selecting chains. For example, if a selection mechanism always chooses peer 1 as the reference neighbor peer for any host, the resulted chain length will be with a length of two. In a practical system, the reference neighbor peer of a host is mainly affected by the peer list that the host received from the tracker. In general, the peer list is randomly selected by the tracker from the currently online peers. Thus, if all joined peers have infinite lifetime, the randomly generated reference neighbor chain is a good approximation to a real system. In such a chain, the reference neighbor peer of a given peer n can be any peer that has joined the system earlier. In other words, the event that the peer k, k < n is the reference neighbor peer of peer n has the probability 1/(n − 1). We will name this chain as the long-lived random neighbor chain. In Appendix D, we will show that, the average chain length |C(n)| of a long-lived random neighbor chain is

$$ E\left\{\left|C(n)\right|\right\}=1+{\displaystyle {\sum}_{i=1}^{n-1}1/i.} $$
(B11)

Although the average length of the long-lived random neighbor chain tends to infinite as the number of peers joining the system increases, the convergence speed is very low. The average chain length for the n th joined peer is approximately ln n. Fortunately, peers in a system have an average online time from 393 to 2778 s (see [21]). The peer list returned by the tracker contain more recently joined peers than peers who have joined the system for long since many peers with long online time could have left the system with high probability. Hence the length of an actual neighbor chain will be significantly shorter than that of the random neighbor chain for peers with infinite online time. If we use asymptotical random neighbor chain to approximate its counterpart in a real system, in which every legal sequence C(n) = {n > n |C|−1 > … > n 2 > 1} has equal probability p n  = 21−n. The average chain length |C(n)| in such an asymptotical random neighbor chain is

$$ E\left\{\left|C(n)\right|\right\}=\frac{n+2}{2}. $$
(B12)

Furthermore, for an asymptotical random neighbor chain we have

$$ \Pr \left(\left|C(n)\right|<M/n\to \infty \right)=0,\kern0.5em \mathrm{for}\kern0.5em \forall M. $$
(B13)

Based on the above discussions, we have the following observation on the average buffer width for PP scheme based on buffer width.

Observation

For a stable PP scheme based on buffer width, the average peer buffer width E(W) should be maintained at a level of /α by any fetching strategy and it can be computed as follows.

$$ E(W)= r\tau /\alpha . $$
(B14)

1.3 Appendix C: Proof of the inequality (A11)

In Appendix A, we show the possible instability of the PP scheme based on buffer width by proving the holding of inequality (A11).

Lemma

if 0 ≤ α < 1, then

$$ {\displaystyle \prod_{j=1}^i\left(1-\alpha /{j}^2\right)}\ge \left(1-\alpha \right)\left(2-\sqrt{\alpha}\right)/i. $$
(C1)

Proof

Use the well known formula 1 − x 2 = (1 − x)(1 + x), we have \( \left(1-\alpha /{j}^2\right)=\left(1-\sqrt{\alpha }/j\right)\left(1+\sqrt{\alpha }/j\right) \). Substitute this into ∏  i j = 1 (1 − α/j 2) we have:

$$ {\displaystyle \prod_{j=1}^i\left(1-\alpha /{j}^2\right)}=\left(1-\alpha \right){\displaystyle \prod_{j=2}^i\left[\left(1-\sqrt{\alpha }/j\right)\left(1+\sqrt{\alpha }/j\right)\right]} $$
(C2)

If we write the multiplex symbol “∏” into each term, we have

$$ {\displaystyle \prod_{j=1}^i\left(1-\alpha /{j}^2\right)}=\left(1-\alpha \right)\times \frac{2-\sqrt{\alpha }}{2}\times \frac{2+\sqrt{\alpha }}{2}\times \frac{3-\sqrt{\alpha }}{3}\times \frac{3+\sqrt{\alpha }}{3}\times \frac{4-\sqrt{\alpha }}{3}\times \frac{4+\sqrt{\alpha }}{3}\cdots \times \frac{i-\sqrt{\alpha }}{i}\times \frac{i+\sqrt{\alpha }}{i}. $$
(C3)

In (C3), if we shift each numerator one position left and keep the denominators unchanged, we have

$$ {\displaystyle \prod_{j=1}^i\left(1-\alpha /{j}^2\right)}=\left(1-\alpha \right)\left(2-\sqrt{\alpha}\right)\times \frac{2+\sqrt{\alpha }}{2}\times \frac{3-\sqrt{\alpha }}{2}\times \frac{3+\sqrt{\alpha }}{3}\times \frac{4-\sqrt{\alpha }}{3}\times \frac{4+\sqrt{\alpha }}{4}\cdots \times \frac{i-\sqrt{\alpha }}{i-1}\times \frac{i+\sqrt{\alpha }}{i}\times \frac{1}{i} $$
(C4)

Look at those fractional terms in (C4) except the last one, they follow the forms of either \( \left(n+\sqrt{\alpha}\right)/n \) or \( \left(n+1-\sqrt{\alpha}\right)/n \). Both forms have a value larger than 1 since 0 < α < 1. Thus we have proved

$$ {\displaystyle \prod_{j=1}^i\left(1-\alpha /{j}^2\right)}\ge \left(1-\alpha \right)\left(2-\sqrt{\alpha}\right)/i. $$
(C5)

1.4 Appendix D: The average chain length of long-lived random neighbor chain

Here, we will show that, the average chain length of a long-lived random neighbor chain C(n) is

$$ E\left\{\left|C(n)\right|\right\}=1+{\displaystyle {\sum}_{i=1}^{n-1}1/i}. $$
(D1)

In terms of a long-lived random neighbor chain, the probability for a particular sequence to happen is

$$ \left\{{n}_k,{n}_{k-1,}\dots, {n}_2,1\right\}=\frac{1}{{\displaystyle {\prod}_{i=2}^k{n}_i}}. $$
(D2)

Let

$$ {S}_n={\displaystyle {\sum}_{k=1}^nE\left\{\left|C(k)\right|\right\}}=E\left\{\left|C(n)\right|\right\}+{\displaystyle {\sum}_{k=1}^{n-1}E\left\{\left|C(k)\right|\right\}}=E\left\{\left|C(n)\right|\right\}+{S}_{n-1} $$
(D3)

then

$$ E\left\{\left|C(n)\right|\right\}=1+\frac{1}{n-1}{\displaystyle {\sum}_{k=1}^{n-1}E\left\{\left|C(k)\right|\right\}}=1+\frac{1}{n-1}{S}_{n-1}. $$
(D4)

Base on (D3) and (D4), we have

$$ \frac{1}{n}{S}_n=\frac{1}{n}{\displaystyle {\sum}_{k=1}^nE\left\{\left|C(k)\right|\right\}}=\frac{1}{n}E\left\{\left|C(n)\right|\right\}+\frac{1}{n}{S}_{n-1}=\frac{1}{n}+\frac{1}{n}\left(\frac{1}{n-1}+1\right){S}_{n-1}=\frac{1}{n}+\frac{1}{n-1}{S}_{n-1}. $$
(D5)

Use (D5) literately, we have

$$ \frac{1}{n}{S}_n=\frac{1}{n}+\frac{1}{n-1}{S}_{n-1}=\frac{1}{n}+\frac{1}{n-1}+\frac{1}{n-2}{S}_{n-2}=\cdots ={\displaystyle {\sum}_{k=1}^n1/k}. $$
(D6)

Substitute the result of (D6) into (D4), we proved (D1):

$$ E\left\{\left|C(n)\right|\right\}=1+\frac{1}{n-1}{S}_{n-1}=1+{\displaystyle {\sum}_{k=1}^{n-1}1/k}. $$
(D7)

1.5 Appendix E: Properties of random neighbor chain

For a random neighbor chain C(n), we have

  1. 1)

    The average chain length E{|C(n)|}is

    $$ E\left\{\left|C(n)\right|\right\}=1+n/2 $$
    (E1)
  2. 2)

    The probability of a finite-length chain tends to zero if the number of peers who join the system earlier tends infinite:

    $$ \begin{array}{cc}\hfill \Pr \left(\left\{\left|C(n)\right|\le M\right\}\right)\to 0,\hfill & \hfill n\to \infty \hfill \end{array}. $$
    (E2)

    Where M is a given positive number.

Proof

A legal sequence with length k is denoted by {n,n 1,…,n k−2,1}, n > n 1 > … > n k−2 > 1. The number of such sequences is \( \left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill k-2\hfill \end{array}\right) \). The number of all legal sequences is thus \( {\displaystyle {\sum}_{k=0}^{n-2}\left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill k\hfill \end{array}\right)={2}^{n-2}} \). The probability for the event {|C(n)| = k} to happen is then

$$ \Pr \left(\left\{\left|C(n)\right|=k\right\}\right)=\left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill k-2\hfill \end{array}\right){2}^{-\left(n-2\right)}. $$
(E3)

Then average length of a chain is

$$ \begin{array}{l}E\left\{\left|C(n)\right|\right\}={2}^{-\left(n-2\right)}{\displaystyle {\sum}_{k=2}^nk\left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill k-2\hfill \end{array}\right)}={2}^{-\left(n-2\right)}\frac{d}{ dx}{\left({\displaystyle {\sum}_{k=2}^n\left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill k-2\hfill \end{array}\right)}{x}^k\right)}_{x=1}={2}^{-\left(n-2\right)}\frac{d}{ dx}{\left({x}^2{\left(1+x\right)}^{n-2}\right)}_{x=1}\hfill \\ {}\hfill ={2}^{-\left(n-2\right)}{\left(2x{\left(1+x\right)}^{n-2}+\left(n-2\right){x}^2{\left(1+x\right)}^{n-3}\right)}_{x=1}={2}^{-\left(n-2\right)}\left({2}^{n-1}+\left(n-2\right){2}^{n-3}\right)=2+\frac{n-2}{2}=\frac{n+2}{2}\hfill \end{array} $$
(E4)

If M < n/2, then the probability for the event {|C(n)| ≤ M} to occur can be bounded as

$$ \Pr \left(\left\{\left|C(n)\right|\le M\right\}\right)={\displaystyle {\sum}_{k=2}^M\left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill k-2\hfill \end{array}\right)\le {2}^{-\left(n-2\right)}\left(M-1\right)\left(\begin{array}{c}\hfill n-2\hfill \\ {}\hfill M-2\hfill \end{array}\right)}\approx \exp \left\{-\left(n-2\right)\left(1-h\left({\scriptscriptstyle \frac{M-2}{n-2}}\right)-\varepsilon \right)\right\}\to 0,\kern0.5em n\to \infty $$
(E5)

Where h(x) = −x ln (x) − (1 − x) ln (1 − x) is the entropy function of x.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Li, C., Chen, Y., Zhang, B. et al. Peer startup process and initial offset placement in peer-to-peer (P2P) live streaming systems. Peer-to-Peer Netw. Appl. 8, 137–155 (2015). https://doi.org/10.1007/s12083-013-0223-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12083-013-0223-5

Keywords

Navigation