IP Library › Granted Patent US 9,311,236
Granted Patent B2
US 9,311,236 · App. 13/682,086 · Granted Apr 12, 2016

Out-of-memory avoidance in dynamic virtual machine memory adjustment

Inventors: Michael H. Dawson (Ottawa, CA); Charles R. Gracie (Kanata, CA); Graeme D. Johnson (Ottawa, CA)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F12/0253G06F3/0604G06F3/0608G06F3/0626G06F3/0629G06F3/0631G06F12/00G06F12/02G06F12/023G06F12/0269G06F12/0615G06F12/0646
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,311,236
App. No.
13/682,086
Granted
Apr 12, 2016
Kind
B2
Abstract

An unused free memory shortage relative to an adjusted heap maximum size associated with a memory heap of application memory is detected. The adjusted heap maximum size is set to a heap size smaller than a maximum heap allocation size. An increase to the adjusted heap maximum size that resolves the unused free memory shortage is calculated. The adjusted heap maximum size is increased by the calculated increase to the adjusted heap maximum size.

Claims (59)

1. A system, comprising:

a memory; and

a processor programmed to:

detect an unused free memory shortage relative to an adjusted heap maximum size associated with a memory heap of application memory allocations within the memory, where the adjusted heap maximum size is set to a heap size smaller than a maximum heap allocation size;

calculate an increase to the adjusted heap maximum size that resolves the unused free memory shortage; and

increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size.

2. The system of claim 1 , where in being programmed to detect the unused free memory shortage relative to the adjusted heap maximum size associated with the memory heap of application memory allocations within the memory, the processor is programmed to:

receive a memory allocation request from an application;

determine an amount of memory requested by the application; and

determine that the amount of memory requested by the application would cause the memory heap of application memory allocations to exceed the adjusted heap maximum size.

3. The system of claim 2 , where:

in being programmed to calculate the increase to the adjusted heap maximum size that resolves the unused free memory shortage, the processor is programmed to:

assign the determined amount of memory requested by the application as the calculated increase to the adjusted heap maximum size; and

in being programmed to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size, the processor is programmed to:

increase the adjusted heap maximum size by the determined amount of memory requested by the application.

4. The system of claim 1 , where:

in being programmed to detect the unused free memory shortage relative to the adjusted heap maximum size associated with the memory heap of application memory allocations within the memory, the processor is programmed to determine that garbage collection processing involves an increased difficulty in garbage collection activities to create unused free memory space relative to a configured normal workload to free memory within the memory heap; and

in being programmed to calculate the increase to the adjusted heap maximum size that resolves the unused free memory shortage, the processor is programmed to calculate an amount of additional heap memory that returns the garbage collection activities to the configured normal workload to free memory within the memory heap.

5. The system of claim 1 , where in being programmed to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size, the processor is programmed to one of change an adjusted heap maximum size value and deflate a heap consumption balloon.

6. The system of claim 1 , where the processor is further programmed to:

block, in response to detecting the unused free memory shortage, a requested application memory allocation; and

unblock the requested application memory allocation in response to increasing the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size.

7. The system of claim 1 , where in being programmed to detect the unused free memory shortage relative to the adjusted heap maximum size associated with the memory heap of application memory allocations within the memory, the processor is programmed to detect the unused free memory shortage via a garbage collector executed by the processor, and the processor is further programmed to:

trigger, via the garbage collector in response to detecting the unused free memory shortage, an out-of-memory handler to process the detected unused free memory shortage;

where in being programmed to calculate the increase to the adjusted heap maximum size that resolves the unused free memory shortage, the processor is programmed to calculate, via the out-of-memory handler, the increase to the adjusted heap maximum size to resolve the unused free memory shortage; and

the processor is further programmed to request, via the out-of-memory handler, the garbage collector to retry a requested application memory allocation in response to increasing the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size.

8. The system of claim 1 , where the processor is further programmed to:

utilize a memory allocation policy to identify total memory and allocations associated with a plurality of instantiated virtual machines;

reclaim unused heap space from at least one of the plurality of instantiated virtual machines based upon the memory allocation policy; and

where in being programmed to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size, the processor is programmed to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size using the reclaimed unused heap space.

9. A computer program product, comprising:

a computer readable storage memory having computer readable program code embodied therewith, where the computer readable program code when executed on a computer causes the computer to:

detect an unused free memory shortage relative to an adjusted heap maximum size associated with a memory heap of application memory allocations, where the adjusted heap maximum size is set to a heap size smaller than a maximum heap allocation size;

calculate an increase to the adjusted heap maximum size that resolves the unused free memory shortage; and

increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size.

10. The computer program product of claim 9 , where in causing the computer to detect the unused free memory shortage relative to the adjusted heap maximum size associated with the memory heap of application memory allocations, the computer readable program code when executed on the computer causes the computer to:

receive a memory allocation request from an application;

determine an amount of memory requested by the application; and

determine that the amount of memory requested by the application would cause the memory heap of application memory allocations to exceed the adjusted heap maximum size.

11. The computer program product of claim 10 , where:

in causing the computer to calculate the increase to the adjusted heap maximum size that resolves the unused free memory shortage, the computer readable program code when executed on the computer causes the computer to:

assign the determined amount of memory requested by the application as the calculated increase to the adjusted heap maximum size; and

in causing the computer to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size, the computer readable program code when executed on the computer causes the computer to:

increase the adjusted heap maximum size by the determined amount of memory requested by the application.

12. The computer program product of claim 9 , where:

in causing the computer to detect the unused free memory shortage relative to the adjusted heap maximum size associated with the memory heap of application memory allocations, the computer readable program code when executed on the computer causes the computer to determine that garbage collection processing involves an increased difficulty in garbage collection activities to create unused free memory space relative to a configured normal workload to free memory within the memory heap; and

in causing the computer to calculate the increase to the adjusted heap maximum size that resolves the unused free memory shortage, the computer readable program code when executed on the computer causes the computer to calculate an amount of additional heap memory that returns the garbage collection activities to the configured normal workload to free memory within the memory heap.

13. The computer program product of claim 9 , where in causing the computer to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size, the computer readable program code when executed on the computer causes the computer to one of change an adjusted heap maximum size value and deflate a heap consumption balloon.

14. The computer program product of claim 9 , where the computer readable program code when executed on the computer further causes the computer to:

block, in response to detecting the unused free memory shortage, a requested application memory allocation; and

unblock the requested application memory allocation in response to increasing the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size.

15. The computer program product of claim 9 , where in causing the computer to detect the unused free memory shortage relative to an adjusted heap maximum size associated with the memory heap of application memory allocations, the computer readable program code when executed on the computer causes the computer to detect the unused free memory shortage via a garbage collector, and the computer readable program code when executed on the computer further causes the computer to:

trigger, via the garbage collector in response to detecting the unused free memory shortage, an out-of-memory handler to process the detected unused free memory shortage;

where in causing the computer to calculate the increase to the adjusted heap maximum size that resolves the unused free memory shortage the computer readable program code when executed on the computer causes the computer to calculate, via the out-of-memory handler, the increase to the adjusted heap maximum size to resolve the unused free memory shortage; and

the computer readable program code when executed on the computer further causes the computer to request, via the out-of-memory handler, the garbage collector to retry a requested application memory allocation in response to increasing the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size.

16. The computer program product of claim 9 , where the computer readable program code when executed on the computer further causes the computer to:

utilize a memory allocation policy to identify total memory and allocations associated with a plurality of instantiated virtual machines;

reclaim unused heap space from at least one of the plurality of instantiated virtual machines based upon the memory allocation policy; and

where in causing the computer to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size, the computer readable program code when executed on the computer causes the computer to increase the adjusted heap maximum size by the calculated increase to the adjusted heap maximum size using the reclaimed unused heap space.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2012
From: DAWSON, MICHAEL H.; GRACIE, CHARLES R.; JOHNSON, GRAEME D.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 029340/0477 →
Continuity (1)
Related Publication 20140143516A1 · May 22, 2014