Allocating storage for virtual machine instances based on input/output (I/O) usage rate of the disk extents stored in an I/O profile of a previous incarnation of the virtual machine

A method, system and computer program product for allocating storage for virtual machine instances. The input/output (I/O) usage of disk extents utilized by a virtual machine is saved in an I/O profile of the virtual machine. In response to deallocating the virtual machine, the I/O usage of the disk extents is extracted from its I/O profile and saved in a data structure. Upon starting a new instance of the virtual machine, new disk extents are allocated to the new virtual machine instance. The I/O usage of the disk extents for the previous incarnation of the virtual machine is applied to the disk extents allocated to the new virtual machine instance. The newly allocated disk extents can now be placed in either a solid-state drive device or a hard disk drive device based on this I/O history without requiring a twenty-four hour long cycle.

TECHNICAL FIELD

The present invention relates generally to cloud computing, and more particularly to allocating disk extents for virtual machine instances between hard disk drive and solid-state drive resources based on the input/output (I/O) usage rate of the disk extents stored in an I/O profile of a previous incarnation of the virtual machine.

BACKGROUND

In a cloud computing environment, computing is delivered as a service rather than a product, whereby shared resources, software and information are provided to computers and other devices as a metered service over a network, such as the Internet. In such an environment, computation, software, data access and storage services are provided to users that do not require knowledge of the physical location and configuration of the system that delivers the services.

In a virtualized computer environment, such as may be implemented in a physical cloud computing node of the cloud computing environment, the virtualized computer environment includes a virtual operating system. The virtual operating system includes a common base portion and separate user portions that all run on a physical computer. The physical computer is referred to as a host. The common base portion may be referred to as a hypervisor and each user portion may be called a guest. Each guest is a logical partition of the physical resources of the computer. A guest operating system runs on each guest, and the guest appears to the guest operating system as a real computer. Each guest operating system may host one or more virtual machines.

Currently, the cloud computing nodes of the cloud computing environment may be connected to a storage system that includes a combination of Solid-State Drive (SSD) devices and Hard Disk Drive (HDD) devices. SSD devices have a lower access time and latency than HDD drives but are more expensive. As a result, the controller of the storage system, commonly referred to as the storage controller, stores the most frequently accessed data in the SSD devices. In particular, the controller places disk extents (contiguous sets of disk blocks) utilized by the virtual machines in either the HDD or SSD device based on how frequently the disk extents are utilized. The disk extents that are more frequently utilized are placed in the SSD device.

The controller allocates the disk extents to the virtual machines as the virtual machines are allocated and deallocated. Unfortunately, the controller may often take twenty-four hours or longer to appropriately place the disk extents to either the HDD or SSD device since the decision is based upon a historical trend of the input/output operation of the disk extents utilized by the virtual machine. By requiring a twenty-four hour or longer cycle to appropriately place the disk extents to the appropriate device (HDD or SSD device) in the storage system, resources are being inefficiently utilized.

BRIEF SUMMARY

In one embodiment of the present invention, a method for allocating storage for virtual machine instances comprises monitoring input/output usage of disk extents utilized by a virtual machine. The method further comprises saving the input/output usage of the disk extents in a profile of the virtual machine. The method additionally comprises extracting the input/output usage of the disk extents from the profile of the virtual machine in response to deallocating the virtual machine. Furthermore, the method comprises saving the input/output usage of the disk extents in a data structure. Additionally, the method comprises allocating new disk extents to a new instance of the virtual machine in response to starting the new instance of the virtual machine. In addition, the method comprises obtaining the input/output usage of the disk extents from the data structure. The method further comprises applying, by a processor, the obtained input/output usage of the disk extents to the new instance of the virtual machine so that the obtained input/output usage of the disk extents applies to the allocated disk extents for the new instance of the virtual machine. The method additionally comprises placing the allocated disk extents for the new instance of the virtual machine to either a hard disk drive device or a solid-state drive device based on the obtained input/output usage of the disk extents.

DETAILED DESCRIPTION

The present invention comprises a method, system and computer program product for allocating storage for virtual machine instances. In one embodiment, the input/output (I/O) usage of disk extents utilized by a virtual machine is monitored. The I/O usage of the disk extents is saved in an I/O profile of the virtual machine. In response to deallocating the virtual machine, the I/O usage of the disk extents is extracted from its I/O profile. The extracted I/O usage of the disk extents is saved in a data structure along with an identifier of the virtual machine. Upon starting a new instance of the virtual machine, new disk extents are allocated to the new virtual machine instance. The I/O usage of the disk extents for the previous incarnation of the virtual machine is obtained from the data structure using the identifier of the previous incarnation of the virtual machine. The obtained I/O usage history is applied to the new instance of the virtual machine so that the I/O usage history applies to the disk extents allocated to the new virtual machine instance. Since it is likely that the I/O patterns for the new virtual machine instance will be similar to the I/O patterns of the previous incarnation of the virtual machine, the I/O history of the disk extents of the previous incarnation of the virtual machine can be applied to the newly allocated disk extents. Since the I/O history of the newly allocated disk extents are known within a reasonable error, the newly allocated disk extents can be placed in either a solid-state drive device or a hard disk drive device based on this I/O history without requiring a twenty-four hour long cycle.

It is understood in advance that although this disclosure includes a detailed description on cloud computing, implementation of the teachings recited herein are not limited to a cloud computing environment. Rather, the embodiments of the present invention are capable of being implemented in conjunction with any type of clustered computing environment now known or later developed.

In any event, the following definitions have been derived from the “The NIST Definition of Cloud Computing” by Peter Mell and Timothy Grance, dated September 2011, which is cited on an Information Disclosure Statement filed herewith, and a copy of which is provided to the U.S. Patent and Trademark Office.

Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. This cloud model is composed of five essential characteristics, three service models, and four deployment models.

Characteristics are as follows:

Rapid Elasticity: Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear to be unlimited and can be purchased in any quantity at any time.

Service Models are as follows:

Software as a Service (SaaS): The capability provided to the consumer is to use the provider's applications running on a cloud infrastructure. The applications are accessible from various client devices through either a thin client interface, such as a web browser (e.g., web-based e-mail) or a program interface. The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.

Platform as a Service (PaaS): The capability provided to the consumer is to deploy onto the cloud infrastructure consumer-created or acquired applications created using programming languages, libraries, services and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure including networks, servers, operating systems or storage, but has control over the deployed applications and possibly configuration settings for the application-hosting environment.

Deployment Models are as follows:

Private Cloud: The cloud infrastructure is provisioned for exclusive use by a single organization comprising multiple consumers (e.g., business units). It may be owned, managed and operated by the organization, a third party or some combination of them, and it may exist on or off premises.

Community Cloud: The cloud infrastructure is provisioned for exclusive use by a specific community of consumers from organizations that have shared concerns (e.g., mission, security requirements, policy and compliance considerations). It may be owned, managed and operated by one or more of the organizations in the community, a third party, or some combination of them, and it may exist on or off premises.

Public Cloud: The cloud infrastructure is provisioned for open use by the general public. It may be owned, managed and operated by a business, academic or government organization, or some combination of them. It exists on the premises of the cloud provider.

Hybrid Cloud: The cloud infrastructure is a composition of two or more distinct cloud infrastructures (private, community or public) that remain unique entities, but are bound together by standardized or proprietary technology that enables data and application portability (e.g., cloud bursting for load balancing between clouds).

Referring now to the Figures in detail,FIG. 1illustrates a network system100configured in accordance with an embodiment of the present invention. Network system100includes a client device101connected to a cloud computing environment102via a network103. Client device101may be any type of computing device (e.g., portable computing unit, personal digital assistant (PDA), smartphone, laptop computer, mobile phone, navigation device, game console, desktop computer system, workstation, Internet appliance and the like) configured with the capability of connecting to cloud computing environment102via network103.

Network103may be, for example, a local area network, a wide area network, a wireless wide area network, a circuit-switched telephone network, a Global System for Mobile Communications (GSM) network, Wireless Application Protocol (WAP) network, a WiFi network, an IEEE 802.11 standards network, various combinations thereof, etc. Other networks, whose descriptions are omitted here for brevity, may also be used in conjunction with system100ofFIG. 1without departing from the scope of the present invention.

Cloud computing environment102is used to deliver computing as a service to client device101implementing the model discussed above. An embodiment of cloud computing environment102is discussed below in connection withFIG. 2.

FIG. 2illustrates cloud computing environment102in accordance with an embodiment of the present invention. As shown, cloud computing environment102includes one or more cloud computing nodes201with which local computing devices used by cloud consumers, such as, for example, personal digital assistant (PDA) or cellular telephone202, desktop computer203, laptop computer204, and/or automobile computer system205may communicate. Nodes201may communicate with one another. They may be grouped (not shown) physically or virtually, in one or more networks, such as Private, Community, Public, or Hybrid clouds as described hereinabove, or a combination thereof. This allows cloud computing environment102to offer infrastructure, platforms and/or software as services for which a cloud consumer does not need to maintain resources on a local computing device. A description of a schematic of an exemplary cloud computing node201is provided below in connection withFIG. 3. It is understood that the types of computing devices202,203,204,205shown inFIG. 2, which may represent client device101ofFIG. 1, are intended to be illustrative and that cloud computing nodes201and cloud computing environment102can communicate with any type of computerized device over any type of network and/or network addressable connection (e.g., using a web browser). Program code located on one of nodes201may be stored on a computer recordable storage medium in one of nodes201and downloaded to computing devices202,203,204,205over a network for use in these computing devices. For example, a server computer in computing nodes201may store program code on a computer readable storage medium on the server computer. The server computer may download the program code to computing device202,203,204,205for use on the computing device.

Referring now toFIG. 3,FIG. 3illustrates cloud computing nodes201A-201N, where N is a positive integer number, in a virtualized computer environment in accordance with an embodiment of the present invention. Cloud computing nodes201A-201N may collectively or individually be referred to as cloud computing nodes201or cloud computing node201, respectively. Cloud computing nodes201A-201N are each coupled to an administrative server301configured to provide data center-level functions of communicating with hypervisors on cloud computing nodes201to install virtual machines, terminate/suspend virtual machines and relocate virtual machines from one cloud computing node201to another within the data center.

With reference now to cloud computing node201A, cloud computing node201A includes a virtual operating system302A. Operating system302A executes on a real or physical computer303A. Real computer303A includes one or more processors304A, a memory305A (also referred to herein as the host physical memory), one or more disk drives306A and the like. Other components of real computer303A are not discussed herein for the sake of brevity.

Virtual operating system302A further includes user portions307A-307B (identified as “Guest 1 and Guest 2,” respectively, inFIG. 3), referred to herein as “guests.” Each guest307A,307B is capable of functioning as a separate system. That is, each guest307A-307B can be independently reset, host a guest operating system308A-308B, respectively, (identified as “Guest 1 O/S” and “Guest 2 O/S,” respectively, inFIG. 3) and operate with different programs. An operating system or application program running in guest307A,307B appears to have access to a full and complete system, but in reality, only a portion of it is available.

Each guest operating system308A,308B may host one or more virtual machine applications309A-309C (identified as “VM 1,” “VM 2” and “VM 3,” respectively, inFIG. 3), such as Java™ virtual machines. For example, guest operating system308A hosts virtual machine applications309A-309B. Guest operating system308B hosts virtual machine application309C.

Virtual operating system302A further includes a common base portion310A, referred to herein as a hypervisor. Hypervisor310A may be implemented in microcode running on processor304A or it may be implemented in software as part of virtual operating system302A. Hypervisor310A is configured to manage and enable guests307A,307B to run on a single host.

As discussed above, virtual operating system302A and its components execute on physical or real computer303A. These software components may be loaded into memory305A for execution by processor304A.

As also discussed above, cloud computing environment102(FIG. 2) can include multiple cloud computing nodes201A-201N as is shown inFIG. 3. In one embodiment, each cloud computing node201A-201N is configured similarly as previously discussed cloud computing node201A. For example, cloud computing node201N is configured similarly as cloud computing node201A. Cloud computing node201N includes the same elements as cloud computing node201A. For example, guests307C-307D (identified as “Guest 3” and “Guest 4,” respectively, inFIG. 3) are functionally the same as guests307A-307B. Similarly, guest operating systems308C-308D (identified as “Guest 3 O/S” and “Guest 4 O/S,” respectively, inFIG. 3) are functionally the same as guest operating systems308A-308B. Virtual machines309D-309E (identified as “VM 4” and “VM 5,” respectively, inFIG. 3) are functionally the same as virtual machines309A-309C. Furthermore, hypervisor310B is functionally the same as hypervisor310A. Hence, the discussion of cloud computing node201A applies to each cloud computing node201, including cloud computing node201N. In one embodiment, each cloud computing node201can be configured differently and the physical hardware, hypervisors and other components may be different as well.

Guests307A-307D may collectively or individually be referred to as guests307or guest307, respectively. Guest operating systems308A-308D may collectively or individually be referred to as guest operating systems308or guest operating system308, respectively. Virtual machines309A-309E may collectively or individually be referred to as virtual machines309or virtual machine309, respectively. Hypervisors310A-310B may collectively or individually be referred to as hypervisors310or hypervisor310, respectively.

FIG. 3is not to be limited in scope to a particular number of cloud computing nodes201and each cloud computing node201may include any number of guests307, guest operating systems308, virtual machines309, etc. Furthermore, cloud computing nodes201include other components that were not discussed herein for the sake of brevity. Hence, cloud computing node201is not to be limited in scope to the elements depicted inFIG. 3.

In one embodiment, cloud computing nodes201are connected to a storage system311which includes various drive devices, such as Solid-State Drive (SSD) devices312and Hard Disk Drive (HDD) devices313. The storing of data in storage system311is controlled by a storage controller314. In one embodiment, storage controller314includes memory315for storing a data structure for storing the input/output usage history of disk extents as well as the identifier of the associated virtual machine309as discussed further below. Furthermore, in one embodiment, memory315stores a data structure for storing the input/output profiles of virtual machines309as discussed further below.

Referring again toFIG. 3, in some embodiments, administrative server301supports a module, referred to herein as the management software316, that can be used to manage all the hardware components of cloud computing nodes201, monitor system utilization, intelligently deploy images of data and optimize the operations of cloud computing environment102. Furthermore, management software316can be used to allocate disk extents for virtual machine instances309between hard disk drive device313and solid-state drive device312without requiring twenty-four hour long cycles as discussed further below in connection withFIGS. 5-6. A description of the hardware configuration of administrative server301is provided further below in connection withFIG. 4.

Referring now toFIG. 4,FIG. 4illustrates a hardware configuration of administrative server301(FIG. 3) which is representative of a hardware environment for practicing the present invention. Administrative server301has a processor401coupled to various other components by system bus402. An operating system403runs on processor401and provides control and coordinates the functions of the various components ofFIG. 4. An application404in accordance with the principles of the present invention runs in conjunction with operating system403and provides calls to operating system403where the calls implement the various functions or services to be performed by application404. Application404may include, for example, a program (e.g., management software316ofFIG. 3) for allocating disk extents for virtual machine instances309(FIG. 3) between hard disk drive device313(FIG. 3) and solid-state drive device312(FIG. 3) without requiring twenty-four hour long cycles as discussed further below in association withFIGS. 5-6.

Referring again toFIG. 4, read-only memory (“ROM”)405is coupled to system bus402and includes a basic input/output system (“BIOS”) that controls certain basic functions of administrative server301. Random access memory (“RAM”)406and disk adapter407are also coupled to system bus402. It should be noted that software components including operating system403and application404may be loaded into RAM406, which may be administrative server's301main memory for execution. Disk adapter407may be an integrated drive electronics (“IDE”) adapter that communicates with a disk unit408, e.g., disk drive. It is noted that the program for allocating disk extents for virtual machine instances309between hard disk drive device313and solid-state drive device312without requiring twenty-four hour long cycles, as discussed further below in association withFIGS. 5-6, may reside in disk unit408or in application404.

Administrative server301may further include a communications adapter409coupled to bus402. Communications adapter409interconnects bus402with an outside network (e.g., network103ofFIG. 1).

As stated in the Background section, currently, the cloud computing nodes of the cloud computing environment may be connected to a storage system that includes a combination of Solid-State Drive (SSD) devices and Hard Disk Drive (HDD) devices. SSD devices have a lower access time and latency than HDD drives but are more expensive. As a result, the controller of the storage system, commonly referred to as the storage controller, stores the most frequently accessed data in the SSD devices. In particular, the controller places disk extents (contiguous sets of disk blocks) utilized by the virtual machines in either the HDD or SSD device based on how frequently the disk extents are utilized. The disk extents that are more frequently utilized are placed in the SSD device. The controller allocates the disk extents to the virtual machines as the virtual machines are allocated and deallocated. Unfortunately, the controller may often take twenty-four hours or longer to appropriately place the disk extents to either the HDD or SSD device since the decision is based upon a historical trend of the input/output operation of the disk extents utilized by the virtual machine. By requiring a twenty-four hour or longer cycle to appropriately place the disk extents to the appropriate device (HDD or SSD device) in the storage system, resources are being inefficiently utilized.

The principles of the present invention provide a means for appropriately placing the disk extents allocated to a virtual machine in either the HDD or SSD device without requiring twenty-four hour long cycles based on the input/output (I/O) usage rate of the disk extents stored in an I/O profile of a previous incarnation of the virtual machine as discussed below in connection withFIGS. 5-6.FIG. 5is a flowchart of a method for utilizing an input/output profile for storing the input/output usage rate of the disk extents.FIG. 6is a flowchart of a method for placing the disk extents allocated to a virtual machine in either the HDD or SSD device without requiring twenty-four hour long cycles based on the input/output (I/O) usage rate of the disk extents stored in an I/O profile of a previous incarnation of the virtual machine.

As stated above,FIG. 5is a flowchart of a method500for utilizing an input/output profile for storing the input/output usage rate of the disk extents in accordance with an embodiment of the present invention.

Referring now toFIG. 5, in conjunction withFIGS. 1-4, in step501, administrative server301initializes a virtual machine309(e.g., virtual machine309A) to be allocated “disk extents.” Disk extents, as used herein, refers to a contiguous set of disk blocks.

In response to allocating disk extents to virtual machine309, administrative server301sets the input/output (I/O) usage history of the disk extents to be a zero value in an I/O profile of the initialized virtual machine309(e.g., virtual machine309A). The I/O usage pattern of the disk extents refers to the input/output operations utilized by the virtual machine of the disk extents. The I/O profile refers to a data structure for storing the I/O usage pattern of the disk extents and other information about the disk extents, such as an identifier of the disk extents, the starting block address and the number of contiguous blocks. In one embodiment, the I/O profiles of virtual machines309are stored in a data structure in memory315of storage controller314.

The I/O usage pattern of the disk extents are used to determine whether the disk extents should be moved to SSD device312or to HDD device313. In the past, when a virtual machine is allocated disk space and started up, the disk extents it uses may previously have had a history of activity, such as input/output operations with those disk extents. Such a history is not valid for a newly initialized virtual machine309. As a result, in one embodiment, the disk extents allocated to the newly initialized virtual machine309should not be associated with any I/O usage history which can be accomplished by setting the I/O usage history of the disk extents to be a zero value in the I/O profile of the initialized virtual machine309. When the I/O usage history is set to a zero value, then the disk extents allocated to the initialized virtual machine309are placed in HDD device313. That is, virtual machine309utilizes hard disk drive device313for a period of time in response to setting the I/O usage history of the disk extents to a zero value.

Alternatively, in response to allocating disk extents to virtual machine309, in step503, administrative server301sets the input/output (I/O) usage history of the disk extents to be a maximum value in the I/O profile of the initialized virtual machine309(e.g., virtual machine309A). By setting the I/O usage history of the disk extents to be a maximum value, the disk extents allocated to the initialized virtual machine309are placed in SSD device312since the “maximum value” indicates a history of significant I/O operations for the disk extents. That is, virtual machine309utilizes solid-state device312for a period of time in response to setting the I/O usage history of the disk extents to a maximum value. Such an embodiment may be utilized to speed up the time spent in formatting and copying newly acquired disk extents.

Upon setting the I/O history of the disk extents as discussed in either step502or step503, in step504, administrative server301monitors the I/O usage of the disk extents utilized by virtual machine309.

In step505, administrative server301saves the I/O usage history in the I/O profile of virtual machine309. In one embodiment, administrative server301saves the I/O usage history in the I/O profile of virtual machine309periodically. In one embodiment, the I/O profiles of virtual machines309are stored in memory315of storage controller314.

In step506, a determination is made by administrative server301as to whether virtual machine309(e.g., virtual machine309A) has been deallocated. If virtual machine309has not been deallocated, then administrative server301continues to monitor the I/O usage of the disk extents utilized by virtual machine309in step504.

If, however, virtual machine309(e.g., virtual machine309A) has been deallocated, then, in step507, administrative server301extracts virtual machine's309I/O usage history of the disk extents from its I/O profile.

In step508, administrative server301saves the extracted I/O usage history of the disk extents in a data structure, such as a data structure stored in memory315of storage controller314. In one embodiment, an identifier of the virtual machine309(e.g., virtual machine309A) that utilized those disk extents is saved in the data structure in connection with the extracted I/O usage history. In this manner, the I/O history of the disk extents is associated with that virtual machine309(e.g., virtual machine309A) and will be able to be retrieved when a new instance of that virtual machine309(e.g., virtual machine309A) is started.

In step509, administrative server301sets the I/O usage history of the disk extents in the virtual machine's309I/O profile to a zero value to free up system resources. In the past, the I/O usage history of the disk extents was not set to a zero value thereby causing storage controller314to continue to hold onto the disk extents, such as the disk extents in SSD drive312, for a period of time (e.g., next forty-eight hours). By setting the I/O usage history of the disk extents to a zero value, such resources can now be freed to be utilized by other virtual machines309.

Once an I/O usage history of the disk extents is stored, such information can be utilized when a new instance of virtual machine309is initialized as discussed below in connection withFIG. 6.

FIG. 6is a flowchart of a method600for placing the disk extents allocated to a virtual machine309(FIG. 3) in either the HDD or SSD device313,312(FIG. 3), respectively, without requiring twenty-four hour long cycles based on the input/output (I/O) usage rate of the disk extents stored in an I/O profile of a previous incarnation of virtual machine309in accordance with an embodiment of the present invention.

Referring toFIG. 6, in conjunction withFIGS. 1-5, in step601, a determination is made by administrative server301as to whether a new instance of virtual machine309(e.g., virtual machine309A) is to be started. If a new instance of virtual machine309is not be started, then administrative server301continues to determine if a new instance of virtual machine309is to be started in step601.

If, however, a new instance of virtual machine309(e.g., virtual machine309A) is started, then, in step602, administrative server301allocates disk extents to the new virtual machine instance309.

In step603, administrative server301obtains the I/O usage history of the disk extents of the previous incarnation of virtual machine309(e.g., virtual machine309A) that was stored in a data structure in step508. In one embodiment, an identifier of the previous incarnation of virtual machine309is used to identify the correct I/O usage history of the disk extents stored in the data structure.

In step604, administrative server301applies the obtained I/O usage history to the new instance of virtual machine309(e.g., virtual machine309A) so that the I/O usage history applies to the allocated disk extents for the new instance of virtual machine309(e.g., virtual machine309A). Since it is likely that the I/O patterns of the new instance of virtual machine309(e.g., virtual machine309A) will be similar to the I/O patterns of the previous incarnation of virtual machine309(e.g., virtual machine309A), the I/O history of the disk extents of the previous incarnation of virtual machine309can be applied to the newly allocated disk extents. Since the I/O history of the newly allocated disk extents are known within a reasonable error, administrative server301can instruct storage controller314to place the newly allocated disk extents to either SSD device312or HDD device313based on this I/O history without requiring a twenty-four hour long cycle.

In step605, administrative server301places the newly allocated disk extents to either SSD device312or HDD device313based on the I/O usage history. For example, if the I/O usage history indicates a history of significant I/O operations for the disk extents, then those disk extents will be placed in SSD device312.