Storage data replicas using different compression algorithms
By analyzing the free capacity and compression ratio of the storage device and dynamically adjusting the compression ratio of the storage device, the performance imbalance caused by compression algorithms in the storage system is solved, and storage efficiency is improved and costs are reduced.
Patent Information
- Application Number
- CN202480009253.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-01
- Filing Date
- 2024-01-19
- Publication Date
- 2025-09-05
AI Technical Summary
In existing storage systems, disks using different compression algorithms lead to performance imbalance, affecting system performance and storage efficiency.
By analyzing the free capacity and compression ratio of storage devices, dynamically adjusting the compression ratio of different storage devices to write data on different storage devices, achieving consistency of compression ratio across devices.
It improves the overall storage efficiency of the storage system and reduces the total storage cost, while hiding the performance impact of slower compression algorithms and ensuring that read performance is not affected.
Smart Images

Figure CN120604207A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates generally to storage and, more particularly, to methods, systems, and computer program products suitable for managing storage arrays in a storage system. Background Art
[0002] Many computer systems use redundant arrays of independent disks (RAID) for data storage purposes. This allows for improved data transfer rates compared to single disk access and also provides error correction, data protection, and disk redundancy. Disks are also referred to as "disk drives" or simply "drives."
[0003] A RAID system is a disk array storage system created to provide large storage areas, fast access times and rates, and redundancy for data protection. For example, data can be mirrored across two or more disks, so if one disk fails, the data can be obtained from the remaining disks. Alternatively, data can be distributed across multiple disks to allow concurrent reading of data. Data parity can also be provided on additional disks, so if one disk fails, the data can be recreated from the remaining disks. A RAID system is controlled by a RAID controller, which is a hardware unit that configures the RAID array and provides the RAID layer, making the disk array appear to be a logically single disk to the using computer system.
[0004] Most modern storage controllers will use a RAID algorithm to distribute data across multiple disks to increase redundancy and prevent data loss in the event of a disk failure.
[0005] Advanced Copy Services are also available. Advanced Copy Services copies data from one disk to another for various purposes, such as backup.
[0006] Some modern disks (such as IBM ® The FlashCore Module (FCM) implements an internal, hardware-based compression algorithm. It's not uncommon for the disk to support more than one algorithm simultaneously; internal logic selects which one to use for a particular write. Different compression algorithms have different compressibility characteristics and compression speeds. The higher the compression ratio, the longer the disk compression takes. Different compression algorithms can be used for different copies of the same data, allowing the appropriate copy with the specified performance characteristics to be used when reading the data. However, this can result in an unbalanced system performance.
[0007] Therefore, there is a need in the art to solve the above problems. Summary of the Invention
[0008] According to the present invention, a method, system and computer program product according to the independent claims are provided.
[0009] From a first aspect, the present invention provides a computer-implemented method for managing a storage system, the storage system comprising a first storage device and a second storage device, the method comprising: analyzing a set of compression ratios for a set of storage blocks written on the first storage device and the second storage device to determine a pattern; determining a first compression ratio and a second compression ratio in response to the pattern, the first compression ratio being different from the second compression ratio; and writing the storage blocks to the first storage device at the first compression ratio and writing the storage blocks to the second storage device at the second compression ratio.
[0010] From another aspect, the present invention provides a computer-implemented method for managing a storage system, the storage system comprising a first storage device and a second storage device, the method comprising: determining a first free capacity on the first storage device and a second free capacity on the second storage device; in response to determining that the first free capacity is greater than the second free capacity and reaches a threshold, writing a storage block to the first storage device at a first compression ratio and writing the storage block to the second storage device at a second compression ratio, the first compression ratio being less than the second compression ratio; in response to determining that the first free capacity is less than the second free capacity and reaches a threshold, writing the storage block to the first storage device at the first compression ratio and writing the storage block to the second storage device at the second compression ratio, the first compression ratio being greater than the second compression ratio.
[0011] From another aspect, the present invention provides a system for managing a storage array in a storage system, the storage array including a first data block and a second data block, the system including: an analysis component for analyzing a set of compression ratios for a set of storage blocks written on the first storage device and the second storage device to determine a pattern; a determination component for determining a first compression ratio and a second compression ratio in response to the pattern, the first compression ratio being different from the second compression ratio; and a data read / write component for writing the storage blocks to the first storage device at the first compression ratio and writing the storage blocks to the second storage device at the second compression ratio.
[0012] From another aspect, the present invention provides a system for managing a storage array in a storage system, the storage array comprising a first data block and a second data block, the system comprising: a memory; at least one processor communicating with the memory; and program instructions executed by one or more processors via the memory to perform the method of the present invention.
[0013] Viewed from another aspect, the present invention provides a computer program product for managing a storage system, the computer program product comprising a computer-readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit to perform a method for executing the steps of the present invention.
[0014] Viewed from another aspect, the invention provides a computer program stored on a computer readable medium and loadable into the internal memory of a digital computer, comprising software code portions for performing the steps of the invention when the program is run on the computer.
[0015] Preferably, the present invention provides a method, system, computer program product and computer program, wherein: analyzing a set of compression ratios includes determining a first free capacity on a first storage device and a second free capacity on a second storage device; determining the first compression ratio and the second compression ratio includes: in response to determining that the first free capacity is greater than the second free capacity and reaches a threshold, determining the first compression ratio and the second compression ratio, the first compression ratio being less than the second compression ratio; in response to determining that the first free capacity is less than the second free capacity and reaches a threshold, determining the first compression ratio and the second compression ratio, the first compression ratio being greater than the second compression ratio.
[0016] Preferably, the present invention provides a method, system, computer program product, and computer program, wherein: analyzing a set of compression ratios includes determining that a third compression ratio has been used for the most recent y writes to a first storage device and a fourth compression ratio has been used for the most recent y writes to a second storage device; and determining the first compression ratio includes determining that the first compression ratio is equal to the fourth compression ratio, and determining the second compression ratio includes determining that the second compression ratio includes the third compression ratio.
[0017] Preferably, the present invention provides a method, system, computer program product, and computer program wherein the first storage device and the second storage device are members of a RAID array.
[0018] Preferably, the present invention provides a method, system, computer program product, and computer program wherein the RAID array is a member of a list comprising RAID 1, RAID 10, RAID 51, and RAID 61.
[0019] Preferably, the present invention provides a method, system, computer program product, and computer program wherein the second storage device is a replica of the first storage device.
[0020] Preferably, the present invention provides a method, system, computer program product, and computer program wherein the second storage device is a point-in-time copy of the first storage device.
[0021] With disks that support two different compression algorithms, one faster but less space-efficient, and a second slower but more compact, the replication algorithm in the storage controller can choose to write one replica to fast / low-compression storage and the second replica to slow / high-compression. If this low / high-compression selection is distributed across the disks so that the total used storage is consistent across all disks, the total storage used will be less than with conventional replication, and therefore the overall storage cost will be reduced. Advantageously, by using this algorithm, the space savings benefits of higher compression can be used while the impact of slower performance can be hidden. Writes can be completed while the faster, low-compression writes are completing, and any reads are not affected by the need to perform slower decompression because the read can always be directed to the mirror with the low-compression version of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Preferred embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
[0023] Figure 1 Depicted is a computing environment 100 according to an embodiment of the present invention;
[0024] Figure 2 depicts a high-level exemplary schematic diagram 200 depicting a storage drive according to an embodiment of the present invention;
[0025] Figure 3 depicts a high-level exemplary schematic flow chart 300 depicting method steps for writing a memory block in a memory array in accordance with a preferred embodiment of the present invention;
[0026] Figure 4 depicts a high-level exemplary schematic diagram 400 depicting a storage disk in accordance with a preferred embodiment of the present invention;
[0027] Figure 5 depicts a high-level exemplary schematic diagram 500 depicting a storage controller in accordance with a preferred embodiment of the present invention;
[0028] Figure 6 depicts a high-level exemplary diagram 600 depicting a computer system in accordance with a preferred embodiment of the present invention; and
[0029] Figure 7 Depicted is a high-level exemplary schematic diagram 700 depicting a table for determining a compression ratio mode, in accordance with a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0030] Various aspects of the present disclosure are described by narrative text, flow charts, block diagrams of computer systems, and / or block diagrams of machine logic included in computer program product (CPP) embodiments. With respect to any flow chart, depending on the technology involved, the operations may be performed in a different order than shown in a given flow chart. For example, again depending on the technology involved, two operations shown in successive flow chart blocks may be performed in reverse order, as a single integrated step, simultaneously, or in a manner that at least partially overlaps in time.
[0031] Computer program product embodiments ("CPP embodiments" or "CPP") are terms used herein to describe any collection of one or more storage media (also referred to as "media") collectively included in a collection of one or more storage devices that collectively include machine-readable code corresponding to instructions and / or data for performing the computer operations specified in a given CPP claim. A "storage device" is any tangible device that can retain and store instructions for use by a computer processor. Without limitation, a computer-readable storage medium can be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these media include: magnetic disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punched cards or pits / bumps formed on a major surface of a disk), or any suitable combination of the foregoing. As the term is used herein, computer-readable storage media should not be construed as storing in the form of transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides, light pulses transmitted through fiber optic cables, electrical signals communicated through wires, and / or other transmission media. As will be understood by those skilled in the art, data is typically moved at certain occasional points in time during the normal operation of the storage device, such as during access, defragmentation, or garbage collection, but this does not make the storage device transient because the data is not transient when stored.
[0032] Figure 1A computing environment 100 is depicted. The computing environment 100 includes an example of an environment for executing at least some computer code related to performing the inventive method, such as functionality 200 for an improved storage controller 501. In addition to block 200, the computing environment 100 also includes, for example, a computer 101, a wide area network (WAN) 102, an end-user device (EUD) 103, a remote server 104, a public cloud 105, and a private cloud 106. In this embodiment, the computer 101 includes a processor set 110 (including processing circuitry 120 and cache 121), a communication fabric 111, volatile memory 112, persistent storage 113 (including an operating system 122 and block 200, as described above), a peripheral device set 114 (including a user interface (UI) device set 123, storage 124, and an Internet of Things (IoT) sensor set 125), and a network module 115. The remote server 104 includes a remote database 130. The public cloud 105 includes a gateway 140 , a cloud orchestration module 141 , a host physical machine set 142 , a virtual machine set 143 , and a container set 144 .
[0033] Computer 101 may take the form of a desktop computer, laptop computer, tablet computer, smartphone, smartwatch or other wearable computer, mainframe computer, quantum computer, or any other form of computer or mobile device now known or to be developed in the future that is capable of running programs, accessing a network, or querying a database (such as remote database 130). As is well understood in the art of computer technology, and depending on the technology, the execution of computer-implemented methods may be distributed among multiple computers and / or among multiple locations. On the other hand, in this representation of computing environment 100, the detailed discussion focuses on a single computer, specifically computer 101, to keep the representation as simple as possible. Computer 101 may be located in the cloud, even though Figure 1 On the other hand, unless explicitly indicated otherwise, computer 101 is not required to be located in the cloud.
[0034] Processor set 110 includes one or more computer processors of any type now known or to be developed in the future. Processing circuitry 120 may be distributed across multiple packages, for example, multiple coordinated integrated circuit chips. Processing circuitry 120 may implement multiple processor threads and / or multiple processor cores. Cache 121 is memory located in the processor chip package and is typically used to quickly access data or code that should be available to the threads or cores running on processor set 110. Cache memory is typically organized into multiple levels based on relative proximity to the processing circuitry. Alternatively, some or all of the processor set's cache may be located "off-chip." In some computing environments, processor set 110 may be designed to work with qubits and perform quantum computations.
[0035] Computer-readable program instructions are typically loaded onto the computer 101 to cause the processor set 110 of the computer 101 to execute a series of operational steps, thereby implementing a computer-implemented method, such that the instructions executed thereby will instantiate the method specified in the flowcharts and / or narrative descriptions of the computer-implemented method included in this document (collectively, the "inventive method"). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 121 and other storage media discussed below. The processor set 110 accesses the program instructions and associated data to control and direct the execution of the inventive method. In the computing environment 100, at least some of the instructions for executing the inventive method may be stored in a block 200 in the persistent storage 113.
[0036] The communication fabric 111 is a signal conduction path that allows the various components of the computer 101 to communicate with each other. Typically, the fabric is made of switches and electrical conduction paths, such as those that constitute a bus, a bridge, physical input / output ports, etc. Other types of signal communication paths may be used, such as fiber optic communication paths and / or wireless communication paths.
[0037] Volatile memory 112 is any type of volatile memory now known or to be developed in the future. Examples include dynamic random access memory (RAM) or static RAM. Typically, volatile memory 112 is characterized by random access, but this is not required unless explicitly indicated. In computer 101, volatile memory 112 is located in a single package and internal to computer 101, but alternatively or additionally, volatile memory can be distributed across multiple packages and / or located externally relative to computer 101.
[0038] Persistent storage 113 is any form of non-volatile storage for computers now known or to be developed in the future. The non-volatility of this storage means that the stored data is maintained regardless of whether power is supplied to the computer 101 and / or directly to the persistent storage 113. Persistent storage 113 may be read-only memory (ROM), but typically at least a portion of the persistent storage allows data to be written, deleted, and rewritten. Some familiar forms of persistent storage include magnetic disks and solid-state storage devices. Operating system 122 can take a variety of forms, such as various known proprietary operating systems or open source portable operating system interface type operating systems that employ a kernel. The code included in block 200 typically includes at least some of the computer code related to performing the inventive method.
[0039] Peripheral device set 114 includes a collection of peripheral devices of computer 101. Data communication connections between peripheral devices and other components of computer 101 can be implemented in various ways, such as Bluetooth connections, near field communication (NFC) connections, connections made by cables (such as universal serial bus (USB) type cables), plug-in connections (e.g., secure digital (SD) cards), connections made through local area communication networks, and even connections made through wide area networks (such as the Internet). In various embodiments, UI device set 123 can include components such as displays, speakers, microphones, wearable devices (such as glasses and smart watches), keyboards, mice, printers, touchpads, game controllers, and haptic devices. Storage 124 is external storage, such as an external hard drive, or plug-in storage, such as an SD card. Storage 124 can be persistent and / or volatile. In some embodiments, storage 124 can take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer 101 is required to have a large amount of memory (e.g., where computer 101 locally stores and manages a large database), this storage can be provided by peripheral storage devices designed to store very large amounts of data, such as a storage area network (SAN) shared by multiple geographically distributed computers. IoT sensor set 125 consists of sensors that can be used in IoT applications. For example, one sensor can be a thermometer and another can be a motion detector.
[0040] The network module 115 is a collection of computer software, hardware, and firmware that allows the computer 101 to communicate with other computers via the WAN 102. The network module 115 may include hardware (e.g., a modem or Wi-Fi signal transceiver), software for packetizing and / or depacketizing data for transmission over a communication network, and / or web browser software for transmitting data over the Internet. In some embodiments, the network control function and the network forwarding function of the network module 115 are executed on the same physical hardware device. In other embodiments (e.g., embodiments using software-defined networking (SDN)), the control function and the forwarding function of the network module 115 are executed on physically separate devices, such that the control function manages multiple different network hardware devices. Computer-readable program instructions for executing the methods of the present invention can typically be downloaded to the computer 101 from an external computer or external storage device via a network adapter card or network interface included in the network module 115.
[0041] WAN 102 is any wide area network (e.g., the Internet) that can transmit computer data over non-local distances using any technology now known or developed in the future for transmitting computer data. In some embodiments, WAN 102 can be replaced and / or supplemented by a local area network (LAN) designed to transmit data between devices located in a local area, such as a Wi-Fi network. A WAN and / or LAN typically includes computer hardware such as copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers.
[0042] An end-user device (EUD) 103 is any computer system used and controlled by an end-user (e.g., a business customer operating computer 101) and may take any of the forms discussed above with respect to computer 101. EUD 103 typically receives helpful and useful data from the operation of computer 101. For example, in a hypothetical scenario where computer 101 is designed to provide recommendations to an end-user, the recommendations would typically be transmitted from network module 115 of computer 101 via WAN 102 to EUD 103. In this manner, EUD 103 may display or otherwise present the recommendations to the end-user. In some embodiments, EUD 103 may be a client device, such as a thin client, a fat client, a mainframe computer, a desktop computer, or the like.
[0043] Remote server 104 is any computer system that serves at least some data and / or functionality to computer 101. Remote server 104 may be controlled and used by the same entity that operates computer 101. Remote server 104 represents a machine that collects and stores helpful and useful data for use by other computers, such as computer 101. For example, in a hypothetical scenario where computer 101 is designed and programmed to provide recommendations based on historical data, the historical data may be provided to computer 101 from remote database 130 of remote server 104.
[0044] Public cloud 105 is any computer system that can be used by multiple entities and provides on-demand availability of computer system resources and / or other computing capabilities, particularly data storage (cloud storage) and computing power, without requiring direct, active management by users. Cloud computing typically leverages resource sharing to achieve consistency and economies of scale. Direct and active management of the computing resources of public cloud 105 is performed by computer hardware and / or software of cloud orchestration module 141. The computing resources provided by public cloud 105 are typically implemented as virtual computing environments running on various computers comprising a set of host physical machines 142, which are all the physical computers in and / or available to public cloud 105. Virtual computing environments (VCEs) typically take the form of virtual machines from a set of virtual machines 143 and / or containers from a set of containers 144. It should be understood that these VCEs can be stored as images and transferred between various physical machine hosts either as images or after the VCEs have been instantiated. Cloud orchestration module 141 manages the transfer and storage of images, deploys new VCE instantiations, and manages active VCE deployment instantiations. Gateway 140 is a collection of computer software, hardware, and firmware that allows public cloud 105 to communicate over WAN 102 .
[0045] Some further explanation of a virtualized computing environment (VCE) will now be provided. A VCE can be stored as an "image." A new active instance of a VCE can be instantiated from an image. Two familiar types of VCEs are virtual machines and containers. Containers are VCEs that use operating system-level virtualization. This refers to an operating system feature where the kernel allows the existence of multiple isolated userspace instances, called containers. From the perspective of the programs running in them, these isolated userspace instances generally behave like real computers. Computer programs running on a normal operating system can utilize all of that computer's resources, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running inside a container can only use the contents of the container and the devices assigned to the container, a feature known as containerization.
[0046] 105 . Private cloud 106 is similar to public cloud 105 , except that the computing resources are available only for use by a single enterprise. Although private cloud 106 is depicted as communicating with WAN 102 , in other embodiments, the private cloud may be completely disconnected from the internet and accessible only via a local / private network. A hybrid cloud is a combination of multiple clouds of different types (e.g., private, community, or public), typically implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is held together by standardized or proprietary technologies that enable orchestration, management, and / or data / application portability between the multiple constituent clouds. In this embodiment, public cloud 105 and private cloud 106 are both part of a larger hybrid cloud.
[0047] A logical unit number (LUN) is a unique identifier used to identify a collection of physical or logical storage. A LUN can reference a single disk, a disk partition, or an entire RAID array. Logical block addressing (LBA) is the method used to specify the location of data blocks on a storage device.
[0048] Small Computer System Interface (SCSI) is a set of command standards for physically connecting and transferring data between computers and peripheral devices (such as disks). Those skilled in the art will appreciate that other command sets exist. SCSI can be used in a variety of interfaces, such as SSA, 1 Gigabit Fibre Channel (1GFC), and SAS. SCSI can be either parallel or serial.
[0049] At IBM ® DS8000 ® series, IBM Storwize ® In IBM FlashSystem storage subsystems, the SAS protocol is used for internal disks. The storage subsystem has a controller that provides the necessary hardware adapters for host connections to the subsystem. RAID adapters are used to create virtual disks or logical unit numbers (LUNs) configured in one of the supported RAID levels with multiple SAS hard drives, based on the RAID level used. Various levels of RAID can be used to configure internal SAS HDDs or SDDs. IBM, DS8000, Storwize, and FlashCopy are trademarks of International Business Machines Corporation and are registered in many jurisdictions worldwide.
[0050] There are several RAID architectures, depending on the desired balance between fault tolerance and performance. These architectures are referred to as "levels." In RAID level 0, data blocks are striped across the disk array, without any fault tolerance. In RAID level 1, data is mirrored across two disks. In RAID 5, data blocks are striped across the disks, and a parity checksum of all block data is written to one disk. Parity data is not written to a fixed disk but is distributed across all disks. If a disk fails, data can be recovered using the remaining block data and blocks. In RAID level 6, data blocks are striped across the disks, along with double parity. RAID 6 can handle double disk failures.
[0051] Other RAID levels are available. In RAID level 2, data bits are striped across a set of data disks, and error correction codes are written to redundant disks. In RAID level 3, data bytes are striped across a set of data disks, and parity values are written to a parity disk. In RAID level 4, data blocks are striped across a set of data disks, and parity values are written to a parity disk.
[0052] In addition, other nested RAID combinations are possible. Nested RAID levels are typically numbered with at least two digits. The first digit specifies the lowest RAID level, and the second digit specifies the level above. For example, RAID 10 is a combination of RAID 1 and RAID 0, with RAID 1 striping layered on top of RAID 1 mirroring. Other examples are: RAID 15, which is a combination of RAID 5 layered on top of RAID 1; RAID 51, which is a combination of RAID 1 layered on top of RAID 5; and RAID 61, which is a combination of RAID 1 layered on top of RAID 6.
[0053] On each physical disk, data is stored in predetermined data blocks that are typically of the same size. A predetermined number of data blocks and any appropriate parity information are mapped to define a data stripe, which is distributed across the elements of the RAID array 220. Typical stripe unit sizes range from 8k to 64k bytes. A "stripe" is a group of corresponding stripe units.
[0054] Common RAID levels are:
[0055] - RAID 0 stripes data across one or more disks, with no redundancy
[0056] - RAID 1 data is mirrored between two disks
[0057] - RAID 5 data is striped across at least three disks with a rotating parity
[0058] - RAID 6 data is striped across at least five disks with two rotating parity
[0059] - RAID 10 data is striped across mirrored disk pairs, with at least two disks
[0060] RAID arrays can be configured using a hardware adapter. This is called "hardware RAID." RAID arrays can also be configured using operating system software. This is called "software RAID."
[0061] In a storage system, if a disk storing data fails, the data may be lost. With fault-tolerant RAID levels, such as RAID 1, RAID 5, and RAID 6, such data can be recovered from the remaining disks and rewritten to a repaired disk or a spare disk. The array is then considered to be "rebuilt."
[0062] A RAID controller, or "disk array controller," is a device that manages physical disks and presents them to the computer as logical units. A RAID controller has a front-end interface to the computer system's host adapter. An example of such an interface is SCSI. A RAID controller also has a back-end interface for communicating with the underlying disks. In addition to RAID management and I / O functions, RAID controllers perform many other functions. Examples include controller failover and array replication services.
[0063] JBOD (Just a Bunch of Disks) is another architecture that uses multiple disk arrays. These disks can be presented to the upper-layer system as a group of independent disks or as a spanned single volume without RAID technology.
[0064] There are many levels of abstraction within a storage system. The storage disk manages the physical placement of data blocks onto the disk media. Built-in functionality handles data block placement. For example, a drive can identify a media error and, as a result, relocate a block to the appropriate media location while still presenting a logically contiguous block space to the upstream storage controller 210.
[0065] Consider a RAID 5 array, which has a "stride" length of 5 blocks. A stride consists of 4 data blocks and one parity block. File writes involve caching data in the RAID controller. The RAID controller calculates parity for the file 4 data blocks at a time. The first "stride" P of 5 blocks is written to the drive array: P's first data block to drive N, P's second data block to drive N+1, P's third data block to drive N+2, P's fourth data block to drive N+3, and P's parity value to drive N+3. In a round-robin system, the subsequent "stride" P+1 of blocks is written to the drive array, this time starting with P+1's first data block to drive N+1, P+1's second data block to drive N+1, P+1's third data block to drive N+2, P+1's fourth data block to drive N+3, and P+1's parity value to drive N. Data and parity rotate around the 5-drive array. The advantage of round-robin writes is that writes are evenly distributed across the drives.
[0066] When a drive fails in a RAID 5 array, the spanned blocks on the surviving drives can be used to rebuild the spanned blocks. For example, if drive N fails in the above example, the second, third, and fourth blocks of stripe P are XORed with the parity bits of drive N+3 to recover block N of stripe P.
[0067] Embodiments of the present invention combine the use of different compression strategies on storage devices containing data replicas. An example of a storage device is a storage disk, such as an IBM® FlashCore Module (FCM). The embodiments will be described in terms of block storage technology, but are equally applicable to other technologies, such as file storage technology.
[0068] Compression can be implemented without impacting the existing environment and can be used in conjunction with other storage processes, such as mirrored volumes and replication services. Compressed volumes provide a level of availability comparable to regular volumes. When a compressed block is read from disk, the data is decompressed. Compression read block performance can vary between disk types, however, IBM FCM disks provide similar compressed block read performance across different compression algorithms. In fact, read performance for LZ compression can be higher for higher compression ratios because the CPU needs to process less compressed data than at lower compression ratios. Currently, FCM has a fixed compression algorithm, but other disks with variable compression algorithms exist.
[0069] One example of creating replicas is mirroring RAID technology. The standard RAID 1 algorithm protects against disk failure by mirroring data to a second disk. Embodiments of the present invention will be primarily described using RAID 1. Those skilled in the art will appreciate that the present invention is also applicable to other RAID mirroring technologies, such as, but not limited to, RAID 10, RAID 51, or RAID 61.
[0070] When a server writes to a mirrored volume, the system writes the data to both copies. When a server reads from a mirrored volume, the system selects one of the copies to read from. If one of the mirrored volume copies becomes temporarily unavailable, for example, because the storage system providing the pool is unavailable, the volume remains accessible to the server. The system remembers which areas of the volume were written and resynchronizes those areas when both copies are available.
[0071] When creating a volume, you can use compression to save capacity for the volume. For a compressed volume, data is compressed when it is written to disk, thereby saving more space. When the data is read to the host 605, the data is decompressed.
[0072] To illustrate embodiments of the present invention, the embodiments include a storage drive having compression ratios C1 and C2, where C1 is less than C2. Those skilled in the art will appreciate that a storage device may support multiple values of compression ratio.
[0073] Figure 2 A high-level exemplary schematic diagram 200 depicting a storage drive is depicted.
[0074] For illustration purposes only, the figures depict memory blocks being written sequentially on the drive from the bottom of the drive. Those skilled in the art will appreciate that different write patterns may be used and that memory blocks may in fact be removed.
[0075] Figure 2 256kB.
[0076] Three storage chunks, VOL_1, VOL_2, and VOL_3, are written to mirrored disks DISK_1 225 and DISK_2 275. The storage chunks are written to DISK_1 225 with a compression ratio of C1, and the storage chunks are written to DISK_2 275 with a compression ratio of C2. This results in DISK_1 225 containing the compressed volumes VOL_1_C1 210, VOL_2_C1 215, and VOL_3_C1 220. DISK_2 275 contains the compressed volumes VOL_1_C2 260, VOL_2_C1 265, and VOL_3_C1 270. The highly compressed storage chunks on DISK_2 275 consume less space. If all writes were directed to the disks in this pattern, eventually one disk would be full (the low-compression disk) while the other disk would still have free space (the high-compression disk).
[0077] Figure 3 Should Figures 4 to 7 Read in conjunction, there is depicted a high-level exemplary schematic flow chart 300 depicting method steps for operating to write a memory block in a memory array, in accordance with a preferred embodiment of the present invention.
[0078] Figure 4 Depicted is a high-level exemplary schematic diagram 400 depicting a storage disk in accordance with a preferred embodiment of the present invention.
[0079] Figure 5 Depicted is a high-level exemplary schematic diagram 500 depicting a memory controller in accordance with a preferred embodiment of the present invention.
[0080] Figure 6 Depicted is a high-level exemplary diagram 600 depicting a computer system in accordance with a preferred embodiment of the present invention. Figure 6 Depicted are a host 605, a storage controller 501 with RAID controller functionality, a disk enclosure 615, and a RAID array 620. The storage controller 620 also includes a component stack, such as a copy services component 608 and a cache component 610. The RAID array 620 includes two storage disks 425 and 475. Commands are communicated between the host 605, the storage controller 501, and the disk enclosure 615 using SCSI commands. If cache 610 is available, data is written to it and then downgraded to disk according to the cache algorithm. For reads, data is first read from cache 610, and only if it is not available (called a cache miss) is the data read from disk. Data is read and written across the depicted interface.
[0081] In an embodiment of the method, analysis component 525 analyzes a set of compression ratios C1 and C2 for a set of storage blocks VOL_1, VOL_2, and VOL_3 (not shown) previously written on at least two storage devices 425 and 475 to determine a write pattern. Based on this pattern, determination component 530 determines a compression ratio for writing to a subsequent volume VOL_4 (not shown). Those skilled in the art will appreciate that the set of storage blocks may be an empty set.
[0082] In one embodiment, the method analyzes a set of compression ratios C1 , C2 for a previously written set of storage blocks VOL_1 , VOL_2 , VOL_3 by analyzing free capacity (also referred to as space) SPACE_1 430 on DISK_1 425 and free capacity SPACE_2 480 on DISK_2 475 .
[0083] The method begins at step 301. At step 303, the method analyzes a set of compression ratios for a set of storage blocks written to a first storage device and a second storage device to determine a pattern. As part of step 303, at step 305, space component 502 determines free capacity SPACE_1 430 on disk DISK_1 425 and free capacity SPACE_2 480 on disk DISK_2 475. At step 310, comparison component 504 compares SPACE_1 430 to SPACE_2 480. Comparison component 504 determines whether SPACE_1 430 is greater than SPACE_2 480 by a threshold value THRES. By using the threshold value THRES, the algorithm allows for a tolerance to be set when determining whether to switch compression ratios. Alternatively, comparison component 504 determines whether SPACE_1 430 is not greater than SPACE_2 480 by a threshold value THRES. By using the threshold value THRES, the algorithm allows for a tolerance to be set when determining whether to switch compression ratios. The threshold value can also be set to zero.
[0084] Figure 4Also shown is the mirroring of data written to two disks, DISK_1 425 and DISK_2 475. Three storage blocks, VOL_1, VOL_2, and VOL_3, have been written to the mirrored disks, DISK_1 425 and DISK_2 475. Storage blocks VOL_1 and VOL_3 are written to DISK_1 425 with a compression ratio of C1, and storage block VOL_2 is written to DISK_1 425 with a compression ratio of C2. Storage blocks VOL_1 and VOL_3 are written to DISK_2 475 with a compression ratio of C2, and storage block VOL_2 is written to DISK_2 475 with a compression ratio of C1. This results in DISK_1 425 containing the compressed volumes VOL_1_C1 410, VOL_2_C2 415, and VOL_3_C1 420. DISK_2 475 contains compressed volumes VOL_1_C2 460 , VOL_2_C 465 , and VOL_3_C1 470 . Figure 4 This shows that SPACE_1 430 is smaller than SPACE_2 480. The space used on DISK_2 475 is less than the space used on DISK_1 425's partner disk (therefore, there is more space). Therefore, DISK_2 475 is a good candidate for the next low-compression write.
[0085] At step 315 , if SPACE_1 430 is greater than SPACE_2 480 by the threshold THRES, the data read / write component 512 writes the storage block VOL_4 to DISK_1 425 at the compression ratio C2 and writes the storage block VOL_4 to DISK_2 475 at the compression ratio C1. The method then proceeds to step 325 .
[0086] At step 320 , if SPACE_1 430 is not greater than SPACE_2 480 by the threshold THRES, the data read / write component 512 writes the storage block VOL_4 to DISK_1 425 at the compression ratio C1 and writes the storage block VOL_4 to DISK_2 475 at the compression ratio C2. The method then proceeds to step 325 .
[0087] At step 325, it is determined whether there are further memory blocks to be written. If there are further memory blocks to be written, the method returns to step 305. If there are no further memory blocks to be written, the method ends at step 330.
[0088] Advantageously, by measuring the space capacity, an appropriate compression ratio for subsequent writes can be determined, taking into account the actual achieved compression ratio of storage blocks already written to disk.
[0089] Figure 7Depicted is a high-level exemplary schematic diagram 700 depicting a table for determining a compression ratio mode, in accordance with a preferred embodiment of the present invention.
[0090] In an alternative embodiment, at step 303, the method analyzes a set of compression ratios C1, C2 for a set of previously written storage blocks VOL_X (X=1 to N) by analyzing the most recently written storage block VOL_N on disk DISK_1 425 and the VOL_N written on disk DISK_2 475. The pattern is stored in compression table TABLE 1 702 for DISK_1 425. The pattern is depicted as {C1, ... C2, C1, C2, C1}. The most recently used compression ratio is for the write of VOL_N on DISK_1 425, and by looking at T N 475 . The method determines that for writing VOL_N+1 to DISK_1 425, the most recently used compression ratio C2 for the write of VOL_N on DISK_2 475 is used. The method also determines that for writing VOL_N+1 to DISK_2 475, the most recently used compression ratio C1 for the write of VOL_N on DISK_1 425 is used. The method rotates which disk is using which compression technique so that the total storage used on the disks remains balanced. The method rotates after each write, resulting in VOL_N+1 (not shown) being written to DISK_1 425 with a compression ratio of C2, and VOL_N+1 being written to DISK_2 475 with a compression ratio of C1.
[0091] In an alternative embodiment, at step 303, after a set of writes Y = 4 has been mirrored or copied to each disk, the method rotates which disk is using which compression technique so that the total storage used on the disks remains balanced. At step 303, the method analyzes a set of compression ratios C1, C2 for a set of previously written storage blocks VOL_X (X = 1 to N) by analyzing the most recently written storage blocks VOL_N-VOL_1 on disk DISK_1 425 and the writes VOL_N-VOL_1 on disk DISK_2 475. The pattern is stored in compression table TABLE 2 712 for DISK_1 425. The pattern is depicted as {C1, ...C2, C2, C2, C2}. A count of the number of times the compression ratio was used consecutively is also stored in column C 720. Table TABLE 2 712 shows that the most recent volumes VOL_N through VOL_N-3 used compression ratio C2 for writes to DISK_1 425, and that this compression ratio has been used four times consecutively. A corresponding table (not shown) for DISK_2 475 would show that the most recent volumes VOL_N through VOL_N-3 used compression ratio C1 for writes to DISK_2 475. Since Y is set to 4 in this embodiment, when VOL_N+1 is mirrored and written to DISK_1 425 and DISK_2 475, compression ratio C1 would be used for DISK_1 425 and compression ratio C2 would be used for DISK_2 475.
[0092] Those skilled in the art will appreciate that Y can be any integer, and that other patterns can be established to trigger a change in the compression ratio for the next write. Such patterns can depend on the relative magnitudes of the compression ratios C1 and C2. Those skilled in the art will also appreciate that multiple compression ratios C1-CN can be used in embodiments of the present invention.
[0093] By using this algorithm, the space savings benefits of higher compression can be used while hiding the impact of slower performance. Writes can be completed while faster, lower-compression writes are completing, and any reads are not affected by needing to perform slower decompression because reads can always be directed to the mirror that has the lower-compression version of the data.
[0094] In an alternative embodiment, the RAID array is configured as RAID 51. This represents a RAID stack, equivalent to a logical RAID 1 layered on top of a RAID 5 array. The invention still applies when the two disks DISK_1 425 and DISK_2 475 are replaced by two logical disks LDISK_1 and LDISK_2 (not shown). Each of these two disks consists of two RAID 5 arrays. To analyze the free space, it is necessary to consider the free space on the disks that make up the RAID 5 array, as well as the compression ratio used on these disks.
[0095] Embodiments of the present invention are also applicable to other replication technologies, such as point-in-time replication for creating snapshots and clones, asynchronous remote replication, and synchronous remote replication. An example of a point-in-time product is IBM Flashcopy. ® .
[0096] IBM Remote Mirror and Copy is a storage feature that continuously updates the target copy of a volume so that it matches changes made to its associated source volume. IBM Remote Mirror and Copy does not capture the state of the source volume at a certain point in time, but instead reflects all changes made on the source volume to the target volume.
[0097] IBM Global Copy offers an asynchronous remote copy option, where writes to storage units at the production site are considered complete before they are transferred to the storage units at your recovery site. The IBM MetroMirror feature offers a synchronous remote copy option, which continuously updates the secondary copy of the volume to match changes made to the source volume. Writes to the production site are considered complete only when they are transferred to the storage units at your recovery site.
[0098] Point-in-time replication is a feature supported on various storage devices that allows a nearly instantaneous point-in-time copy of an entire logical volume or data set to be made. The point-in-time feature allows a complete volume copy of the data to be made, and the copy is immediately available for read or write access. This copy can be used to create backup copies on tape using standard backup tools available in the computing environment.
[0099] A snapshot provides the ability to record the state of a storage device at a given moment and retain that snapshot as a guide for restoring the storage device in the event of a storage device failure. A snapshot essentially creates a point-in-time copy of data. Typically, snapshot replication is instantaneous and can be used by other applications, such as data protection, data analysis and reporting, and data replication applications. The original copy of the data remains available to the application without interruption, while the snapshot copy is used to perform other functions on the data. A snapshot is a point-in-time copy that relies on the primary disk. For example, a snapshot can be created using a copy-on-write process, in which, when a write is made to an area on the primary disk, the existing data currently in that area is written to the backup disk. Therefore, compared to a full copy of the primary disk, the backup disk will contain data that has been overwritten on the primary disk. This type of backup copy often results in a thinly provisioned volume, which reduces storage requirements. A series of snapshot copies can be concatenated to represent the primary disk at different times. However, snapshot copies typically still rely on the primary disk to reconstruct a full copy of the primary disk. Therefore, a snapshot is a point-in-time copy, in which the target disk only holds the changed data required to present a point-in-time copy of the source. Data is copied to the target disk only when it has changed on the source. To present a point-in-time copy, the target disk usually always depends on some data on the source disk.
[0100] In contrast, a "clone" is a point-in-time copy that is independent of the primary disk. For example, a clone can be created by performing a background copy process in which regions of the disk are sequentially copied to a backup disk, and performing a copy-on-write process to immediately copy any regions of the primary disk that are about to be overwritten due to writes and have not yet been processed by the background copy process. Clones are typically used when a copy is needed and input / output (I / O) to the copy must not affect I / O to the primary volume in any way. Clones can also be used when the copy will not be affected by the availability of the source. Clones can also be used in cascading. Therefore, a clone is a point-in-time copy in which the target disk will maintain a complete copy of the data that was on the source disk at the time the point-in-time copy was started. When the copy of data from the source to the target is complete, the target disk is independent of the source.
[0101] Point-in-time replication is performed using a bitmap to track the data grains copied from the source disk to the target disk. When copying data between the source and target, data is copied in blocks called "grains." The grain size is determined when the mapping is created. Typical sizes are 256KB and 64KB. A background copy process is used to copy the data grains. If a data grain is read from the target drive before it is copied to the target, the read is redirected to the source drive. If a data grain is read from the target drive after it has been copied to the target, the read is directed to the target drive. If a data grain is written to the target drive before it is copied to the target, the corresponding entry in the bitmap is marked as complete. If a data grain is written to the target drive after it has been copied to the target, the write is directed to the target drive. If a data grain is written to the source drive before it is copied to the target, the data grain is first copied to the target drive, and then the source disk data grain is overwritten with the new data. In this way, the source and target drives appear to be immediately available to the host, even before all data has actually been copied to the target drive.
[0102] In RAID 1 writes, storage blocks are written to both disks simultaneously. In contrast, in remote replication, existing storage blocks are copied from the source to the target, which is equivalent to performing a read from the source and a write to the target.
[0103] In an alternative embodiment of the present invention, DISK_2 475 is the target volume of the copy operation from DISK_1 425. The method includes analyzing the set of compression ratios used on the copy source volume and the copy target volume to determine a pattern. The pattern is analyzed to determine a first compression ratio to be used with subsequent writes to the source disk and a second compression ratio to be used for subsequent writes to the target drive. Writes to the target as part of the copy process also consider the compression ratio of the source granule to determine the compression ratio for the target write.
[0104] In another embodiment, the target is a point-in-time copy of the source. When a granule on the source is overwritten, a copy of the granule is first made to the target, copying the existing data on the source drive to the target. By analyzing the compression ratio, the existing data can be written to the target disk using one compression ratio, and the new data can be written to the source using a different ratio.
[0105] The description of the various embodiments of the present disclosure is presented for illustrative purposes, but is not intended to be exhaustive or to limit the embodiments to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, the practical applications or technical improvements relative to the technology found in the marketplace, or to enable those of ordinary skill in the art to understand the embodiments disclosed herein. It will be readily understood that the components of the application as generally described and illustrated herein can be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiments is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application.
[0106] Those skilled in the art will readily appreciate that the invention described above can be practiced with steps performed in a different order and / or with configurations of hardware elements different from those disclosed. Therefore, although the application has been described based on these preferred embodiments, it will be apparent to those skilled in the art that certain modifications, variations, and alternative configurations will be apparent.
[0107] Although preferred embodiments of the present application have been described, it is to be understood that the described embodiments are merely illustrative and that the scope of the application is to be defined solely by the appended claims, taking into account their full range of equivalents and modifications (e.g., protocols, hardware devices, software platforms, etc.).
[0108] In addition, the same or similar reference numerals are used throughout the drawings to represent the same or similar features, elements or structures, and therefore, the detailed explanation of the same or similar features, elements or structures will not be repeated for each drawing. As used herein, the terms "approximately" or "substantially" are intended to mean close to or approximate to, but not precisely, thickness, width, percentage, range, etc. For example, the terms "approximately" or "substantially" used herein imply a small margin of error. In addition, the terms "vertical" or "vertical direction" or "vertical height" used herein refer to the Z direction of the Cartesian coordinate system shown in the figures, and the terms "horizontal" or "horizontal direction" or "lateral direction" used herein refer to the X direction and / or Y direction of the Cartesian coordinate system shown in the figures.
[0109] Additionally, the term “illustrative” is used herein to mean “serving as an example, instance, or illustration.” Any embodiment or design described herein is intended to be “illustrative” and is not necessarily to be construed as preferred or advantageous over other embodiments or designs.
[0110] It is to be understood that although the present disclosure includes detailed descriptions about cloud computing, the implementation of the teachings herein is not limited to cloud computing environments. Instead, embodiments of the present invention can be implemented in conjunction with any other type of computing environment now known or later developed.
[0111] For the avoidance of doubt, the term "comprising" when used throughout the specification and claims is not to be construed as meaning "consisting only of.
Claims
1. A computer-implemented method for managing a storage system, the storage system comprising a first storage device and a second storage device, the method comprising: analyzing a set of compression ratios for a set of memory blocks written on a first storage device and a second storage device to determine a pattern; In response to the mode, determining a first compression ratio and a second compression ratio, the first compression ratio being different from the second compression ratio; as well as The memory block is written to the first memory device at a first compression ratio, and the memory block is written to the second memory device at a second compression ratio.
2. The method according to claim 1, wherein: Analyzing a set of compression ratios includes determining a first free capacity on a first storage device and a second free capacity on a second storage device; Determining the first compression ratio and the second compression ratio includes: In response to determining that the first idle capacity is greater than the second idle capacity by a threshold value, determining a first compression ratio and a second compression ratio, the first compression ratio being less than the second compression ratio; In response to determining that the first free capacity is less than the second free capacity by the threshold, a first compression ratio and a second compression ratio are determined, the first compression ratio being greater than the second compression ratio.
3. The method according to claim 1, wherein: Analyzing a set of compression ratios includes determining that a third compression ratio has been used for the most recent Y writes to the first storage device and a fourth compression ratio has been used for the most recent Y writes to the second storage device; as well as Determining the first compression ratio includes determining the first compression ratio to be equal to a fourth compression ratio, and determining the second compression ratio includes determining the second compression ratio to include a third compression ratio.
4. A method according to any preceding claim, wherein the first storage device and the second storage device are members of a RAID array.
5. The method of claim 4, wherein the RAID array is a member of a list including RAID 1, RAID 10, RAID 51, and RAID 61.
6. A method according to any preceding claim, wherein the second storage device is a copy of the first storage device. The method of claim 6 , wherein the second storage device is a point-in-time copy of the first storage device.
8. A system for managing a storage array in a storage system, the storage array comprising a first data block and a second data block, the system comprising: an analysis component for analyzing a set of compression ratios for writing a set of storage blocks on a first storage device and a second storage device to determine a pattern; a determining component for determining a first compression ratio and a second compression ratio in response to the mode, the first compression ratio being different from the second compression ratio; as well as The data read / write component is configured to write the storage block to the first storage device at a first compression ratio and write the storage block to the second storage device at a second compression ratio.
9. The system of claim 8, wherein: The analysis component further includes a space component for determining a first free capacity on the first storage device and a second free capacity on the second storage device; as well as In response to determining that the first idle capacity is greater than the second idle capacity by a threshold value, the determining component is further operative to determine a first compression ratio and a second compression ratio, the first compression ratio being less than the second compression ratio; as well as In response to determining that the first free capacity is less than the second free capacity by the threshold, the determining component is further operative to determine a first compression ratio and a second compression ratio, the first compression ratio being greater than the second compression ratio.
10. The system of claim 8, wherein: The analysis component is further operative to determine that a third compression ratio has been used for the last y writes to the first storage device and a fourth compression ratio has been used for the last y writes to the second storage device; as well as The determining component is further operative to determine that the first compression ratio is equal to a fourth compression ratio, and determining the second compression ratio includes determining that the second compression ratio includes the third compression ratio.
11. The system of claim 8, wherein the first storage device and the second storage device are members of a RAID array.
12. The system of claim 11, wherein the RAID array is a member of a list including RAID 1, RAID 10, RAID 51, and RAID 61.
13. The system of claim 8, wherein the second storage device is a replica of the first storage device.
14. The system of claim 13, wherein the second storage device is a point-in-time copy of the first storage device.
15. A computer program product for managing a storage array in a storage system, the computer program product comprising: A computer-readable storage medium readable by a processing circuit, the computer-readable storage medium storing instructions for execution by the processing circuit to perform the method according to any one of claims 1 to 7.
16. A computer program stored on a computer-readable medium and loadable into the internal memory of a digital computer, comprising software code portions for performing the method according to any one of claims 1 to 7 when the program is run on a computer.