This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2008-192966, filed on Jul. 28, 2008, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to a virtual machine system which runs a plurality of virtual machines on a physical machine.
The virtual machines (also referred to as VMs) are run, by a virtualization technology, on a physical computer logically divided into a plurality of computers (VMs) each executing an operating system (referred to as a guest OS) independent from others. The integration and consolidation of the operating systems (OSs) implemented in a plurality of computers to one computer allows an effective use of hardware resources such as a central processing unit (CPU) and a storage and may save power and spaces. Since the Kyoto Protocol came into effect in 2005, the environmental efforts of companies and local governments to address the global warming issue have received attention, and the needs for power saving with server virtualization have increased.
Power saving operation methods have been known by which virtual machines are efficiently integrated in accordance with work loads to shut down power supply to redundant servers, by using a live migration technology that moves a virtual machine in operation to another server without stopping. “VMware (registered trade mark) VirtualCenter” by VMware, Inc. is known as one of management tools that automatically implement the live migration in accordance with a load status of each virtual machine.
Alternatively, a method that implements the live migration on the basis of the energy consumption and resource utilization in the server running virtual machines has been proposed (for example, refer to Japanese Laid-open Patent Publication No. 2007-536657).
The methods for resource allocation on a server may include a method that monitors the load statuses of virtual machines and changes the resource allocation, a method that changes the resource allocation to a guest OS in accordance with a energy consumption control request issued by the guest OS, and a method that controls unused system resources to save power.
Conventional technologies monitor the statuses of virtual machines and change the resource quota to a virtual machine with a low load or release unused resources.
According to an aspect of the present invention, provided is a virtual machine system for running a plurality of virtual machines on a physical machine. The virtual machine system includes a virtual battery manager, a schedule manager, a resource quota manager, a discharge calculator, and a discharger.
The virtual battery manager manages a virtual battery for running a virtual machine. The virtual battery holds electric energy used by the virtual machine. The virtual battery is capable of discharging and being charged.
The schedule manager allocates a resource of the physical machine to the virtual machine.
The resource quota manager manages a resource quota for each of the plurality of virtual machines in accordance with status data acquired from the schedule manager. The status data indicates an allocated status of the resource on each of the plurality of virtual machines.
The discharge calculator calculates a discharged amount of the virtual battery by calculating energy consumption of the virtual machine with reference to a consumption policy and a consumption allocation table when the resource quota for the virtual machine satisfies a predefined condition for discharging. The consumption policy defines a maximum amount of total energy consumption of the plurality of virtual machines. The consumption allocation table contains an allocated ratio of energy consumption for each of the plurality of virtual machines.
The discharger decreases a battery level of the virtual battery.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
Today, setting a target for reduced carbon dioxide emissions and electric load leveling are being under review, and energy consumption is now a more urgent problem. Therefore, it is desirable that an upper limit of energy consumption is preset for each server and that virtual machines are controlled so as to operate under the limit.
However, in the past, no resource control methods have been available that manage the resource allocation to virtual machines in consideration of the energy consumption.
The virtual machine system discussed in embodiments of the present invention virtually causes a plurality of operating systems to operate to run a plurality of virtual machines by a virtual battery. The virtual battery virtually supplies power to a virtual machine in accordance with energy consumption of a physical machine (hereinafter also simply referred to as a computer or a server) of the virtual machine system. The virtual battery may discharge and be charged. By using the virtual battery, energy consumption of the virtual machine system may be suppressed and proper resource allocation to the virtual machines in accordance with the energy consumption may be realized.
A virtual machine system 1 is a computer system that runs a plurality of virtual machines 3 by employing a virtual machine monitor 2 to manage a physical memory (denoted by “MEM” in
In a physical machine of the virtual machine system 1 illustrated in
The virtual machine monitor 2 divides the hardware resource 4 of the computer and allocates divided hardware resource 4 to the plurality of virtual machines 3 to use the computer as a plurality of virtual machines 3.
The virtual machines 3 are components that operate by using the hardware resource 4 and may be allowed by the virtual machine monitor 2 to virtually operate as if they were independent computers by using a virtual hardware resource (denoted by “vH/W” in
The virtual hardware resource 31 used by the virtual machine 3 includes a virtual CPU (denoted by “vCPU” in
Each virtual machine 3 includes a virtual battery (denoted by “vBAT” in
The virtual battery 10 is a virtual device storing finite electric energy, whose battery level may be referred and updated by the virtual machine monitor 2. The virtual machine 3 may run as long as the virtual battery 10 is alive.
The virtual machine monitor 2 includes a power policy setter 11, a schedule manager 12, a resource quota manager 13, and the virtual battery manager 14.
The power policy setter 111 sets a consumption policy 111, a charge policy 112, and an allocation table 113.
The consumption policy 111 defines energy consumption of the virtual machine system 1 per unit time, which is defined in accordance with energy consumption of the computer as a whole. The energy consumption may be defined for each time or each time range.
The charge policy 112 defines a charged amount of the virtual battery 10. The charged amount may be differently defined for time ranges. For example, a larger charged amount may be defined for a daytime range while a smaller charged amount may be defined for a nighttime range.
The allocation table 113 is a data table that defines how the energy consumption or the charged amount is to be allocated to the virtual machines 3 of the virtual machine system 1. The allocation table 113 defines an allocation ratio of the energy consumption and an allocation ratio of the charged amount for each virtual machine 3.
The schedule manager 12 allocates the hardware resource 4, such as the CPU 41 of the computer of the virtual machine system 1, to the virtual machines 3 in time-sharing.
In the allocation of the hardware resource 4 to the virtual machines 3, the schedule manager 12 may change the quotas of the hardware resource 4 in accordance with the battery level of the virtual battery 10 of the virtual machine 3. When the battery level of the virtual battery 10 is lower than or equals to a predefined amount or equals to zero, the schedule manager 12 may hold up allocation of the hardware resource 4 to a corresponding virtual machine 3.
The resource quota manager 13 manages a quota table indicating the time over which a hardware resource 4 is allocated to a virtual machine 3 by the schedule manager 12.
The quota table may indicate a load status of the computer of the virtual machine system 1, a total number of running virtual machines, and an allocated time for each virtual machine 3, for example.
A record of the quota table 131 corresponds to a virtual machine 3 and includes a virtual machine identifier (ID) (denoted by “VM ID” in
The virtual battery manager 14 provides a guest OS 32 of the virtual machine 3 with the virtual battery 10, calculates a charged amount and a discharged amount of the virtual battery 10, and controls the battery level of the virtual battery 10.
More specifically, the virtual battery manager 14 allocates electric energy corresponding to the maximum energy consumption of the physical machine of the virtual machine system 1 to the virtual machines 3. The allocation is performed in accordance with the allocation ratio defined for each of the virtual machines 3 on the allocation table 113. The allocated electric energy is held as the battery level of the virtual battery 10.
The virtual battery manager 14 regularly obtains the quota table 131 for the virtual machines 3 from the resource quota manager 13 and creates and manages a virtual battery management table for each virtual machine 3 to manage the status of the virtual battery 10 provided to the virtual machine 3.
A record of the virtual battery management table 141 corresponds to a virtual machines 3 and includes, a virtual machine ID (denoted by “VM ID” in
The virtual battery manager 14 calculates the charged amount or the discharged amount of the virtual battery 10 of a virtual machine 3 with reference to the consumption policy 111 and the allocation table 113 when data contained in a corresponding record of the quota table 131 satisfies a predefined condition for charging or discharging.
The virtual battery manager 14 updates the virtual battery level 1413 contained in a corresponding record of the virtual battery management table 141 in accordance with the charged amount or the discharged amount.
The virtual battery manager 14 calculates the discharged amount when such a condition for discharging is satisfied that the total amount of the CPU allocated time 1313 contained in the quota table 131 for all the virtual machines 3 during a predefined time period is greater than or equals to a predefined threshold value.
The virtual battery manager 14 calculates the charged amount when such a condition for charging is satisfied that the total amount of the CPU allocated time 1313 contained in the quota table 131 for all the virtual machines 3 during a predefined time period is less than or equals to a predefined threshold value. Alternatively, the condition for charging may be that the total amount of the virtual machine stop time 1314 contained in the quota table 131 for all the virtual machines 3 is greater than or equals to a predefined threshold value.
The threshold values in the conditions for charging and discharging may be determined in accordance with the maximum energy consumption by the computer of the virtual machine system 1 or the total number of the virtual machines 3 running on the computer.
The threshold values in the conditions for charging and discharging may be defined to be different for each time or each time period.
The threshold values in the conditions for charging and discharging may be determined in accordance with a priority assigned to each of the virtual machines 3.
When a plurality of computers are provided for implementing the virtual machine system 1, the threshold values in the conditions for charging and discharging may be determined in accordance with the energy consumption assigned to each of the computers.
In operation S1, the virtual battery manager 14 obtains the quota table 131 for the virtual machines 3 from the resource quota manager 13.
In operation S2, the virtual battery manager 14 determines for each of the virtual machines 3 whether the virtual machine 3 is running.
In operation S3, when the virtual machine 3 is running (“Yes” in operation S2), the virtual battery manager 14 calculates, as a discharged amount, energy consumption of the virtual machine 3 from the CPU allocated time 1313 in accordance with the consumption policy 111 and the allocation table 113.
In operation S4, the virtual battery manager 14 determines whether the virtual battery level 1413 for the virtual machine contained in the virtual battery management table 141 is zero.
In operation S5, when the virtual battery level 1413 is not zero (“No” in operation S4), the virtual battery manager 14 decrease the virtual battery level 1413 contained in the virtual battery management table 141 by a calculated discharged amount.
When the virtual battery level 1413 is zero (“Yes” in operation S4), the process proceeds to operation S10. At this time, the virtual battery manager 14 may notify the schedule manager 12 that allocation of the hardware resource 4 to the virtual machine 3 has been suspended.
Thus, the resource quota to the virtual machine 3 that has drained the virtual battery 10 may be controlled to suppress the maximum energy consumption of the computer as a whole by limiting resource utilization of the computer.
In operation S7, when the virtual machine 3 is not running (“No” in operation S2), the virtual battery manager 14 calculates a charged amount from the virtual machine stop time 1314 contained in the quota table 131 in accordance with the charge policy 112 and the allocation table 113.
In operation S8, the virtual battery manager 14 determines whether the virtual battery level 1413 for the virtual machine equals to the virtual battery capacity 1414.
In operation S9, when the virtual battery level 1413 does not equal to the virtual battery capacity 1414 (“No” in operation S8), a calculated charged amount is added to the virtual battery level 1413 up to the virtual battery capacity 1414. When the virtual battery level 1413 equals to the virtual battery capacity 1414 (“Yes” in operation S8), the process proceeds to operation S10.
Leveling of user's utilization time of the virtual machine 3 may be accelerated by defining a condition for charging such that the charged amount is adjusted in accordance with a time range over which the virtual machine 3 is stooped for a predefined time period or longer.
For example, increase in number of users who use the virtual machine 3 in nighttime may be expected by combining conditions for charging and discharging such that stopping the virtual machine 3 for one hour during a peak time range in daytime allows charge of the virtual battery 10 for two hours use in nighttime.
In operation S10, the virtual battery manager 14 determines whether the virtual batteries 10 for all the virtual machines 3 have been processed. When the virtual batteries 10 for some of the virtual machines 3 have not been processed (“No” in operation S10), the process returns to operation S2. When the virtual batteries 10 for all the virtual machines 3 have been processed (“Yes” in operation S10), the process terminates.
The management of the virtual battery 10 in the virtual machine system 1 will be discussed more specifically.
In a first example, the discharged amount of the virtual battery 10 is calculated in accordance with a load status of a computer of a virtual machine system 1 and utilization time of a resource in a virtual machine 3.
It is assumed that the specifications of the server of the virtual machine system 1 includes maximum power consumption [W]=600 and idle-time power consumption [W]=120, and the relationship between power consumption [W] of the server and resource utilization [%] in the server is expressed by:
power consumption of the server=resource utilization×4.8+120
as illustrated in
In this case, energy consumption [Wh] of the server for T seconds may be expressed by:
energy consumption of the server=(average resource utilization for T seconds×4.8+120)×T/3600.
When one virtual machine 3 occupies a hardware resource 4 in a server for t seconds, the energy consumption [Wh] of the virtual machine 3 may be expressed as:
energy consumption of the virtual machine 3=energy consumption of the server×t/T
It is assumed that the server is operating over time as illustrated in
energy consumption of each virtual machine 3={(50×4.8+120)×3/3600}×1/3=0.1.
Therefore, a discharge amount 0.1 Wh is decreased from the battery level of the virtual battery 10.
In a second example, energy consumption of a server of a virtual machine system 1 is limited.
It is assumed that, under the similar condition as that of the first example, energy consumption of the server is limited to 480 Wh per hour as illustrated in
In a first operational status where the resource utilization of the server is 100% at all times and ten virtual machines 3 are equally operating, the battery level of the virtual battery 10 in each virtual machine 3 becomes zero in 48 minutes as illustrated in
In this case, the energy consumption [Wh] of each virtual machine 3 per 60 seconds is calculated as:
energy consumption of each virtual machine 3={(100×4.8+120)×60/3600}×1/10=1.
The energy consumption [Wh] of the server as a whole is calculated as:
energy consumption of the server=1×10×48=480.
Therefore, if the server stops when all of the virtual machines 3 stop after a lapse of 48 minutes, the energy consumption may be kept to 480 Wh.
In a second operational status where the resource utilization of the server is 75% at all times and ten virtual machines 3 are equally operating, the battery level of the virtual battery 10 in each virtual machine 3 becomes zero in 60 minutes as illustrated in
In this case, the energy consumption [Wh] of each virtual machine 3 per 60 seconds is calculated as:
energy consumption of each virtual machine 3={(75×4.8+120)×60/3600}×1/10=0.8.
The energy consumption [Wh] of t the server as a whole is calculated as:
energy consumption of the server=0.8×10×60=480.
Therefore, the energy consumption per hour may be kept to 480 Wh.
In a third example, leveling of energy consumption is promoted by defining a condition for charging the virtual battery 10 of a stopped virtual machine in a similar case as that of the first example.
It is assumed that a total number of the virtual machines 3 on the server is eight, and that the battery capacity of each virtual battery 10 is 48 Wh.
In this case, energy consumption of the server is defined for each time range as illustrated in
The battery capacity of the virtual battery 10 of VM1, for example, is calculated to be 48 Wh in accordance with the consumption policy 151 illustrated in
charging time [h] in nighttime=48/(60×0.1)=8
charging time [h] in daytime=48/(96×0.1)=5
charging time [h] peak hours=48/(160×0.1)=3
Therefore, if a virtual machine 3 is stopped in peak hours, the virtual battery 10 of the virtual machine may be charged in a shorter time than that in nighttime. As a result, users may avoid the use of the virtual machines 3 in peak hours, which allows the leveling of the energy consumption.
Most functions of the virtual machine server 7 are similar to that of the virtual machine system 1 according to the first embodiment of the present invention, and the difference is that the virtual machine monitor 2 in each virtual machine server communicates with a external power management server 8 to obtain and set the consumption policy 111 and the charge policy 112 In the second embodiment.
Because each of the virtual machines 3 has the virtual battery 10, the virtual machine server may operate like a laptop personal computer (PC) without connection of an alternate current (AC) adapter. With the virtual machine system 1 which is not originally battery-driven, the resource usage may be kept within predefined energy consumption.
Having described the embodiments, different variations may be made to the embodiments without departing from the scope and spirit of the present invention.
For example, a plurality of virtual machines 3 operating in a computer may share one virtual battery 10.
Furthermore, the power policy setter 11 may be provided as an external device that is capable of network-communication with the virtual machine system 1.
The virtual battery discussed above allows to grasp energy consumption of each virtual machine to manage the consumable energy by discharging and charging the energy calculated in accordance with the maximum energy consumption of each computer.
Thus, the resource usage by a virtual machine which is originally not driven by a battery, may be controlled in accordance with energy consumption, suppressing the energy consumption of the virtual machine system as a whole.
The amount of resource usage by a virtual machine is visualized as energy consumption which may be controlled in accordance with the energy consumption target of the virtual machine system and/or charging system.
The promotion of power saving in system operations may be expected, because a guest OS executed on a virtual machine may detect the battery level of the virtual battery so as to implement active power saving operations.
The battery level of the virtual battery may be checked through the OS by a user of the virtual machine. Therefore, the promotion of conscious power saving actions may be expected, such as frequent shut down of an unused virtual machine.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2008-192966 | Jul 2008 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
7007183 | Rawson, III | Feb 2006 | B2 |
7583951 | Gibbs | Sep 2009 | B2 |
7783909 | Hatasaki et al. | Aug 2010 | B2 |
7861102 | Ranganathan et al. | Dec 2010 | B1 |
7970903 | Oeda | Jun 2011 | B2 |
7971078 | Govindan et al. | Jun 2011 | B2 |
8028179 | Zettler | Sep 2011 | B2 |
20020138774 | Imada et al. | Sep 2002 | A1 |
20050251802 | Bozek et al. | Nov 2005 | A1 |
20050268078 | Zimmer et al. | Dec 2005 | A1 |
20070243852 | Gibbs | Oct 2007 | A1 |
20080186086 | Bell | Aug 2008 | A1 |
20080301473 | Perez et al. | Dec 2008 | A1 |
20090113221 | Holle et al. | Apr 2009 | A1 |
20120005505 | Tolia et al. | Jan 2012 | A1 |
Number | Date | Country |
---|---|---|
2004-192612 | Jul 2004 | JP |
2006-087228 | Mar 2006 | JP |
2006-113767 | Apr 2006 | JP |
2007-011992 | Jan 2007 | JP |
2007-272297 | Oct 2007 | JP |
2007-536657 | Dec 2007 | JP |
Entry |
---|
Reference AG (Japanese Laid-Open Patent No. 2007-536657) corresponds to Reference AA (U.S. Patent Publication No. 2005/0251802). |
Reference AH (Japanese Laid-Open Patent No. 2004-192612) corresponds to Reference AB (U.S. Patent No. 7,007,183). |
Japanese Office Action issued in corresponding Japanese Patent Application No. 2008-192966 (7 pages) (2 pages English translation). |
Number | Date | Country | |
---|---|---|---|
20100023940 A1 | Jan 2010 | US |