Method and apparatus for managing shared cache, and storage medium
AssigneeHuawei Technologies Co., Ltd.
InventorsZehui Chen, Ruliang Dong
Life of this patent
Estimating the term…
Abstract
The present disclosure relates to methods and apparatuses for managing a shared cache. One example method includes determining an access characteristic of accessing the shared cache by IO requests of each of K types that access the shared cache, determining a partition size and an eviction algorithm of the IO requests of each type in the shared cache based on the determined access characteristic and a hit rate of the shared cache, and configuring a cache size of the IO requests of each type in the shared cache as the determined partition size, and configuring an eviction algorithm of the IO requests of each type in the shared cache as the determined eviction algorithm.
Claims20
A method for managing a shared cache, wherein the shared cache is configured to cache data that a plurality of input/output (IO) requests request to operate, the plurality of IO requests correspond to K types of IO requests, the shared cache corresponds to N eviction algorithms, and K and N are integers greater than 1, and wherein the method comprises:
- for each type of the K types, determining an access characteristic of accessing the shared cache by IO requests of the each type to obtain K access characteristics, wherein each access characteristic of the K access characteristics includes N relationships between hit rates and cache sizes of IO requests of a corresponding type of the K types, and each relationship of the N relationships is determined using a respective eviction algorithm of the N eviction algorithms;
- for each type of the K types, determining a partition size and an eviction algorithm of the IO requests of the each type in the shared cache based on the K access characteristics and a hit rate of the shared cache, wherein the determined eviction algorithm is one of the N eviction algorithms;
- and
- for each type of the K types, configuring a cache size of the IO requests of the each type in the shared cache as the determined partition size of the IO requests of the each type in the shared cache, and configuring an eviction algorithm of the IO requests of the each type in the shared cache as the determined eviction algorithm of the IO requests of the each type in the shared cache.
An apparatus for managing a shared cache, wherein the shared cache is configured to cache data that a plurality of input/output (IO) requests request to operate, the plurality of IO requests correspond to K types of IO requests, the shared cache corresponds to N eviction algorithms, and K and N are integers greater than 1, and wherein the apparatus comprises:
- at least one processor;
- and
- at least one memory coupled to the at least one processor and storing programming instructions for execution by the at least one processor to:
- for each type of the K types, determine an access characteristic of accessing the shared cache by IO requests of the each type to obtain K access characteristics, wherein each access characteristic of the K access characteristics includes N relationships between hit rates and cache sizes of IO requests of a corresponding type of the K types, and each relationship of the N relationships is determined using a respective eviction algorithm of the N eviction algorithms;
- for each type of the K types, determine a partition size and an eviction algorithm of the IO requests of the each type in the shared cache based on the K access characteristics and a hit rate of the shared cache, wherein the determined eviction algorithm is one of the N eviction algorithms;
- and
- for each type of the K types, configure a cache size of the IO requests of the each type in the shared cache as the determined partition size of the IO requests of the each type in the shared cache, and configure an eviction algorithm of the IO requests of the each type in the shared cache as the determined eviction algorithm of the IO requests of the each type in the shared cache.
A non-transitory computer-readable storage medium, wherein non-transitory the computer-readable storage medium comprises program instructions, and when the program instructions are run on a computer or a processor, the computer or the processor is enabled to perform operations comprising:
- for each type of K types of input/output (IO) requests, determining an access characteristic of accessing a shared cache by IO requests of the each type to obtain K access characteristics, wherein each access characteristic of the K access characteristics includes N relationships between hit rates and cache sizes of IO requests of a corresponding type of the K types, each relationship of the N relationships is determined using a respective eviction algorithm of N eviction algorithms, and K and N are integers greater than 1;
- for each type of the K types, determining a partition size and an eviction algorithm of the IO requests of the each type in the shared cache based on the K access characteristics and a hit rate of the shared cache, wherein the determined eviction algorithm is one of the N eviction algorithms;
- and
- for each type of the K types, configuring a cache size of the IO requests of the each type in the shared cache as the determined partition size of the IO requests of the each type in the shared cache, and configuring an eviction algorithm of the IO requests of the each type in the shared cache as the determined eviction algorithm of the IO requests of the each type in the shared cache.
Dependencies are inferred from the claim text.