Abstract:
A method of distributing load amongst two or more computer system resources. The method includes distributing load to the system resources in accordance with their modeled response times and a predetermined Service level Agreement (SLA) associated with each system resource. By modeling the response time of each resource, load can be distributed with a view to maintaining response times within a predetermined Service level Agreement (SLA). The response time may be modeled by analytical modeling, which uses a queuing network model for predicting the response time, typically along with other parameters such as, utilization, throughput and queue length.

Description:
FIELD OF THE INVENTION  
       [0001]     The present invention relates to a method of distributing load amongst two or more computer system resources.  
       BACKGROUND OF THE INVENTION  
       [0002]     Load balancing is used to distribute load among compute servers to ensure that no one server is overloaded. There are basically two categories of load balancing techniques: static and dynamic.  
         [0003]     In static load balancing, a fixed technique is used to distribute the load. Examples are round robin techniques where the next transaction is allocated in round robin fashion to the servers. These techniques do not take into account the variation in the requests and the different loads therein.  
         [0004]     In dynamic load balancing, the state of the system is taken into account when scheduling the next transaction. Most of the measures are performance measures (like CPU utilization) or the number of requests being currently served by an application.  
         [0005]     An example of a previous load balancing technique is given in “The Case for SRPT Scheduling in Web Servers”, Mor Harchol-Balter, Mark Crovella, SungSim Park, MIT-LCS-TR-767, October 1998, available online at http://www-2.cs.cmu.edu/˜harchol/Papers/papers.html  
         [0006]     The assumption in previous load balancing techniques is that all the servers in the load balanced pool are of the same type. If this is not the case, it is difficult to load balance using performance measures that are not normalized. For instance, a high end server with 95% CPU utilization may be able to serve a request faster compared to a low end server with 80% CPU utilization.  
         [0007]     Service Level Agreements (SLAs) are commonly provided which determine a minimum level of service to be provided by a computer system. Each SLA will include a maximum response time which is permitted under the SLA.  
         [0008]     An object of the invention is to provide an alternative load balancing technique which takes resource response times into account in order to comply with SLAs.  
       SUMMARY OF THE INVENTION  
       [0009]     The invention provides a method of distributing load amongst two or more computer system resources, the method including distributing load to the system resources in accordance with their modeled response times and in accordance with a predetermined Service Level Agreement (SLA) associated with each system resource.  
         [0010]     The invention also provides a load distributor configured to distribute load amongst two or more computer system resources by this method. The load distributor may be provided in a load balancer, in cluster software, in a computational grid in which servers loan free CPU cycles, or in any other suitable computer system environment.  
         [0011]     By modeling the response time of each resource, load can be distributed with a view to maintaining response times within the predetermined SLA.  
         [0012]     In a preferred embodiment the load is distributed amongst the system resources in accordance with the difference between their modeled response times and their predetermined Service Level Agreements (SLAs). This enables the method to take into account a request which does not have the same SLA for each resource.  
         [0013]     Typically the response time is modeled by analytical modeling, which uses a queuing network model for predicting the response time, typically along with other parameters such as, utilization, throughput and queue length. This enables the method to take into account queues that are forming in the system. An online book of queuing theory modeling for computer systems can be found in the text book “Quantitative system performance: computer system analysis using queuing network models”, by Edward D. Lazowska et al, Prentice Hall, Inc, 1984, ISBN 0-13-746975-6, also available at http://www.cs.washington.edu/homes/lazowska/qsp/. However other ways of obtaining response time may be used, for example by simulation.  
         [0014]     The computation is usually done in iterative fashion, calculating queues at each iteration. This is not only at the server level but can also be at an application level.  
         [0015]     For example, in the Apache server, a master process receives all the requests and forks child processes to service the requests. Queues could form at the master process. Such queues can be modeled after understanding the application architecture.  
         [0016]     In a preferred embodiment the modeling is performed by running a Mean Value Analysis (MVA) algorithm.  
         [0017]     Typically the method includes receiving a request; receiving modeled response times for each system resource for processing the request; selecting one of the system resources in accordance with their modeled response times and in accordance with their predetermined Service Level Agreements (SLAs); and distributing the request to the selected system resource.  
         [0018]     The invention further provides a computer system including two or more system resources, two or more agents each configured to model the response time of a respective system resource; and a load distributor configured to receive modeled response times from the agents and distribute load to the system resources in accordance with their respective modeled response times and in accordance with a predetermined Service Level Agreement (SLA) associated with each system resource. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0019]     Embodiments of the invention will now be described, by way of example only, with reference to the accompanying drawings in which:  
         [0020]      FIG. 1  is a schematic diagram of a computer network;  
         [0021]      FIG. 2  is a schematic diagram of a server; and  
         [0022]      FIG. 3  is a flowchart illustrating the processes followed by the load balancer. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0023]     Referring to  FIG. 1 , a computer system  1  includes a number of servers  2 ,  3 ,  4  etc. Incoming requests are distributed among the servers by a load balancer  5 .  
         [0024]     Each server  24  can be modelled schematically as shown in  FIG. 2 , and contains a number of server resources including a CPU  6 , and disks  7 .  
         [0025]     Each application received by the load balancer comprises a series of processes. Each process is executed by utilising one or more of the server resources. It is assumed that any one process will only be utilising one of the server resources at any one time. Each resource includes a queue  8  for holding processes waiting to be executed.  
         [0026]     Associated with each application is one or more Service Level Agreements (SLAs). In most cases the application will have only a single SLA which is the same for all servers. For example the SLA for the application may be R seconds i.e. the application must take less than or equal to R seconds for execution. However in rare cases the application may have different SLAs on different servers. For example one server may have a bigger memory cache than the others, or is itself faster, so may be expected to return responses faster than the other servers. In this case the SLA for that server will be shorter than for the other servers.  
         [0027]     The load balancer  5  hosts a capacity planning engine computer program which is arranged to run the process illustrated in  FIG. 3 .  
         [0028]     A request arrives (perhaps a web server request) which is forwarded to the load balancer  5  (which could be in hardware or software). Associated with the request is SLA data  13 .  
         [0029]     The load balancer  5  contacts an agent  20 - 22  on each server, and each agent quickly calculates (using queuing theory modeling) the modeled response time if the request is sent to that server.  
         [0030]     Referring to  FIG. 3 , each agent  20 - 23  takes system and application metrics  10 . The system metrics may be for example the number of servers, and the arrangement of resources for each server. The application metrics are described in more detail below. The agent then runs a Mean Value Analysis (MVA) algorithm  11  that outputs utilizations, response times and throughputs  12 .  
         [0031]     Suitable tools for capacity modeling include BMC Predict and the Teamquest tool. A good overview of capacity modeling generally (“How to do Capacity Planning”) is available at http://www.teamquest.com/pdfs/whitepaper/tqwp23.pdf. Further information is also available at http://www.teamquest.com/resources/cpwhitepapers.shtml and in the paper “Web Transaction Analysis and Optimization (TAO)” by Pankaj K. Garg et al, available online at http://www.hpl.hp.com/techreports/2002/HPL-2002-45.pdf.  
         [0032]     The system and application metrics  10  are gathered by HP OpenView Performance agent. The application metrics include the parameters Alive Population, Active Population, and Completed Population, as defined below.  
         [0033]     Each agent monitors its respective server over a measurement interval which is referred to below as the parameter Measurement Interval. In case of the OpenView performance tools, the measurement interval for process metrics is one minute and for other metrics is five minutes. During this interval, some processes will be created and some will be completed. Thus at any time during the measurement interval there will be a number of processes which are alive, that is they have been created but not yet completed. Say, at the start of the interval there may be 20 alive processes, during the interval 20 more are created and 10 are completed. So at the end of the hour there are 30 alive processes and 10 processes have been completed. The parameter Alive Population is the sum of the ratio alive-process-time/Measurement Interval for every process belonging to a given application, where alive-process-time is a parameter indicating the amount of time during the measurement interval in which the process is alive. The parameter Active Population is the sum of the ratio active-process-time/Measurement Interval for every process belonging to a given application, where active-process-time is a parameter indicating the amount of time during the measurement interval in which the process is consuming server resources. For example Active Population may have a value of 20.  
         [0034]     The parameter Completed Population is defined as the total number of processes that completed during the measurement interval.  
         [0035]     Table 1 below illustrates a four second interval for two processes, A &amp; B, for an application.  
                                                                       TABLE 1                                       Time (seconds)                    1   2   3   4                        Process A   Alive   Alive   Alive   Alive       Process B   Alive/CPU   Alive/CPU   Alive   Dead                  
 
         [0036]     Process A is alive for the entire four second interval but consumes no resources. A&#39;s contribution to Alive Population is 4*¼. A contributes 0*¼ to Active Population. B&#39;s contribution to Alive Population is 3*¼. B contributes 2*¼ to Active Population. Thus, for this interval, Active Population is 0.5 and Alive Population is 1.75. Because a process may be alive but not active, Active Population will always be less than or equal to Alive Population.  
         [0037]     The parameter Completed Population for the measurement interval of Table 1 is 1 since process B died in the last second of the interval.  
         [0038]     The measured response time is calculated from the performance metrics directly as follows: 
        1. Calculate the measured throughput of an application as: Measured Throughput=(Active Population+Completed Population)/Measurement Interval     2. Measured Response Time=Active Population/Measured Throughput        
 
         [0041]     The parameter Modeled Response Time is calculated by performing MVA modeling on the basis of the system and application metrics  10 . The application metrics include the parameters Alive Population, Active Population, and Completed Population as defined above, for each application currently being handled by the system. The metrics also include a parameter Application Service Demand which indicates the demand of a particular application. As part of the modeling process, a parameter Average Queue Length is calculated. This is the queue length averaged over all server resources and all applications for the measurement interval. For each application, a parameter Modeled Response Time can be calculated as Modeled Response Time=Application Service Demand* (1+Average Queue Length).  
         [0042]     The parameter Modeled Response Time is essentially the time to service all the applications in the queue+the time taken to service the current application.  
         [0043]     The modeled throughput can then be calculated as Active Population/Modeled Response Time.  
         [0044]     After modeling, models are usually calibrated (by introducing suitable delays) to make Modeled Response Time close to Measured Response Time.  
         [0045]     The load balancer  5  calculates the parameter SLA miss, in step  14  of  FIG. 3 , and outputs at step  15 . SLA miss is defined as:
 
 SLA  miss=Defined  SLA −Modeled response time
 
         [0046]     The load balancer  5  forwards the request to the server whose performance would be least affected (i.e. the server with the highest value of SLA miss). A positive SLA miss means SLA will not be affected; a negative one means it will be affected in which case the request is forwarded to the one with the least negative value of SLA miss.  
         [0047]     The invention is described above in the context of a load balancer. However the invention may also be implemented in the following systems.  
         [0048]     In a first alternative example the invention may be implemented in cluster software that migrates processes based on load. Migration involves moving a process to a different cluster node when the load on a node goes up. The load could be computed from simple metrics (such as CPU utilization) or in a more complex way (using capacity modeling). OpenSSI uses technology from the MOSIX project to perform load leveling (see http://www.samag.com/documents/s=8817/sam0313a/0313a.htm for an overview). The process is stopped on the current node and restarted from the next instruction on a different node (decided by the load leveler).  
         [0049]     Load balancing mechanisms can be implemented for cluster nodes if they run horizontally scaling applications (applications that can be scaled by creating more instances of the application/server such as a web server). For example, in HP&#39;s OpenSSI cluster(http://openssi.org/) is integrated with the Linux Virtual Server (LVS) to load balance web servers in the cluster. HP&#39;s OpenSSI software migrates processes from one cluster node to another based on a simple notion of load (the run queue length on the cluster node). Better migration decisions can be taken if load balancing is done with capacity evaluation inputs.  
         [0050]     In a second alternative example. the invention may be implemented in a computational grid in which servers loan free CPU cycles. How many cycles to loan is a tricky decision. The decision could be made on the basis of analytical modeling.  
         [0051]     While the present invention has been illustrated by the description of the embodiments thereof, and while the embodiments have been described in considerable detail, it is not the intention of the applicant to restrict or in any way limit the scope of the appended claims to such detail. Additional advantages and modifications will readily appear to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details representative apparatus and method, and illustrative examples shown and described. Accordingly, departures may be made from such details without departure from the spirit or scope of applicant&#39;s general inventive concept.