Symmetrical Pair Scheme: A Load Balancing ... - Semantic Scholar

3 downloads 165 Views 205KB Size Report
probably leads to load imbalance among server nodes in parallel video servers. .... data from a movie magazine and a rental store to model the long-term movie ...
Symmetrical Pair Scheme: a Load Balancing Strategy to Solve Intra-movie Skewness for Parallel Video Servers

Song Wu

and Hai Jin

Huazhong University of Science & Technology, Wuhan, China Email: {wusong, hjin}@hust.edu.cn

Abstract Parallel video servers divide video objects into small segments and store them across multiple server nodes. This avoids the load imbalance problem caused by video popularity. However, due to users’ various viewing time, the access numbers of movie segments are quite different, and some segments are more popular than others. This instance is called the intra-movie skewness, which probably leads to load imbalance among server nodes in parallel video servers. In this paper we analyze and model the intra-movie skewness. According to the characteristic of intra-movie skewness, we propose a novel data placement strategy, called Symmetrical Pair Scheme (SPS). It is proved that SPS prevents the impact of intra-movie skewness and has perfect load balancing performance than traditional round robin data placement, especially in a large-scale parallel video server.

1.

Introduction

Video popularity is a nontrivial issue when modeling and designing large-scale video servers. The retrieval of video objects is highly skewed in many applications because some videos are more popular than others. Furthermore, the skewness changes with time, particularly when most users have seen a popular video and it becomes less popular [6]. Some popular video objects are frequently accessed by most of users, which leads to load imbalance and hot spot problem. In order to reduce the negative impact of video popularity, various replication strategies are exploited [1, 9]. However, replication occupies lots of system resources such as disk and network bandwidth and storage capacity.

Parallel video servers interleave media files across multiple server nodes to obtain load balancing and server-level fault tolerance [2, 3, 4, 8]. Inter-movie skewness, the popularity among different movies, has been addressed by some researchers. (We refer any long, stored audio/video data as a “movie” without loss of generality.) But the popularity among different segments in a movie has been ignored. When viewing a movie, not all of users view it all the way to the end. It is possible that some users stop watching halfway and they have different viewing times. An example is that the beginning segment of a movie is more popular than others. We call this the intra-movie skewness. Because movies are striped into many segments stored on multiple nodes in the parallel video server, the intra-movie skewness has great influence on various designing aspects of the systems, such as data striping and placement strategy, load balancing and caching policy. This paper contributes in analyzing and modeling the intra-movie skewness and proposing a novel data placement strategy, Symmetrical Pair Scheme (SPS), with perfect load balancing performance in parallel video servers. The paper is organized as follows. The research background is introduced in Section 2. In Section 3, we discuss the intra-movie skewness in detail. After analyzing its characteristics from various aspects, we present a model of the intra-movie skewness, called Symmetrical Pair Scheme (SPS). Section 4 focuses on SPS and we compare its load-balancing performance with traditional round robin style in Section 5. Finally, Section 6 closes with conclusion and future work.

2.

Background

Load-balancing problem has been addressed by some previous researches. In [4], Buddhikot and Parulkar proposed a family of hierarchical, distributed layouts that use constant time length logical units for clustered MOD

0-7695-1573-8/02/$17.00 (C) 2002 IEEE

(Movie on Demand) servers. For some of these layouts they studied the load balancing problem arising from interactive operations, whereas they did not take user access behavior into account and neglected the potential load imbalance in a normal playout mode. Bernhardt and Biersack reported a loosely coupled distributed server approach, called Sever Array [2]. They intended to use sub-frame striping to attain perfect load balancing. However, the tiny stripe unit size of sub-frame striping probably leads to the decline of system throughput and concurrent session amount [7]. Lee and Wong provided a system design of pull-based parallel video server [8] and derive a performance model to obtain various performance metrics. In their parallel architecture the movie segments were ordered in a round robin manner to avoid the load imbalance problem caused by inter-movie skewness. They studied the instantaneous load imbalance problem arising from concurrent video sessions and proposed a staggering-based admission scheduler to control when a client can start a new video session. However, they didn’t take into account the potential load imbalance rooting in intra-movie skewness and their data placement strategy. On the other hand, although many previous works had discussed user behavior about inter-movie skewness, the intra-movie skewness is seldom addressed. In [6], Griwodz et al. compared data on user requests from various sources and deduced two main issues in user request modeling. They were the long-term life cycle of movies and the effects that varying user population sizes have on the usefulness of considering this life cycle at individual access points of distributed VoD systems. But their observations only focused on the long-term movie popularity and didn’t involve the user access behavior in watching movies.

prove and analysis the intra-movie skewness. Then, we specify the intra-movie skewness from several aspects in details. External statistic information is necessary in order to analyze the inter- and intra-movie skewness. There are several kinds of external data sources used to create the model of inter-movie popularity, such as reports from trials, cinema visitor number, related literatures, movie magazines, movie rental store. Griwodz et al. used the data from a movie magazine and a rental store to model the long-term movie popularity [6]. However, due to the difference between inter- and intra-movie skewness, the above data sources are not useful in analyzing the characteristics of intra-movie skewness. The intra-movie skewness is caused by the fact that people have different viewing time. So, we need the data describing the uses’ viewing time in order to prove and analyze intra-movie skewness. The access statistics on some video servers can be applied. In fact, we use the log files from the video server located in the CCRNC (Center China Regional Network Center) of CERNET (China Education and Research Network). The video server is used for remote education and multimedia experiments. Log files of the video server record historical data. They track who visited the site, what clips they watched, whether they watched them all the way through to completion and how long they watched them. We can gather information and observe trends from them. Figure 1 is the viewing times of different users who choose the movie “Thelma & Louise” in March 17, 2001.

Dan and Sitaram [5] analyzed the workload in a single server or a server cluster and proposed a caching policy under various interactive workloads. Though user viewing time and access skewness were taken into account, they modeled general view time as a random variable with exponential distribution according to their supposition, which is probably not accordant with the fact. The goal of this paper is to study the characteristic of intra-movie skewness and analyze its impact on data placement for load balancing in parallel video servers. We propose a novel data placement strategy with perfect load-balancing performance based on our analysis results.

3.

Intra-movie Skewness In this section, we first describe the data source used to

Figure 1: Viewing times of different users

From the figure we can see that only some of users completed viewing the whole movie, and others stopped halfway. Moreover, most of those who had canceled watching the movie stopped at the beginning. We have

0-7695-1573-8/02/$17.00 (C) 2002 IEEE

analyzed the log data of 48 movies during three months. Our results are based on them.

such as network congestion etc., users will probably lose their patience. It is a common case during peak hours.

Before discussing the intra-movie skewness, we first explain some conceptions and definitions that will be used in the following sections. Movie segment: Assuming Tp is the playing time of a movie, we consider the movie as a combination of Tp parts, m[0], m[1], , m[Tp-1]. m[i] is called the i-th movie segment. The size of movie segment is flexible. User’s buffering time: There is some buffer space on users’ machine. Buffering time, Tb, is the time period during which the user’s buffer space is filled. It is at the head of viewing time. Segment access number: Assuming users view a movie sequentially, the user with viewing time t (0 < t Tp) accesses m[0], m[1], , m[t-1]. Because users have different viewing time, movie segments have different access numbers. We use A(i) to represent the access number of m[i].

Figure 2: Access numbers of movie segments

User’s stop probability: Some users stop watching in the midway. We use P(i) to represent the probability that users stop viewing the movie during segment m[0], m[1], , m[i-1]. P(i) =(A(0)-A(i))/A(0). From the three months’ log data of the video server, we pick-up the viewing times of 48 movies. Then, segment access numbers can be calculated out. Finally, we compute user’s stop probability. Figure 2 shows the access number of different movie segments and Figure 3 indicates the stop possibilities. (Movie 1 and 3 has the most and least access users among the movies, respectively.) From Figure 2 we can see that segment access number decreases rapidly at the head of movies. At other parts, the segment access number declines continuously and tenderly. Figure 3 shows a part of users stop watching before the end. Moreover, most of those who have stopped watching halt at the movie’s beginning. These two figures prove the existence of intra-movie skewness. This tendency leads to the large gap between the access number of head segments and that of others. The intra-movie skewness has two main reasons. Firstly, before a user clicks a movie, it is hard to estimate whether he or she will watch it throughout or stop halfway. In fact, when users begin to view a movie, they are mostly interested in its start. If the beginning of a movie is attractive enough to them, they will continue watching it. Otherwise they will cancel their choice. Secondly, users have to wait during buffering time after clicking a movie. If the buffering time is prolonged because of some reasons

Figure 3: User stop probability during different segment ranges

In order to observe the changes of segment access number and stop probability within the beginning, we divide movies into smaller segments. Second, instead of minute, will be used as the segment unit. Figure 4 and 5 reflect these changes. m[0], m[1], , m[Tb-1] are within the buffering time and called the buffering segments. The buffered segments have the largest access number, and the user’s stop probability is nearly zero. After the buffering time, segment access number decreases sharply and almost linearly until a particular time, leaking time Tl. Lots of users stop their watching between Tb and Tl. We call m[Tb],

0-7695-1573-8/02/$17.00 (C) 2002 IEEE

m[Tb+1], , m[Tl-1] the leaking segments. After the leaking time, segment access number decrease moderately and most users continue viewing movies. m[Tl], m[Tl+1], , m[Tp-1] are called the normal segments. Users seldom stop watching during this period of time.

4.

Symmetrical Pair Scheme

The intra-movie skewness results in large access number gap among different movie segments, which probably lead to load imbalance in some video severs. Previous data placement schemes in parallel video servers did not take intra-movie skewness into account. The purpose of SPS is to obtain better load balancing performance based on the characteristic of intra-movie skewness. From the above section we can assert that the main reason of load imbalance among server nodes is the users’ stopping watching during the leaking time. So, it is most important how to distribute the leaking segments in the whole system. SPS tries to organize the leaking segments belonging to different movies into symmetrical pairs, which can compensate the decrease of leaking segment access number each other.

Figure 4: Access numbers of movies’ beginning segments

Figure 5: User stop probability during movies’ beginning segments

From above results we use the following functions to approximately describe the characteristic of intra-movie skewness. Assuming the skewness degree k (k>0) is the slope of intra-movie skewness.

A(i) =

P(i) =

A A-A*P(i) A-A*P(Tl) 0 k*(i-Tb) k*(Tl-Tb)

i=0, 1, , Tb-1; i= Tb, Tb+1, , Tl-1; i= Tl, Tl+1, , Tp-1; i=1, 2, , Tb-1; i= Tb, Tb+1, , Tl-1; i= Tl, Tl+1, , Tp-1;

We assume all movies have the same access number A and intra-movie skewness degree k. (The general case will be studied in Section 5.) We use the following notations: N:

server node number in the parallel video server, N>2

S[i]:

the i-th server node in the parallel video server, i=1, , N-1

M:

movie number in the parallel video server

mi:

the i-th movie in the parallel video server, i=0, 1, , M-1

mi[j]:

the j-th movie segment in i-th movie, i=0, 1, M-1 and j=0, 1, , Tp-1

,

For the movie mi, SPS takes the following steps. First, SPS distributes the buffering segments uniformly on each server node due to their large and steady access number. The segment length is Tb/N. The buffering segment mi[j] is located on S[j], j=0, 1, , N-1. Second, the leaking segments are distributed uniformly on each server. The segment length is (Tl-Tb)/N. If (i mod 2) equals to 0, the leaking segment mi[N+j] is located on S[((i div 2) mod N + j) mod N]. Otherwise, mi[N+j] is located on S[((i div 2) mod N + N – 1– j) mod N]. Third, the normal segments are distributed uniformly on each server. The segment length is (Tp-Tl)/(x*N). Here x is the granularity factor and its value depends on the system configuration. Figure 6 is a diagrammatic sketch of SPS. The second step is the key point of SPS. It symmetrically put the

0-7695-1573-8/02/$17.00 (C) 2002 IEEE

leaking segments belonging to different movies in pairs. server nodes S[0]

S[1]

S[2]

S[3]

S[4]

m0[0] m0[5] m0[10] m0[15] m1[0] m1[9] m1[10] m1[15] m2[0] m2[9] m2[10] m2[15] m3[0] m3[5] m3[10] m3[15]

m0[1] m0[6] m0[11] m0[16] m1[1] m1[8] m1[11] m1[16] m2[1] m2[5] m2[11] m2[16] m3[1] m3[9] m3[11] m3[16]

m0[2] m0[7] m0[12] m0[17] m1[2] m1[7] m1[12] m1[17] m2[2] m2[6] m2[12] m2[17] m3[2] m3[8] m3[12] m3[17]

m0[3] m0[8] m0[13] m0[18] m1[3] m1[6] m1[13] m1[18] m2[3] m2[7] m2[13] m2[18] m3[3] m3[7] m3[13] m3[18]

m0[4] m0[9] m0[14] m0[19] m1[4] m1[5] m1[14] m1[19] m2[4] m2[8] m2[14] m2[19] m3[4] m3[6] m3[14] m3[19]

Figure 6:

round robin style. Figure 8 shows leaking segments layout according to SPS. In the latter figure we can see leaking segments belonging to Movie 0, 1 and 2, 3 form two symmetrical pairs. server nodes

buffering segment

leaking segment

normal segment

Data placement of SPS

5. Load-balancing Performance In this section, firstly, we compare load-balancing performance between SPS and traditional round robin placement strategy. Then, we present a general scheme based on SPS to obtain perfect load-balancing performance (in which movie segments are put across server nodes in a round robin manner and starts of different movies are staggered). Considering that a system’s access number decides its load, we present the following symbols. L[i] represents the load of the i-th server node. It is equal to the sum of access numbers of the segments located on the node. Lb[i], Ll[i] and Ln[i] respectively represents the sum of access numbers of buffering, leaking and normal segments located on the i-th node. L[i] = Lb[i]+Ll[i]+ Ln[i]. From the result in Section 3 we know if buffering and normal segments are distributed uniformly on each server node, Lb[i] and Ln[i] is approximately equal to Lb[i] and Ln[i] respectively (i, j=0, 1, , N-1 and i j). So, the load imbalance among server nodes is chiefly caused by Ll[i]. In this section we focus on Ll[i] and compare load balancing performance between SPS and traditional round robin style.

S[0]

S[1]

S[2]

S[3]

S[4]

m0[5] m1[9] m2[8] m3[7]

m0[6] m1[5] m2[9] m3[8]

m0[7] m1[6] m2[5] m3[9]

m0[8] m1[7] m2[6] m3[5]

m0[9] m1[8] m2[7] m3[6]

Figure 7: Layout of leaking segments using traditional round robin manner

server nodes S[0]

S[1]

S[2]

S[3]

S[4]

m0[5] m1[9]

m0[6] m1[8]

m0[7] m1[7]

m0[8] m1[6]

m0[9] m1[5]

m2[9] m3[5]

m2[5] m3[9]

m2[6] m3[8]

m2[7] m3[7]

m2[8] m3[6]

symmetrical pairs

Figure 8: Layout of leaking segments using SPS

we can compute the access number of leaking segment m[N+i] (i=0, 1, , N-1). A(N+i) = A-i*k*A. Therefore, we use the following M*N matrixes to describe the Ll[i]. Before discussing the load balancing performance, we give performance metrics: UD (Unbalance Degree) and MBP (Minimum Balance Period). UD is the maximum discrepancy of node loads. UD = max { | L[i] - L[j]| } , N-1). MBP reflects max{ | Ll[i]- Ll[j]| } (i, j=0, 1, 2, the periodical change of load balancing performance. S[0] movie 0 movie 1 movie 2

S[1]

S[2]

S[N-1]

A-Ak A-2Ak A A-(N-1)Ak A A-Ak A-(N-2)Ak A-(N-1)Ak A A-Ak A

A-2Ak A-Ak

A-3Ak A-2Ak

Σ

Σ

Σ

Ll(0)

Ll(1)

Ll(2)

A-(N-1)Ak A-(N-2)Ak A-(N-3)Ak A A-(N-1)Ak

movie M-1

Σ Ll(N-1)

Matrix 1: Ll[i] of traditional round robin placement

Figure 7 is an outline of leaking segments in traditional

0-7695-1573-8/02/$17.00 (C) 2002 IEEE

movie 0 movie 1 movie 2 movie 3 movie 4 movie 5

S[0]

S[1]

S[2]

A

A-Ak

A-2Ak

S[N-1] A-(N-1)Ak

A-(N-1)Ak A-(N-2)Ak A-(N-3)Ak A-(N-1)Ak A A-Ak A A-(N-1)Ak A-(N-2)Ak A-(N-2)Ak A-(N-1)Ak A A-Ak A A-(N-1)Ak

A A-(N-2)Ak A-Ak A-(N-3)Ak A-2Ak

movie M-1

Σ

Σ

Ll(0)

Ll(1)

Σ

Σ

Ll(2)

Ll(N-1)

Matrix 2: Ll[i] of SPS

UD periodically changes with the increase of movie number, if N is fixed. For round robin placement, the following equation can be proved. UDRB = (N*M – M2)*A*k, M=0, 1, 2,

, N-1

If (N mod 2) equals to zero, UDRB reach its maximum value N2Ak/4 when M equals to N/2. Otherwise, UDRB reach its maximum value (N2-1)Ak/4 when M equals to (N+1)/2 or (N-1)/2. And MBPRB equals to server node number N. Figure 9 shows MBPRB and UDRB when (N mod 2) equals to zero.

Figure 10:

UD and MBP of SPS

UD of SPS is correlative with the movie number’s parity instead of the amount. MBPSPS is constantly equal UDRB to 2. If the M and N are given, we have UDSPS and MBPSPS MBPRB. So, in a parallel video server with N nodes, SPS has much better load balancing performance than round robin scheme. Figure 11 shows that SPS is prior to round robin placement with scaled video servers. Obviously, round robin placement is not suitable for large-scale parallel video servers. In the above section we have proved SPS has much better load balancing performance than round robin placement. However, there are some shortages in SPS. SPS has favorable performance in the case that the movies on the video server have almost the same access number A and intra-movie skewness slop k. It is hard to judge its real performance because the movies have different characteristics in fact. And, there is always a lonely movie in the video server with odd movie number, which leads to system load imbalance. Moreover, when parallel video servers scale up SPS cannot prevent the load balancing performance from descending.

Figure 9:

UD and MBP of round robin style (N mod 2 = 0)

For SPS, we have following equation and Figure 10. UDSPS =

0 (N-1)*A*k

M mod 2 = 0 M mod 2 0

In order to obtain perfect load-balancing performance, we can mirror the leaking segments of a movie and put them into a symmetrical pair, shown in Figure 12. Users access the leaking segments and their mirror image alternately. Because the leaking segments have absolutely the same characteristic with their mirroring image, the access number gap among leaking segments can be compensated completely. In this case, UDSPS and MBPSPS always equal to zero regardless of server node number and movie number.

0-7695-1573-8/02/$17.00 (C) 2002 IEEE

performance placement.

compared

to

traditional

round

robin

SPS divides movies into buffering, leaking and normal segments that may have different lengths. The granularity of movie segments has some impact on the load-balancing performance. We will improve SPS by optimizing the segment granularity assignment in our future work. Moreover, we are also interested in the intra-movie skewness’s impact on caching policy and the relationship between intra- and inter-movie skewness.

References Figure 11: Load-balancing performance change with system scale

Mirror SPS has some overhead in storage capacity. However, since the leaking time is very short comparing with the playing time of a movie, the overhead can be endured by the system. Moreover, mirror SPS can be combined with fault tolerate strategy in parallel video servers using mirror redundancy. In this case, besides leaking segments, buffering and normal segments can also be mirrored and placed according to SPS, which will result in perfect load balancing performance.

[1]

C. C. Bisdikian and B. V. Patel, “Issues on Movie Allocation in Distributed Video-on-Demand Systems,” Proc. ICC95, IEEE Press, Piscataway, N.J., 1995, pp.250-255.

[2]

C. Bernhardt and E. Biersack, “The Server Array: A Scalable Video Server Architecture,” High-Speed Networks for Multimedia Applications, Kluwer Press, Boston, 1996.

[3]

W. J. Bolosky, J. S. Barrera III, R. P. Draves, R. P. Fitzgerald, G. A. Gibson, M. B. Jones, S. P. Levi, N. P. Myhrvold, and R. F. Rashid, “The Tiger Video Fileserver,” Proc. Sixth Int'l Workshop Network and Operating System Support for Digital Audio and Video, Apr. 1996.

[4]

M. M. Buddhikot and G.M. Parulkar, “Efficient Data Layout,Scheduling and Playout Control in MARS,” Proc. Fifth Int'l Workshop Network and Operating System Support for Digital Audio and Video, 1995

[5]

A. Dan, D. Sitaram, “A Generalized Interval Caching Policy for Mixed Interactive and Long Video Workloads”, IBM Research Division, RC 20206 (89404), 9/28/95

[6]

C. Griwodz, M. Bar, and L. C. Wolf, “Long-term Movie Popularity Models in Video-on-Demand Systems or the Life of an On-Demand Movie,” Proc. Multimedia 97, ACM Press, New York, 1997, pp.349-357.

[7]

J. Gafsi, E. Biersack, “Data striping and reliability aspects in distributed video servers,” Cluster Computing 2(1), pp. 75-91, 1999,

[8]

J. Y. B. Lee, and P. C. Wong, “Performance Analysis of a Pull-Based Parallel Video Server”, IEEE Trans. on Parallel and Distributed Systems, vol.11 pp.1217-1231, Dec 2000.

[9]

N. Venkatasubramanian and S. Ramanthan, “Load Management in Distributed Video Servers,” Proc. 17th Int’I Conf. On Distributed Computing Systems, IEEE Computer Society Press, Los Alamitos, Calif., 1997, pp.528-535.

server nodes S[0]

S[1]

S[2]

S[3]

S[4]

mi[0] mi[5] mi[9] mi[10] mi[15]

mi[1] mi[6] mi[8] mi[11] mi[16]

mi[2] mi[7] mi[7] mi[12] mi[17]

mi[3] mi[8] mi[6] mi[13] mi[18]

mi[4] mi[9] mi[5] mi[14] mi[19]

Figure 12:

6.

mirror symmetrical pair

Data placement of mirror SPS

Conclusions and Future Work

In this paper, we study the conception of intra-movie skewness and analyze its characteristic by means of the log data of a video server. Intra-movie skewness caused by different viewing time leads to access number discrepancy among movie segments, which results in load imbalance problem in parallel video servers. According to our analysis result about intra-movie skewness, we propose Symmetrical Pair Scheme that has better balancing

0-7695-1573-8/02/$17.00 (C) 2002 IEEE