Adaptive cache sizing
AssigneeVMware, Inc.
InventorsDerek Bruening, Saman Amarasinghe
Life of this patent
Estimating the term…
Abstract
A runtime code manipulation system is provided that supports code transformations on a program while it executes. The runtime code manipulation system uses code caching technology to provide efficient and comprehensive manipulation of an application running on an operating system and hardware. The code cache includes a system for automatically keeping the code cache at an appropriate size for the current working set of an application running.
Claims32
A method for automatically changing the size of a cache, comprising:
- removing old entries in said cache using an eviction policy;
- inserting new entries in said cache;
- maintaining information about regenerated entries and replaced entries;
- and
- resizing said cache based on a function of said information about regenerated entries and replaced entries.
A method for automatically changing the size of a software code cache, comprising:
- removing an old code fragment from said software code cache based on an eviction policy and adding a new code fragment if said software code cache is full;
- maintaining a count of replaced code fragments in response to removing said old code fragment;
- determining whether said new code fragment is regenerated based on whether said new code fragment has previously been in said software code cache;
- maintaining a count of regenerated code fragments;
- and
- resizing said software code cache if a ratio of regenerated code fragments to replaced code fragments is beyond a certain threshold.
One or more processor readable storage devices having processor readable code embodied on said processor readable storage devices, said processor readable code for programming one or more processors to perform a method comprising:
- removing an old entry from a cache using an eviction policy after said cache is fill;
- adding a new entry to said cache;
- determining whether said new entry was previously in said cache;
- incrementing a count of regenerated entries if said new entry was previously in said cache;
- and
- resizing said cache based on said count of regenerated entries and a number of removed entries.
An apparatus capable of automatically changing the size of a cache, comprising:
- one or more storage devices;
- one or more communication interfaces;
- and
- one or more processors in communication with said one or more storage devices and said one or more communication interfaces, said one or more processor programmed to perform a method comprising:
- receiving a new entry to add to a software cache,
- adding said new entry without evicting entries if said software cache is not full,
- removing an old entry and adding said new entry if said software cache is full,
- maintaining a count of removed entries,
- determining whether said new entry has previously been in said software cache,
- incrementing a count of regenerated entries if said new entry has previously been in said software cache,
- determining a ratio of regenerated entries to replaced entries, and
- resizing said cache if said ratio is beyond a certain threshold.
Dependencies are inferred from the claim text.