IP Library Granted Patent US 9,389,894
Granted Patent B1
US 9,389,894 · App. 14/514,604 · Granted Jul 12, 2016

Flexible processor association for virtual machines

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,389,894
App. No.
14/514,604
Granted
Jul 12, 2016
Kind
B1
Abstract

The present disclosure relates to flexible processor association for virtual machine instances. One example method includes initializing a virtual machine instance on a particular computing device, the particular computing device including a plurality of physical processors, determining a maximum number of the physical processors available to be associated with the virtual machine instance; initializing a number of virtual processors for use by the virtual machine instance, the same as the maximum number of the physical processors; associating the virtual machine instance with a number of the physical processors less than the maximum number of the physical processors; during execution of the virtual machine instance: identifying a change in a demand metric associated with the virtual machine instance; and adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors.

Claims (73)

1. A computer-implemented method executed by one or more processors, the method comprising:

initializing a virtual machine instance on a particular computing device, the particular computing device including a plurality of physical processors;

determining a maximum number of the physical processors available to be associated with the virtual machine instance to execute instructions provided by the virtual instance;

initializing a number of virtual processors for use by the virtual machine instance, wherein the number of virtual processors initialized is the same as the maximum number of the physical processors available to be associated to the virtual machine instance, and wherein each virtual processor is configured to receive instructions for execution from the virtual machine instance and execute the received instructions using the physical processors associated with the virtual instance;

associating the virtual machine instance with a number of the physical processors, the number being less than the maximum number of the physical processors available to be associated to the virtual machine instance;

executing the virtual machine instance on the particular computing device;

during execution of the virtual machine instance:

identifying a change in a demand metric associated with the virtual machine instance, the demand metric indicating a prediction of future usage of the physical processors by the virtual machine instance; and

adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors.

2. The method of claim 1 , wherein the demand metric includes an average number of threads in run queues associated with each virtual processor, each run queue configured to store references to threads of the virtual machine instance while the virtual processor is waiting for one of the physical processors associated with the virtual machine instance to be available to execute each thread.

3. The method of claim 1 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of increased future usage of the physical processors by the virtual machine instance;

in response to determining that the change in the demand metric indicates a prediction of increased future usage:

determining that the number of physical processors associated with the virtual machine instance is less than the maximum number of the physical processors available to be associated with the virtual machine instance; and

in response to determining that the number of physical processors associated with the virtual machine instance is less than the maximum number, associating one or more additional physical processors with the virtual machine instance while maintaining the number of virtual processors.

4. The method of claim 1 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of decreased future usage of the physical processors by the virtual machine instance; and

in response to determining that the change in the demand metric indicates a prediction of decreased future usage, disassociating one or more physical processors from the virtual machine instance while maintaining the number of virtual processors.

5. The method of claim 1 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of decreased future usage of the physical processors by the virtual machine instance;

determining that the number of the physical processors associated with the virtual machine instance is equal to a number of dedicated physical processors for the virtual machine instance; and

in response to determining that the number of the physical processors associated with the virtual machine instance is equal to the number of dedicated physical processors for the virtual machine instance, maintaining the number of physical processors associated with the virtual machine instance while maintaining the number of virtual processors.

6. The method of claim 1 , wherein adjusting the number of the physical processors associated with the virtual machine instance includes setting a physical processor affinity attribute of the virtual machine instance in an operating system executing on the computing device.

7. The method of claim 1 , wherein adjusting the number of the physical processors associated with the virtual machine instance is performed without notifying one or more software applications executing within the virtual machine instance.

8. A non-transitory, computer-readable medium storing instructions operable when executed to cause at least one processor to perform operations comprising:

initializing a virtual machine instance on a particular computing device, the particular computing device including a plurality of physical processors;

determining a maximum number of the physical processors available to be associated with the virtual machine instance to execute instructions provided by the virtual instance;

initializing a number of virtual processors for use by the virtual machine instance, wherein the number of virtual processors initialized is the same as the maximum number of the physical processors available to be associated to the virtual machine instance, and wherein each virtual processor is configured to receive instructions for execution from the virtual machine instance and execute the received instructions using the physical processors associated with the virtual instance;

associating the virtual machine instance with a number of the physical processors, the number being less than the maximum number of the physical processors available to be associated to the virtual machine instance;

executing the virtual machine instance on the particular computing device;

during execution of the virtual machine instance:

identifying a change in a demand metric associated with the virtual machine instance, the demand metric indicating a prediction of future usage of the physical processors by the virtual machine instance; and

adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors.

9. The computer-readable medium of claim 8 , wherein the demand metric includes an average number of threads in run queues associated with each virtual processor, each run queue configured to store references to threads of the virtual machine instance while the virtual processor is waiting for one of the physical processors associated with the virtual machine instance to be available to execute each thread.

10. The computer-readable medium of claim 8 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of increased future usage of the physical processors by the virtual machine instance;

in response to determining that the change in the demand metric indicates a prediction of increased future usage:

determining that the number of physical processors associated with the virtual machine instance is less than the maximum number of the physical processors available to be associated with the virtual machine instance; and

in response to determining that the number of physical processors associated with the virtual machine instance is less than the maximum number, associating one or more additional physical processors with the virtual machine instance while maintaining the number of virtual processors.

11. The computer-readable medium of claim 8 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of decreased future usage of the physical processors by the virtual machine instance; and

in response to determining that the change in the demand metric indicates a prediction of decreased future usage, disassociating one or more physical processors from the virtual machine instance while maintaining the number of virtual processors.

12. The computer-readable medium of claim 8 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of decreased future usage of the physical processors by the virtual machine instance;

determining that the number of the physical processors associated with the virtual machine instance is equal to a number of dedicated physical processors for the virtual machine instance; and

in response to determining that the number of the physical processors associated with the virtual machine instance is equal to the number of dedicated physical processors for the virtual machine instance, maintaining the number of physical processors associated with the virtual machine instance while maintaining the number of virtual processors.

13. The computer-readable medium of claim 8 , wherein adjusting the number of the physical processors associated with the virtual machine instance includes setting a physical processor affinity attribute of the virtual machine instance in an operating system executing on the computing device.

14. The computer-readable medium of claim 8 , wherein adjusting the number of the physical processors associated with the virtual machine instance is performed without notifying one or more software applications executing within the virtual machine instance.

15. A system comprising:

memory for storing data; and

one or more processors operable to perform operations comprising:

initializing a virtual machine instance on a particular computing device, the particular computing device including a plurality of physical processors;

determining a maximum number of the physical processors available to be associated with the virtual machine instance to execute instructions provided by the virtual instance;

initializing a number of virtual processors for use by the virtual machine instance, wherein the number of virtual processors initialized is the same as the maximum number of the physical processors available to be associated to the virtual machine instance, and wherein each virtual processor is configured to receive instructions for execution from the virtual machine instance and execute the received instructions using the physical processors associated with the virtual instance;

associating the virtual machine instance with a number of the physical processors, the number being less than the maximum number of the physical processors available to be associated to the virtual machine instance;

executing the virtual machine instance on the particular computing device;

during execution of the virtual machine instance:

identifying a change in a demand metric associated with the virtual machine instance, the demand metric indicating a prediction of future usage of the physical processors by the virtual machine instance; and

adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors.

16. The system of claim 15 , wherein the demand metric includes an average number of threads in run queues associated with each virtual processor, each run queue configured to store references to threads of the virtual machine instance while the virtual processor is waiting for one of the physical processors associated with the virtual machine instance to be available to execute each thread.

17. The system of claim 15 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of increased future usage of the physical processors by the virtual machine instance;

in response to determining that the change in the demand metric indicates a prediction of increased future usage:

determining that the number of physical processors associated with the virtual machine instance is less than the maximum number of the physical processors available to be associated with the virtual machine instance; and

in response to determining that the number of physical processors associated with the virtual machine instance is less than the maximum number, associating one or more additional physical processors with the virtual machine instance while maintaining the number of virtual processors.

18. The system of claim 15 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of decreased future usage of the physical processors by the virtual machine instance; and

in response to determining that the change in the demand metric indicates a prediction of decreased future usage, disassociating one or more physical processors from the virtual machine instance while maintaining the number of virtual processors.

19. The system of claim 15 , wherein adjusting the number of the physical processors associated with the virtual machine instance based on the identified change in the demand metric while maintaining the number of virtual processors includes:

determining that the change in the demand metric indicates a prediction of decreased future usage of the physical processors by the virtual machine instance;

determining that the number of the physical processors associated with the virtual machine instance is equal to a number of dedicated physical processors for the virtual machine instance; and

in response to determining that the number of the physical processors associated with the virtual machine instance is equal to the number of dedicated physical processors for the virtual machine instance, maintaining the number of physical processors associated with the virtual machine instance while maintaining the number of virtual processors.

20. The system of claim 15 , wherein adjusting the number of the physical processors associated with the virtual machine instance includes setting a physical processor affinity attribute of the virtual machine instance in an operating system executing on the computing device.

Assignments (2)
CHANGE OF NAME Recorded Oct 2, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044566/0657 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 24, 2014
From: ZHANG, XIAO; ZHANG, XIAOPAN
To: GOOGLE INC.
Reel/Frame 034025/0746 →