Method, system, and program for improving cache hit ratio for selected volumes in a storage system
By differentiating between preferred and non-preferred storage elements and extending their residency in the cache, the cache management system addresses cache miss issues in synchronous I/O, enhancing cache hit rates and optimizing performance.
Patent Information
- Application Number
- JP2021567777
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-05-12
- Filing Date
- 2020-04-28
- Publication Date
- 2024-11-11
- Estimated Expiration
- 2040-04-28
AI Technical Summary
Existing synchronous I/O technologies like zHyperLink face delays due to cache misses, leading to failed operations and the need for slower communication paths, which affect the cache hit ratio and overall performance.
Implementing a cache management system that distinguishes between preferred and non-preferred storage elements, maintaining preferred elements in the cache for a longer duration than non-preferred elements by using a residency multiplier, and adjusting cache eviction policies to prioritize critical data.
Enhances cache hit rates for critical data, optimizing synchronous I/O operations and reducing the need for slower communication paths, thereby improving overall system performance and reliability.
Smart Images

Figure 0007580398000001 
Figure 0007580398000002 
Figure 0007580398000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a system and method for increasing the cache hit rate of selected volumes in a storage system. [Background technology]
[0002] When an I / O request is made by an application, several processes may be running to complete the request. These processes contribute to I / O latency, which can be a significant portion of application response time. zHyperLink is a technology designed to reduce I / O latency by providing a fast, reliable, direct communication path between host systems and storage systems. This is accomplished by installing zHyperLink adapters in z / OS host systems and storage systems, and connecting the components together using zHyperLink cables. This configuration creates a point-to-point connection between host systems and storage systems, which reduces I / O response times by up to 10 times compared to z High-Performance FICON® (zHPF). Such low response times are achieved by using synchronous I / O requests, which reduces the amount of time required for several functions, such as I / O interrupt operations and z / OS dispatch operations.
[0003] Standard I / O processing available using technologies such as zHPF requires an I / O operation to perform a series of time-consuming tasks, such as z / OS dispatching, interrupt handling, CPU queuing, and L1 / L2 processor cache reloading. These tasks and others required for I / O processing can result in I / O response times of over 130 microseconds plus the time for interrupt handling and CPU dispatch, which can be relatively long compared to the transfer of data within virtual storage.
[0004] Typically, with zHyperLink or synchronous I / O, when a synchronous I / O operation is performed, the CPU on the host system waits or "spins" until the I / O completes or a timeout value is reached. zHyperLink can greatly reduce the time required to complete an I / O because dispatch, interrupt handling, CPU queue time, and CPU cache reload operations are no longer required. This saves the two context swaps involved in a typical I / O operation, putting a thread to sleep and then redispatching it, and the processor time associated with servicing the I / O interrupt.
[0005] To achieve the I / O response time improvements associated with synchronous I / O (e.g., zHyperLink), the code pathways used to process the I / O must be highly optimized. Any condition that delays a synchronous I / O operation, such as a cache miss, can cause a notification to be sent back to the host system, which can then retry the operation using a slower communication pathway, such as zHPF. Synchronous I / O is only successful when the microcode can complete the synchronous I / O operation in a very small amount of time, such as 10-30 microseconds. If a synchronous I / O operation cannot be completed in that amount of time, it may fail and the host system may need to retry the operation over a less optimal pathway, such as FICON.
[0006] In view of the above, what is needed is a system and method for improving cache hit rates for selected volumes when using synchronous I / O technologies such as zHyperLink, ideally reducing or preventing delays that can prevent synchronous I / O operations from being performed. Summary of the Invention
[0007] The present invention has been developed in response to the current state of the art, and in particular in response to problems and needs in the art not yet fully addressed by currently available systems and methods. In response, systems and methods have been developed to improve cache hit rates for selected volumes when using synchronous I / O processes. The features and advantages of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.
[0008] In accordance with the above, a method is disclosed for improving cache hit ratios for a selected volume when using synchronous I / O. In one embodiment, such a method includes establishing in the cache a first set of non-preferred storage elements from the non-preferred storage area. The method further establishes in the cache a second set of preferred storage elements from the preferred storage area. The method calculates a life expectancy that the non-preferred storage elements will have in the cache before eviction. The method further implements an eviction policy for the cache, such that the preferred storage elements are maintained in the cache for at least several times the expected life of the non-preferred storage elements. In a particular embodiment, the method calculates the expected life by subtracting a timestamp of a least recently used non-preferred storage element in the first set from a timestamp of a most recently used non-preferred storage element in the first set. The disclosed method reduces or prevents delays when accessing the preferred storage area that can impair the operation of synchronous I / O (e.g., zHyperLink) processes.
[0009] Corresponding systems and computer program products are also disclosed and claimed herein.
[0010] So that the advantages of the present invention may be readily understood, a more particular description of the invention, briefly described above, can be made by reference to specific embodiments which are illustrated in the accompanying drawings, in which:
[0023] Embodiments of the invention will now be described and explained with greater specificity and detail through the use of the following accompanying drawings, with the understanding that these drawings depict only typical embodiments of the invention and are therefore not intended to limit its scope, and in which: [Brief description of the drawings]
[0011] [Figure 1] 1 is a high-level block diagram illustrating an example of a network environment in which systems and methods consistent with the present invention may be implemented; [Diagram 2] 2 is a high-level block diagram illustrating an example of a storage system that may be used in the network environment of FIG. 1. [Diagram 3] A high level block diagram showing different communication paths between a host system and a storage system. [Figure 4] 1 is a high-level block diagram illustrating a system for improving cache hit rates for selected volumes when using synchronous I / O. [Diagram 5] FIG. 2 is a high level block diagram showing various exemplary sub-modules within an optimization module according to the present invention. [Figure 6] FIG. 2 is a flow diagram illustrating one embodiment of a method for evict storage elements from a cache to free up space in the cache while preferring preferred storage elements. [Figure 7] 1 is a high-level block diagram showing a host system sending commands and / or lists to a storage system to specify which volumes should be treated as preferred and non-preferred. [Figure 8] FIG. 11 is a flow diagram illustrating an alternative method for evicting storage elements from a cache to free up space in the cache while preferring preferred storage elements. [Figure 9]1 is a high level block diagram showing a host system sending a residency multiplier to a storage system to indicate how strong a cache preference should be applied to a preferred volume. [Figure 10] 2 is a high level block diagram illustrating a preference adjustment module for adjusting cache preferences for a preferred volume. [Figure 11] FIG. 1 is a high-level block diagram illustrating a first example list of preferred volumes and associated residency multipliers. [Figure 12] FIG. 13 is a high level block diagram illustrating a second example list of preferred volumes and associated residency multipliers. [Figure 13] 1 is a high-level block diagram showing the LRU lists for each group of preferred volumes having the same residency multiplier, and the LRU lists for non-preferred volumes. [Figure 14] 14 is a flow diagram illustrating a method for evicting storage elements from a cache using an LRU list such as that shown in FIG. 13. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] It will be readily understood that the components of the present invention, while generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the present invention as represented in the figures is not intended to limit the scope of the invention as claimed, but merely represents specific examples of the inventive embodiments contemplated herein. The embodiments described herein can be best understood by reference to the drawings, in which like parts are designated with like numerals throughout.
[0013] The present invention may be embodied as a system, method, and / or computer program product, which may include a computer readable storage medium having computer readable program instructions for causing a processor to perform aspects of the present invention.
[0014] A computer readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. A non-exhaustive list of more specific examples of computer readable storage media includes the following: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded devices such as punch cards or ridge structures in grooves on which instructions are recorded, and any suitable combination of the above. As used herein, computer-readable storage media should not be construed as ephemeral signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over wires.
[0015] The computer readable program instructions described herein may be downloaded from the computer readable storage medium to the respective computing / processing device or to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may comprise copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions to be stored on the computer readable storage medium in the respective computing / processing device.
[0016] Computer readable program instructions for carrying out the operations of the present invention may be either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk®, C++, and conventional procedural programming languages, such as the “C” programming language or similar programming languages.
[0017] The computer readable program instructions may be executed exclusively on the user's computer, partially on the user's computer as a stand-alone software package, partially on the user's computer and partially on a remote computer, or exclusively on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer readable program instructions to personalize the electronic circuitry by utilizing state information of the computer readable program instructions to perform aspects of the invention.
[0018] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.
[0019] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, produce means for performing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams. These computer readable program instructions may also be stored on a computer readable storage medium and capable of directing a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture containing instructions for performing aspects of the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.
[0020] The computer readable program instructions may also be loaded into a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to create a computer-implemented process such that the instructions, which execute on the computer, other programmable apparatus, or other device, perform the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.
[0021] 1, an example of a network environment 100 is shown. The network environment 100 is provided to illustrate one example of an environment in which systems and methods consistent with the present invention may be implemented. The network environment 100 is provided by way of example and not limitation. Indeed, the systems and methods disclosed herein may be applicable to a variety of different network environments in addition to the illustrated network environment 100.
[0022] As shown, the network environment 100 includes one or more computers 102, 106 interconnected by a network 104. The network 104 may include, for example, a local area network (LAN) 104, a wide area network (WAN) 104, the Internet 104, an intranet 104, etc. In certain embodiments, the computers 102, 106 may include both client computers 102 and server computers 106 (also referred to herein as "host systems" 106). Generally, the client computers 102 initiate communication sessions, while the server computers 106 wait for requests from the client computers 102. In certain embodiments, the computers 102 and / or the servers 106 may be connected to one or more internal or external direct-attached storage systems 110a (e.g., arrays of hard disk drives, solid state drives, tape drives, etc.). The computers 102, 106 and the direct attached storage system 110a may communicate using protocols such as ATA, SATA, SCSI, SAS, Fibre Channel, etc.
[0023] The network environment 100 may, in certain embodiments, include a storage network 108 behind the server 106, such as a storage area network (SAN) 108 (e.g., when using network-attached storage) or a LAN 108. This network 108 may connect the server 106 to one or more storage systems, such as an array of hard disk drives or solid state drives 110b, a tape library 110c, individual hard disk drives 110d or solid state drives 110d, a tape drive 110e, a CD-ROM library, etc. To access the storage system 110, the host system 106 may communicate via a physical connection from one or more ports on the host 106 to one or more ports on the storage system 110. The connection may be via a switch, fabric, direct connection, etc. In certain embodiments, the server 106 and the storage system 110 may communicate using a network standard such as Fibre Channel (FC).
[0024] 2, one embodiment of a storage system 110 is shown that includes an array of hard disk drives 204 and / or solid state drives 204. As shown, the storage system 110 includes a storage controller 200, one or more switches 202, and one or more storage drives 204, such as hard disk drives 204 or solid state drives 204 (e.g., flash memory based drives 204). The storage controller 200 may enable one or more hosts 106 (e.g., open systems servers 106 and / or mainframe servers 106 running operating systems such as z / OS, zVM, etc.) to access data in the one or more storage drives 204.
[0025] In selected embodiments, the storage controller 200 includes one or more servers 206. The storage controller 200 may also include host adapters 208 and device adapters 210 for connecting the storage controller 200 to the host devices 106 and storage drives 204, respectively. Multiple servers 206a, 206b can provide redundancy to ensure that data is always available to the connected hosts 106. As a result, if one server 206a fails, the other server 206b can take over the I / O burden of the failed server 206a, ensuring that I / O can continue between the hosts 106 and the storage drives 204. This process may be referred to as a "fallover."
[0026] In selected embodiments, each server 206 may include one or more processors 212 and memory 214. Memory 214 may include volatile memory (e.g., RAM) and non-volatile memory (e.g., ROM, EPROM, EEPROM, hard disks, flash memory, etc.). The volatile and non-volatile memory, in certain embodiments, may store software modules that execute on processor 212 and are used to access data in storage drive 204. These software modules may manage all read and write requests to the logical volumes in storage drive 204.
[0027] In selected embodiments, the memory 214 includes a cache 218, such as a DRAM cache 218. Whenever a host 106 (e.g., an open systems server or mainframe server 106) performs a read operation, the server 206 performing the read can fetch the data from the storage drive 204 and save the data in its cache 218 in case it is needed again. If the data is requested again by the host 106, the server 206 can fetch the data from the cache 218 instead of fetching the data from the storage drive 204, saving both time and resources. Similarly, when the host 106 performs a write, the server 106 receiving the write request can store the write in its cache 218 and later destage the write to the storage drive 204. Once the write is stored in the cache 218, it can also be stored in the non-volatile storage (NVS) 220 of the mating server 206 so that the write can be recovered by the mating server 206 if the first server 206 fails. In a particular embodiment, the NVS 220 is implemented as battery-backed memory within the companion server 206 .
[0028] An example of a storage system 110 having an architecture similar to that shown in FIG. 2 is the IBM DS8000™ enterprise storage system. The DS8000™ is a high-performance, high-capacity storage controller that provides disk storage designed to support continuous operations. However, the systems and methods disclosed herein are not limited to operation with the IBM DS8000™ enterprise storage system 110, but may be operated with any equivalent or similar storage system 110, regardless of the manufacturer, product name, or component or component names associated with the system 110. Furthermore, any storage system that may benefit from one or more embodiments of the present invention is considered to be within the scope of the present invention. Thus, the IBM DS8000™ is presented by way of example and is not intended to be limiting.
[0029] Referring to FIG. 3, when an I / O request is performed by an application residing on the host system 106, several processes may be executed to complete the request. These processes may affect I / O latency and application response time. zHyperLink is a technology designed to reduce I / O latency by providing a fast, reliable, direct communication path 300 between the host system and the storage system 110. This may be accomplished by installing zHyperLink adapters in the host system 106 and the storage system 110, and connecting the components using zHyperLink cables. This configuration creates a point-to-point connection 300 between the host system 106 and the storage controller 200. This technology can reduce I / O response time by up to 10 times compared to using a traditional communication path 302, such as the z High-Performance FICON® (zHPF) communication path 302. Such short response times can be achieved by using synchronous I / O requests, which reduces the amount of time required for certain functions such as I / O interrupt and I / O dispatch operations.
[0030] Standard I / O processing available using technologies such as zHPF requires an I / O operation to perform a series of time-consuming tasks, such as z / OS dispatching, interrupt handling, CPU queuing, and L1 / L2 processor cache reloading. These tasks and others required for I / O processing can result in I / O response times of over 130 microseconds plus the time for interrupt handling and CPU dispatch, which can be relatively long compared to the transfer of data within virtual storage.
[0031] With zHyperLink, when synchronous I / O is done over a higher performance communication path 300, the CPU on the host system 106 can wait or "spin" until the I / O completes or reaches a timeout value. zHyperLink can significantly reduce the time required to complete I / O because dispatch, interrupt handling, CPU queue time, and CPU cache reload operations are no longer required. This reduces the processor time required to perform two context swaps in a typical I / O operation, putting a thread to sleep and then redispatching it, and servicing the I / O interrupt.
[0032] To achieve the improved I / O response times associated with synchronous I / O, the code pathways used to process the I / O must be highly optimized. Any condition that delays a synchronous I / O operation, such as a cache miss, can result in a notification being sent back to the host system 106 to retry the operation over a slower communication pathway 302, such as zHPF. Synchronous I / O over a higher performance communication pathway 300 is typically successful only when the microcode can complete the synchronous I / O operation in a very small amount of time, such as 10-30 microseconds. If the synchronous I / O operation cannot be completed in that amount of time, it may fail and the host system 106 may need to retry the operation over a less optimal pathway 302, such as FICON.
[0033] With continued reference to FIG. 3 in general, and with reference to FIG. 4, to perform synchronous I / O on data stored on volumes 304 of storage system 110, the requested data is ideally contained within cache 218. A cache miss may cause the synchronous I / O operation to fail and be retried over a slower communication path 302, such as zHPF. To improve the cache hit rate for data accessed using synchronous I / O, in certain embodiments, volumes 304 on storage system 110 may be divided into preferred volumes 304a and non-preferred volumes 304b. Preferred volumes 304a may be volumes 304 that are preferably accessed using synchronous I / O. These may be volumes 304 that are considered more important or critical or contain data (e.g., directories, etc.) whose capabilities are important or critical. Non-preferred volumes 304b, in contrast, may be any volumes 304 that are not designated as preferred volumes 304a.
[0034] As shown in FIG. 4, a volume 304 may be composed of storage elements 402, such as tracks. The storage elements 402 from a preferred volume 304a may be designated as preferred storage elements 402a, while the storage elements 402 from a non-preferred volume 304b may be designated as non-preferred storage elements 402b. At any given time, the cache 218 of the storage system 110 may store a first set 404b of non-preferred storage elements 402b from the non-preferred volumes 304b and a second set 404a of preferred storage elements 402a from the preferred volumes 304a. The preferred storage elements 402a may be preferred in the cache 218 over the non-preferred storage elements 402b because the preferred volumes 304a are volumes 304 that are preferred to use synchronous I / O. This ideally increases the cache hit rate of the preferred storage element 402a, thereby optimizing synchronous I / O and increasing the percentage of synchronous I / O operations that complete successfully.
[0035] An optimization module 400 may be provided to treat preferred storage elements 402a in preference to non-preferred storage elements 402b in the cache 218. Among other things, the optimization module 400 may provide functionality for specifying which volumes 304 are preferred and non-preferred, as well as implement a cache eviction policy whereby preferred storage elements 402a reside longer in the cache 218 than non-preferred storage elements 402b. The optimization module 400 and its functionality will be discussed in more detail in conjunction with FIG.
[0036] Referring to FIG. 5, a high level block diagram illustrating the optimization module 400 and associated sub-modules is shown. The optimization module 400 and associated sub-modules may be implemented in hardware, software, firmware, or a combination thereof. The optimization module 400 and associated sub-modules are provided by way of example and not by way of limitation. Different embodiments may provide more or fewer sub-modules. For example, the functionality of some sub-modules may be combined into a single or fewer sub-modules, or the functionality of a single sub-module may be distributed across several sub-modules. Although the optimization module 400 and associated sub-modules are shown within the storage system 110, not all functionality is necessarily implemented within the storage system 110, nor is the location of the optimization module 400 and associated sub-modules limited to implementation within the storage system 110. Thus, the location of the optimization module 400 and associated sub-modules is provided by way of example and not by way of limitation.
[0037] As shown, the optimization module 400 includes one or more of an establishing module 500, an adjusting module 502, an estimated lifespan determining module 504, a residency determining module 506, and a cache eviction module 508. The establishing module 500 may be configured to designate preferred volumes 304a and non-preferred volumes 304b as previously discussed. In certain embodiments, the host system 106 communicates these designations to the storage system 110. In certain embodiments, the preferred / non-preferred volumes 304 are established using online commands or configuration lists. In other embodiments, the host system 106 may incorporate functionality to determine which volumes 304 should be preferred / non-preferred. For example, the host system 106 may observe I / O patterns and may determine that certain volumes 304 should or would be preferred to be accessed using a faster synchronous I / O process. The host system 106 may add these volumes 304 to the set of preferred volumes 304a.
[0038] The adjustment module 502 can adjust which volumes 304 are preferred / non-preferred. For example, over time, access patterns or data importance for the volumes 304 may change. The adjustment module 502, in certain embodiments, may adjust which volumes 304 are considered preferred / non-preferred as these access patterns or data importance change. Alternatively, the adjustment module 502 may allow a user to manually adjust which volumes 304 are considered preferred or non-preferred. In certain embodiments, as described in more detail in connection with FIG. 7, the host system 106 periodically sends commands and / or lists to the storage system 110 to change or update which volumes 304 are considered preferred or non-preferred.
[0039] The estimated lifetime determination module 504 may be configured to determine an estimated lifetime (i.e., residency time) of a storage element (e.g., a track) in the cache 218. For example, in particular embodiments, the estimated lifetime determination module 504 is configured to determine an amount of time a non-preferred storage element 402b will reside in the cache 218 before being evicted. This estimated lifetime may be a number for a point in time, or an average over a time interval. In particular embodiments, the estimated lifetime is calculated by subtracting the timestamp of the least recently used non-preferred storage element 402b in the cache 218 from the timestamp of the most recently used non-preferred storage element 402b in the cache 218, which timestamps indicate when the non-preferred storage element 402b was most recently accessed.
[0040] The residency determination module 506, in contrast, can determine how long a particular storage element has been in the cache 218. The residency time can be calculated, for example, by subtracting the timestamp of the storage element 402 (indicating when the storage element 402 was most recently accessed) from the current time.
[0041] Using the estimated lifespan calculated by the estimated lifespan determination module 504 and the residency time calculated by the residency determination module 506, the cache eviction module 508 can implement a cache eviction policy such that the preferred storage element 402a is maintained in the cache 218 for longer than the estimated lifespan of the non-preferred storage element 402b. For example, the cache eviction policy may require that the preferred storage element 402a is maintained in the cache 218 for twice the estimated lifespan of the non-preferred storage element 402b. Other multiples (i.e., numbers greater than one, decimals, or fractions) are possible and are within the scope of the present invention. One example of a method 600 that may be implemented by the cache eviction module 508 is described in connection with FIG. 6.
[0042] Figure 6 illustrates one embodiment of a method 600 for evicting entries from the cache 218 to free up space in the cache 218. The method 600 references the first set 404b of non-preferred storage elements 402b and the second set 404a of preferred storage elements 402a, previously described in connection with Figure 4. In a particular embodiment, the first set 404b of non-preferred storage elements 402b are documented in a first LRU (least recently used) list (i.e., a "non-preferred" LRU list) and the second set 404a of preferred storage elements 402a are documented in a second LRU list (i.e., a "preferred" LRU list).
[0043] As shown, the method 600 first determines 602 whether it is time to evict one or more storage elements 402 from the cache 218. This step 602, in a particular embodiment, includes determining whether the cache 218 is low on free space. If it is time to evict entries from the cache 218, the method 600 determines 604 whether the "preferred" LRU list is empty. If so, the method 600 evicts 606 from the cache 218 the oldest non-preferred storage element 402b listed in the "non-preferred" LRU list (i.e., the non-preferred storage element 402b having the oldest timestamp). If the "preferred" LRU list is not empty, the method 600 determines 608 whether the "non-preferred" LRU list is empty. If so, the method 600 evicts 610 from the cache 218 the oldest preferred storage element 402a listed in the "preferred" LRU list.
[0044] If neither the “non-preferred” nor the “preferred” LRU list is empty, the method 600 determines 612 whether the oldest non-preferred storage element 402b in the “non-preferred” LRU list has an older timestamp than the oldest preferred storage element 402a in the “preferred” LRU list. If so, the method 600 evicts 614 the oldest non-preferred storage element 402b in the “non-preferred” LRU list from the cache 218. If not, the method 600 proceeds to step 616. In step 616, the method 600 determines 616 whether the residency time of the oldest preferred storage element 402a in the cache 218 (i.e., the amount of time that the oldest preferred storage element 402a in the “preferred” LRU list has been present in the cache 218) is less than a multiple N multiplied by the estimated lifetime of the non-preferred storage element 402b in the cache 218. If so, the method 600 evicts 618 the oldest non-preferred storage element 402b in the "non-preferred" LRU list from the cache 218. In contrast, if the residency time for the oldest preferred storage element 402a in the "preferred" LRU list is less than N * If so, then the method 600 evicts 620 the oldest preferred storage element 402a in the “preferred” LRU list from the cache 218. The variable N is a residency multiplier, the details of which are described in more detail below.
[0045] 7, as previously discussed, the host system 102 may periodically send commands and / or lists to the storage system 110 to change or update which volumes 304 are considered preferred or non-preferred, and therefore which storage elements 402 are given caching preference. In certain embodiments, the host system 102 periodically sends commands to the storage system 110 with a list 700 of volumes 304 that should be preferred. This list 700 of volumes 304 may change each time the host system 102 issues a command to the storage system 110. If a volume 304 in the list 700 is already designated as preferred, but is not so designated in the new list 700, the storage system 110 may change the status of the volume 304 to non-preferred and stop giving the volume 304 caching preference.
[0046] In certain embodiments, the host system 102 may set an indicator (e.g., a FORCE FAVORED CACHE indicator) for a particular volume 304 indicating that the volume 304 will retain its preferred state until the host system 102 categorically changes the volume's state to non-preferred. The host system 102 may use a REMOVE FAVORED CACHE command to change the state of the volume 304 from preferred to non-preferred. In certain embodiments, the force preferred cache indicator may be accompanied by a duration indicating how long the volume 304 should have the preferred state before returning to a non-preferred state. Once the duration ends and the volume 304 is no longer included in the list 700, the state of the volume 304 may automatically change to non-preferred such that the volume 304 no longer receives cache preference.
[0047] 8, various modifications can be made to the method 600 of FIG. 6 to take into account that the state of a volume may have changed as volumes 304 may dynamically change from a preferred state to a non-preferred state and vice versa. This state change may be grounds for moving a storage element 402 from the "non-preferred" LRU list to the "preferred" LRU list or vice versa.
[0048] FIG. 8 illustrates one embodiment of a method 800 for evicting entries (i.e., storage elements 402) from a cache 218 to free up space in the cache 218. The method 800 is similar to the method 600 illustrated in FIG. 6, except that the method 800 has been modified to account for volumes 304 that may be changing from a preferred state to a non-preferred state and vice versa. Steps of the method 800 that are the same as the method 600 of FIG. 6 are shown with the same numbering, while new steps (i.e., steps 802, 804, and 806) have been assigned new numbering. The flow of the method 800 compared to the method 600 of FIG. 6 has also been modified somewhat to account for the new steps 802, 804, and 806.
[0049] 8, after determining 608 whether the "non-preferred" LRU list is empty, method 800 may determine 802 whether the oldest entry in the "preferred" LRU list is no longer preferred. In other words, method 800 may determine 802 whether the state of the oldest entry in the "preferred" LRU list (i.e., storage element 402) has changed from preferred to non-preferred. If so, method 800 evicts 610 the oldest entry in the "preferred" LRU list from cache 218.
[0050] Similarly, after decision step 616 is performed, method 800 determines 806 whether the oldest entry in the "non-preferred" LRU list is now preferred. In other words, method 800 determines 806 whether the state of the oldest entry in the "non-preferred" LRU list (i.e., storage element 402) has changed from non-preferred to preferred. If so, method 800 moves 804 the entry from the "non-preferred" LRU list to the most recently used end of the "preferred" LRU list, and method 800 returns to step 612. If not, method 800 evicts 618 the oldest entry in the "non-preferred" LRU list from cache 218.
[0051] 9, as previously discussed, the host system 102 may periodically send a command to the storage system 110 that includes a list 700 that includes volumes 304 that should be preferred. In certain embodiments, the host system 102 may include, along with the list 700, a residency multiplier 902 that indicates how strong a cache preference should be applied to the preferred volume 304a. A larger residency multiplier 902 indicates a stronger cache preference, which results in the preferred volume 304a being retained in the cache 218 for a longer period of time compared to the non-preferred volumes 304b. A smaller residency multiplier 902 indicates a weaker cache preference, which results in the preferred volume 304a being retained in the cache 218 for a shorter period of time compared to the non-preferred volumes 304b. In certain embodiments, a single residency multiplier 902 is provided for all preferred volumes 304a in the list 700. In other embodiments, different preferred volumes 304a are provided with different residency multipliers 902, as will be described in more detail in connection with FIGS.
[0052] The host system 102 or another system may be provided with a preference adjustment module 900 for determining which volumes 304 should be treated as preferred volumes 304a and for determining a residency multiplier 902 for each of the preferred volumes 304a. In general, the preference adjustment module 900 may track I / O to the volumes 304 on the storage system 110 and determine which volumes 304 should be treated as preferred based on this tracking information. Using the tracking information, the preference adjustment module 900 may also determine how strong the cache preference should be for the preferred volumes 304a individually or collectively.
[0053] Referring to FIG. 10, a high level block diagram illustrating the preference adjustment module 900 and associated sub-modules is shown. The preference adjustment module 900 and associated sub-modules may be implemented in hardware, software, firmware, or a combination thereof. The preference adjustment module 900 and associated sub-modules are provided by way of example and not by way of limitation. Different embodiments may provide more or fewer sub-modules. For example, the functionality of some sub-modules may be combined into a single or fewer sub-modules, or the functionality of a single sub-module may be distributed across several sub-modules. Although the preference adjustment module 900 and associated sub-modules are shown within the host system 102, not all functionality is necessarily implemented within the host system 102, nor is it limited to implementation within the host system 102. Thus, the location of the preference adjustment module 900 and associated sub-modules is provided by way of example and not by way of limitation.
[0054] As shown, the preference adjustment module 900 includes one or more of an I / O tracking module 1000, a volume ranking module 1010, a list creation module 1012, a residency time determination module 1014, a multiplier calculation module 1016, and a transmission module 1018.
[0055] The I / O tracking module 1000 may be configured to track I / O issued from the host systems 102 to the storage system 110. This I / O may indicate which volumes 304 should be prioritized and accessed via a faster synchronous I / O process. For example, a higher amount of I / O to a volume 304 may indicate that a job is running against the volume 304 and that the job can be run faster and more efficiently using synchronous I / O. In such a scenario, the volume 304 may be given a cache preference to keep more of its data in the cache 218 for a longer amount of time, thereby ensuring a higher cache hit rate when accessing the volume 304.
[0056] When tracking I / O to a volume 304, the I / O tracking module 1000 can distinguish between different types of I / O. For example, the I / O tracking module 1000 may track intra-transactional reads 1002, intra-transactional writes 1004, extra-transactional reads 1006, and extra-transactional writes 1008. In particular embodiments, the I / O tracking module 1000 can utilize counters to track the amount of each of these different types of I / O to a volume 304.
[0057] Using the information gathered by the I / O tracking module 1000, the volume ranking module 1010 can rank the volumes 304 on the storage system 110. For example, the volume ranking module 1010 can rank the volumes 304 on the storage system 110 using the formula A * L+B * M+C* P+D * Q may be used to rank each volume 304, where A is the number of accesses to volume 304 for in-transactional reads, B is the number of accesses to volume 304 for in-transactional writes, C is the number of accesses to volume 304 for extra-transactional reads, and D is the number of accesses to volume 304 for extra-transactional writes. L, M, P, and Q are weighting factors (e.g., L=4, M=3, P=2, Q=1), where L>M>P>Q. In other words, for purposes of establishing cache preferences, accesses to volume 304 in-transactions may be weighted more heavily than accesses to volume 304 outside of transactions. Also, for purposes of establishing cache preferences, reads to volume 304 may be weighted more heavily than writes to volume 304.
[0058] Using the output of the above calculations for each volume 304, the volume ranking module 1010 can rank the volumes 304 on the storage system 110 by the magnitude of their power values. Volumes 304 with a higher amount of I / O will generally have a higher power value and therefore may be ranked higher than volumes 304 with a lower amount of I / O within the same time period. The list creation module 1012 can then create a list 700 of volumes 304 that should be prioritized and given caching preference. This could be a certain number of the top ranked volumes 304, volumes 304 with power values above a certain threshold, etc.
[0059] The residency time determination module 1014 may determine the residency time (i.e., expected lifespan) of the storage elements 402 of the non-preferred volume 304b in the cache 218. The multiplier calculation module 1016 may then determine a residency multiplier 902 for the preferred volume 304a. For example, if the storage elements 402 of the preferred volume 304a will be in the cache 218 for twice the amount of time as the storage elements 402 of the non-preferred volume 304b, then the residency multiplier 902 may be set to 2. In certain embodiments, the residency multiplier 902 is determined by taking the output value described above from the preferred volume 304a and dividing it by the output value from the non-preferred volume 304b to obtain a ratio. If desired, a minimum value for the residency multiplier 902 may be set such that it does not fall below a particular value (e.g., 2) regardless of the ratio. This ensures that the storage elements 402 of the preferred volume 304a are retained in the cache 218 for at least twice the amount of time as the storage elements 402 of the non-preferred volume 304b.
[0060] Once the list 700 has been created and the residency multipliers 902 have been determined, the transmission module 1018 can transmit the list 700 and the residency multipliers 902 from the host system 102 to the storage system 110. As previously discussed, in certain embodiments, a single residency multiplier 902 can be calculated for all preferred volumes 304a in the list 700. In other embodiments, a different residency multiplier 902(N) can be calculated for each preferred volume 304a in the list 700, as shown in FIG. 11. As illustrated in FIG. 11, the list 700 documents the volumes 304 that are to be preferred in order of ranking (i.e., in order of their output values using the calculations described above). Each preferred volume 304a has a different residency multiplier 902 associated with them. The higher the ranked volume 304, the higher the residency multiplier 902. As previously mentioned, the residency multiplier 902 may be multiplied by the estimated life span of the storage elements 402 of the non-preferred volume 304b to determine the amount of time that the storage elements 402 of the preferred volume 304a should be retained in the cache 218.
[0061] 12, in certain embodiments, the preferred volumes 304a in the list 700 may share the same residency multiplier 902 and thus have the same preferred cache residency time. For example, a first set of preferred volumes 304a (i.e., volumes A, B, and C) may be assigned a first residency multiplier N1, a second set of preferred volumes 304a (i.e., volumes D and E) may be assigned a second residency multiplier N2, and a third set of preferred volumes 304a (i.e., volumes F and G) may be assigned a third residency multiplier N3, where N1>N2>N3. Each residency multiplier 902 indicates how strong the cache preference (i.e., preferred cache residency time) should be for its corresponding group of preferred volumes 304a. In certain embodiments, in a storage system 110, such as an IBM DS8000™ enterprise storage system 110, the residency multiplier 902 for each volume 304 is stored in a global state area (e.g., an area in the cache 218 that is mirrored to a more permanent storage drive 204) so that the residency multiplier 902 is not lost during a reboot, power loss, failure, or the like.
[0062] 13, in certain embodiments, an LRU list 1300 is created for each residency multiplier 902 and associated group of preferred volumes 304a. An LRU list 1300d may also be created for all non-preferred volumes 304b (i.e., volumes 304 that have no residency multiplier 902 or have a residency multiplier 902 of 1). When an unmodified storage element 402 (e.g., an unmodified track) is added to the cache 218, the volume 304 associated with the storage element 402 may be checked to determine whether it is a preferred volume 304a, and if so, what the residency multiplier 902 for that volume 304 is. Based on the residency multiplier 902 (or its absence) for the volume 304, the entry associated with the unmodified storage element 402 may be added to the most recently used (MRU) end of the appropriate LRU list 1300. If an LRU list 1300 does not exist for the residency multiplier 902 associated with the volume 304, an LRU list 1300 for the residency multiplier 902 can be created, and an entry associated with the unmodified storage element 402 can be added to this newly created LRU list 1300.
[0063] 14 illustrates a method 1400 for evicting storage elements from a cache 218 using an LRU list 1300 such as the one illustrated in FIG. 13. As shown, the method 1400 first determines 1402 whether it is time to evict one or more storage elements 402 from the cache 218. This step 1402, in certain embodiments, includes determining whether the cache 218 is low on free space. If it is time to evict entries from the cache 218 (e.g., the cache 218 is low on free space), the method 1400 determines 1404 whether the LRU lists 1300 associated with the preferred volume 304a (hereinafter referred to as the "preferred" LRU list 1300) are all empty. If they are all empty, the method 1400 evicts 1406 from the cache 218 the storage element 402 associated with the oldest entry (i.e., the entry at the LRU end of the LRU list) in the LRU list 1300 for the non-preferred volume 304b (hereinafter referred to as the “non-preferred” LRU list 1300).
[0064] On the other hand, if the “preferred” LRU list 1300 is not completely empty, the method 1400 calculates 1410 the “time above required residency time” for the non-empty “preferred” LRU list 1300. In a particular embodiment, the “time above required residency time” may be calculated by determining the residency time of the oldest entry in the “preferred” LRU list 1300 and subtracting from this value the “estimated lifetime” multiplied by the residency multiplier 902. As previously discussed, the “estimated lifetime” may be equivalent to the amount of time that a non-preferred storage element 402b will reside in the cache 218 before being evicted. In general, step 1410 determines the amount by which the oldest entry in the “preferred” LRU list 1300 has exceeded (or fallen below) its preferred residency time in the cache 218.
[0065] The method 1400 then picks 1412 the “preferred” LRU list 1300 with the largest “time beyond required residency time” for the oldest entry. The method 1400 then determines 1414 whether this “time beyond required residency time” is negative (meaning that the storage element associated with the oldest entry in the “preferred” LRU list 1300 has been in the cache 218 for some amount of time less than its preferred residency time). If the “time beyond required residency time” is negative, the method 1400 determines 1416 whether the “non-preferred” LRU list 1300 is empty. If it is not empty, the method 1400 evicts 1406 from the cache 218 the storage element 402 associated with the oldest entry in the “non-preferred” LRU list 1300.
[0066] In step 1414, if the "time beyond required residency time" is non-negative (meaning that the oldest entry in the "preferred" LRU list 1300 has been in the cache 218 for some amount of time greater than or equal to its preferred residency time), then the method 1400 evicts 1408 from the cache 218 the storage element associated with the oldest entry in the "preferred" LRU list 1300 with the greatest "time beyond required residency time". Similarly, if in step 1416 the "non-preferred" LRU list 1300 is found to be empty, then the method 1400 also evicts 1408 from the cache 218 the oldest entry in the "preferred" LRU list 1300 with the greatest "time beyond required residency time".
[0067] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of code, comprising one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may be performed in a different order than that noted in the figures. For example, two blocks shown in succession may in fact be executed substantially in parallel, or the blocks may sometimes be executed in reverse order depending on the functionality involved. In other implementations, not all steps disclosed may be required to achieve the desired functionality. It should also be noted that each block in the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or a combination of dedicated hardware and computer instructions.
Claims
1. 1. A method for improving a cache hit rate for a selected volume when using synchronous I / O in a system having a processor and a memory device operatively coupled to the processor, the method comprising: establishing a first set of non-preferred storage elements from the non-preferred storage area in the cache; establishing in the cache a second set of preferred storage elements from a preferred storage area; calculating an estimated lifetime that the non-preferred storage element will reside in the cache and multiplying the estimated lifetime by a residency multiplier N, where N>2, to determine a residency time that the preferred storage element will reside in the cache; recording the first set of non-preferred storage elements in a first LRU list and recording the second set of preferred storage elements in a second LRU list; evict the oldest preferred storage element in the second LRU list from the cache if the residency time of the oldest preferred storage element in the second LRU list is greater than the estimated life span of the non-preferred storage elements; evict from the cache the oldest non-preferred storage element in the first LRU list if the residency time of the oldest preferred storage element in the second LRU list is less than the estimated life span of the non-preferred storage element; accessing said preferred storage element via a synchronous I / O process; accessing said non-preferred storage element via an asynchronous I / O process; A method comprising:
2. 2. The method of claim 1, wherein the residency multiplier N is a value obtained by dividing the time that a preferred storage element from the preferred storage area resides in the cache by the time that a non-preferred storage element from the non-preferred storage area resides in the cache, and values less than 2 are calculated as 2.
3. The method of claim 1 , wherein the non-preferred storage area is a non-preferred volume and the preferred storage area is a preferred volume.
4. 2. The method of claim 1, further comprising causing the preferred storage elements to reside in cache longer than non-preferred storage elements.
5. 2. The method of claim 1, wherein calculating the estimated lifetime comprises subtracting a timestamp of a least recently used non-preferred storage element in the first set from a timestamp of a most recently used non-preferred storage element in the first set.
6. 2. The method of claim 1, wherein the first set of non-preferred storage elements are documented in a first LRU list and the second set of preferred storage elements are documented in a second LRU list.
7. 2. The method of claim 1, wherein the non-preferred and / or preferred storage areas are established using at least one of an online command and a configuration file.
8. A computer program product for causing a computer to carry out the method according to any one of claims 1 to 7.
9. 9. A computer readable storage medium having the computer program of claim 8 recorded thereon.
10. 1. A system for improving cache hit rates for a selected volume when using synchronous I / O, comprising: At least one processor; at least one memory device operatively coupled to the at least one processor, the memory device storing instructions for execution on the at least one processor; wherein the instructions cause the at least one processor to: establishing a first set of non-preferred storage elements from the non-preferred storage area in the cache; establishing in the cache a second set of preferred storage elements from a preferred storage area; calculating an estimated lifetime that the non-preferred storage element will reside in the cache and multiplying the estimated lifetime by a residency multiplier N, where N>2, to determine a residency time that the preferred storage element will reside in the cache; recording the first set of non-preferred storage elements in a first LRU list and recording the second set of preferred storage elements in a second LRU list; evict the oldest preferred storage element in the second LRU list from the cache if the residency time of the oldest preferred storage element in the second LRU list is greater than the estimated life span of the non-preferred storage elements; evict from the cache the oldest non-preferred storage element in the first LRU list if the residency time of the oldest preferred storage element in the second LRU list is less than the estimated life span of the non-preferred storage element; accessing said preferred storage element via a synchronous I / O process; accessing said non-preferred storage element via an asynchronous I / O process; A system that allows the user to:
11. 11. The system of claim 10, wherein the residency multiplier N is a value obtained by dividing the time that a preferred storage element from the preferred storage area resides in the cache by the time that a non-preferred storage element from the non-preferred storage area resides in the cache, and values less than 2 are calculated as 2.
12. 11. The system of claim 10, wherein the non-preferred storage area is a non-preferred volume and the preferred storage area is a preferred volume.
13. The system of claim 10 , further comprising: causing the preferred storage elements to reside in cache longer than non-preferred storage elements.
14. 11. The system of claim 10, wherein calculating the estimated lifetime comprises subtracting a timestamp of a least recently used non-preferred storage element in the first set from a timestamp of a most recently used non-preferred storage element in the first set.
15. 11. The system of claim 10, wherein the first set of non-preferred storage elements is documented in a first LRU list and the second set of preferred storage elements is documented in a second LRU list.
Citation Information
Patent Citations
Managing method for cache page and medium stored with managing program for cache page
JP1999338775A
Method for controlling cache memory and storage sub- system
JP2002149492A
Virtual volume storage
JP2002324000A
Adjusting parameters used to prefetch data from storage into cache
US20090055595A1
Coordinated utilization of parallel paths to improve efficiency
US20180275884A1
