# US 2012/0084776 A1 · Virtual machine stage detection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0084776 A1
- Document ID: US20120084776A1
- Status: Published application
- Kind: A1
- Application number: 12/896,155
- Filed: 2010-10-01
- Published: 2012-04-05
- Earliest claimed: 2010-10-01
- Assignees: International Business Machines Corporation
- Inventors: Marius Pirvu
- Web page: https://patentgrep.com/patent/US20120084776A1

## CPC

- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F 9/45516: {Runtime code conversion or optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer implemented method, system and computer program product for categorizing a virtual machine stage. A data processing system starts a virtual machine. It sets factor-stage ranges, wherein for each combination factor and stage, a corresponding range is present, and wherein each range is as broad as a reset range. It sets a frequency for sampling virtual machine metrics and samples virtual machine metrics to form a plurality of virtual machine metrics for each factor. It applies a value to each range satisfied by each virtual machine metric, to form a plurality of stage-qualifying values corresponding to a range, and sums all stage-qualifying values for each stage, to form a stage likelihood. The data processing system further selects a stage corresponding a highest stage likelihood. The data processing system determines if the current range is different from a former range. The system expands each range corresponding to the current stage.

## Claims

### Claim 1

A computer implemented method to categorize a virtual machine stage, the method comprising:
starting a virtual machine;
setting factor-stage ranges, wherein for each combination factor and stage, a corresponding range is present, and wherein each range is at least as broad as a reset range;
setting a frequency for sampling virtual machine metrics;
sampling virtual machine metrics, consistent at a frequency, to form a plurality of virtual machine metrics for each factor;
applying a value to each range satisfied by each virtual machine metric, to form a plurality of stage-qualifying values corresponding to a range;
summing all stage-qualifying values corresponding to each stage, to form a stage likelihood for each of the stages;
selecting a stage corresponding to a highest stage likelihood, among the plurality of stage likelihoods, as the current stage;
determining if the current range is different than a former range; and
responsive to a determination that the current range is different, expanding each range corresponding to the current stage.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, wherein the virtual machine metric is a non-direct central processing unit virtual machine metric.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, wherein selecting the stage comprises selecting a startup stage; and
responsive to selecting the startup stage, postponing a just-in-time compilation of at least one method.

### Claim 4 (depends on 1)

The computer implemented method of claim 1, wherein selecting the stage comprises selecting an idle stage, and the computer implemented method further comprises:
responsive to selecting the idle stage, reducing a first housekeeping activity of the virtual machine as compared to a second housekeeping activity used in non-idle stages.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein selecting the stage comprises selecting a startup stage, and the computer implemented method further comprises:
inhibiting method profiling in the virtual machine.

### Claim 6 (depends on 1)

The computer implemented method of claim 1, wherein selecting the virtual machine stage comprises selecting the startup stage, the method further comprising:
allocating a first memory amount to the virtual machine in response to selecting the startup stage;
further sampling, applying, summing and selecting the steady stage; and
responsive to selecting the steady stage, allocating a second memory amount larger than the first memory amount.

### Claim 7 (depends on 6)

The computer implemented method of claim 6, the method further comprising:
determining a continuous execution in the steady stage for a predetermined time; and
responsive to the determination of continuous execution in the steady stage, inhibiting just in time compilation.

### Claim 8

A computer implemented method for categorizing a virtual machine stage, the method comprising:
determining for each virtual machine metric and a virtual machine stage combination, that at least one criterion is met or unmet, wherein the virtual machine metric measures performance of a virtual machine;
determining a count of criteria met for each virtual machine stage of the virtual machine;
selecting a selected virtual machine stage from among virtual machine stages, based on the selected virtual machine stage having a most criteria met among each count of criteria met corresponding to each virtual machine stage; and
responsive to selecting the selected virtual machine stage, changing an allocation of data processing system resources in response to selecting the selected virtual machine stage.

### Claim 9 (depends on 8)

The computer implemented method of claim 8, wherein the selected virtual machine stage is steady stage, and changing the allocation of data processing system resources is a change to increase memory allocated to the virtual machine.

### Claim 10

A computer program product to categorize a virtual machine stage, the computer program product comprising: a computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:
computer readable program code configured to start a virtual machine;
computer readable program code configured to set factor-stage ranges, wherein for each combination factor and stage, a corresponding range is present, and wherein each range is at least as broad as a reset range;
computer readable program code configured to set a frequency for sampling virtual machine metrics;
computer readable program code configured to sample virtual machine metrics, consistent at a frequency, to form a plurality of virtual machine metrics for each factor;
computer readable program code configured to apply a value to each range satisfied by each virtual machine metric, to form a plurality of stage-qualifying values corresponding to a range;
computer readable program code configured to sum all stage-qualifying values corresponding to each stage, to form a stage likelihood for each of the stages;
computer readable program code configured to select a stage corresponding to a highest stage likelihood, among the plurality of stage likelihoods, as the current stage;
computer readable program code configured to determine if the current range is different than a former range; and
computer readable program code configured to expand each range corresponding to the current stage, responsive to a determination that the current range is different.

### Claim 11 (depends on 10)

The computer program product of claim 10, wherein the virtual machine metric is a non-direct central processing unit virtual machine metric.

### Claim 12 (depends on 10)

The computer program product of claim 10, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select a startup stage; and
computer readable program code configured to reduce the optimization effort of at least one method, responsive to selecting the startup stage.

### Claim 13 (depends on 10)

The computer program product of claim 10, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select a startup stage; and
computer readable program code configured to postpone a just-in-time compilation of at least one method, responsive to selecting the startup stage.

### Claim 14 (depends on 10)

The computer program product of claim 10, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select an idle stage, and the computer program product further comprises:
computer readable program code configured to reduce a first housekeeping activity of the virtual machine as compared to second housekeeping activity used in non-idle stages.

### Claim 15 (depends on 10)

The computer program product of claim 10, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select a startup stage, and the computer program product further comprises:
computer readable program code configured to inhibit method profiling in the virtual machine.

### Claim 16 (depends on 10)

The computer program product of claim 10, wherein the computer readable program code configured to select the virtual machine stage comprises computer readable program code configured to select the virtual machine stage comprises selecting the startup stage, the method further comprising:
computer readable program code configured to allocate a first memory amount to the virtual machine in response to selecting the startup stage;
further sampling, applying, summing and selecting the steady stage; and
computer readable program code configured to allocate a second memory amount larger than the first memory amount, responsive to selecting the steady stage.

### Claim 17 (depends on 16)

The computer program product of claim 16, the method further comprising:
computer readable program code configured to determine a continuous execution in the steady stage for a predetermined time; and
computer readable program code configured to inhibit just in time compilation, responsive to the determination of continuous execution in the steady stage.

### Claim 18

A data processing system for categorizing a virtual machine stage, the data processing system comprising: a processor, a computer readable memory and a computer readable storage medium; the computer readable program code comprising:
computer readable program code configured to start a virtual machine;
computer readable program code configured to set factor-stage ranges, wherein for each combination factor and stage, a corresponding range is present, and wherein each range is at least as broad as a reset range;
computer readable program code configured to set a frequency for sampling virtual machine metrics; computer readable program code configured to sample virtual machine metrics, consistent at a frequency, to form a plurality of virtual machine metrics for each factor;
computer readable program code configured to apply a value to each range satisfied by each virtual machine metric, to form a plurality of stage-qualifying values corresponding to a range;
computer readable program code configured to sum all stage-qualifying values corresponding to each stage, to form a stage likelihood for each of the stages; computer readable program code configured to select a stage corresponding to a highest stage likelihood, among the plurality of stage likelihoods, as the current stage;
computer readable program code configured to determine if the current range is different than a former range; and
computer readable program code configured to expand each range corresponding to the current stage, responsive to a determination that the current range is different.

### Claim 19 (depends on 18)

The data processing system of claim 18, wherein the virtual machine metric is a non-direct central processing unit virtual machine metric.

### Claim 20 (depends on 18)

The data processing system of claim 18, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select a startup stage; and computer readable program code configured to reduce the optimization effort of at least one method, responsive to selecting the startup stage.

### Claim 21 (depends on 18)

The data processing system of claim 18, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select a startup stage; and computer readable program code configured to postpone a just-in-time compilation of at least one method, responsive to selecting the startup stage.

### Claim 22 (depends on 18)

The data processing system of claim 18, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select an idle stage, and the data processing system further comprises:
computer readable program code configured to reduce a first housekeeping activity of the virtual machine as compared to a second housekeeping activity used in non-idle stages.

### Claim 23 (depends on 18)

The data processing system of claim 18, wherein the computer readable program code configured to select the stage comprises computer readable program code configured to select a startup stage, and the data processing system further comprises:
computer readable program code configured to inhibit method profiling in the virtual machine.

### Claim 24 (depends on 18)

The data processing system of claim 18, wherein the computer readable program code configured to select the virtual machine stage comprises computer readable program code configured to select the virtual machine stage comprises selecting the startup stage, the method wherein the processor further executes computer usable code to computer readable program code configured to allocate a first memory amount to the virtual machine in response to selecting the startup stage; further sample, apply, sum and select the steady stage; and computer readable program code configured to allocate a second memory amount larger than the first memory amount, responsive to selecting the steady stage.

### Claim 25 (depends on 24)

The data processing system of claim 24, the method wherein the processor further executes computer usable code to determine a continuous execution in the steady stage for a predetermined time; and computer readable program code configured to inhibit method profiling, responsive to the determination of continuous execution in the steady stage.
