Dynamically modifying the resources of a virtual server6985937Abstract A system and a method dynamically adjusts the quality of service guarantees for virtual servers based upon the resource demands experienced by the virtual servers. Virtual server resource denials are monitored to determine if a virtual server is overloaded based upon the resource denials. Virtual server resources are modified dynamically to respond to the changing resource requirements of each virtual server. Occasionally, a physical host housing a virtual server may not have additional resources to allocate to a virtual server requiring increased resources. In this instance, a virtual server hosted by the overloaded physical host is transferred to another physical host with sufficient resources. Claims What is claimed is: Description CROSS REFERENCE TO RELATED APPLICATIONS
The virtual servers 162 each may consume a different amount of the resources of the physical host machines 160. The resources of a physical host machine comprise the set of functions and features the physical host machine uses in implementing tasks for each virtual server. Examples of resources include disk space, memory, network capacity and processing cycles (CPU resources). As shown in FIG. 1, virtual server 162A consumes 15% of the physical host 160A resources. This means that 15% of physical host 160A's disk space, memory, network bandwidth, and CPU processing will be dedicated to servicing the needs of virtual server 162A. A variety of other types of physical host resources will be evident to one of skill in the art. A resource allocation for a virtual server is specified as a "quality of service guarantee" for that particular server. Each physical host stores quality of service guarantees for the virtual servers it hosts. As a physical host performs processes associated with a particular virtual server, the physical host accesses the stored quality of service information to enable the physical host to request the correct quality of service from the operating system kernel of the physical host. One implementation for storing quality of service guarantee information is a quality of service parameter table. A quality of service parameter table in each physical host 160 associates each virtual server 162 resident in the particular physical host 160 with quality of service parameters. These parameters are used to allocate physical host 160 resources for each resident virtual server 162. For example, physical host 160A includes a quality of service parameter table, which lists resident virtual servers 162A and 162B. The parameter table lists whatever virtual servers are resident in the physical host. As virtual server resource allocations are changed, and as virtual servers are transferred between physical hosts, the corresponding quality of service parameter tables are updated to reflect these changes and transfers. In another embodiment, a single master quality of service parameter table can coordinate multiple slave tables associated with each physical host. Dynamic resource configuration module 100 includes a virtual server resource monitor 110, a virtual server resource modifier 120, a physical host load balancer 130, a dynamic virtual server mover 140, and a file system 150. In one embodiment, these modules are portions of the software code implementing the dynamic resource configuration module 100. The dynamic resource configuration module 100 is further communicatively coupled to each physical host 160. The virtual server resource monitor 110 monitors the resource usage of the virtual servers 162 to determine if they are overloaded. The virtual server resource modifier 120 dynamically modifies the resource allocations of the virtual servers 162 on an as-needed basis. The physical host load-balancer 130 periodically monitors the resource usage of the physical hosts 160, and uses the dynamic virtual server mover 140 to transfer virtual servers 162 between physical hosts 160 as needed to balance the loads of the physical hosts 160. The file system 150 is used for storing state information associated with a particular virtual server 162 when transferring the particular virtual server 162 to a different physical host 160. In another embodiment, the file system 150 is not used, and state information is copied directly from one physical host to another physical host to transfer a virtual server. FIG. 2A is a flowchart of an embodiment of the overall process for dynamically modifying the resources of a virtual server. Virtual server resource denials are monitored 210. Resource monitoring is performed using the selective interception of system calls. One embodiment of selectively intercepting system calls is disclosed in the related application, the subject matter of which is incorporated herein by reference. Each resource (e.g., disk space, memory, network bandwidth, or CPU cycles) used by a virtual server is monitored to determine the time at which the resource is fully used, that is, the point at which a request for more resources is either implicitly or explicitly denied. Examples of resource denials include a memory allocation request denial and a network packet delay signal. A determination is made 220 as to whether a particular virtual server resource is overloaded. The number of times a particular resource denial is received in a time window is averaged using one of a number of well-known techniques. If the average number of denials is beyond a pre-configured threshold, the virtual server is determined 220 to be overloaded for the corresponding resource. If the virtual server is not determined to be overloaded, the method continues to monitor 210 virtual server resource denials. If the virtual server is determined to be overloaded, a determination is made 230 as to whether the corresponding resource of the physical host hosting the virtual server resource is also overloaded. For example, referring to FIG. 1, if it was determined that a resource for virtual server 162B was overloaded, module 100 would then check to see if that same resource was overloaded for physical host 160A which contains virtual server 162B. A physical host 160 resource is determined to be overloaded if the physical host 160 does not have enough of the particular resource unallocated to the resident individual virtual servers 162 to service the resource increase request. The physical host resource is overloaded if: For example, assume virtual server 162B requests an additional memory allocation of 1 megabyte. If physical host 160A has only 100 kilobytes of memory available (the rest already having been allocated to virtual servers 162A and 162B), then physical host 160A cannot service virtual server 162B's request and physical host 160A is considered overloaded. This same principle may be extended to other types of resources. If the particular physical host resource is not determined to be overloaded the virtual server resource allocation within the physical host is increased 240. The method then continues to monitor 210 virtual server resource denials. However, if the physical host is determined to be overloaded, a new physical host is selected 250 to accommodate the overloaded virtual server and its required resource increases. A variety of different fitting heuristic methods may be used to select a new physical host to execute the virtual server. For example, a first fit method may be used, wherein the first physical host 160 determined to have enough extra resources to accommodate the overloaded virtual server 162 is selected. In a best fit method, the physical host 160 with available resources most closely matching the resource needs of the overloaded virtual server 162 is selected. In an easiest fit method, the physical host 160 with the most available resources is selected to accommodate the overloaded virtual server 162. For the following discussion, assume that physical host 160A is overloaded, and new physical host 160B has been selected to receive virtual server 162B. Once the new physical host 160B has been selected 250, the virtual server 162B is moved 260 to the new physical host 160B. The virtual server 162B is also allocated its required resource increase. In one embodiment, the old overloaded physical host 160A places state information for the virtual server 162B being transferred into a common file system 150, e.g. in a configuration file or other system file. The new physical host 160B accesses the state information and restarts the virtual server 162B as resident in the new physical host 160B. In another embodiment, the virtual server 162B files are copied directly from the old physical host 160A to the new physical host 160B. Once the virtual server information transfer is complete, the old physical host 160A has one fewer virtual server, and the new physical host 160B has one additional virtual server. The quality of service tables for both the old and new physical hosts are modified 260 to reflect this change. The quality of service table entries for virtual server 162B will also reflect the virtual server's resource increase. The virtual server user is transferred 270 from the old physical host (160A) to the new physical host (160B) by transferring the virtual server address. The transfer process may use either "break, then make" timing, or "make, then break" timing. The timing of the transfer process determines whether all processes and configuration information associated with the virtual server to be transferred are first shut down in the old physical host, or first started up in the new physical host, before the virtual server address is transferred. Transferring the virtual server address transfers the virtual server user from one virtual server location to another. For example, using "break, then make" timing, the virtual server 162B is first shut down in the old physical host 160A, a new virtual server is created in new physical host 160B and started up, and the virtual server 162B address is then transferred over to the new physical host 160B. In another embodiment using "make, then break" timing, a new virtual server is created in new physical host 160B and started up, the virtual server 162B address is transferred over to the new physical host 160B, and the virtual server 162B is then shut down in old physical host 160A. As used herein, the terms "customer," "user," and "virtual server user" refer to individuals or groups of individuals accessing the same virtual server. Typically, a virtual server "user" is a group of individuals with a shared association. For example, "user" may collectively refer to the employees of a company, or to certain employees within a division of a company. One company (a "customer") may have several different users, each corresponding to a different group within the company, and each having many different individuals. Additionally, a "user" may also refer to a single individual. The process for virtual server resource configuration is dynamic and ongoing during the operation of the virtual servers. After the virtual server user transfer 270 is completed, the process continues to monitor 210 virtual server resource denials. FIG. 2B is another embodiment of a flowchart of the process for dynamically modifying the resources of a virtual server. The method shown in FIG. 2B is similar to the method shown in FIG. 2A. However, the method of FIG. 2B includes three additional steps, steps 242, 244 and 246, which together provide a method for reclaiming unused virtual server resources. As before, virtual server resource denials are monitored 210. If a determination 220 is made that a particular virtual server resource is overloaded, and a determination 230 is made that the corresponding physical host resources are not overloaded, the virtual server resource allocation is increased 240. Next, a timer is set 242 for a pre-specified interval. Upon timer expiry, the method determines 244 whether the newly increased virtual server resource is currently operating at its resource limit. If one or more resource denial signals corresponding to the newly increased virtual server resource are received during the timer period, the virtual server is assumed to be operating at its resource limit. If the virtual server is determined 244 to be operating at its limit for a particular resource, the method continues 210 to monitor resource denials. However, if the virtual server is not operating at its limit for a particular resource, the method decreases 246 the virtual server resource allocation by a pre-specified amount. Steps 242, 244, and 246 allow the dynamic resource configuration module 100 to reclaim unused resources within the virtual server system, by temporarily increasing resources allocated to a virtual server as needed. In another embodiment, a recently transferred virtual server 162 may also allow unused resources to be reclaimed by the virtual server 162's new physical host. In this embodiment, step 270 would be followed by steps 242, 244 and 246. FIG. 3 shows an embodiment of one process for determining whether an individual resource in a virtual server has reached its resource limit. A virtual server resource monitor 110 receives a set of input signals 312 from a virtual server 162B. The virtual server resource monitor 110 processes these signals to determine if any resources from virtual server 162B are overloaded. If an overloaded resource is found, the virtual server resource monitor 110 sends a "resource overloaded" signal 350 to the virtual server resource modifier 120. Many different types of input signals 312 may be processed to determine if a resource is overloaded. The virtual server resource monitor 110 monitors different types of resource denials, which are instances wherein a request for additional resources is either implicitly or explicitly denied. FIG. 3 shows four examples of resource denial signals: a create file denial signal 312A generated, for example, by a lack of disk space, a memory allocation denial signal 312B, a network packet delay signal 312C generated by a lack of network bandwidth, and a central processing unit (CPU) process scheduling delay signal 312D generated by exceeding CPU usage limits. It is to be understood that there may be many other types of signals indicating an implicit or explicit denial of resources. The examples shown herein are used purely for illustrative purposes. In order to associate resource request denials with a particular virtual server executing in a physical host computer, certain selected system calls are intercepted. For example, not all CPU scheduling within the physical host computer is associated with a virtual server. The monitor 110 must be able to distinguish between resource requests made from virtual servers, and other resource requests. The monitor 110 must also be able to distinguish between resource requests made by different virtual servers within the same physical server. A system call performs some system operation, such as the access of a system hardware or software resource, when the system call is executed. In order to make a system call, arguments are programmatically loaded into specific registers of the central processing unit on which the operating system is executing. One of these arguments identifies the specific system call that is being made. This argument is typically in the form of a number that is an offset into the operating system interrupt vector table, which contains pointers to the actual executable code of the system calls. The other loaded arguments include parameters to be passed to the system call. Once the arguments have been loaded, a software interrupt is generated, signaling to the operating system that a process is requesting execution of a system call. The operating system reads the registers, and executes the requested system call with the specified parameters. The system call executes and performs the desired functionality. If the system call generates a return value, it places the generated return value (or a pointer thereto) in a pre-designated register where it can be accessed by the calling process. In order to intercept a system call, a pointer in an interrupt vector table to a system call is replaced with a pointer to alternative object code to be executed instead of the system call. Then, when the system call is made, the alternative object code will execute instead. The alternative object code is known as a system call wrapper. The method of the related application may be used to selectively intercept system calls such that a system call wrapper only executes when a system call is made by a select process associated with one of the virtual servers being monitored. When a system call is made by a non-select process, the default system call is executed. Furthermore, only certain types of system calls relating to resource allocation, as described above, are selectively intercepted. The system call wrapper for the intercepted system call allows the resource request by a particular virtual server and the resulting response to be monitored. Request denial responses are monitored by the virtual server resource monitor 110. As will be evident to one of skill in the art, the specific system calls to be monitored will be system-dependent, and may vary based upon the type of operating system and physical server machine being used. Each resource denial signal 312 is input into an individual resource denial table 320 for tracking purposes. Create file denial signals 312A are recorded in a disk denial table 320A; memory allocation denial signals 312B are recorded in a memory denial table 320B; network packet delay signals 312C are recorded in a network denial table 320C; and CPU process scheduling delay signals 312D are recorded in a CPU denial table 320D. A calculation 330 is performed on the signals stored in each table to determine the mean number of times a particular resource denial occurs in a pre-specified time window. Different time windows may be specified for each type of resource denial. The calculation of mean resource denials is performed individually for each different type of resource denial being monitored (330A, 330B, 330C and 330D). The mean number of resource denials may be calculated using one of several well-known techniques for averaging a signal rate over a period of time. Each technique determines whether the number of received resource denial signals a received in a particular time window t exceeds a certain threshold T: a(t)>T? In one embodiment, a "jumping-window" technique is used. The jumping-window technique measures the number of resource denials a received in consecutive windows of time length t. A new time interval t starts immediately after the end of the last time interval t. In another embodiment, a "moving-window" technique is used. The moving-window technique measures the number of resource denials a received in a continuously moving window of time length t. In the moving-windows technique, all windows of time length t are measured. The virtual server resource monitor 110 checks 340 if the metric a(t) calculated is beyond the pre-specified threshold T. This determination is made individually for each type of resource denial signal (340A, 340B, 340C and 340D), and need not be made simultaneously. Each different type of resource denial signal 312 may have a different pre-specified threshold T. If the metric a(t) representing the average resource denial rate does not exceed the threshold T, the method continues to calculate a(t) 330 so that resource denials are continuously monitored. Using the jumping-window technique, after the next consecutive time interval t passes, the method will again check 340 if a(t)>T. Using the moving-windows technique, a continuous loop of steps 330 and 340 is used to measure each continuously-moving window of time t. In another embodiment, a pre-specified schedule for repeating calculating mean resource denials 330 and checking 340 if the threshold T has been exceeded can be established to limit the amount of processing required by the virtual server resource monitor 110. However, if the metric a(t) does exceed the threshold T, a "resource overloaded" signal is sent 350 to the virtual server resource modifier 120. Each type of resource denial signal 312 has an associated resource overloaded signal. FIG. 3 shows four examples of resource overloaded signals: disk resource overloaded signal 350A, memory resource overloaded signal 350B, network resource overloaded signal 350C, and CPU resource overloaded signal 350D. It is to be understood that there may be many other types of signals indicating an overloaded resource. The examples shown herein are used purely for illustrative purposes. FIG. 4 shows a flowchart of an embodiment of a method for determining when to increase or decrease a particular resource allocation within a virtual server. The virtual server resource modifier 120 performs the method shown in FIG. 4. A separate analysis using the method of FIG. 4 is performed for each type of resource being monitored. The modifier 120 waits 410 to receive a resource overloaded signal 350 from the virtual server resource monitor 110. When a resource overloaded signal 350 is received, the modifier 120 checks 420 to determine whether the signal 350 falls within a pre-specified "hysteresis time window" H. The hysteresis time window H check 420 damps the modifier 120 system to avoid rapid changes in the system state. For example, in a situation in which a virtual server has overloaded its existing memory resource allocation, the virtual server may attempt to access memory repeatedly before the memory resource allocation is increased. Each memory access attempt may generate a memory resource overloaded signal 350B. The modifier 120 only needs to respond to one of these signals. The hysteresis time window H check 420 avoids repetitive responses to resource overloaded messages. Thus, the modifier 120 checks 420 whether the most recently received resource overloaded signal 350 (received at T1) is close in time (within the hysteresis time window H) to a previously received resource overloaded signal 350 (received at T0) for a particular resource: T1-T0<H? If the recent and previous resource overloaded signals have occurred close enough in time to fall within the pre-specified hysteresis time window H, no further action will be taken and the modifier 120 returns and waits 410 to receive another resource overloaded signal 350. If the current resource overloaded message is not received within the hysteresis time window H, the modifier 120 proceeds to increase 430 the virtual server resource allocation. The resource allocation for a particular overloaded resource is increased 430 by a pre-specified amount i. Amount i may be specified as a certain percentage of the resources of a physical host, or alternatively amount i may be specified as a certain number of resource units. Amount i may also be specified as a certain percentage of each particular virtual server's current resource allocation, e.g. increase a resource by 5% of its current value. After a particular resource has been increased the modifier 120 sets 440 a timer for a pre-specified time period. When the timer expires, the modifier 120 determines 450 if the recently increased resource is being fully utilized. In one embodiment, a resource is fully utilized if a corresponding resource denial signal has been received within the timer period 440 after the resource was increased. If the resource is determined 450 to be fully utilized, the modifier 120 returns and waits 410 for an overloaded signal. However, if it is determined that the resource is not being fully utilized, the modifier 120 decreases 460 the resource by a pre-specified amount d. Amount d may be specified as a certain percentage of the resources of a physical host, or amount d may be specified as a certain number of resource units. Amount d may also be specified as a certain percentage of each particular virtual server's current resource allocation, e.g. decrease a resource by 10% of its current value. In one embodiment, d (the resource decreases amount) is larger than i (the resource increase amount). This allows unused resources to be decreased aggressively, but overloaded resources to be increased cautiously. In another embodiment, d and i are set such that the resource allocation is increased and decreased by equal amounts. For example, assume that the increase in virtual server resources i is specified as a percentage of each virtual server's current resource allocation. The decrease in virtual server resources d is specified as d=1-(1/1+i), which returns the resource allocation to its previous level. Once the resource reaches a fully utilized state, the modifier 120 then returns to waiting 410. FIG. 5 shows a block diagram of an embodiment of a process for performing resource load balancing among physical hosts, in the context of a working example of overloaded physical host 160A. The physical host load balancer 130 periodically monitors the resource usage of a group of physical hosts 160 (160A, 160B and 160C) and transfers virtual servers to different ones of these physical hosts 160 in order to balance the resource loads between the physical hosts 160. Requests to increase virtual server resource allocations are also sent to the physical host load balancer 130 in order to assist in the balancing of physical host 160 resource loads. This process is next explained by example. In this example, physical host load balancing module 130 receives a signal 510 from the virtual server resource modifier 120 indicating that virtual server 162B requires an increased resource allocation. This signal is used as an input 520 into the load-balancing calculator 530. The load-balancing calculator 530 also requests and receives as input the current physical host resource loads 535 from the physical host resource monitor 540. The physical host resource monitor 540 performs periodic physical host resource checks 545 upon the group of physical hosts 160 (160A, 160B and 160C). Resource checks 545 monitor the current virtual server resource guarantees in each quality of service table for each physical host 160. The load-balancing calculator 530 determines whether a virtual server's request for additional resources 510 will overload the particular physical host currently hosting the virtual server. Using the example shown in FIG. 5, the load-balancing calculator 530 determines whether physical host 160A is capable of supporting the request for additional virtual server 162B resources 510. If the resource request 510 exceeds the available resources of physical host 160A, the load-balancing calculator 530 determines that physical host 160A is overloaded. In one embodiment, the load-balancing calculator 530 uses an easiest fit heuristic to find the physical host that has the most available resources. Each different type of resource is associated with an ordinal and a weight. The ith resource Ri has ordinal i and weight wi. For example, resource R1 represents disk resources, R2 represents memory resources, R3 represents network resources and R4 represents CPU resources. The weights for each respective resource are determined by the system operator. Let Ri(V) denote the resource requirement of the virtual server under consideration, e.g. virtual server 162B, including the requested resource increase from signal 510. Let Ri(Sj) denote the resource availability at the jth physical host. The load-balancing calculator 530 computes the weighted resource availability of physical host j as the sum over i: ##EQU1## Using the easiest fit heuristic, the load-balancing calculator 530 will select the physical host with the largest weighted resource availability to receive the virtual server 162B (in the example of FIG. 5, physical host 160B). The choice of physical host 160B is subject to the constraint that the selected physical host 160B has sufficient resources to meet the resource demands of virtual server 162B. The load-balancing calculator 530 sends 550 a signal 560 to the dynamic virtual server mover 140 indicating that virtual server 162B is to be transferred to physical host 160B. It will be understood by one of skill in the art that load-balancing calculator 530 may use other criteria for selecting which virtual server to transfer out of an overloaded physical host. In the embodiment given above, the load balancing calculator 530 transfers the virtual server that has most recently requested additional resources. However, in another embodiment, the load balancing calculator could select, for example, the smallest virtual server within an overloaded physical host for transfer, regardless of which virtual server has recently made a request for increased resources. FIG. 6 is a flowchart of an embodiment of the process for transferring a virtual server from one physical host to another physical host. The dynamic virtual server mover 140 directs the process of FIG. 6. This process is next explained by example. In this example, virtual server 162B is transferred from old physical host 160A to new physical host 160B. The mover 140 waits 610 to receive a transfer virtual server signal 560. The mover 140 receives a signal 560 directing the transfer of virtual server 162B from physical host 160A to physical host 160B. The mover 140 directs physical host 160A to store 620 local state information associated with virtual server 162B in the file system 150. As shown in FIG. 1, file system 150 is commonly accessible from physical hosts 160A, 160B and 160C. Mover 140 next directs physical host 160A to stop 630 local processes associated with the virtual server being moved, e.g. virtual server 162B. Mover 140 directs physical host 160B to access 640 the virtual server 162B state information stored in file system 150. Mover 140 directs physical host 160B to start 650 processes associated with virtual server 162B locally. This enables virtual server 162B to begin running locally in physical host 160B. The user of virtual server 162B is then transferred 660 from physical host 160A to physical host 160B by transferring the virtual server 162B address to the new physical host 160B. As explained previously, the mover 140 may use either "make, then break" timing or "break, then make" timing for the transfer process. Although the invention has been described in considerable detail with reference to certain embodiments, other embodiments are possible. As will be understood by those of skill in the art, the invention may be embodied in other specific forms without departing from the essential characteristics thereof. For example, the dynamic resource configuration module may support different numbers of physical hosts. Additionally, different fitting heuristic methods may be used to select physical hosts for receiving transferred virtual servers during load balancing among the physical hosts. Accordingly, the present invention is intended to embrace all such alternatives, modifications, and variations as fall within the spirit and scope of the appended claims and equivalents.
|
Same subclass Same class Consider this |
|||||||||||||||||||||||||||||||||||||||||
