Claims
- 1. A computer network comprising:
one or more storage devices, wherein the storage devices comprise a plurality of logical volumes, and wherein each logical volume comprises one or more bins, such that each bin corresponds to an area of a storage device; a first and second memory location; a cache, wherein the cache comprises one or more lines of cache operable to store data; a window access table in the first memory location, wherein the window access table contains frequency values corresponding to the number of times an I/O access was directed to data stored in each bin; a hot spot table in the second memory location, wherein the hot spot table contains a hot spot value corresponding to the frequency values contained in the window access table for bins that contain data stored in a cache line; and a logic operable to calculate a hot spot value and make a comparison of the hot spot value for a bin that contains data responsive to an I/O access to one or more hot spot values stored in the hot spot table; and a network appliance operable to replace data stored in a cache line based on the comparison.
- 2. The computer system of claim 1, wherein the network appliance is a memory controller.
- 3. The computer system of claim 2, wherein the memory controller is a storage controller.
- 4. The computer system of claim 1, wherein the network appliance is a storage virtualizer.
- 5. The computer system of claim 1, wherein the first and second memory locations are located in the cache.
- 6. The computer system of claim 1, wherein the network appliance comprises the cache.
- 7. The computer system of claim 1, wherein the window access table comprises a series of time windows for each bin, wherein each time window defines a period of time, such that each successive time window in a series represents a period further back in time and contains the frequency value corresponding to the number of times an I/O access was directed to data stored in the bin associated with that time window during the defined period of time.
- 8. The computer system of claim 7, wherein the hot spot factor is expressed as: hsf(x)=fx0+α1fx1+α2fx2+ . . . +αk−1fxk−1, wherein fxy is the frequency value contained in the window access table for bin x and time window y, and αj is a predetermined scaling factor for time window j.
- 9. The computer system of claim 1, wherein the network appliance comprises the logic.
- 10. A computer network comprising:
one or more storage devices, wherein the storage devices comprise a plurality of logical volumes, and wherein each logical volume comprises one or more bins, such that each bin corresponds to an area of a storage device; a cache, wherein the cache comprises one or more lines of cache operable to store data; a window access table stored cache, wherein the window access table comprises a series of time windows for each bin, wherein each time window is a selected duration of time and corresponds to a selected period of time, such that each successive time window in a series represents a period further back in time and contains a frequency value corresponding to the number of times an I/O access was directed to data stored in the bin associated with that time window; a hot spot table stored in cache, wherein the hot spot table comprises one or more entries corresponding to a line of cache, wherein each entry contains a hot spot value hsf(x) for the bin that contains data that is currently stored in the corresponding line of cache, wherein the hot spot factor is expressed as: hsf(x)=fx0+α1fx1+α2fx2+ . . . +αk−1fxk−1, wherein fxy is the frequency value contained in the window access table for bin x and time window y, and αj is a predetermined scaling factor for time window j, and wherein hsf(z) is the hot spot factor for bin (z) and is the lowest hot spot factor in the hot spot table, and wherein bin (z) contains data that is currently stored in a line of cache; and a memory controller operable to compare hsf(a) to hsf (z) upon receiving an I/O access, wherein hsf(a) is the hot spot factor for bin (a) and wherein bin (a) is the bin that contains data responsive to the I/O access, and replace the data from bin (z) that is in cache with the data from bin (a) if hsf(a) is greater than hsf(z) and the cache is full.
- 11. The computer system of claim 10, wherein the memory controller is a storage controller.
- 12. The computer system of claim 11, wherein the memory controller is a RAID controller.
- 13. The computer system of claim 10, wherein the memory controller comprises the cache.
- 14. The computer system of claim 10, wherein α1>α2> . . . >αk−1.
- 15. The computer system of claim 10, wherein the window access table comprises the hot spot table.
- 16. The computer system of claim 10, wherein each bin is of equal volume.
- 17. The computer system of claim 10, wherein the each time window is of equal duration.
- 18. The computer system of claim 10, wherein the computer system comprises a shared storage network.
- 19. A method for caching data retrieved from one or more storage devices coupled to a computer network, wherein the storage devices comprise a plurality of bins, such that each bin corresponds to an area of a storage device, comprising the steps of:
providing a cache, wherein the cache comprises one or more lines of cache operable to store data; providing a first and second memory location; providing a window access table in the first memory location, wherein the window access table contains frequency values corresponding to the number of times an I/O access was directed to data stored in each bin; providing a hot spot table in the second memory location, wherein the hot spot table contains a hot spot value corresponding to the frequency values contained in the window access table for bins that contain data stored in a cache line; and providing a logic operable to calculate a hot spot value and make a comparison of the hot spot value for a bin that contains data responsive to an I/O access to one or more hot spot values stored in the hot spot table; and providing a network appliance operable to replace data stored in a cache line based on the comparison; receiving an I/O access directed to data stored in a first bin; calculating the hot spot factor of the first bin; comparing the hot spot factor of the first bin to one or more hot spot factors in the hot spot table; and determining which line of cache, if any, to replace with data responsive to the I/O access based on the comparison.
- 20. The method of claim 19, wherein the network appliance is a memory controller.
- 21. The method of claim 20, wherein the memory controller is a storage controller.
- 22. The method of claim 19, wherein the network appliance is a storage virtualizer.
- 23. The method of claim 19, wherein the first and second memory locations are located in the cache.
- 24. The method of claim 19, wherein the network appliance comprises the cache.
- 25. The method of claim 19, wherein the window access table comprises a series of time windows for each bin, wherein each time window defines a period of time, such that each successive time window in a series represents a period further back in time and contains the frequency value corresponding to the number of times an I/O access was directed to data stored in the bin associated with that time window during the defined period of time.
- 26. The method of claim 25, wherein the hot spot factor is expressed as: hsf(x)=fx0+α1fx1+α2fx2+ . . . +αk−1fxk−1, wherein fxy is the frequency value contained in the window access table for bin x and time window y, and αj is a predetermined scaling factor for time window j.
- 27. The method of claim 19, wherein the network appliance comprises the logic.
- 28. A method for caching data retrieved from one or more storage devices coupled to a computer network, wherein the storage devices comprise a plurality of logical volumes, and wherein the logical volumes are apportioned to a plurality of bins, such that each bin corresponds to an area of a storage device, comprising the steps of:
providing a memory controller; providing a cache, wherein the cache comprises one or more lines of cache operable to store data; providing a window access table, wherein the window access table comprises a series of time windows for each bin, wherein each time window is a selected duration of time and corresponds to a selected period of time, such that each successive time window in a series represents a period further back in time and contains a frequency value corresponding to the number of times an I/O access was directed to data stored in the bin associated with that time window; providing a hot spot table, wherein the hot spot table comprises one or more entries corresponding to a line of cache, wherein each entry contains a hot spot value hsf(x) for the bin that contains data that is currently stored in the corresponding line of cache, wherein the hot spot factor is expressed as: hsf(x)=fx0+α1fx1+α2fx2+ . . . +αk−1fxk−1, wherein fxy is the frequency value corresponding to bin x and time window y, and αj is a predetermined scaling factor for time window j; receiving an I/O access directed to data stored in a first bin from an application; updating the frequency value in the window access table corresponding to the current time window for the first bin; determining whether or not a cache hit or a cache miss has occurred; sending the cached data to the application if a cache hit occurs; recalculating the hot spot factors for the bins that contain data that is currently stored in cache and updating the hot spot table with the recalculated hot spot factors if a cache hit occurs; reading data from an area of a storage device corresponding to the first bin and sending the data from the first bin to the application if a cache miss occurs; calculating the hot spot factor for the first bin, adding the data from the first bin to cache and updating the hot spot table with an entry corresponding to the hot spot factor for the first bin for the associated line of cache, if a cache miss occurs and the cache is not full; and comparing the hot spot factor for the first bin to the hot spot factor for a second bin, wherein the second bin is the bin with the lowest associated hot spot factor in the hot spot table, and replacing the data associated with the second bin in cache line with the data from the second bin, and updating the hot spot table with the hot spot value for the first bin in the entry associated with the cache line that previously contained data from the second bin if the hot spot factor for first bin is greater than the hot spot factor for the second bin, a cache miss occurs and the cache is full.
- 29. The method of claim 28, further comprising the step of:
replacing the data associated with the second bin in cache line with the data from the first bin, and updating the hot spot table with the hot spot value for the first bin in X the entry associated with the cache line that previously contained data from the second bin if the hot spot factor for the first bin is equal to the hot spot factor for the second bin, a cache miss occurs and the cache is full.
- 30. The method of claim 28, wherein the memory controller is a storage controller.
- 31. The method of claim 30, wherein the memory controller is a RAID controller.
- 32. The method of claim 28, wherein the memory controller comprises the cache.
- 33. The method of claim 28, wherein α1>α2> . . . >αk−1.
- 34. The method of claim 28, wherein the window access table comprises the hot spot table.
- 35. The method of claim 28, wherein each bin is of equal volume.
- 36. The method of claim 28, wherein the each time window is of equal duration.
- 37. The method of claim 28, wherein the computer system comprises a shared storage network.
- 38. The method of claim 28, further comprising the following steps after the step of receiving an I/O access:
determining whether or not the duration of time for a time window corresponding to the most recent period of time has expired; and restructuring the window access table and updating the hot spot table, if the duration of time for the most recent time window has expired.
- 39. A network appliance operable to be coupled to a computer network comprising one or more storage devices wherein the storage devices comprise a plurality of bins, such that each bin corresponds to an area of a storage device, comprising:
a cache, wherein the cache comprises
one or more lines of cache operable to store data, a window access table located in the first memory location, wherein the window access table contains frequency values corresponding to the number of times an I/O access was directed to data stored in each bin; a hot spot table located in the second memory location, wherein the hot spot table contains a hot spot value corresponding to the frequency values contained in the window access table for bins that contain data stored in a cache line; and a logic operable to calculate a hot spot value and make a comparison of the hot spot value for a bin that contains data responsive to an I/O access to one or more hot spot values stored in the hot spot table.
- 40. The network appliance of claim 39, wherein the network controller is a memory controller.
- 41. The memory controller of claim 40, wherein the memory controller is a storage controller.
- 42. The memory controller of claim 41, wherein the memory controller is a RAID controller.
- 43. The network appliance of claim 39, wherein the network appliance is a storage virtualizer.
- 44. The network appliance of claim 39, wherein the network appliance is processor.
CROSS-REFERENCE OF RELATED APPLICATION
[0001] The application is related to U.S. application titled “System and Method for Time Weighted Access Frequency Based Caching for Memory Controllers” filed by Williams Dawkins et al., which is filed concurrently herewith and which is incorporated herein by reference in its entirety for all purposes.