Cache replacement policy for data with strong temporal locality
First Claim
1. A method, comprising:
- receiving a request for an item stored in a cache queue;
promoting the item to a specified position within the cache queue in an event the item satisfies at least one criterion of multiple criteria, wherein the multiple criteria include a reuse period of the item and a reuse distance of the item, wherein the reuse period is an elapsed time between two consecutive accesses of the item, and wherein the reuse distance is a number of different items accessed between the two consecutive accesses of the item, wherein promoting the item to the specified position includes promoting the item to a head of the cache queue; and
otherwise maintaining a location of the item in the cache queue in an event the item does not satisfy any of the reuse period and the reuse distance.
2 Assignments
0 Petitions
Accused Products
Abstract
Various cache replacement policies are described whose goals are to identify items for eviction from the cache that are not accessed often and to identify items stored in the cache that are regularly accessed that should be maintained longer in the cache. In particular, the cache replacement policies are useful for workloads that have a strong temporal locality, that is, items that are accessed very frequently for a period of time and then quickly decay in terms of further accesses. In one embodiment, a variation on the traditional least recently used caching algorithm uses a reuse period or reuse distance for an accessed item to determine whether the item should be promoted in the cache queue. In one embodiment, a variation on the traditional two queue caching algorithm evicts items from the cache from both an active queue and an inactive queue.
-
Citations
20 Claims
-
1. A method, comprising:
-
receiving a request for an item stored in a cache queue; promoting the item to a specified position within the cache queue in an event the item satisfies at least one criterion of multiple criteria, wherein the multiple criteria include a reuse period of the item and a reuse distance of the item, wherein the reuse period is an elapsed time between two consecutive accesses of the item, and wherein the reuse distance is a number of different items accessed between the two consecutive accesses of the item, wherein promoting the item to the specified position includes promoting the item to a head of the cache queue; and otherwise maintaining a location of the item in the cache queue in an event the item does not satisfy any of the reuse period and the reuse distance. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method, comprising:
-
maintaining an active queue and an inactive queue in a cache, the active queue having a first plurality of items, the inactive queue having a second plurality of items; receiving a request for an item; placing the requested item within the inactive queue of the cache in an event requested item is not already stored in the active queue or the inactive queue of the cache; moving the requested item to a head of the active queue in an event the requested item is already stored in the inactive queue; promoting the requested item to a specified position within the active queue of the cache in an event the requested item is already stored in the active queue; and evicting an existing item from the cache, wherein the existing item is selected for eviction from; a tail of the active queue in an event a ratio of a length of the active queue to the inactive queue exceeds a specified range, the existing item evicted from the cache without further being stored in the inactive queue, and a tail of the inactive queue in an event the ratio is below the specified range. - View Dependent Claims (12, 13, 14, 15, 16, 17)
-
-
18. A non-transitory computer readable storage medium storing instructions, comprising:
-
instructions for receiving a request for an item stored in a cache queue, the cache queue including an active queue and an inactive queue, the active queue having a first plurality of items, the inactive queue having a second plurality of items; instructions for promoting the requested item to a head of the cache queue in an event the requested item satisfies a criterion and is in the active queue, the head of the cache queue being within the active queue of the cache queue, wherein the cache queue is configured to evict one of the first plurality of items from the active queue without further being stored in the inactive queue, wherein the cache queue is configured to evict a specified item from the active queue or the inactive queue based on a ratio of the length of the active queue to the inactive queue; instructions for moving the requested item to the head of the active queue in an event the requested item is already stored in the inactive queue; instructions for associating every item in the cache queue with a recycle bit, wherein the recycle bit associated with each item is initially unset at zero; instructions for determining, in an event a tail item of the cache queue is to be evicted, whether the recycle bit for the tail item has been set; and instructions for, in an event the recycle bit for the tail item has not been set; setting the recycle bit for the tail item; and promoting the tail item to a head of the inactive queue of the cache queue; and instructions for evicting the tail item from the cache queue in an event the recycle bit for the tail item has been set. - View Dependent Claims (19, 20)
-
Specification