Bandwidth Usage Distribution of Multimedia Servers using Patching ?
Carlo K. da S. Rodrigues and Rosa M. M. Le˜ao Federal University of Rio de Janeiro, COPPE/PESC CxP 68511, Phone +55 21 2562-8664, fax: +55 21 2562-8676 Rio de Janeiro RJ, 21941-972, Brazil
Abstract Several multicast bandwidth sharing techniques have been proposed in the literature to provide more scalability to multimedia servers. These techniques are often analyzed in terms of the average bandwidth requirements they demand to satisfy client requests. However, average values do not always provide an accurate estimate of the required bandwidth. Therefore, they cannot be the only parameter used to guarantee a certain level of quality to the clients. In this work we propose a simple analytical model to accurately calculate the distribution of the number of concurrent streams or, equivalently, the bandwidth usage distribution considering the popular Patching technique. We show that the distribution may be modeled as a binomial random variable in the single object case, and as a sum of independent binomial random variables in the multiple object case. Through simulation we validate our results. Moreover, we also illustrate how these results may be practically used for instance (i) to allocate bandwidth to provide a given level of QoS, (ii) to estimate the impact on QoS when some system parameters dynamically change, and (iii) to configure the overall system.
Key words: Patching, Multicast, Multimedia, Bandwidth, QoS
? This work is supported in part by grants from CNPq and Faperj. Email address: kleber,
[email protected] ( Carlo K. da S. Rodrigues and Rosa M. M. Le˜ao ).
Preprint submitted to Elsevier Science
1 December 2006
1
Introduction
Multimedia servers for applications such as distance learning and video on demand have been the focus of recent studies in the literature. In particular, considerable attention has been given to the issue of providing scalability to these servers. The easiest way to service client requests in such applications is to schedule unicast data streams, one for each client request. The multimedia server bandwidth increases linearly with the client arrival rate since clients arrive and presumably stay in the system for some reasonable time (i.e., it increases linearly with the number of concurrent clients in the system). This increase rate notably precludes the use of this service for a very large number of clients and the study of bandwidth sharing techniques becomes essential to provide scalability. Bandwidth sharing techniques may be classified in multicast or periodic broadcast delivery techniques. Multicast techniques (e.g.,[1–3,5–10,12]) are reactive in the sense that data is delivered in response to client requests. Most of them provide immediate service and save server bandwidth by avoiding unnecessary transmission of data. Periodic broadcast delivery techniques (e.g., [13–21]) cyclically transmit object segments in a proactive way. They can guarantee a maximum start up delay. The idea is to divide the media object into a series of segments and broadcast each segment periodically on dedicated server channels. While the client is playing the current object segment, it is guaranteed that the next segment is downloaded on time and the whole object can be played out continuously. Besides multicast and periodic broadcast, an orthogonal scheme for reducing the load on network and video server is video caching (see [44] and references within). In this scheme a set of proxies are strategically placed close to the clients. Another approach to address the scalability issue in video applications is peer-to-peer streaming (see [46] and references within). In this approach clients can serve other clients by forwarding the video stream. Patching [2] is a multicast technique and has been used in recent works [22,45,23–28]. For example, in [22] Patching is used to provide a peer-to-peer video streaming service, and in [45] it is integrated with proxy caching for media distribution. This technique is especially attractive because of its extreme simplicity and competitive efficiency in terms of bandwidth savings. The work of [29] for instance evaluated the complexity of several multicast delivery techniques. The analysis is based on the information the server has to keep and the work the server has to perform per client request. One of the main results they obtained is that Patching is one of the simplest schemes. And it was shown in the work of [7,9] that, for reasonably popular media objects, the average bandwidth requirements of Patching are very similar to those of much more complex techniques. 2
It is quite common to evaluate the efficiency of multicast techniques in terms of the average bandwidth requirements they demand to satisfy the client requests arriving in the system. A discussion about average bandwidth requirements may be found in [5–7,30–33]. However, average values do not always provide an accurate estimate of bandwidth requirements and therefore cannot be used solely to guarantee a given level of QoS to the clients. Tam et al. [29] were the first to measure the performance of multicast techniques using other metrics such as the maximum bandwidth and the bandwidth distribution. The authors have focused on three merge techniques: the dynamic Fibonacci tree [9,34], the Dyadic [10], and the ERMT (Earliest Reachable Merge Target) [7]. Their analysis was all based on simulations. The quality of service of multicast techniques was also evaluated in [28,33]. De Souza e Silva et al. [28] proposed an algorithm to compute the distribution of the bandwidth required by the Patching technique. Their analytical model estimates the distribution of the total requested bandwidth in one window of Patching. They showed that the requested data streams in a window are a good estimator of the data streams actually transmitted in a window as t → ∞. The computational cost of their algorithm is O(P 2 ), where P is a function of the estimated error and is usually not very large. Their results indicated that if the server configuration is based on the average bandwidth required by each object, the probability of requiring more than the average value is large for a wide range of system parameters. In [33] approximate analytical models were developed to analyze the quality of service of the following schemes: Patching, Hierarchical Stream Merging (HSM) [7] and Bandwidth Skimming [8]. The authors used a closed queueing network model to estimate two performance measures: the mean client waiting time and the fraction of clients who leave without receiving service when the server is temporarily overloaded (i.e., the balking rate). The performance measures were computed from the iterative solution of a set of equations. Their results showed for instance that if server configuration is based on the average bandwidth there may be unacceptably high client balking rates. We may see that the analytical evaluation of the Patching mechanism done so far is based on the solution of one equation [28] or a set of equations [33], i.e., there is not a closed-form solution for the bandwidth usage distribution that may be practically employed. Moreover, in [28] they only consider the single object case, and in [33] they only analyze the multiple object case. In this paper we propose a simple analytical model to accurately calculate the distribution of the number of concurrent streams or, equivalently, the bandwidth usage distribution for the Patching technique. We consider both the single and the multiple object cases. We show that the distribution may be modeled in the form of a closed-form solution as a binomial random variable 3
in the single object case. In the multiple object case, it can be represented as a sum of independent binomial random variables, which may be easily implemented using Fast Fourier Transform [38]. Through simulation we validate our results. Moreover, we illustrate how our results may be practically used to (i) allocate bandwidth to provide a given level of QoS, (ii) estimate the impact on QoS when some system parameters dynamically change, and (iii) configure the overall system. The remainder of this paper is organized as follows. Section 2 introduces some basic concepts and terminology. Section 3 is dedicated to the presentation of our analytical model. Analytical and simulation results are presented in Section 4. Lastly, conclusions and ongoing work are included in Section 5.
2
Basic Concepts and Terminology
Consider a multimedia server and a group of clients receiving object streams (e.g., a film, a video clip, etc.) across the Internet from this server. The paths from the server to the clients are multicast enabled. Multicast is not currently deployed over the global Internet. However, this can be alleviated through the use of proxies which can bridge unicast and multicast networks. One of the most common proposed architectures consists of a unicast channel from the server to the proxy and multicast channels from the proxy to the clients. Since, in general, the proxy and the clients are in the same local area network, multicast service can be easily implemented. Solutions like application level multicast using tunelling have also been used over the public Internet [29,42,43]. Still assume that Patching is used to provide immediate service, clients always request playback from the beginning of the object and watch it continuously till the end without any interruptions (i.e., sequential access), and client bandwidth is twice the object play rate. All these assumptions are considered in the original model of Patching presented in [2]. Also, consider that the client buffer is large enough to store a portion of the object size (to allow the stream synchronization). This supposition is based on the results presented in the works of [30,4,5]. These works show that, since the client bandwidth is twice the object play rate, in the worst case, the client will listen to two concurrent streams during an interval equal to half of the object size. However, since it is possible to compute an optimal threshold window [30,31], we may relax this initial supposition for the client buffer being half of the object size and set it to the optimal threshold window. Lastly, Table 1 summarizes some notation used in the rest of this work. The Patching technique operates as follows [2]. The server begins to deliver a full-object multicast stream upon the arrival of the first client. The following 4
Table 1 Key parameters λj
client arrival rate for object Oj
Dj
total length of object Oj in units of time
Wj
threshold window for object Oj in units of time
Nj
average number of requests for object Oj that arrive during the period of length Dj . It is referred as object popularity and is given by Nj = λj Dj
Bj
average server bandwidth used to deliver object Oj using the Patching technique in units of the object play rate
dj
unit length used for object Oj
Tj
total length of object Oj in units dj
wj
threshold window for object Oj in units dj
u
total number of objects in the server
clients who request the same object and arrive within a certain time interval, denoted as threshold window, retrieve the stream from the multicast channel (buffering the data) and obtain the missing initial portion, denoted as patch, directly from the server over a unicast channel; for clients arriving after the threshold window, a new session is initiated and the process restarts again. Both the multicast and patch streams deliver data at the object play rate so that each client can play the object in real time. Similar models have been proposed in [30,31] to estimate the average server bandwidth for the Patching technique. They assumed a Poisson client arrival process with rate λj for the media object Oj , where j = 1, ..., u and u is the total number of objects in the server. The average server bandwidth for delivering object Oj is [30,31]: Bj =
λj W 2 j
Dj + 2 Wj + λ1
,
(1)
j
where Dj and Wj are the length and the threshold window, respectively, for object Oj . The denominator of Equation (1) is the average time that elapses between successive full-object multicasts, i.e., the duration of the threshold window plus the average time until the next client request arrives. The numerator is the expected value of the sum of the transmission times of the full-object and the patch streams that are initiated during the interval. Note that the average number of patches that are started before the threshold window expires is 5
λj Wj , and the average duration of a patch is Wj /2 [35]. Now differentiating Equation (1) with respect to Wj and setting the result to zero gives: √ 2Nj +1−1 (2) Wj,optimal = λj As already mentioned, the client buffer can be equal to the optimal threshold window Wj,optimal , instead of half of the object size. Substituting (2) into Equation (1) yields the following result for the average server bandwidth for the optimized Patching technique: Bj,optimized =
q
2Nj + 1 − 1 ,
(3)
where Nj = λj Dj is the average number of client requests that arrive during Dj . The parameter Nj is often denoted as the object popularity. For simplicity, we will refer to the optimized Patching technique as the Patching technique, and we will denote Wj,optimal and Bj,optimized as Wj and Bj , respectively. When the object popularity Nj is above (below) a certain threshold value, periodic broadcast delivery techniques achieve more (less) bandwidth savings than multicast ones [14]. Thus, it is reasonably to classify media objects in accordance with popularity in order to choose the most adequate type of delivery technique [30,14]. This is usually done as follows [8]: for hot objects (i.e., Nj ≥ 100), use periodic broadcast techniques; for cold objects (i.e., N j < 10) and lukewarm objects (i.e., 10 ≤ Nj < 100), use multicast techniques. Since Patching is a multicast technique, we mainly focus on N j values in the range of 10 to 100.
3
Bandwidth Usage Distribution
In this section, we present our analytical model and derive the distribution of the number of concurrent streams needed by the Patching technique, or equivalently, the server bandwidth usage distribution. We initially address the case of the single object and then the case of multiple objects. 3.1 Single Object Consider a server implementing the Patching technique and that client request arrivals follow a Poisson process. Let C(t) be the stochastic process which de6
notes the number of Patching windows opened in the interval (0, t). It thus directly follows that C(t) is a renewal process [35] whose renewal points correspond to the instants at which the server schedules a new full-object multicast stream, i.e., the start of a new window. Moreover, we have that a cycle of C(t) has an average duration of Wj + 1/λj = Wj + Dj /Nj , and then this is the base interval we consider in the analysis to follow. Now assume that the object Oj is divided into time units of length dj . For example, a two-hour object can be divided into 20 units of 6 minutes each, or divided into 100 units of 72 seconds each. Now let Tj = Dj /dj and wj = Wj /dj . Then, we have that Tj and wj are, respectively, the object size and the window size measured in number of discrete units of length dj . Also consider that if there is at least one client arrival in a time unit, the server initiates a stream (patch or full-object multicast) at the beginning of the next time unit to serve this client. We stress that the value of dj can be as small as desired to obtain a very small probability of more than one arrival in the same time unit and a guarantee of immediate service. Note that since the media object and time in our model are divided into units of length dj , the base interval of our analysis Wj + Dj /Nj may alternatively be rewritten as wj + Tj /Nj and Equation (2) as: wj =
q
Tj ( 2Nj + 1 − 1)
(4)
Nj
The interval wj +Tj /Nj is composed by a total of wj +Tj /Nj units of length dj . Hence, this interval can still be expressed in the following form: [1, w j +Tj /Nj ]. Let us now focus on each one of its wj + Tj /Nj units individually in order to identify a distribution for the number of concurrent streams in each one of them. Once we obtain these individual distributions, we try to identify a unique distribution that may be deployed for the entire base interval of analysis [1, wj + Tj /Nj ]. Note that Oj may be any object in the multimedia server, then we drop the subscript j from now on. Consider the k-th interval [1, w + T /N ] of the process C(t) (see Figure 1). In this interval we have transmissions due to fullobject multicasts and also due to patches. Then, we have that the number of concurrent streams in each unit of length d of the k-th interval is given by a multicast component plus a patch component. Let us denote the multicast component as MC . We consider√MC as a constant value and estimate it using Little’s result [36]: MC = N/ 2N + 1 (i.e., the average number of multicast streams is given by the arrival rate times the duration of the media object). Although the real number of multicast streams is not constant due to the possible variation of the arrival rate λ (and conse7
quently of N ), MC is a good approximation since changes on the arrival rate λ, within certain limits, do not severely impact on the value of M C . Consider N >> 1, which refers to the scenarios in. In this case M C √ √ we are interested can be approximated by MC = N/ 2N = 0.707 N . Thus we have that the number of multicast streams increases approximately with the square root of the arrival rate. The patch component is associated to client arrivals and we estimate it as a random variable. Our goal now is to determine the distribution of this random variable. Let us examine two successive intervals: the (k-1)-th and k-th intervals. We want to determine how many units of the k-th interval can transmit a patch initiated in the (k-1)-th interval. Note that we only need to consider the (k-1)-th interval because the patches generated in other previous intervals will finish before the k-th interval starts. Consider that the k-th interval is divided into two sub-intervals: [1, w − T /N ] and [w − T /N + 1, w + T /N ]. In the former we may have transmissions initiated in the (k-1)-th interval, while in the latter we do not have any transmission initiated in the previous interval. Figure 1 shows a scenario where an arrival occurs in the last unit of the (k-1)-th interval. This arrival generates the longest possible patch which is equal to w. We note that the number of units in the k-th interval, transmitting a patch stream initiated in the (k-1)-th interval, decreases as the value of T /N increases. In the limit, when T /N = w (see Equation (4)), all patches are initiated and transmitted in the same interval. Note that we do not need to consider scenarios where T /N > w because this condition occurs only for N = 1 (see Equation (4)). Bandwidth sharing techniques are mostly useful when N > 1. We mainly focus on the values of N in the range of 10 to 100, as already mentioned. 4-th unit arrivals
patch=4
w-d
w-th unit patch=w
d
w
Time
w-T/N T/N
w
(k-1) interval
T/N k interval
Fig. 1. Patches in two consecutive intervals: (k-1) and k.
We proceed in three steps to obtain the distribution of the number of concurrent patch streams in each unit of the k-th interval. We first compute the number of concurrent streams in the i-th unit of the (k-1)-th and k-th intervals assuming that there is a client arrival in each unit of the window w of the (k-1)-th interval. In the second step we compute the number of concurrent streams in the i-th unit of the k-th interval considering that there is a client arrival in each unit of both windows w of the (k-1)-th and k-th intervals. Finally, in the third step, we analyze the impact of the Poisson client request 8
arrival process. Let us consider the first step. As just mentioned, we only observe the patches started in the (k-1)-th interval and assume that there is a client arrival in each unit of the window w of this interval. Figure 1 shows that an arrival in the j-th unit of the interval generates a patch of length j units. Then, there is a patch in the i-th unit of the (k-1)-th interval if, and only if, 2j ≥ i, j = 1, 2, . . . , i−1, and a client arrival occurs in the j-th unit. We can also see from Figure 1 that the longest possible patch initiated in the (k-1)-th interval starts at w + 1 and ends at 2w. Therefore the interval we have to evaluate is [1, 2w]. We denote by mi,w the number of concurrent streams in the i-th unit of the interval [1, 2w], where i = 1, 2, ..., 2w. The following lemma determines an expression for m i,w . Lemma 1 Considering one client arrival in each unit of the interval [1, w] and i = 1, 2, ..., 2w, the number of concurrent patch streams mi,w in the i-th unit of the interval [1, 2w] is given by: • Case 1: i ∈ [1, w]. mi,w =
Pi−1
e 1{2j ≥ i} = d i−1 2
Pw
1{2j ≥ i} = d 2w−(i−1) e 2
j=1
(5)
• Case 2: i ∈ [w + 1, 2w]. mi,w =
j=1
(6)
where 1 denotes the indicator function, i.e., 1{x} = 1 if x is true, and 1{x} = 0 if x is false. Proof See Appendix A.
2
So far we obtained expressions to calculate mi,w , i.e., the number of concurrent streams in the (k-1)-th and k-th intervals considering the patches exclusively initiated in the (k-1)-th interval. We now present the second step of our analysis. Let li,w be the number of concurrent streams in the k-th interval [1, w + T /N ], considering the patches initiated in this interval as well as in the previous one. We show that li,w can be easily computed by properly superposing the expressions obtained in Lemma 1. Figure 2 illustrates the superposition of two successive intervals: the (k-1)-th and k-th intervals. From this figure we can see that the number of concurrent patches in the first unit of the k-th interval is equal to m 1,w + mw+T /N +1,w , in the second unit it is equal to m2,w + mw+T /N +2,w , and so on. The final formulation for li,w is presented in Lemma 2. 9
w w
T/N
(k-1)-th interval 1
mw+T/N+1,w
m2w,w w
w T/N
k-th interval m1,w
mw-T/N,w
k-th interval with patches initiated in the (k-1)-th and k-th intervals mw+T/N+1,w + m1,w
w-T/N
m2w,w + mw-T/N,w
mw-T/N+1,w
w+T/N
Fig. 2. Superposition of the (k-1)-th and k-th intervals.
Lemma 2 Considering one client arrival in each unit of both windows w of the (k-1)-th and k-th intervals and i = 1, 2, ..., w + T /N , the number of concurrent streams li,w in the i-th unit of the k-th interval is given by: • Case 1: i ∈ [1, w −
li,w =
T w− N 2
+ 1 , if (w −
T d w− N 2
• Case 2: i ∈ [w − li,w = d
T ] N
e
T N
and i are even (7)
, otherwise + 1, w]
i−1 e 2
• Case 3: i ∈ [w + 1, w + li,w = d
T ) N
(8) T ] N
2w − (i − 1) e 2
(9)
Proof See Appendix B.
2
We now proceed to the third step. Assume that client arrivals are represented by a Poisson process. Let Xi be a random variable that denotes the number of concurrent streams due to patches in the i-th unit of the interval [1, w + T /N ], where i = 1, ..., w + T /N . Consider the scenario of Figure 3 and let us examine the possible values taken, for example, by X4 . To simplify the figure we do not represent patches eventually generated in the previous interval. X 4 may be 10
equal to 0, 1 or 2, depending on the client arrivals in the previous units. X 4 = 1 when there is one arrival in the second or in the third unit (see Figures 3(a) and 3(b), respectively). In Figure 3(c) we have the case where X 4 = 2, i.e., when there is an arrival in both the second and third units. Lastly, X 4 = 0 when there are arrivals neither in the second nor in the third units. Note that we do not need to make assumptions about the first unit because only the 2 nd and 3rd units of this interval generate patches long enough to extend over the 4th unit. patch patch
patch
arrival
patch
arrival
1 2 3 4
w
arrivals
1 2 3 4 5 6
w + T/N
w
1 2 3 4 5 6
w + T/N
(a) one arrival in the second unit
w
w + T/N
(b) one arrival in the third unit
(c) one arrival in the second and third units
Fig. 3. Concurrent streams in the 4th unit of an interval [1, w + T /N ].
The following theorem determines the probability distribution function of X i . Theorem 1 Xi has binomial distribution with parameters p = 1 − e−N/T and ni,w , i = 1, . . . , w + T /N . The parameter ni,w is given by: (1) Case 1: w =
ni,w =
T , N
then:
d i−1 e 2
, if i ∈ [1, w]
d 2w−(i−1) e 2
(10)
, if i ∈ [w + 1, w +
T ] N
(2) Case 2: w > NT , then: • i ∈ [1, w − NT ], then:
ni,w =
T w− N 2
T d w− N 2
• i ∈ [w −
T N
+ 1 , if (w − e
T ) N
and i are even (11)
, otherwise
+ 1, w], then:
ni,w = d
i−1 e 2
(12)
11
• i ∈ [w + 1, w + ni,w = d
T ], N
then:
2w − (i − 1) e 2
(13)
Proof As we know, the interval [1, w + T /N ] is divided into units of length d. Let A be a random variable which represents the number of arrivals in one unit of the interval [1, w + T /N ]. We have that P [A > 0] = 1 − e−N/T since the arrivals follow a Poisson process and λ is normalized with regard to the value of d. Then we have a sequence of units, each one with probability p = 1 − e −N/T of success (where success means at least one arrival in the unit). The total number of units which can generate a patch to be transmitted in the i-th unit is given by: • Case 1: w = NT All patches generated in an interval are transmitted in the same interval, then ni,w is given by Equations (5) and (6) obtained in Lemma 1. • Case 2: w > NT Some patches generated in an interval can extend over the next interval. In this case ni,w = li,w obtained in Lemma 2. Thus, it follows that Xi has a binomial distribution with parameters ni,w and p = 1 − e−N/T , where i = 1, . . . , w + T /N . 2 Xi is a random variable that denotes the number of concurrent streams due to patches in the i-th unit of the interval [1, w + T /N ]. Note that the random variables X1 , X2 , . . . , Xw+T /N have the same parameter p = 1 − e−N/T while the parameter ni,w depends on the value of i and w. Then, we have a binomial distribution with a different parameter in each of the units of the interval. We want to determine a unique distribution to model the number of concurrent streams due to patches in the base interval of analysis [1, w + T /N ]. Let us examine the values of ni,w for the Case 2 of Theorem 1. We analyze this case because w is larger than T /N for the situations we are interested in, i.e., 10 ≤ N ≤ 100 (see Equation (4) for reference). From the equations of Case 2 we observe that the computation of ni,w varies according to the sub-interval. For the first sub-interval, i.e., [1, w − T /N ], ni,w does not depend on i and can assume at most two values. For the two other sub-intervals, n i,w depends on i and may possibly assume more than two values. To illustrate this aspect consider T = 104 (recall that w = W/d and T = D/d). We calculate the proportion of the interval [1, w + T /N ] corresponding to the first subinterval [1, w − T /N ] and the two other sub-intervals 12
together [w − T /N + 1, w + T /N ]. Table 2 shows the results obtained for N = 10, 25, 50, 100, 200, 400, 700. It can be seen that the percentage of the first sub-interval (where ni,w assumes at most two values) increases as the value of N increases. Table 2 Size of the sub-intervals for different values of N N
[1, w − T /N ]
[w − T /N + 1, w + T /N ]
10
56%
44%
25
72%
28%
50
80%
20%
100
86%
14%
200
90%
10%
400
93%
7%
700
95%
5%
For example, Figure 4(a) shows P [Xi = k] for N = 50, T = 103 and k = 1, 2. The value of P [Xi = k] is constant for the sub-interval [1, w − T /N ] since ni,w = d w−T2 /N e for these units. In Figure 4(b) the value of P [Xi = k], for N = 100, T = 103 and k = 1, 2, oscillates between two values for the subinterval [1, w − T /N ] (ni,w is computed from Equation (11)). In both figures, at the end of the interval, we see that P [Xi = k] shows more variability. As already explained, this behavior is due to the larger variability of the parameter ni,w in the sub-interval [w − T /N + 1, w + T /N ]. 0.06
P[Xi=k]
P[Xi=k]
0.18
k=2
0.16
k=2
0.05
0.14 0.04 0.12 0.03
0.1
k=1
0.08
k=1
0.02
0.06 0.01 0.04
50
100
(a) N=50, T=1000
150
i
200
20
40
60
80
100
(b) N=100, T=1000
120
i
140
Fig. 4. P [Xi = k] for the interval [1, w + T /N ].
Based on the analysis presented above, we approximate the distribution of the number of concurrent patches in the interval [1, w + T /N ] by a binomial distribution with parameters p = 1 − e−N/T and the expected value of ni,w . Note that the larger N is, the more accurate our approximation tends to be since the variability of the parameter ni,w tends to reduce. More formally, let 13
X be a random variable which represents the number of concurrent patches in the interval [1, w + T /N ]. We thus approximate the distribution of X by a binomial distribution with parameters p = 1 − e−N/T and nw = d
Pw+T /N
ni,w e. w+T /N
i=1
Finally, we have to consider the full-object multicasts to obtain the distribution of the total number of concurrent streams required by Patching. It is the sum of the concurrent patches and the concurrent full-object multicast streams. Let Z denote the random variable which represents the total number of concurrent streams. Z has the same distribution of X shifted to the right by MC . As previously mentioned, the √ number of concurrent fullobject multicasts is approximated by MC = N/ 2N + 1. Thus it follows that P (Z ≤ MC − 1) = 0. The probability distribution function of Z is given by Equation (14). We note that both X and Z only depend on the parameters N and T of the object O.
P (Z ≤ k) =
where nw = d
0
, 0≤k ≤v−1
Pk nw (1 − e−N/T )l (e−N/T )nw −l j=v l
Pw+T /N
ni,w e, w+T /N
i=1
, v ≤ k ≤ nw + v
(14)
√ v = MC = N/ 2N + 1, and l = j − v.
Our model is closer to the original continuous model of Patching as the value of d decreases. In the limit, when d → 0, our model becomes identical to the original Patching model since users have immediate service. Now, we define two criteria to estimate a value for d. The first is based on the probability of more than one arrival in a unit of length d, and the second is based on the relative error between the expected value of Z and the average bandwidth B computed from Equation (3). Figure 5 shows the probability of more than one arrival in a unit of length d for several values of N and T . Recall that T = D/d. From this figure we note that, for T ≥ 104 , the probability of more than one arrival is smaller than 10−4 for all values of N . Let us now evaluate the second criterion. The expectation of Z is given by: √ E[Z] = nw (1 − e−N/T ) + N/ 2N + 1
(15)
We define the relative error between E[Z] and B as EM B = |B−E[Z]| . In FigB ure 6, we plot the relative error as a function of T for N = 10, 25, 40, 75 14
P[A>1]
0.01
T=103
0.001 0.0001
T=104
1e-05 1e-06
T=105
1e-07 1e-08
T=106
1e-09 1e-10 1e-11
10
20
30
40
50
60
70
80
90
N
100
Fig. 5. Probability of more than one arrival in a unit of length d.
and 100. We also show the complementary cumulative distribution function (CCDF) of Z for N = 100 and several values of T . As already expected, the value of the relative error decreases as the value of T increases. However, we note that the relative error has no significant reduction for T > 10 4 . Moreover, the CCDFs of Z are practically the same for T ≥ 104 .
N=40
N=10
P[ Z > k ]
EMB
0.1
N=25
N=75
1
0.8
T=105, 2x105
0.6
0.01
N=100
T=103
0.4
T=104
0.2
0.001 1000
10000
(a) Relative Error
0
T
0
5
10
15
(b) CCDF of Z
20
k
25
Fig. 6. Analysis of the value of T .
3.2 Multiple Objects A multimedia server usually services client requests for more than one object simultaneously and so the bandwidth usage distribution in this case plays an important role in the overall system configuration. In the last subsection, we show that the random variable Z, which represents the distribution of the number of concurrent streams for a single object, depends on two parameters: N and T . Note that we can consider T equal to a constant value computed in accordance with the two criteria previously defined (see last subsection). If T is set to a constant, the random variable Z depends exclusively on the parameter N . 15
Assume that there are n different objects stored in the multimedia server. These objects have lengths D1 , D2 , ..., Dn , respectively. We may compute the corresponding values T1 , T2 , ..., Tn using the two criteria previously defined (see last subsection). Notice that T = max{T1 , T2 , ..., Tn } may be used for all these n objects. This is because the larger T is, the more accurate our model becomes, as already observed. We emphasize that to consider T as a constant and the same for all objects stored in the server does not mean that the objects must have a same length D, as we explain in the following. We know that T = D/d (see Table 1 for reference). Since we propose an analytical model and have a steady-state analysis, the value of D does not affect the real distribution. For example, in Figure 7 we plot the CCDF curves (obtained via simulation) for an object of popularity N = 5 and considering D =100 min, 200 min, 500 min. We may see that the curves are the same. Similar behavior is observed for other different values of D and a same N in the interval [10, 100]. P[ Z > k ]
1.2
1
N=5 and D=100 min, 200 min, 500 min
0.8
0.6
0.4
0.2
0
0
5
10
15
k
20
Fig. 7. Distribution of Z for N = 5 and different values of D.
Still we consider that the n objects stored in the multimedia server have the same play rate. This is a quite common assumption of previous work (e.g., [29,33,18,15]) and is mainly supported by recent researches (e.g., [41,11]) which analyze real media server workloads. Let YN be the random variable that denotes the number of concurrent patches due to the delivery of all objects of popularity N , N ∈ {1, . . . , N max }, where Nmax is the highest object popularity value in the server. Once we consider T as a constant and the same for all objects stored in the server, we have that Y N is a sum of identical binomial random variables, with parameters p = 1−e −N/T Pw+T /N ni,w e, where mN denotes the total number of and nN,w = mN × d i=1 w+T /N objects of popularity N in the server [37]. Now we want to estimate the total required bandwidth due to patches in the multimedia server. Let Y be the random variable that denotes the total number of concurrent patches due to the delivery of all objects in the server. Then, 16
Y is the sum of potentially Nmax binomial random variables with different parameters. There is no closed-form solution for the distribution of this sum. However the distribution of Y may be calculated based on the convolution of the individual probability mass functions (PMFs) of Y N , for N = 1, . . . , Nmax . This convolution may be efficiently implemented with the Fast Fourier Transform [38]. The total number of concurrent streams is the sum of patches and full-object P max mN N √ . multicasts. The number of full-object multicasts is equal to f = N N =1 2N +1 Let S be the random variable that represents the total number of concurrent streams due to the delivery of all objects in the server. The distribution of S is the distribution of Y shifted to the right by f . Similarly to the analysis in the single object case, the shift is because we assume that the total number of full-object multicast streams is a constant given by f , which corresponds to the sum of all individual multicast components related to the objects in the server. Thus it follows that P (S ≤ f − 1) = 0.
4
Results
In this section, we validate our analytical model using simulation and show for instance how we may practically use the bandwidth usage distribution we obtained (i) to allocate bandwidth to provide a given level of QoS, (ii) to estimate the impact on QoS when some system parameters dynamically change, and (iii) to configure the overall system. We mention that the simulation results are obtained using the modeling environment Tangram-II [39,40], and have 95% confidence intervals that are within 5% of the reported values. Client arrivals are generated according to a Poisson process and the media objects are 100 minutes long. Lastly, since Patching is a multicast technique, we mainly focus on the values of N in the range of 10 to 100. Tangram-II is an environment for computer and communication system modeling and experimentation developed at Federal University of Rio de Janeiro (UFRJ), with participation of UCLA/USA, for research and educational purposes. It combines a sophisticated user interface based on an object oriented paradigm and new solution techniques for performance and availability analysis. The user specifies a model in terms of objects that interact via a message exchange mechanism. Once the model is compiled, it can be either solved analytically, if it is Markovian or belongs to a class of non-Markovian models, or solved via simulation. There are several solvers available to the user, both for steady state and transient analysis. The organization of this section is detailed in the following. Subsection 4.1 shows the model accuracy and how to use the bandwidth distribution of a 17
single object to dynamically reserve a given number of channels for a group of clients. In Subsection 4.2, we study the behavior of the bandwidth distribution of a single object considering different values of the threshold window w for a given object popularity. We evaluate the required bandwidth when the server operates using a window that is not the optimal one and quantify the impact on QoS. This analysis is motivated by the fact that the computation of the optimal window to be used at time t depends on the accurate estimation of the arrival rate λ at time t. Finally, Subsection 4.3 evaluates the use of the bandwidth distribution of multiple objects to compute the total server capacity to achieve a given level of QoS to the clients. 4.1 Model Validation and Bandwidth Reservation To evaluate the accuracy of our model we set T = 104 and use two important criteria: the relative error and the mean squared error (MSE). As for the first criterion, we compare the average bandwidth B, computed from Equation (3) (theoretical), with that computed from our model E[Z] (analytical . FigEquation (15)). We calculate the relative error from Error = |B−E[Z]| B ure 8 shows B and E[Z], and Figure 9 presents the obtained relative errors for 10 ≤ N ≤ 100. We may see that they lie between 10−2 and 10−3 and are thus satisfactory. In Table 3 we illustrate the parameters p and n w considering some values of N . Band
14 13 12 11
theoretical band
10 9 8
analytical band
7 6 5 4 3
10
20
30
40
50
60
70
80
90
N
100
Fig. 8. Average bandwidth.
As for the second criterion, we compute the MSEPvalues for the single object
and multiple objects cases from M SEsingle = PM
|(1−F (s))−(1−F
(s))|2
M |(1−FZ (z))−(1−FZs (z))|2 i=1
M
and
S Ss M SEmultiple = i=1 , respectively, where M is the number M of samples and the subscript s of the random variables Z and S is used to refer to simulation results. Recall that Z and S represent the number of concurrent streams for the single object and multiple object cases, respectively. Figure 11 shows the complementary cumulative distribution function (CCDF) of the number of concurrent streams considering N = 10, 25, 40, 50, 75 and 100. In
18
Error
1
0.1
0.01
0.001
1e-04
10
20
30
40
50
60
70
80
90
N
100
Fig. 9. Relative errors for average bandwidth.
this figure, we have both analytical and simulation results (solid and dotted lines, respectively). And in Figure 10 we have the computed MSE values for 10 ≤ N ≤ 100. MSE
0.01
0.001
1e-04
1e-05
0
20
40
60
80
100
N
Fig. 10. Mean squared error (MSE) values.
Note that the values of MSE are all smaller than 10−3 . This indicates that the analytical results are satisfactorily close to those obtained using simulation. From Figures 11 and 10 we can observe that the accuracy of the model tends to increase with the value of N . In other words, the proposed model tends to be more accurate for the most popular objects, i.e., the objects that will significantly impact on the server bandwidth. We stress that this is a tendency that has been confirmed by the overall results obtained in the experiments. Therefore we may not state that for any given value of N , the larger it is, the more accurate the model is. We recall that we use the expected value of ni,w to parameterize the binomial distribution. The parameter ni,w exhibits more variability in the sub-interval [w − T /N + 1, w + T /N ] as shown in Section 3.1. Then, the accuracy of the model is mainly affected by the size of the sub-interval [w −T /N +1, w +T /N ] and the variability of ni,w in this subinterval. The size of the sub-interval [w − T /N + 1, w + T /N ] decreases with the value of N . However, the variability of 19
ni,w does not always decrease with the value of N . For example, the coefficient of variation of ni,w for N = 10 is smaller than that for N = 25. The behavior of the MSE is a consequence of the variability of ni,w . Figure 11 also demonstrates that, in general, the analytical results underestimate the simulation ones. The explanation for this result is that we use average values to determine the multicast component (MC ) as well as to calculate the parameter nw of the binomial distribution. Consider two binomial random variables Y1 and Y2 with the same parameter p (probability of success) and distinct parameters m1 and m2 (number of trials), where m1 < m2 . We have that Y1 always underestimates Y2 [37]. In our model we approximate the number of concurrent patches by a binomial random variable X with parameters p and the expected value of ni,w . We recall that the number of patches in the i-th unit of the interval [1, w + T /N ] is represented by the random variable X i with parameters p and ni,w . We thus have the condition stated above, i.e., the random variable X underestimates the random variables X i with ni,w > nw . Similarly, the average value provided by MC underestimates some of the real instantaneous values of the multicast component. Table 3 Values of parameters p and nw N
p
nw
10
9.99e-04
1401
25
2.50e-03
1057
40
3.99e-03
890
50
4.98e-03
816
75
7.47e-03
692
100
9.95e-03
613
In Figure 12 we have the CCDF for the multiple object case. In this example we considered the same six objects analyzed in Figure 11. The analytical and simulation curves are quite close to each other, and the MSE is equal to 2.32e-04 which is quite satisfactory. We may also note that this value is smaller than the values obtained for N ≤ 40. This occurs because although the bandwidth consumed for delivery of a given object may significantly vary over time, the total bandwidth (i.e., the sum of individual bandwidths) to deliver a large number of objects simultaneously will have lower coefficient of variation over time for independently requested objects and fixed client request rate [6,37]. In the following we focus on applications concerning the single object case and leave the discussion of the multiple object case for Section 4.3. 20
P[Z > k]
P[Z > k]
simulation analytical
1
0.8
N=75
0.8
N=25
0.6
N=50
0.6
N=100
N=40
0.4
0.4
N=10
0.2
0
simulation analytical
1
0
0.2
5
10
15
20
k
(a) N=10,25,40
25
0
0
5
10
15
20
(b) N= 50, 75, 100
k
25
P[ S > k ]
Fig. 11. CCDF of the number of concurrent streams for a single object. simulation analytical
1
0.8
0.6
0.4
0.2
0
0
20
40
60
80
100
120
140
k
Fig. 12. CCDF of the number of concurrent streams for multiple objects.
Using our analytical results we have the analysis that follows. With the distribution of the number of concurrent streams we can reserve bandwidth for a group of clients such that these clients may have a very low probability of not being immediately served. Assume, for example, that we reserve k channels in the server for a group of users retrieving object O such that P [Z > k] = 10 −3 , that is, the probability of the number of concurrent streams be larger than k is equal to 10−3 . The value of k may be easily obtained from Table 4 for N = 25, 50, 100. This table shows the estimated bandwidth (EB), the probability of the number of concurrent streams to exceed the estimated bandwidth (P [Z > EB]), and the needed increase with respect to the average bandwidth (NI) for N = 25, 50, 100. The values of EB in the first line of the table are equal to the average bandwidth computed from Equation (3). We may conclude that if bandwidth reservation is based on the average bandwidth, the probability of the number of concurrent streams to exceed the reserved value is greater than 0.38 (Table 4) for all values of N . In others words, the probability that a client arrives and has to wait until the server may allocate a channel for him is equal to 0.38 for N = 50. This means that clients have a high probability of waiting until the server may allocate a channel to serve them. We note that for N = 25, approximately 50% of the clients will not be immediately served. 21
Table 4 Bandwidth evaluation for N = 25, 50, 100 N=25
N=50
N=100
EB
P [Z > EB]
NI
EB
P [Z > EB]
NI
EB
P [Z > EB]
NI
6
4.9e-01
-
9
3.8e-01
-
13
4.1e-01
-
7
2.7e-01
16.67%
10
2.3e-01
11.11%
14
2.7e-01
7.69%
8
1.3e-01
33.33%
11
1.2e-01
22.22%
15
1.6e-01
15.38%
9
5.2e-02
50.00%
12
5.5e-02
33.33%
16
8.9e-02
23.08%
10
1.8e-02
66.67%
13
2.3e-02
44.44%
17
4.6e-02
30.76%
11
5.7e-03
83.33%
14
8.9e-03
55.56%
19
9.6e-03
46.15%
12
1.6e-03
100.00%
15
3.1e-03
66.67%
21
1.5e-03
61.54%
13
4.1e-04
116.67%
17
3.1e-04
88.89%
22
5.6e-04
69.23%
4.2 Analysis for Different Values of the Threshold Window Consider a server that dynamically estimates the value of λ and then determines the threshold window to be used in accordance with the value of the optimal window (Equation (2)). Suppose that the value initially obtained for N is equal to 75. From Figure 13, the bandwidth needed in order to have P [Z > k] ≈ 10−2 is 17. Now assume that the value of λ changes and the server does not immediately detect it. The server continues to operate with the optimal window determined for N = 75 and keeps the same previously reserved bandwidth. Considering this scenario, we would like to answer the two following questions: (i) What is the quality of service provided by the previously reserved bandwidth to the clients accessing the server now? (ii) What is the impact of operating with a threshold window that is not the optimal one? And what are the bandwidth requirements of this threshold window? Let us analyze the first question. In our example we assume that N = 75, the reserved bandwidth is equal to k channels, and the threshold window is equal to the optimal value computed for N = 75. If the bandwidth and the threshold window are computed in accordance with a popularity equal to 75 and the arrival rate λ increases (decreases), we can observe from Figure 13 that the probability of the number of concurrent streams to be greater than the reserved value increases (decreases). This is an expected result, but using our model we can precisely quantify the QoS offered to the users when their arrival rate changes and the server does not detect it. Suppose, for example, that the number of reserved channels is 17. We have P [Z > 17] = 6.8e-03 for N = 75. If λ decreases so that N = 50 and the server does not detect it, 22
we have that P [Z > 17] = 1.1e-04. Thus, the probability that we need more channels, besides the reserved ones, decreases by one order of magnitude. On the other hand, if λ increases so that N = 100, we have that P [Z > 17] = 7.2e-02, i.e., the probability increases by one order of magnitude. (Note that the bandwidth distributions for N = 50 and N = 100 in Figure 13 were computed using the optimal window defined for N = 75.) P[Z > k]
1
N=100
0.1
0.01
N=75 0.001
N=50
0.0001
1e-05
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
k
Fig. 13. Bandwidth usage distribution for different values of N and the optimal window w defined for N = 75.
P[Z > k]
P[Z > k]
Figure 14 presents another example that illustrates the quality of service perceived by the clients when the arrival rate changes. In this example we set an initial value for the arrival rate and evaluate the QoS as the arrival rate increases. In Figure 14(a) the server is initially configured for N = 10 and in Figure 14(b) it is initially configured for N = 50. We note that, for N = 10 and N = 50, an increase of approximately 20% in the arrival rate does not significantly affect the quality offered to the clients. The same behavior is observed for other values of N in the interval [10, 100]. 1
P[Z > 5]
1
P[Z>12]
0.1
0.1
P[Z>14]
P[Z > 7] 0.01
0.01
P[Z > 8]
0.001
0.0001
5
10
15
20
P[Z>17]
0.001
25
30
35
40
45
50
0.0001
55
50
60
70
80
N
90
100
N
(a) For N=10 : P[Z>5] = 10-2 ; P[Z>7] = 10-3 ; P[Z>8] = 10-4
(b) For N=50 : P[Z>12] = 10-2 ; P[Z>14] = 10-3 ; P[Z>17] = 10-4
Fig. 14. Quality of service as the value of N increases.
Now, we present the analysis of the second question. Figure 15 shows the distribution of the number of concurrent streams Z when the threshold window varies around 20% of its optimal value for N = 50 and N = 100. We may notice that these distributions are quite similar. Hence, if the server does not 23
detect changes in the value of λ, and consequently does not update the value of the threshold window, the required bandwidth for this non optimal window is quite similar to that computed for the optimal one. In other words, the threshold window may vary within certain limits around the optimal window value without significantly affecting the bandwidth requirements. Qualitatively similar results are obtained for other values of N in the interval [10, 100]. 1
P[Z > k]
P[Z > k]
1
window 20% smaller than the optimal one
0.9 0.8 0.7
0.8
optimal window
0.7
optimal window
0.6
0.6
window 20% larger than the optimal one
0.5 0.4
window 20% larger than the optimal one
0.5 0.4
0.3
0.3
0.2
0.2
0.1 0
window 20% smaller than the optimal one
0.9
0.1
0
5
10
15
(a) N=100
20
k
25
0
0
5
10
15
(a) N=50
20
k
25
Fig. 15. Distribution of the number of concurrent streams for N = 50 and N = 100 when the threshold window w varies around 20% of the optimal window value.
In summary, we are able to predict the bandwidth requirements for a given object, or for a group of clients, in order to guarantee a certain quality of service based on the distribution of the number of concurrent streams. This distribution also allows us to predict the quality of service when the client arrival rate changes and the server does not detect it quickly. Moreover, increases of 20% in the arrival rate do not considerably impact on the quality offered to the clients. Another important point is related to the value of the threshold window. We observe that changes around 20% of the optimal window value do not significantly impact on the distribution.
4.3 Server Configuration As already mentioned, the distribution of the number of concurrent streams in the case of the multiple objects may be used, for example, to configure the server. To exemplify this point, we consider four specific scenarios based on the real case studies of [41]. They showed that the distribution of access frequencies for all media objects of two educational servers (BIBS and e-Teach) can be approximated by a concatenation of two Zipf distributions. The first Zipf is used for the most popular objects and the second for the least requested objects. We only consider the first Zipf distribution since the access frequency of the least requested objects is very low and therefore has little or almost no influence on server bandwidth. The scenarios we studied are summarized in Table 5. It presents the number of objects in each scenario for each value of 24
N . Each scenario has a distinct value of skew factor z and we have the most popular 50-55 min media objects of the BIBS server. Figure 16(a) shows the probability of the total number of concurrent streams to exceed the average server bandwidth. The average server bandwidth is equal to the sum of the individual average bandwidths for the objects being delivered (computed from Equation (3)). Figure 16(b) shows the needed increment with respect to the average server bandwidth to achieve a given probability for a client not being immediately served. We can observe that the probability of exceeding the average server bandwidth is greater than 0.18 for all scenarios. The needed increase in bandwidth goes from 32% (Scenario 1 and P [S > k = 10−4 ]) to 6% (Scenario 4 and P [S > k = 10−2 ])). The experiments also show that the more objects we have, the smaller is the increase in the average server bandwidth to reach a given level of QoS, as similarly observed in [6,33]. Table 5 Number of objects in each scenario Scenario 1
Scenario 2
Scenario 3
Scenario 4
z=0.60
z=0.55
z=0.80
z=0.65
100
1
2
2
4
75
1
2
2
3
50
1
2
2
3
40
1
1
2
3
25
1
1
2
3
10
1
1
2
2
0.26
Needed Increase (%)
P[S > Average server bandwidth]
N
0.24
0.22
35
30
25
20
10-2
15
0.2
10-4
10-3
10 0.18 5
0.16
6
8
10
12
14
16
0
18
6
8
10
Number of Objects (a) P [ S > Average server bandwidth]
12
14
16
(b) % increase in server bandwidth to -2 -3 -4 have P[S>k]=10 , 10 or 10 .
Fig. 16. Analysis of the multiple object case.
25
18
Number of Objects
5
Conclusions and Ongoing Work
In this work, we developed a very simple and precise analytical model to calculate the distribution of the number of concurrent streams generated by the Patching technique, or equivalently, the server bandwidth usage distribution. In the case of the single object, we showed that the bandwidth usage distribution can be accurately modeled in the form of a closed-form solution as a binomial distribution. Only two system variables are required to compute the parameters of the binomial distribution: the mean client arrival rate and the media object length. For the multiple object case, the distribution is a sum of independent binomial random variables which may be easily implemented using Fast Fourier Transform. Through simulations and analytical analysis we validate our model and illustrated how our results may be practically used in real project designs to mainly provide quality of service to system clients. Some of our main observations were: • We may easily employ our results to dynamically allocate server bandwidth to guarantee a certain level of QoS for a group of clients retrieving an object from the multimedia server. • In the case of the single object, we observed that the probability of exceeding the well-known average value is significant (≈ 0.4). This means that the QoS is severely affected if bandwidth reservation is based on average values. • Using our results we may easily predict the QoS if the arrival rate changes and the server is not able to detect it immediately. For instance, we observed that variations below 20% do not severely impact on the system QoS. Similarly, we noticed that the Patching window size may also vary around 20% of its optimal value without significantly affecting the bandwidth distribution. • In the case of multiple objects and considering real-case-based scenarios, we observed that to guarantee a low probability of a client not being served immediately (≈ 10−4 ), we need a server bandwidth which is 15–32% larger than the well-know average value. This confirms the usefulness of our results to guarantee system QoS. As an extension of this work, we include the evaluation of the impact on the server bandwidth usage distribution of both a limited client bandwidth and client interactive behavior. We also plan to investigate the distribution considering other than a Poisson client arrival process.
A
Proof of Lemma 1
We show by mathematical induction that Equations (5) and (6) are correct and therefore Lemma 1 is true. 26
• Case 1: i = 1, 2, . . . , w. Base Case It is easy to verify that for i = 1 and all w, we have that m1,w = 0. This agrees with the result of Equation (5). Inductive Hypothesis First, assume that the lemma is true for 1 ≤ i ≤ k, where k is even, i.e., k = 2c and c ∈ {1, 2, . . .}. We therefore may write the following: m2c,w = e = c, and m2c−1,w = d 2c−1−1 e = c − 1. d 2c−1 2 2 Second, assume that the lemma is true for 1 ≤ i ≤ k, where k is odd, i.e., k = 2c − 1 and c ∈ {1, 2, . . .}. We therefore may write the following: m2c−1,w = d 2c−1−1 e = c − 1, and m2c−2,w = d 2c−2−1 e = c − 1. 2 2 We thus obtain the following relation from the inductive hypothesis: (i) If i is even, then mi,w = mi−1,w + 1; (ii) If i is odd, then mi,w = mi−1,w . Evaluation of Equation (5) for i + 1 We use the assumptions of the inductive hypothesis and prove that the result of Equation (5) holds for i+1. As before, let c ∈ {1, 2, . . .}. Two cases must be considered: · i is odd, then i + 1 is even. e = c using We have i = 2c − 1 and i + 1 = 2c. We obtain m2c,w = d 2c−1 2 Equation (5). Now using the result of the inductive hypothesis we have that m2c,w = m2c−1,w + 1 = c − 1 + 1 = c. · i is even, then i + 1 is odd. e=c We have i = 2c and i + 1 = 2c + 1. We obtain m2c+1,w = d 2c+1−1 2 using Equation (5). Now using the result of the inductive hypothesis, we have that m2c+1,w = m2c,w = c. This completes the proof of Equation (5). • Case 2: i = w + 1, w + 2, . . . , 2w. Base Case It is easy to verify that for w = 1 and i = 2, we have that m2,1 = 1. This agrees with the result of Equation (6). Inductive Hypothesis Let c1 and c2 ∈ {1, 2, . . .}. Two cases must be considered: · Assume that the lemma is true for 1 ≤ i ≤ k, where k is even, i.e. 2 +1 k = 2c2 . For w even, i.e., w = 2c1 , we obtain: m2c2 ,2c1 = d 4c1 −2c e = 2 2 +2 e = 2c − c + 1. For w odd, 2c1 − c2 + 1, and m2c2 −1,2c1 = d 4c1 −2c 1 2 2 2 +1 i.e., w = 2c1 − 1, we obtain: m2c2 ,2c1 −1 = d 4c1 −2−2c e = 2c1 − c2 , and 2 4c1 −2−2c2 +2) e = 2c1 − c2 . m2c2 −1,2c1 −1 = d 2 · Now, assume that the lemma is true for 1 ≤ i ≤ k, where k is odd, i.e. 2 +2 e= k = 2c2 −1. For w even, i.e., w = 2c1 , we obtain: m2c2 −1,2c1 = d 4c1 −2c 2 4c1 −2c2 +2+1 e = 2c1 − c2 + 2. For w odd, 2c1 − c2 + 1, and m2c2 −2,2c1 = d 2 2 +2) i.e., w = 2c1 − 1, we obtain: m2c2 −1,2c1 −1 = d 4c1 −2−2c e = 2c1 − c2 , and 2 4c1 −2−2c2 +3) m2c2 −2,2c1 −1 = d e = 2c1 − c2 + 1. 2 We thus obtain the following relation from the inductive hypothesis: when i is even, we have that mi,w = mi−1,w ; when i is odd, we have that mi,w =
27
mi−1,w − 1. Evaluation of Equation (6) for i + 1 We use the assumptions of the inductive hypothesis and prove that the result of Equation (6) holds for i + 1. As before, let c1 and c2 ∈ {1, 2, . . .}. Two cases must be considered: · i is odd, then i + 1 is even. We have i = 2c2 − 1 then i + 1 = 2c2 . For w even, i.e., w = 2c1 , we have m2c2 ,2c1 = 2c1 − c2 + 1 from Equation (6). The result of the inductive hypothesis gives: m 2c2 ,2c1 = m2c2 −1,2c1 = 2c1 − c2 + 1. For w odd, i.e., w = 2c1 − 1, we have m2c2 ,2c1 −1 = 2c1 − c2 from Equation (6). The result of the inductive hypothesis gives: m 2c2 ,2c1 −1 = m2c2 −1,2c1 −1 = 2c1 − c2 . · i is even, then i + 1 is odd. We have i = 2c2 then i + 1 = 2c2 + 1. For w even, i.e., w = 2c1 , we have m2c2 +1,2c1 = 2c1 − c2 from Equation (6). The result of the inductive hypothesis gives: m 2c2 +1,2c1 = m2c2 ,2c1 − 1 = 2c1 − c2 + 1 − 1 = 2c1 − c2 . For w odd, i.e., w = 2c1 − 1, we have m2c2 +1,2c1 −1 = 2c1 − c2 − 1 from Equation (6). The result of the inductive hypothesis gives: m 2c2 +1,2c1 −1 = m2c2 ,2c1 −1 − 1 = 2c1 − c2 − 1. This completes the proof of Equation (6). 2
B
Proof of Lemma 2
We show that Equations (7), (8) and (9) are correct and therefore Lemma 2 is true. • Case 1: i ∈ [1, w − NT ] We have that li,w = mi+w+T /N,w + mi,w , where mi+w+T /N,w is the number of patches initiated in the previous interval and m i,w is the number of patches initiated in the current interval. Substituting Equations (5) and (6) of Lemma 1 in the expression obtained for li,w , gives: −i+1 /N −1) e + d i−1 e = d w−T /N e + d i−1 e li,w = d 2w−(i+w+T 2 2 2 2
(B.1)
Now we consider the possible values for i and (w − T /N ) (even or odd): · i and (w − NT ) are even. li,w =
w−T /N 2
− 2i + 1 +
· i is even and (w − li,w =
w−T /N 2
T ) N
i 2
=
w−T /N 2
+1
(B.2)
is odd.
+ 12 − 2i +
i 2
= d w−T2 /N e 28
(B.3)
· i and (w −
T ) N
are odd.
li,w = d w−T2 /N e − · i is odd and (w − li,w =
w−T /N 2
T ) N
−
i−1 2
+
i−1 2
= d w−T2 /N e
(B.4)
is even.
i−1 2
+
i−1 2
= d w−T2 /N e
(B.5)
This completes the proof of Equation (7). • Case 2: i ∈ [w − NT + 1, w] We have that li,w = mi,w since all patches initiated in the (k-1)-th interval have already finished. From Equation (5) of Lemma 1 we have: li,w = d
i−1 e 2
(B.6)
T ] • Case 3: i ∈ [w + 1, w + N We have that li,w = mi,w since all patches initiated in the (k-1)-th interval have already finished. From Equation (6) of Lemma 1 we have:
li,w = d
2w − (i − 1) e 2
(B.7)
This completes the proof of Equations (8) and (9).
2
References [1] C. C. Aggarwal, J. L. Wolf, P. S. Yu, On optimal piggyback merging policies for video-on-demand systems, in: Proc. 1996 ACM SIGMETRICS Conf. On Measurement and Modeling of Computer Systems, 1996, pp. 200–209. [2] K. A. Hua, Y. Cai, S. Sheu, Patching: A multicast technique for true videoon-demand services, in: Proc. 6th ACM Int’l Multimedia Conference (ACM MULTIMEDIA’98), 1998, pp. 191–200. [3] Y. Cai, K. A. Hua, An efficient bandwidth-sharing technique for true video on demand systems, in: Proc. 7th ACM Int’l Multimedia Conference (ACM Multimedia’99), 1999, pp. 211–214. [4] Y. Cai, K. A. Hua, K. Hu, Optimizing patching performance, in: Proc. SPIE/ACM Conference on Multimedia Computing and Networking, Jan. 1999. [5] S. Sen, L. Gao, J. Rexford, D. Towsley, Optimal patching schemes for efficient multimedia streaming, in: Proc. 9th Int’l Workshop on Network and Operating Systems Support for Digital Audio and Video (NOSSDAV’99), 1999.
29
[6] D. Eager, M. Vernon, J. Zahorjan, Minimizing bandwidth requirements for ondemand data delivery, in: Proc. 5th Int’l Workshop on Multimedia Information Systems (MIS’99), 1999, pp. 80–87. [7] D. Eager, M. Vernon, J. Zahorjan, Optimal and efficient merging schedules for video-on-demand servers, in: Proc. 7th ACM Int’l Multimedia Conference (ACM Multimedia’99), 1999, pp. 199–202. [8] D. Eager, M. Vernon, J. Zahorjan, Bandwidth skimming: A technique for costeffective video-on-demand, in: Proc. IS&T/SPIE MMCN’00, 2000, pp. 206–215. [9] A. Bar-Noy, R. E. Ladner, Competitive on-line stream merging algorithms for media-on-demand, in: Proc. 12th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2001. [10] E. G. C. Jr., P. Jelenkovic, P. Momcilovic, Provably efficient stream merging, in: Proc. 6th Int’l Workshop on Web caching and Content Distribution, Boston, MA, 2001. [11] C. Costa, I. Cunha, A. Borges, C. Ramos, M. Rocha, J. M. Almeida, B. RibeiroNeto, Analyzing Client Interactivity in Streaming Media, in: Proc. 13th ACM Int’l World Wide Web Conference, May, 2004, pp. 534–543. [12] W.-T. Chan, T.-W. Lam, H.-F. Ting, W.-H. Wong, Competitive analysis of on-line stream merging algorithms, in: Proc. of the 27th Int’l Symposium on Mathematical Foundations of Computer Science (MFCS), 2002, pp. 188–200. [13] K. C. Almeroth, M. H. Ammar, The use of multicast delivery to provide a scalable and interactive video-on-demand service, IEEE Journal on Selected Areas in Communications 14 (5) (1996) 1110–1122. [14] A. Hu, Video-on-demand broadcasting protocols: A comprehensive study, in: Proc. IEEE Infocom, 2001, pp. 508–517. [15] S. Viswanathan, T. Imielinski, Pyramid broadcasting for video-on-demand service, in: Proc. SPIE Multimedia Computing and Networking Conference, 1995, pp. 66–77. [16] L. Juhn, L. Tseng, Fast data broadcasting and receiving scheme for popular video service, IEEE Transactions on Broadcasting 44 (1) (Mar 1998) 100–105. [17] L. Juhn, L. Tseng, Harmonic broadcasting for video-on-demand service, IEEE Transactions on Broadcasting 43 (3) (Sept 1997) 268–271. [18] K. Hua, S. Sheu, Skyscraper broadcasting: A new broadcasting scheme for metropolitan video-on-demand systems, in: Proc. ACM SIGCOMM, 1997, pp. 89–100. [19] J.-F. Paris, S. W. Carter, D. D. E. Long, A low bandwidth broadcasting protocol for video on demand, in: Proc. IEEE Int’l Conference on Computer Communications and Networks (IC3N’98), 1998, pp. 690–697.
30
[20] J.-F. Paris, S. W. Carter, D. D. E. Long, A hybrid broadcasting protocol for video on demand, in: Proc. SPIE Multimedia Computing Networking Conference (MMCN’99), 1999, pp. 317–326. [21] J.-F. Paris, S. W. Carter, D. D. E. Long, A simple low-bandwidth broadcasting protocol for video on demand, in: Proc. 8th Int’l Conference on Computer Communications and Networks (IC3N’99), 1999. [22] Y. Guo, K. Suh, J. Kurose, D. Towsley, P2cast: peer-to-peer patching scheme for VoD service, in: Proc. 12th World Wide Web Conference (WWW-03), 2003, pp. 301–309. [23] M. K. Bradshaw, B. Wang, S. Sen, L. Gao, J. Kurose, P. Shenoy, D. Towsley, Periodic broadcast and patching services - implementation, measurement and analysis in an Internet streaming video testbed, ACM Multimedia Journal, Special Issue on Multimedia Distribution 9 (1) (2003) 78–93. [24] D. Guan, S. Yu, A two-level patching scheme for video-on-demand delivery, IEEE Transactions on Broadcasting 50 (1) (March 2004) 11–15. [25] Y. W. Wong, J. Y. B. Lee, Recursive Patching - An efficient technique for multicast video streaming, in: Proc. 5th International Conference on Enterprise Information Systems (ICEIS) 2003, Angers, France, 2003, pp. 23–26. [26] Y. Cai, K. Hua, Sharing multicast videos using patching streams, Journal of Multimedia Tools and Applications 21 (2) (2003) 125–146. [27] Y. Cai, W. Tavanapong, K. Hua, Enhancing patching performance through double patching, in: Proc. Int’l. Conf. on Distributed Multimedia Systems, Miami, FL, USA, 2003, pp. 72–77. [28] E. de Souza e Silva, R. M. M. Le˜ao, M. C. Diniz, The Required Capacity Distribution for the Patching Bandwidth Sharing Technique, in: Proc. IEEE Int’l Conference on Communications (ICC 2004), 2004. [29] A. Bar-Noy, G. Goshi, R. E. Ladner, K. Tam, Comparison of stream merging algorithms for media-on-demand, in: Proc. Multimedia Computing and Networking (MMCN’02), San Jose, CA, 2002, pp. 18–25. [30] L. Gao, D. Towsley, Supplying instantaneous video-on-demand services using controlled multicast, in: Proc. IEEE Multimedia Computing Systems, 1999, pp. 117–121. [31] Y. Cai, K. Hua, K. Vu, Optimizing Patching Performance, in: Proc. SPIE/ACM Conference on Multimedia Computing and Networking, 1999, pp. 204–215. [32] D. L. Eager, M. C. Ferris, M. Vernon, Optimized regional caching for ondemand data delivery, in: Proc. ISET/SPIE Conf. Multimedia Computing and Networking (MMCN’99), 1999, pp. 301–316. [33] H. Tan, D. Eager, M. Vernon, H. Guo, Quality of service evaluations of multicast streaming protocols, in: Proc. ACM SIGMETRICS, 2002, pp. 183–194.
31
[34] A. Bar-Noy, R. E. Ladner, Efficient algorithms for optimal stream merging for media-on-demand, SIAM Journal on Computing 33 (5) (2004) 1011–1034. [35] S. M. Ross, Stochastic Processes, 2nd Edition, John Wiley & Sons, Inc., New York, 1996. [36] L. Kleinrock, Queueing Systems, Vol. 1: Theory, John Wiley & Sons, New York, 1975. [37] K. S. Trivedi, Probability and Statistics with Reliability, Queuing and Computer Science Applications, 2nd Edition, John Wiley & Sons, Inc., New York, 2002. [38] E. O. Brigham, The Fast Fourier Transform and its applications, Prentice-Hall, Inc., New Jersey, 1988. [39] R. M. L. R. Carmo, L. R. de Carvalho, E. de Souza e Silva, M. C. Diniz, R. R. Muntz, Performance/Availability Modeling with the TANGRAM-II Modeling Environment, Performance Evaluation 33 (1998) 45–65. [40] E. de Souza e Silva, R. M. M. Le˜ao, The Tangram-II Environment, in: Proc.11th Int’l Conference TOOLS2000, 2000, pp. 366–369. [41] J. M. Almeida, J. Krueger, D. L. Eager, M. K. Vernon, Analysis of educational media server workloads, in: Proc. 11th Int’l Workshop Network and Operating Systems Support for Digital Audio and Video (NOSSDAV’01), 2001, pp. 21–30. [42] E. de Souza e Silva, R. M. M. Le˜ao, B. Ribeiro-Neto, S. Campos, Performance Issues of Multimedia Applications, Lecture Notes in Computer Science 2459 (July 2002) 374–404. [43] Huadong Ma, K. G. Shin, Multicast video-on-demand services, ACM SIGCOMM, Computer Communication Review 32 (1) (2002) 31–43. [44] K. A. Hua, M. A. Tantaoui, W. Tavanapong, Video delivery technologies for large-scale deployment of multimedia applications, Proceedings of the IEEE 92 (9) (Sept 2004) 1439–1451. [45] B. Wang, S. Sen, M. Adler, D. Towsley, Optimal Proxy Cache Allocation for Efficient Streaming Media Distribution, IEEE Transactions on Multimedia (2004) 1726–1735 [46] X. Zhang, J. Liu, B. Li, Tak-Shing P. Yum, CoolStreaming/DONet: A DataDriven Overlay Network for Efficient Live Media Streaming, in: IEEE Infocom, 2005.
32