Detection of avoidable cache thrashing for OLTP and DW workloads
First Claim
1. A method comprising:
- storing in memory, in response to evicting a particular item from a cache, a metadata entry for the particular item;
detecting, in response to a cache miss for the particular item, whether or not the metadata entry for the particular item resides in memory;
incrementing, when the metadata entry for the particular item is detected in memory, a victim hit counter;
incrementing, when a second metadata entry for a second item is detected in memory, same said victim hit counter;
adjusting, based on the victim hit counter, a policy of the cache.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided to adjust the behavior of a cache based on a count of cache misses for items recently evicted. In an embodiment, a computer responds to evicting a particular item (PI) from a cache by storing a metadata entry for the PI into memory. In response to a cache miss for the PI, the computer detects whether or not the metadata entry for the PI resides in memory. When the metadata entry for the PI is detected in memory, the computer increments a victim hit counter (VHC) that may be used to calculate how much avoidable thrashing is the cache experiencing, which is how much thrashing would be reduced if the cache were expanded. Either immediately or arbitrarily later, the computer adjusts a policy of the cache based on the VHC'"'"'s value. For example, the computer may adjust the capacity of the cache based on the VHC.
120 Citations
22 Claims
-
1. A method comprising:
-
storing in memory, in response to evicting a particular item from a cache, a metadata entry for the particular item; detecting, in response to a cache miss for the particular item, whether or not the metadata entry for the particular item resides in memory; incrementing, when the metadata entry for the particular item is detected in memory, a victim hit counter; incrementing, when a second metadata entry for a second item is detected in memory, same said victim hit counter; adjusting, based on the victim hit counter, a policy of the cache. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
-
storing in memory, in response to evicting a particular item from a cache, a metadata entry for the particular item; detecting, in response to a cache miss for the particular item, whether or not the metadata entry for the particular item resides in memory; incrementing, when the metadata entry for the particular item is detected in memory, a victim hit counter; incrementing, when a second metadata entry for a second item is detected in memory, same said victim hit counter; adjusting, based on the victim hit counter, a policy of the cache. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22)
-
Specification