Memory use for garbage collected computer environments
AssigneeGlobalfoundries Inc.
InventorsNorman Bobroff, Arun Iyengar, Peter Westerink
Life of this patent
Estimating the term…
Abstract
A method, processing system, and computer readable storage medium, reduce heap memory used by an application, where unused memory in the heap memory is reclaimed by a garbage collector. A processor periodically monitors the application's memory usage including maximum heap memory size, committed heap memory size, in use heap memory size, and a garbage collection activity level. The processor, based on determining that the monitored garbage collection activity level is below a threshold, releases unused heap memory from the application by reducing the maximum heap memory size.
Claims22
In a processing system including an application, a run-time system, and a heap memory used by the application, wherein unused memory in the heap memory is reclaimed by a garbage collector, a method for reducing memory used by the application comprising:
- periodically monitoring, with the processing system, information related to the application's memory usage including a maximum heap memory size, a committed heap memory size, an in use heap memory size, and a garbage collection activity level;
- based on determining that the garbage collection activity level is below a first threshold, estimating an amount of memory that can be released from the application by reducing the maximum heap memory size;
- and
- based on determining that the estimated amount of memory that can be released from the application is above a second threshold, attempting to release memory from the application by reducing the maximum heap memory size to a value lower than the committed heap memory size, but not lower than the in use heap memory size.
An information processing system comprising:
- a memory;
- a processor communicatively coupled to the memory;
- a garbage collector communicatively coupled to the processor and the memory;
- a system monitor communicatively coupled to the processor and the memory;
- a memory optimizer communicatively coupled to the processor and the memory, wherein an application running on the information processing system is communicatively coupled with a run-time system and a heap memory portion of the memory, wherein unused memory in the heap memory is reclaimed by the garbage collector, and further wherein the system monitor monitors run-time performance information for the run-time system and the heap memory and maintains memory usage parameters for the application including a maximum heap memory size, a committed heap memory size, and an in use heap memory size, and wherein the processor, responsive to executing computer instructions, performs operations comprising:
- maintaining, with the system monitor, memory usage parameters for the application including a maximum heap memory size, a committed heap memory size, and an in use heap memory size;
- reducing, with the memory optimizer, the maximum heap memory size to a value lower than the committed heap memory size but not lower than the in use heap memory size;
- performing, with the garbage collector, a compacting garbage collection on the heap memory to instantiate the reduced value of the maximum heap memory size;
- and
- increasing, with the memory optimizer, the maximum heap memory size to allow the application to allocate more heap memory.
A computer readable storage medium, comprising computer instructions which, responsive to being executed by a processor, the processor being in an information processing system comprised of at least one application including a run-time system and a heap memory wherein unused memory in the heap memory is reclaimed by a garbage collector, the computer instructions cause the processor to perform operations comprising:
- periodically monitoring the application for memory usage including a maximum heap memory size, a committed heap memory size, an in use heap memory size, and a garbage collection activity level;
- and
- in response to the garbage collection activity level falling below a threshold value, attempting to release memory from the application by reducing the maximum heap memory size to a value lower than the committed heap memory size but not lower than the in use heap memory size.
In a system comprised of an application including a run-time system and a heap memory wherein unused memory in the heap memory is reclaimed by a garbage collector, a method for reducing memory used by the application comprising the steps of:
- maintaining memory usage parameters for the application including a maximum heap memory size, a committed heap memory size, and an inuse heap memory size;
- reducing the maximum heap memory size to a value lower than the committed heap memory size but not lower than the inuse heap memory size;
- performing a compacting garbage collection to instantiate the reduced value of maximum heap memory size;
- and
- increasing the maximum heap memory size to allow the application to allocate more heap memory.
In a system comprised of an application including a run-time system and a heap memory wherein unused memory in the heap memory is reclaimed by a garbage collector, a method for reducing memory used by the application comprising the steps of:
- periodically monitoring said application for memory usage including a maximum heap memory size, a committed heap memory size, an inuse heap memory size, and a garbage collection activity level;
- and
- in response to said garbage collection activity level falling below a threshold, attempting to release memory from the application by reducing said maximum heap memory size to a value lower than the committed heap memory size but not lower than the inuse heap memory size.
Dependencies are inferred from the claim text.