Efficient input/output-aware multi-processor virtual machine scheduling
Abstract
Computerized methods, computer systems, and computer-readable media for governing how virtual processors are scheduled to particular logical processors are provided. A scheduler is employed to balance a CPU-intensive workload imposed by virtual machines, each having a plurality of virtual processors supported by a root partition, across various logical processors that are running threads and input/output (I/O) operations in parallel. Upon measuring a frequency of the I/O operations performed by a logical processor that is mapped to the root partition, a hardware-interrupt rate is calculated as a function of the frequency. The hardware-interrupt rate is compared against a predetermined threshold rate to determine a level of an I/O-intensive workload being presently carried out by the logical processor. When the hardware-interrupt rate surpasses the predetermined threshold rate, the scheduler refrains from allocating time slices on the logical processor to the virtual machines.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . One or more computer-readable media having computer-executable instructions embodied thereon that, when executed, perform a method for excluding one or more virtual processors from being scheduled to a logical processor, the method comprising:
monitoring over a window of time a pattern of input/output (I/O) operations performed by a root partition, wherein the logical processor is mapped to root partition and is designated to carry out I/O operations issued thereby; deriving an I/O-awareness variable a function of the pattern of I/O operations; based on the I/O-awareness variable, refraining from scheduling tasks issued from the one or more virtual processors onto the logical processor; and at least temporarily storing the I/O-awareness variable at an interrupt table that is accessible by a scheduler.
2 . The one or more computer-readable media of claim 1 , wherein the I/O-awareness variable is expressed as a hardware-interrupt rate, and wherein the method further comprises:
comparing the hardware-interrupt rate against a predetermined threshold rate; and when the hardware-interrupt rate surpasses the predetermined threshold rate, excluding the one or more virtual processors from being scheduled to the logical processor.
3 . The one or more computer-readable media of claim 2 , wherein excluding the one or more virtual processors from being scheduled to the logical processor comprises reserving the logical processor to execute I/O operations issued exclusively by the root partition that is mapped to the logical processor.
4 . The one or more computer-readable media of claim 2 , wherein the method further comprises:
when the hardware-interrupt rate falls below the predetermined threshold rate, allowing the one or more virtual processors to access the logical processor; and updating the interrupt table in accordance with incremented changes that occur to the hardware-interrupt rate.
5 . The one or more computer-readable media of claim 4 , wherein allowing the one or more virtual processors to access the logical processor comprises granting the one or more virtual processors at least one time slice that allocates the logical processor to the one or more virtual processors for a predetermined duration of time.
6 . The one or more computer-readable media of claim 4 , the method further comprising de-scheduling the root partition from the logical processor as a function of the hardware-interrupt rate.
7 . The one or more computer-readable media of claim 1 , wherein monitoring a pattern of I/O operations performed by a root partition comprises periodically inspecting the logical processor to determine whether the root partition has acquired a lock on the logical processor.
8 . The one or more computer-readable media of claim 1 , wherein the pattern of I/O operations performed by a root partition comprises satisfying a request from the one or more virtual machines to process a network packet or carrying out a storage transaction.
9 . The one or more computer-readable media of claim 1 , the method further comprising tracking in a idle-summary table a present availability of a plurality of logical processors within a node on a physical machine, wherein the plurality of logical processors includes the logical processor mapped to the root partition.
10 . The one or more computer-readable media of claim 9 , the method further comprising:
reading the idle-summary table in conjunction with the interrupt table upon detecting a request from the one or more virtual processors to be scheduled to the plurality of logical processors; and selecting one of the plurality of logical processors for allocation to the one or more requesting virtual processors based upon the idle-summary table in conjunction with the interrupt table.
11 . A computer system for disallowing a plurality of logical processors from being scheduled to a particular logical processor as a function of usage thereof, the computer system comprising:
a first node residing on a physical machine, wherein the first node is associated with a plurality of logical processors, and wherein one of the plurality of logical processors is mapped to a root partition; a scheduler running on the physical machine that observes a frequency at which the mapped logical processor executes input/output (I/O) operations issued by the root partition, that refrains from granting a time slice on the mapped logical processor to the virtual processors when the observed frequency reaches a predefined level, and that records in an interrupt table an indication to exclude the mapped logical processor from consideration when scheduling the virtual processors to the plurality of logical processors.
12 . The computer system of claim 11 , wherein a first portion of the plurality of virtual processors comprises a first virtual machine, and wherein the root partition issues the I/O operations to provide the first virtual machine with access to network packets and hardware memory.
13 . The computer system of claim 11 , further comprising a second node residing on the physical machine, wherein the second node is associated with a plurality of logical processors that are segregated from the plurality of logical processors associated with the first node, and wherein one of the plurality of logical processors associated with the second node is mapped to the root partition.
14 . The computer system of claim 13 , wherein a second portion of the plurality of virtual processors comprises a second virtual machine, and wherein the root partition issues the I/O operations to provide the second virtual machine with access to network packets and hardware memory.
15 . The computer system of claim 13 , wherein the scheduler reserves the logical processor mapped to the root partition for exclusive use by the root partition upon detecting that a frequency at which the logical processor mapped to the root partition executes I/O has reached a predefined level.
16 . A computerized method for arresting allocation of a logical processor to one or more virtual processors, the method comprising:
identifying a frequency at which a root partition has acquired a lock on the logical processor, wherein the logical processor is configured to execute input/output (I/O) operations issued by the root partition upon acquiring the lock, and wherein the logical processor is one of a plurality of logical processors that are carved out of a physical machine to execute threads issued by the one or more virtual processors; ascertaining a hardware-interrupt rate as a function of the identified frequency; comparing the hardware-interrupt rate against a predetermined threshold rate; when the hardware-interrupt rate surpasses the predetermined threshold rate, arresting allocation of the logical processor to the one or more virtual processors; and when the hardware-interrupt rate resides below the predetermined threshold rate, scheduling the one or more virtual processors to the logical processor.
17 . The computerized method of claim 16 , wherein arresting allocation of the logical processor to the one or more virtual processors comprises refraining from granting the one or more virtual processors a time slice on the logical processor when the logical processor is available and others of the one or more logical processors are unavailable.
18 . The computerized method of claim 16 , wherein arresting allocation of the logical processor to the one or more virtual processors comprises scheduling the one or more virtual processors to the logical processor at a rate that is inversely proportional to the hardware-interrupt rate.
19 . The computerized method of claim 16 , wherein scheduling the one or more virtual processors to the logical processor comprises:
allocating the logical processor to execute threads issued by the one or more virtual processors at a first rate; and allocating the logical processor to execute I/O operations issued by the root partition at a second rate, wherein the second rate is greater than the first rate.
20 . The computerized method of claim 16 , wherein the first rate and the second rate are stored in a memory location accessible by a scheduler.Join the waitlist — get patent alerts
Track US2015317179A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.