Elastic caching for Java virtual machines
AssigneeVMware, Inc.
InventorBenjamin J. Corrie
Life of this patent
Estimating the term…
Abstract
A mechanism is provided for managing memory of a runtime environment executing on a virtual machine. The mechanism includes an elastic cache made of objects within heap memory of the runtime environment. When the runtime environment and virtual machine are not experiencing memory pressure from a hypervisor, the objects of the elastic cache may be used to temporarily store application-level cache data from applications running within the runtime environment. When memory pressure from the hypervisor is exerted, the objects of the elastic cache are re-purposed to inflate a memory balloon within heap memory of the runtime environment.
Claims21
A method for managing memory of a runtime environment executing in a virtual machine, the method comprising:
- receiving cache data from an application executing in the runtime environment and storing the received cache data in one or more objects within heap memory of the runtime environment;
- determining, by operation of a memory management agent, a first target size for memory to be reserved within heap memory of the runtime environment;
- identifying at least one of the objects stored in the heap memory that store cache data for the application;
- replacing at least some portion of the cache data stored in the identified object with a first value;
- and
- notifying a hypervisor that at least one machine physical memory page associated with the identified object and having the first value, can be re-claimed.
A non-transitory computer-readable storage medium comprising instructions that, when executed in a computing device, manage memory of a runtime environment executing in a virtual machine, by performing the steps of:
- receiving cache data from an application executing in the runtime environment and storing the received cache data in one or more objects within heap memory of the runtime environment;
- determining, by operation of a memory management agent, a first target size for memory to be reserved within heap memory of the runtime environment;
- identifying at least one of the objects stored in the heap memory that store cache data for the application;
- replacing at least some portion of the cache data stored in the identified object with a first value;
- and
- notifying a hypervisor that at least one machine physical memory page associated with the identified object and having the first value, can be re-claimed.
A computer system for managing memory of a runtime environment executing in a virtual machine, the computer system comprising:
- a system memory comprising a plurality of machine physical memory pages;
- and
- a processor programmed to carry out the steps of:
- receiving cache data from an application executing in the runtime environment and storing the received cache data in one or more objects within heap memory of the runtime environment;
- determining, by operation of a memory management agent, a first target size for memory to be reserved within heap memory of the runtime environment;
- identifying at least one of the objects stored in the heap memory that store cache data for the application;
- replacing at least some portion of the cache data stored in the identified object with a first value;
- and
- notifying a hypervisor that at least one machine physical memory page associated with the identified object and having the first value, can be re-claimed.
Dependencies are inferred from the claim text.