Dynamically tuning the size of a cache stored in a shared memory
AssigneeDisney Enterprises, Inc.
InventorsSravana Kumar Karnati, Guy A. Molinari, David T. Parkinson
Life of this patent
Estimating the term…
Abstract
A system and method configured to dynamically tune the size of a cache stored in a shared memory minimizes the amount of the shared memory consumed by the cache while achieving a desired cache hit ratio. A maximum size of the cache is computed based on a slope, the current cache size, a target hit ratio, and a current hit ratio. The maximum size is then used to dynamically adjust the size of the cache, decreasing or increasing the size based on the computed maximum size.
Claims20
A computer-implemented method for tuning the size of a dynamically-sized cache in a shared memory, the method comprising:
- determining a plurality of cumulative hit ratios for the dynamically-sized cache, where each cumulative hit ratio is the ratio of a first number of cache reads of data that is stored in the dynamically-sized cache (cache hits) to a sum of the first number and a second number of cache reads of data that is not stored in the dynamically-sized cache (cache misses), wherein at least one cumulative hit ratio of the plurality of cumulative hit ratios is determined when an entry in the dynamically-sized cache is filled in response to a cache miss;
- computing a slope as a first order derivative of each cumulative hit ratio of the dynamically-sized cache with respect to a size of the dynamically-sized cache associated with each cumulative hit ratio;
- computing, based on the slope, a maximum value that limits the size of the dynamically-sized cache in the shared memory;
- and
- adjusting the size of the dynamically-sized cache in the shared memory based on the maximum value.
A system for tuning the size of a dynamically-sized cache in a shared memory, the system comprising:
- a shared memory configured to store the dynamically-sized cache in a portion of the shared memory;
- and
- a cache management unit coupled to the shared memory and configured to:
- determine a plurality of cumulative hit ratios for the dynamically-sized cache, where each cumulative hit ratio is the ratio of a first number of cache reads of data that is stored in the dynamically-sized cache (cache hits) to a sum of the first number and a second number of cache reads of data that is not stored in the dynamically-sized cache (cache misses), wherein at least one cumulative hit ratio of the plurality of cumulative hit ratios is determined when an entry in the dynamically-sized cache is filled in response to a cache miss;
- compute a slope as a first order derivative of each cumulative hit ratio of the dynamically-sized cache with respect to a size of the dynamically-sized cache associated with each hit ratio;
- compute, based on the slope, a maximum value that limits the size of the dynamically-sized cache stored in the shared memory;
- and
- adjust the size of the dynamically-sized cache in the shared memory based on the maximum value.
A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause a computer system to tune the size of a dynamically-sized cache in a shared memory, by performing an operation comprising:
- determining a cumulative hit ratio for the dynamically-sized cache as the ratio of a first number of cache reads of data that is stored in the dynamically-sized cache (cache hits) to a sum of the first number and a second number of cache reads of data that is not stored in the dynamically-sized cache (cache misses), wherein at least one cumulative hit ratio of the plurality of cumulative hit ratios is determined when an entry in the dynamically-sized cache is filled in response to a cache miss;
- computing a slope as a first order derivative of the cumulative hit ratio of the dynamically-sized cache with respect to a size of the dynamically-sized cache associated with each cumulative hit ratio;
- computing, based on the slope, a maximum value that limits the size of the dynamically-sized cache in the shared memory;
- and
- adjusting the size of the dynamically-sized cache in the shared memory based on the maximum value.
Dependencies are inferred from the claim text.