Journal of Information & Computational Science 8: 10 (2011) 1901 1908 Available at http://www.joics.com Dynamic Adaptive Feedback of Load Balancing Strategy Hongbin Wang a,b, Zhiyi Fang a,, Shuang Cui a a College of Computer Science and Technology, Jilin University, Changchun 130012, China b School of Computer Science and Technology, Changchun University of Science and Technology Changchun 130022, China Abstract Cluster of load balancing strategy is the key to improve cluster s performance. In this paper, we propose the dynamic adaptive feedback of load balancing strategy. The value of server performance and the value of server nodes dynamic load as assessment the server nodes load capacity indicators. The sub-server nodes adaptively collect their own load information, and then make load information sending to the load balancer. It reduces communication overhead and reduces the burden of the load balancer. To avoid the load balancer and single server node instantaneous overloading, this paper introduces the parameter of server node load redundancy. The load balancer according each node s weight information distributes task; effectively addresses the cluster inner server node s load balancing issue. Keywords: Load Balancer; Dynamic Adaptive; Load Redundancy Value; Binary Sort Tree 1 Introduction At present, the major areas of network, such as the enterprise networks, campus networks and wide area networks, the development of volume of business has gone beyond the past estimate, which is the most considerable estimate. The new network technology rapidly advance, the optimality network configuration is also not well supported the rapid development needs of the network applications. In fact, the internet scale will be doubled in every hundred days. The customers want to get the 7*24 hours of uninterrupted application and faster system response time, and they wouldn t like to frequently see a site system occurs problem. Especially, with the sharp rise in all kinds of traffic, data traffic flow and accessing number rapid expansion, the network data traffic, the solving problem capacity and the calculation relative intensity gradually expanded. The single device unable to undertake such big carrying capacity. How to reasonable and effective distribution the volume of business for network worth consider. It can help to solve a problem, which is some devices are busy, while the other equipments are idle. This problem is needs to be resolved. So, with a series of urgent problems need to be solved, the load balancing mechanism is appearing [1]. Project supported by the SME Innovation Foundation of China (No. SC0701002). Corresponding author. Email address: fangzy@jlu.edu.cn (Zhiyi Fang). 1548 7741/ Copyright 2011 Binary Information Press October 2011
1902 H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 The traditional Web requests allocation algorithm is mainly based on access requests Poisson arrival and corresponding time exponential distribution to assumes, the commonly used Round- Robin (Round-robin), Weighted Round-robin (Weighted Round-robin), the Least-connection Scheduling (Least-connection) and the weighted Least-connections Scheduling (Weighted Leastconnection) [3], and so on. As more and more web pages using dynamic embedded object technology and database query tasks, making different task requests have different workloads. Between static pages and dynamic web pages have 10 times or 100 times difference [4]. Meanwhile, the nodes in the cluster have difference performances that the same task request in different servers have different impact. Therefore, how to accurately assess the workload on the server has become the key to achieve load balancing cluster. These algorithms do not take into account the user tasks requests difference and each node server cluster performance differences, these algorithms only use a small amount of static characteristics of information, suitable for small-scale, single-configuration static pages information service system [5]. These algorithms can only be approximate load balanced distribution, and can not effectively solve the cluster server load balancing problems. These load balancing algorithms can not take full advantage of the processing power of each node server. The dynamic load balancing method is more advantages than static load balancing approach [2]. For example, the common dynamic load balancing algorithm which is weighted least-connection algorithm, each server node with the corresponding weight shows the processing performance, the value is W=C/R, where C is the performance of the server node, R is the current request tasks connected number, the algorithm based on the number of server connection request and sub-task performance as server node indicator parameter to assign task. When increasing the number of concurrent connection requests, the load balancer is also increasing its processing tasks, the load balancer will cause excessive load on their own, and result the load balancer becomes bottleneck of the system services. In this paper, we propose the dynamic adaptive feedback of load balancing strategy. The value of server performance and the value of server nodes dynamic load as assessment the server nodes load capacity indicators. The sub-server nodes adaptively collect their own load information, and then make load information sending to the load balancer, avoid load balancer overloading lead to system bottleneck; reducing the complexity of load balancing algorithm. Effectively addresses the cluster inner server node s load balancing issue. The rest of this paper is organized into four sections. In Section 2, the major issues and challenges in designing dynamic adaptive feedback of load balancing strategy is listed. In Section 3, the weight sorting algorithm will be explained briefly. In Section 4, the performance test for dynamic adaptive feedback of load balancing strategy. In Section 5, concludes the paper. 2 Dynamic Adaptive Feedback of Load Balancing Strategy The dynamic load scheduling strategy has two ways: the first is the centralized load scheduling strategy, the second is distributed load scheduling strategy. The load balancer is responsible for collecting sub-server nodes information is centralized scheduling strategy, if the sub-server nodes self-adaptive collects their information, and then according to its own state initiative sends the information to the load balancer, this is called distributed load scheduling strategy. The load scheduler based on the current sending information to execute decision-making and scheduling.
H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 1903 The load scheduler does not go to collect their server information, thus reducing the load which comes collecting the additional traffic information overhead, reduces the burden of the load scheduler. Therefore, the load balancer needs to accord a certain algorithm to detect current server node actual load, and forecasts load redundancy for each server node within the time slice T. How to correctly detect each server node s true load? Firstly, we must consider the server node itself performance, where the introduction of server performance indicators, including CPU frequency, memory capacity, the system I/O utilization, number of processes, response time, network bandwidth, and so on. Secondly, we calculate the dynamic load value of each server node, where the load indicator parameters, including the rate of CPU occupy, the memory utilization, the system I/O utilization, total number of processes, response time and the rate of network bandwidth occupy, and so on. Finally, we should consider that every parameter actual change in a certain period of time, given a reasonable algorithm to determine the weight of each server node, achieved the cluster system load balancing. 2.1 Server Node Parameters Definition We assume server performance indicator is P(S i ), where S i is the server node i, iin(1 n), A = 1. P (S i ) = A 1 P cpu (S i ) + A 2 P memory (S i ) + A 3 P io (S i ) + A 4 P process (S i ) + A 5 P net (S i ) + A 6 P response (S i ) (1) where P cpu is CPU frequency, P memory is memory capacity, P io is the speed of system I/O, P process is the total number of processes, P net is network speed, P response is the response time. We want to detect each server node real load information, the sever node must real-time feedback the node load value, as it is real-time feedback information, every time T, the server node collects the node load value, we assume the server load value is L(S i ), and introduces dynamic parameters to calculate the node load value. In experiment, we select the dynamic parameters including the rate of CPU occupy, the memory utilization, the system I/O utilization, total number of processes, response time and the rate of network bandwidth occupy, we also give each parameter set a coefficient A( A=1), the users can set and change the A value in the actual test system environment, the dynamic load information much more real, to achieve the system best. We assume the server real dynamics load value is L(S i ), where S i is the server node i, i (1 n), A = 1. L(S i ) = A 1 L cpu (S i ) + A 2 L memory (S i ) + A 3 L io (S i ) + A 4 L process (S i ) + A 5 L net (S i ) + A 6 L response (S i ) (2) where L cpu is the CPU utilization, L memory is the memory utilization, L io is I/O utilization, L process is the total number for process, L net is the network utilization, L response is response time. When the server node access the cluster system, each node records its own static parameters, calculated the server performance indicator P, submitted P to the load balancer, from now on, every other time slice T, the sub-server nodes sends its load information L to load balancer.
1904 H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 2.2 Load Balancing Optimization Idea The load balancing strategy features that a certain moment the load balancer receives request task information, according to sub-node receives the current load information, the load balancer selects the lightest load sub-node to distribute tasks.the sub-node sends its current information in a fixed time interval T, if there are more than one task scheduler request arrive the load balancer at any time within the time slice T, the load scheduler recorded sub-nodes load information have not been updated, the load scheduler stored each service node s machine performance P and load L were not changed, if the load scheduler according this load information distribution tasks requests, all the requests are assigned to a sub-server node, it may cause a single node excessive load, resulting overload. Therefore, when the load balancing strategy takes into considering the server performance and server load information, it must also consider a few questions in the time slice T: (1) Within the time slice T, the sub-server nodes may be part of the job task request has been completed, so that the node load is reduced or even idle, the performance of each sub-server nodes, load state change and the current load information is linked to each other. The sub-server nodes load under a certain circumstances, because of the server machine has different performance, the server node handle the request task ability also difference; (2) Within the time slice T, the task requests sends to load balancer, at this time load information of each node is not updated, every time the load balancer assigned task to each sub-node will increase the node load value. We introduce a parameter load redundant R, to more accurately records the task request, effectively predicts each node load capacity, while minimizing the complexity of the algorithm, and use it to measure each sub-server nodes can increase the load capacity in one time, the load capacity of its own to make effective predictions. The load redundant R and machine performance P, the node load values L, time t and the increase number of requests X n have a certain relationship, we assume the sub-server nodes load redundant values as follows: R(S i ) = R n + K 1 t P (S i )/L(S i ) K 2 X n /P (S i ) (3) where R n is the last time slice arrives, the server node send load redundancy, K 1 t P (S i )/L(S i ) starting from the last time slice, in the time t completion load, K 2 X n /P (S i ) is t time in the sub-server nodes for each request to add new tasks to increase the load, X n is the number of task requests. The load balancer collects each sub-server nodes load information, related to the acquisition time, in the actual experimental environment, if so often to collect the sub-server node load information will also increase the burden on each node. On the other hand, each sub-node collects related parameters of the load information, if the frequency of collection, then all the relevant parameters is changing in real time, which will lead to the sub-server nodes load information appear drastic shake. Therefore, to avoid this from happening, the acquisition time period should not too long or too short, usually the acquisition time period is set to 5 to 10 seconds is appropriate. In this experimental environment, we set the acquisition cycle time slice T=10s, every 10s, each sub-server nodes sends load information to load balancer. According to the above formula for load redundant R, the initial value of R should be: R 0 = 10 K 1 P (S i )/L(S i ) K 2 /P (S i ) (4)
H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 1905 where R 0 is the first time slice T completed, the each server current load redundancy. In order to make an effectively predicting load capacity of the sub-server nodes, sets a minimum load redundancy R min, when the load redundant of sub-server node is greater than current load redundant R min, the sub-server node has rights to assigned the task request, so that the sub-server nodes have a load redundant free to avoid itself excessive load appears. When the server node processed a task, it is load redundant value should be amended: R = R i + K 1 t P (S i )/L K 2 /P (S i ) (5) When completed a task for each treatment, the load redundant value is automatically changed once. In the acquisition cycle time slice T, There isn t new load information sending to the load balancer, L(S i ) is the last time slice arrived data, so every time after a task completed, L values will be changed once, estimated the current node value of node load, L value amended as follows: L = L(S i ) K 1 t P (S i )/L(S i ) + K 2 /P (S i ) (6) When a new time slice arrives, the sub-server node sends the current accurate load information to load balancer, then the next time slice will be the new L(S i ) started to re-estimate calculation. The chip in the acquisition cycle time, as much as possible to estimate the node load value and the true load redundancy. 2.3 Weight Calculation The server performance and dynamic load value has a corresponding calculation methods, combination of these two important parameters to more accurately estimate the current server node load capacity, we assume the weight W: W (S i ) = L(S i )/P (S i ) (7) The server performance using the static parameters of P, when the server node access the cluster to collects load information, The dynamic load value L is the nodes current load state, L is larger, the load number of tasks is greater. Therefore, W is greater, the current server node s load is greater, it can be assigned tasks are smaller because of the load capacity is weak. 3 The Weight Sorting Algorithm 3.1 The Binary Sort Tree Feature The properties of BST can be obtained: (1) The any node x of Binary sort tree, its left (right) sub tree of any node y (if it is present) the keywords must be small (large) the x keywords. (2) Binary sort tree, each node keywords is unique. In practice application, we can not guarantee the data set elements keywords different from each other. So, in the binary sort tree definition, we can make the less than amend to greater than or equal of BST s character (1), or make
1906 H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 the greater than amend to less than or equal of BST s character(2), and even to modify these two characters simultaneously. (3) According to middle order traversal the tree resulting middle order sequence which is an increase sequence [7]. 3.2 Algorithm Process (1) Binary sort tree: for (i =0; i< MAX CLIENT;i++) { } if (R(S i ) R min ) { } else Then the node is not inserted into a binary tree; insert the node; All nodes in the left sub tree are less than the root value; All nodes in the right sub tree are greater than the root value; (2) Order traversal binary sort tree According to the nature of binary sort tree, the order traversal results is an increasing sequence, the weight of each server node will order from small to large. (3) Allocation tasks According to the order traversal results, followed allocate tasks to node, after assigned tasks to nodes, the value of load redundancy R and load L is changed Cycle the above operation. The process figure shows as Fig. 1. 4 Performance Test We use NAT structure construct a LVS cluster [10], which has 3 node servers. The node server respectively configures with dual-cpu server, single-cpu server and ordinary PC. Another using 2 PC as a client to simulate the stress test for cluster, the stress testing tool is JMeter. We divide 7 groups tested in simulation, the first group of 100 user requests, next is 200, 300, 400, 500, 600, 700 access request, we respectively measure the response time of user request for the current system. The comparison test selects algorithm between weighted Round-Robin and dynamic adaptive feedback method. The users request response time of weighted Round-Robin and dynamic adaptive feedback method are shown as Table 1. By Fig. 2 Comparison of the response time of user requests reflect their impact on system throughput. With the number of user requests increased the dynamic adaptive feedback load
H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 1907 Start N Calculate R(S i ) Allocates task to node N R(S i )>R min? Y Node inserts into binary tree Request is over? Y End Fig. 1: Algorithm process 2000 1800 1600 Weighted round-robin Dynamic adaptive feedback Response time (ms) 1400 1200 1000 800 600 400 200 0 100 200 300 400 500 600 700 Current connections Fig. 2: Comparison of the response time Table 1: Response time of user requests (ms) 1 group 2 group 3 group 4 group 5 group 6 group 7 group CurrentConnections 100 200 300 400 500 600 700 W eightround Robin 90 151 343 607 952 1366 1865 DynamicAdaptiveF eedback 122 167 314 513 790 1087 1463 balancing strategy significantly improves the system throughput, better balance the system load, and effectively improves the overall cluster system performance.
1908 H. Wang et al. / Journal of Information & Computational Science 8: 10 (2011) 1901 1908 5 Conclusion This paper proposed dynamic feedback load balancing strategy. The traditional collected load information of all nodes by load balancer in a centralized scheduling working was improved, every node server submits its own dynamic load information to load balancer, and it reduces communication overhead and reduces the burden of the load balancer. To avoid the load balancer and single server node instantaneous overloading, this paper introduced the parameter of server node load redundancy, effectively predicts the load capacity of each node. We utilize the middle order traversal binary tree sorting algorithm sorts the nodes weight, then the load balancer distributes task to sub-server nodes. By experiment comparing between weighted Round-Robin and dynamic adaptive feedback load balancing strategy, the dynamic adaptive feedback load balancing strategy effectively improved the system s load balancing capabilities. References [1] Mark Baker, Cluster Computing White Paper, University of Portsmouth, UK, 2000 [2] V. Cardellini, M. Colajanni, P. S. Yu, Dynamic load balancing on web server systems. IEEE internet Computing, 8(6), 1999, 34-35 [3] M. Colajanni, et al, Dynamic load balancing in geographically distributed heterogeneous web servers, in: Proc. of 18th IEEE Int 1 Conf. On Distributed Computing System (ICDCS 1998), Amsterdam, the Netherlands, 1998, 295-303 [4] Iyengar Arun, MacNair Ed, Nguyen Thao, An analysis of web server performance, In: Proceeding of Global Telecommunications Conference, 1997, 1943-1947 [5] Casslicchio Emiliano, Tucci Salvatore, Static and dynamic scheduling algorithm for scalable web server farm, In: Proceedings of the IEEE 9th Euro micro Workshop on Parallel and Distributed Proceeding, 2001, 369-376 [6] Hideo Taniguchi, Parallel Processing and Distributed Processing, Japan: Corona Publishing Co, LTD, 2003, 38-50 [7] Mark Allen Weiss, Data Structures and Algorithm Analysis in C (Second Edition), 128-140 [8] Xiaofang Zhang, Guozheng Hu, High-availability clustering technology research and application, Computer Engineering, 29(4), 2003, 26-37 [9] R. B. Bunt, D. L. Eager, F. M. Sstart, et al, Archiving load balancing and effective caching in clustered web servers, Proc of the 4th International Web Caching Workshop, 1999, 19-20 [10] http://www.linuxvirtualserver.org/zh/index.html