Cache management method, storage system and computer program product
Embodiments of the present disclosure provide a cache management method, storage system and computer program product. The cache management method includes determining an access frequency for each of a plurality of cache pages in a storage system. The method further includes organizing the plurality of cache pages into a plurality of queues based on the access frequency. The method further includes allocating solid-state disks for the plurality of queues based on the access frequency, so that queues where pages with higher access frequency are located have more solid state disks.
1. A method of cache management comprising:
determining an access frequency for each of a plurality of cache pages in a cache of a storage system, the storage system including the cache and an HDD (hard disk drive) matrix below the cache;
organizing, based on the access frequency, the plurality of cache pages into a plurality of queues;
allocating, based on the access frequency, solid-state disks for the plurality of queues, so that a queue where a page with higher access frequency is located has more solid-state disks than has a queue where a page with lower access frequency is located; and
dynamically moving pages among queues of the plurality of queues based on changes in access frequency over time,
wherein pages belonging to queues having higher access frequencies are stored a greater number of times in respective solid-state disks than are pages belonging to queues having lower access frequencies, such that data in pages accessed at higher frequencies is available from a greater number of solid-state disks than is data in pages accessed at lower frequencies,
wherein one of the solid-state disks stores pages that belong to multiple queues having different access frequency.
2. The method according to claim 1 , wherein the plurality of queues comprise a first queue allocated with a first number of solid-state disks and a second queue allocated with a second number of solid-state disks, the first number being larger than the second number.
3. The method according to claim 2 , further comprising:
determining a first access frequency for a first page in the first queue; and
in response to the first access frequency decreasing below a first threshold, moving the first page from the first queue to the second queue.
4. The method according to claim 2 , further comprising:
determining a second access frequency for a second page in the second queue; and
in response to the second access frequency increasing above a second threshold, moving the second page from the second queue to the first queue.
5. The method according to claim 1 , wherein the solid-state disks are read-preference caches.
6. The method according to claim 3 , wherein moving the first page from the first queue to the second queue comprises:
storing data in the first page into the second number of solid-state disks; and
updating metadata associated with the first page.
7. The method according to claim 4 , wherein moving the second page from the second queue to the first queue comprises:
storing data in the second page into the first number of solid-state disks; and
updating metadata associated with the second page.
8. The method according to claim 2 , further comprising:
receiving a read request for the first page in the first queue;
selecting a solid-state disk from the first number of solid state disks; and
reading, from the selected solid-state disk, data to which the read request is targeted.
9. A storage system, comprising:
a cache including a plurality of solid state disks;
an HDD (hard disk drive) matrix below the cache; and
a controller configured to:
determine access frequency for each of a plurality of cache pages in the storage system;
organize, based on the access frequency, the plurality of cache pages into a plurality of queues;
allocate, based on the access frequency, solid-state disks of the plurality of solid-state disks to the plurality of queues, so that a queue where a page with higher access frequency is located has more solid-state disks than has a queue where a page with lower access frequency is located; and
dynamically move pages among queues of the plurality of queues based on changes in access frequency over time,
wherein one of the solid-state disks stores pages that belong to multiple queues having different access frequency.
10. The storage system according to claim 9 , wherein the plurality of queues comprise a first queue allocated with a first number of solid-state disks and a second queue allocated with a second number of solid-state disks, the first number being larger than the second number.
11. The storage system according to claim 10 , wherein the controller is further configured to:
determine a first access frequency for a first page in the first queue; and
in response to the first access frequency decreasing below a first threshold, move the first page from the first queue to the second queue.
12. The storage system according to claim 10 , wherein the controller is further configured to:
determine a second access frequency for a second page in the second queue; and
in response to the second access frequency increasing above a second threshold, move the second page from the second queue to the first queue.
13. The storage system according to claim 9 , wherein the plurality of solid state disks are read-preference caches.
14. The storage system according to claim 11 , wherein moving the first page from the first queue to the second queue comprises:
storing data in the first page into the second number of solid-state disks; and
updating metadata associated with the first page.
15. The storage system according to claim 12 , wherein moving the second page from the second queue to the first queue comprises:
storing data in the second page into the first number of solid-state disks; and
updating metadata associated with the second page.
16. The storage system according to claim 10 , wherein the controller is further configured to:
receive a read request for the first page in the first queue;
select a solid-state disk from the first number of solid-state disks; and
read, from the selected solid-state disk, data to which the read request is targeted.
17. A computer program product for cache management, the computer program product comprising:
a non-transitory computer readable medium encoded with computer-executable code, wherein the code is configured for the execution of:
determining an access frequency for each of a plurality of cache pages in a cache of a storage system, the storage system including the cache and an HDD (hard disk drive) matrix below the cache;
organizing, based on the access frequency, the plurality of cache pages into a plurality of queues;
allocating, based on the access frequency, solid-state disks for the plurality of queues, so that a queue where a page with higher access frequency is located has more solid-state disks than has a queue where a page with lower access frequency is located; and
dynamically moving pages among queues of the plurality of queues based on changes in access frequency over time,
wherein one of the solid-state disks stores pages that belong to multiple queues having different access frequency.
18. The method of claim 1 , wherein two solid-state disks that store respective copies of a particular page are not part of a RAID-1 arrangement.