IP Library › Granted Patent US 9,336,035
Granted Patent B2
US 9,336,035 · App. 13/658,567 · Granted May 10, 2016

Method and system for VM-granular I/O caching

Inventors: Li Zhou (Palo Alto, CA); Samdeep Nayak (Sunnyvale, CA); Sandeep Uttamchandani (Palo Alto, CA)
Assignee: VMware, Inc.
G06F9/45558G06F9/45533G06F12/0246G06F2009/45579G06F2212/222G06F2212/7202G06F2212/7207
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,336,035
App. No.
13/658,567
Granted
May 10, 2016
Kind
B2
Abstract

Methods are presented for caching I/O data in a solid state drive (SSD) locally attached to a host computer supporting the running of a virtual machine (VM). Portions of the SSD are allocated as cache storage for VMs running on the host computer. A mapping relationship is maintained between unique identifiers for VMs running on the host computer and one or more process identifiers (PIDs) associated with processes running in the host computer that correspond to each of the VM's execution on the host computer. When an I/O request is received, a PID associated with I/O request is determined and a unique identifier for the VM is extracted from the mapping relationship based on the determined PID. A portion of the SSD corresponding to the unique identifier of the VM that is used as a cache for the VM can then be accessed in order to handle the I/O request.

Claims (55)

1. A method for caching I/O data in a solid state drive (SSD) locally attached to a host computer supporting the running of a virtual machine (VM), the method comprising:

allocating portions of the SSD to use as cache storage for VMs running on the host computer;

maintaining, by a hypervisor of the host computer, a mapping relationship between unique identifiers for VMs running on the host computer and one or more process identifiers (PIDs) associated with processes running in the host computer that correspond to each of the VM's execution on the host computer;

integrating a cache module into an I/O stack of the hypervisor to allow the cache module to intercept I/O requests before the I/O requests are forwarded to a virtual disk file;

receiving, by the hypervisor, an I/O request from the VM, wherein the VM directed the I/O request for the virtual disk file of the VM that is remotely stored from the host computer;

intercepting, by the cache module in the hypervisor, the I/O request from the I/O stack of the hypervisor before the I/O request is sent to the virtual disk file;

determining, by the cache module in the hypervisor, a PID associated with I/O request prior to accessing the mapping relationship;

using, by the cache module in the hypervisor, the determined PID to look up and extract a unique identifier for the VM that corresponds to the determined PID from the mapping relationship; and

accessing, by the cache module in the hypervisor, a portion of the SSD corresponding to the unique identifier of the VM that is used as a cache for the VM in order to handle the I/O request.

2. The method of claim 1 , further comprising

receiving a request to allocate an amount of the SSD as the cache for the VM upon a request to start-up the VM on the host computer; and

determining whether the SSD can support the requested allocation.

3. The method of claim 2 , wherein the amount of SSD to allocate as the cache for the VM is maintained as a per-VM caching policy at a remote server configured to provide caching policies to requesting host computers.

4. The method of claim 1 , wherein the PID corresponds to a process associated with a virtual CPU (vCPU) of the VM that is issuing the I/O request.

5. The method of claim 1 , performed within a layer of an I/O stack of the hypervisor supporting execution of VMs on the host computer and further comprising receiving associations of the unique identifiers for VMs with the PIDs associated with processes that respectively correspond to the VMs from a management agent component in the host computer that is configured to receive notifications from the hypervisor upon the startup of VMs on the host computer.

6. The method of claim 1 , further comprising invalidating the portion of the SSD corresponding to the unique identifier of the VM when the VM is shut-down or migrated to a different host computer.

7. The method of claim 1 , wherein the cache for the VM is a write-though cache.

8. The method of claim 1 , wherein:

the process ID is passed through one or more layers of an I/O stack of the hypervisor along with the I/O request, and

the process ID is extracted from data structures that accompany the I/O request though the set of layers of the I/O stack.

9. A non-transitory computer readable storage medium storing instructions which when executed by a host computer cause the host computer to perform a method for caching I/O data in a solid state drive (SSD) locally attached to the host computer supporting the running of a virtual machine (VM), the method comprising:

allocating portions of the SSD to use as cache storage for VMs running on the host computer;

maintaining, by a hypervisor of the host computer, a mapping relationship between unique identifiers for VMs running on the host computer and one or more process identifiers (PIDs) associated with processes running in the host computer that correspond to each of the VM's execution on the host computer;

integrating a cache module into an I/O stack of the hypervisor to allow the cache module to intercept I/O requests before the I/O requests are forwarded to a virtual disk file;

receiving, by the hypervisor, an I/O request from the VM, wherein the VM directed the I/O request for the virtual disk file of the VM that is remotely stored from the host computer;

intercepting, by the cache module in the hypervisor, the I/O request from the I/O stack of the hypervisor before the I/O request is sent to the virtual disk file;

determining, by the cache module in the hypervisor, a PID associated with I/O request prior to accessing the mapping relationship;

using, by the cache module in the hypervisor, the determined PID to look up and extract a unique identifier for the VM that corresponds to the determined PID from the mapping relationship; and

accessing, by the cache module in the hypervisor, a portion of the SSD corresponding to the unique identifier of the VM that is used as a cache for the VM in order to handle the I/O request.

10. The non-transitory computer readable storage medium claim 9 , wherein the method further comprises

receiving a request to allocate an amount of the SSD as the cache for the VM upon a request to start-up the VM on the host computer; and

determining whether the SSD can support the requested allocation.

11. The non-transitory computer readable storage medium claim 10 , wherein the amount of SSD to allocate as the cache for the VM is maintained as a per-VM caching policy at a remote server configured to provide caching policies to requesting host computers.

12. The non-transitory computer readable storage medium claim 9 , wherein the PID corresponds to a process associated with a virtual CPU (vCPU) of the VM that is issuing the I/O request.

13. The non-transitory computer readable storage medium claim 9 , wherein the method is performed within a layer of an I/O stack of the hypervisor supporting execution of VMs on the host computer and further comprising receiving associations of the unique identifiers for VMs with the PIDs associated with processes that respectively correspond to the VMs from a management agent component in the host computer that is configured to receive notifications from the hypervisor upon the startup of VMs on the host computer.

14. The non-transitory computer readable storage medium claim 9 , wherein the method further comprises invalidating the portion of the SSD corresponding to the unique identifier of the VM when the VM is shut-down or migrated to a different host computer.

15. The non-transitory computer readable storage medium claim 9 , wherein the cache for the VM is a write-though cache.

16. A host computer system configured to cache I/O data, the host computer comprising:

a solid state drive (SSD); and

a processor configured to perform the steps of:

allocating portions of the SSD to use as cache storage for VMs running on the host computer;

maintaining, by a hypervisor of the host computer, a mapping relationship between unique identifiers for VMs running on the host computer and one or more process identifiers (PIDs) associated with processes running in the host computer that correspond to each of the VM's execution on the host computer;

integrating a cache module into an I/O stack of the hypervisor to allow the cache module to intercept I/O requests before the I/O requests are forwarded to a virtual disk file;

receiving, by the hypervisor, an I/O request from the VM, wherein the VM directed the I/O request for the virtual disk file of the VM that is remotely stored from the host computer;

intercepting, by the cache module in the hypervisor, the I/O request from the I/O stack of the hypervisor before the I/O request is sent to the virtual disk file;

determining, by the cache module in the hypervisor, a PID associated with I/O request prior to accessing the mapping relationship;

using, by the cache module in the hypervisor, the determined PID to look up and extract a unique identifier for the VM that corresponds to the determined PID from the mapping relationship; and

accessing, by the cache module in the hypervisor, a portion of the SSD corresponding to the unique identifier of the VM that is used as a cache for the VM in order to handle the I/O request.

17. The host computer system of claim 16 , wherein processor is further configured to perform the steps of:

receiving a request to allocate an amount of the SSD as the cache for the VM upon a request to start-up the VM on the host computer; and

determining whether the SSD can support the requested allocation.

18. The host computer system of claim 17 , wherein the amount of SSD to allocate as the cache for the VM is maintained as a per-VM caching policy at a remote server configured to provide caching policies to requesting host computers.

19. The host computer system of claim 16 , wherein the PID corresponds to a process associated with a virtual CPU (vCPU) of the VM that is issuing the I/O request.

20. The host computer system of claim 16 , wherein the steps performed by the processor are performed within a layer of an I/O stack of the hypervisor supporting execution of VMs on the host computer and wherein the processor is further configured to receive associations of the unique identifiers for VMs with the PIDs associated with processes that respectively correspond to the VMs from a management agent component in the host computer that is configured to receive notifications from the hypervisor upon the startup of VMs on the host computer.

21. The host computer of claim 16 , wherein the method further comprises invalidating the portion of the SSD corresponding to the unique identifier of the VM when the VM is shut-down or migrated to a different host computer.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0395 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 23, 2012
From: ZHOU, LI; NAYAK, SAMDEEP; UTTAMCHANDANI, SANDEEP
To: VMWARE, INC.
Reel/Frame 029176/0922 →
Continuity (1)
Related Publication 20140115228A1 · Apr 24, 2014