Storage data copy using different compression algorithms
By dynamically adjusting compression ratios based on spare capacity and pattern analysis, the method balances storage capacity and performance in RAID systems, addressing performance imbalances and reducing costs.
Patent Information
- Application Number
- JP2025533606
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-01
- Filing Date
- 2024-01-19
- Publication Date
- 2026-03-04
AI Technical Summary
Existing RAID systems face performance imbalances due to the use of different compression algorithms on storage disks, leading to unbalanced storage capacity and potential performance degradation.
A method and system that dynamically adjust compression ratios based on spare capacity and pattern analysis across storage devices within a RAID array, balancing storage capacity and performance by alternating faster but less space-efficient and slower but more compact compression algorithms.
This approach ensures consistent total storage capacity usage across disks, reduces overall storage costs, and minimizes performance degradation by directing reads to low-compression versions, maintaining efficient space utilization and performance.
Smart Images

Figure 2026507395000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention is directed generally to storage, and more particularly to methods, systems and computer program products suitable for managing storage arrays within a storage system. [Background technology]
[0002] Many computer systems use Redundant Array of Independent Disks (RAID) for data storage, which allows for improved data transfer rates over a single disk access and also provides error correction, data protection, and disk redundancy. Disks are also known as "disk drives" or simply "drives."
[0003] RAID systems are disk array storage systems created to provide large storage capacity, fast access times and rates, and also redundancy for data protection. For example, data can be mirrored across two or more disks, so that if one disk fails, the data is available from the remaining disks. Alternatively, data can be distributed across multiple disks, allowing simultaneous retrieval of the data. Data parity can also be provided on additional disks, so that if one disk fails, the data can be regenerated from the remaining disks. RAID systems are controlled by a RAID controller, which is a hardware unit that configures the RAID array and provides the RAID layer, so that the disk array appears as a logical single disk to the computer system in use.
[0004] Modern storage controllers use RAID algorithms to distribute data across multiple disks to add redundancy and prevent data loss in the event of a disk failure.
[0005] Advanced copy services are also available, which copy data from one disk to another for various purposes, such as backup.
[0006] Some modern disks, such as the IBM® FlashCore Module (FCM), implement internal hardware-based compression algorithms. It is not unrealistic for a disk to simultaneously support more than one algorithm and choose one to use for a particular write based on its internal logic. These different compression algorithms will have different compression characteristics and speeds. The higher the compression ratio, the longer the disk will take to compress. Different compression algorithms can be used for different copies of the same data, so that when reading that data, the appropriate copy can be used to meet specified performance characteristics. However, this can lead to an unbalanced system in terms of performance.
[0007] Therefore, there is a need in the art to address the above-mentioned problems. Summary of the Invention
[0008] According to the present invention, there are provided a method, a system and a computer program product according to the independent claims.
[0009] Viewed from a first aspect, the present invention provides a computer-implemented method for managing a storage system including a first storage device and a second storage device, the method comprising: analyzing a set of compression ratios to be used for a set of storage blocks written to 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] Viewed from a further aspect, the present invention provides a computer-implemented method for managing a storage system including a first storage device and a second storage device, the method including: determining a first spare capacity of the first storage device and a second spare capacity of the second storage device; in response to determining that the first spare capacity is greater than the second spare capacity by a threshold value, writing storage blocks to the first storage device at a first compression rate and writing storage blocks to the second storage device at a second compression rate, wherein the first compression rate is less than the second compression rate; and in response to determining that the first spare capacity is less than the second spare capacity by a threshold value, writing storage blocks to the first storage device at the first compression rate and writing storage blocks to the second storage device at the second compression rate, wherein the first compression rate is greater than the second compression rate.
[0011] Viewed from a further aspect, the present invention provides a system for managing a storage array in a storage system, the storage array including first data blocks and second data blocks, the system comprising: an analysis component for analyzing a set of compression ratios to be used for a set of storage blocks written to a first storage device and a 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, where the first compression ratio is 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] Viewed from a further 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 comprising: a memory; at least one processor in communication with the memory; and program instructions executable by the one or more processors via the memory for performing a method of the present invention.
[0013] Viewed from a further 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 performing steps of the present invention.
[0014] Viewed from a further aspect, the present invention provides a computer program stored on a computer readable medium and loadable into the internal memory of a digital computer, the computer program comprising software code portions for performing the steps of the present invention when said program is run on the computer.
[0015] Preferably, the present invention provides a method, a system, a computer program product, and a computer program, wherein analyzing the set of compression ratios comprises determining a first spare capacity of a first storage device and a second spare capacity of a second storage device; determining the first compression ratio and the second compression ratio comprises determining the first compression ratio and the second compression ratio in response to determining that the first spare capacity is greater than the second spare capacity by a threshold value, wherein the first compression ratio is less than the second compression ratio; and determining the first compression ratio and the second compression ratio in response to determining that the first spare capacity is less than the second spare capacity by a threshold value, wherein the first compression ratio is greater than the second compression ratio.
[0016] Preferably, the present invention provides a method, a system, a computer program product and a computer program, wherein analyzing the set of compression ratios comprises determining that a third compression ratio has been used for the most recent y writes to the first storage device and that a fourth compression ratio has been used for the most recent y writes to the second storage device; and determining the first compression ratio comprises determining that the first compression ratio is equal to the fourth compression ratio, and determining the second compression ratio comprises determining that the second compression ratio includes the third compression ratio.
[0017] Preferably, the present invention provides a method, a system, a computer program product and a 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, a system, a computer program product and a computer program, wherein the RAID array is a member of a list, the list including RAID 1, RAID 10, RAID 51 and RAID 61.
[0019] Preferably, the present invention provides a method, a system, a computer program product and a computer program, wherein the second storage device is a copy of the first storage device.
[0020] Preferably, the present invention provides a method, a system, a computer program product and a computer program, wherein the second storage device is a point-in-time copy of the first storage device.
[0021] By having disks that support two different compression algorithms—a first compression algorithm that is faster but less space-efficient, and a second compression algorithm that is slower but more compact—a copy of the algorithm in the storage controller can choose to write the first copy to fast / low compression storage and the second to slower / high compression. If this choice of low / high compression is distributed across disks so that the total storage capacity used is consistent across all disks, the total storage capacity used is smaller than traditional copies, thus reducing the total storage cost. Advantageously, by using this algorithm, the space-saving benefits of high compression can be obtained and the impact of performance degradation can be hidden. Writes can complete when the faster, low-compression writes complete, and reads will not be affected by having to perform the slower decompression because reads can always be directed to a mirrored, low-compression version of the data. [Brief explanation of the drawings]
[0022] The present invention will now be described, by way of example only, with reference to the preferred embodiments illustrated in the following figures:
[0023] [Figure 1] 1 illustrates a computing environment 100 according to one embodiment of the present invention.
[0024] [Figure 2] 2 shows a high-level exemplary schematic diagram 200 illustrating a storage drive according to one embodiment of the present invention.
[0025] [Figure 3] 3 depicts a high level exemplary schematic flow diagram 300 illustrating operational method steps for writing storage blocks to a storage array in accordance with a preferred embodiment of the present invention.
[0026] [Figure 4] 4 shows a high level exemplary schematic diagram 400 illustrating a storage disk according to a preferred embodiment of the present invention.
[0027] [Figure 5] 5 depicts a high level exemplary schematic diagram 500 illustrating a storage controller in accordance with a preferred embodiment of the present invention.
[0028] [Figure 6] 6 shows a high-level exemplary schematic diagram 600 illustrating a computer system according to a preferred embodiment of the present invention.
[0029] [Figure 7] 7 depicts a high-level exemplary diagram 700 showing tables used to determine compression ratio patterns, according to a preferred embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0030] Various aspects of the present disclosure are described through text, flowcharts, block diagrams of computer systems, and / or block diagrams of machine logic included in computer program product (CPP) embodiments. For any flowchart, depending on the technology involved, operations may be performed in an order different from that shown in a given flowchart. For example, again depending on the technology involved, two operations shown in successive flowchart blocks may be performed in the reverse order, as a single integrated step, simultaneously, or in an at least partially overlapping manner.
[0031] A computer program product embodiment ("CPP embodiment" or "CPP") is a term used in this disclosure to describe any set of one or more storage media (also referred to as "media") collectively included in a set of one or more storage devices that collectively contain 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 hold and store instructions for use by a computer processor. The computer-readable storage medium may be, but is not limited to, 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 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), compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded device (such as pits / lands formed on a major surface of a punch card or disk), or any suitable combination of the foregoing. Computer-readable storage media, as the term is used in this disclosure, should not be construed as storage in the form of a transitory signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide, light pulses passing through fiber optic cables, electrical signals communicated through wires, and / or other transmission media. As will be appreciated by those skilled in the art, data is typically moved at some infrequent time during the normal operation of a storage device, such as during access, defragmentation, or garbage collection, but the above does not qualify a storage device as transitory because data is not transitory while it is stored.
[0032] 1 illustrates a computing environment 100. The computing environment 100 includes an example environment for executing at least some of the computer code involved in performing the methods of the present invention, such as functionality 200 of an improved storage controller 501. In addition to block 200, the computing environment 100 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 set of processors 110 (including processing circuitry 120 and cache 121), a communications fabric 111, volatile memory 112, persistent storage 113 (including an operating system 122 and block 200 shown above), a set of peripheral devices 114 (including a set of user interface (UI) devices 123, storage 124, and a set of Internet of Things (IoT) sensors 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 set of host physical machines 142, a set of virtual machines 143, and a set of containers 144.
[0033] Computer 101 may take the form of a desktop computer, a laptop computer, a tablet computer, a smartphone, a smartwatch or other wearable computer, a mainframe computer, a quantum computer, or any other form of computer or mobile device now known or later developed that is capable of executing programs, accessing a network, or querying a database, such as remote database 130. As is well understood in the field of computer technology, and depending on the technology, execution of a computer-implemented method may be distributed among multiple computers and / or among multiple locations. However, in this presentation of computing environment 100, to keep the presentation as concise as possible, the detailed description focuses on a single computer, specifically computer 101. Although computer 101 is not depicted in FIG. 1 within a cloud, it may be located within a cloud. However, computer 101 is not required to reside within a cloud except to any extent that may be expressly indicated.
[0034] Processor set 110 includes one or more computer processors of any type now known or later developed. Processing circuitry 120 may be distributed across multiple packages, e.g., multiple tailored integrated circuit chips. Processing circuitry 120 may implement multiple processor threads and / or multiple processor cores. Cache 121 is memory located within the processor chip package and is typically used for data or code that should be available for fast access by threads or cores executing on processor set 110. Cache memory is typically organized into multiple levels depending on relative proximity to the processing circuitry. Alternatively, some or all caches for a processor set may be located “off-chip.” In some computing environments, processor set 110 may be designed to operate with qubits and perform quantum computing.
[0035] Computer-readable program instructions are typically loaded onto computer 101 to cause processor set 110 of computer 101 to perform a series of operational steps, thereby realizing a computer-implemented method, whereby the instructions so executed instantiate the method specified in the flowcharts and / or descriptions of the computer-implemented methods contained herein (collectively referred to as the "methods of the present invention"). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 121 and other storage media described below. The program instructions and associated data are accessed by processor set 110 to control and direct the execution of the methods of the present invention. In computing environment 100, at least some of the instructions for executing the methods of the present invention may be stored in block 200 in persistent storage 113.
[0036] Communications fabric 111 is the signal-conducting pathway that allows various components of computer 101 to communicate with one another. Typically, this fabric is made up of switches and conductive pathways, such as buses, bridges, and switches and conductive pathways that make up physical input / output ports, etc. Other types of signal communication pathways may be used, such as fiber optic and / or wireless communication pathways.
[0037] Volatile memory 112 may be any type of volatile memory now known or later developed. Examples include dynamic random access memory (RAM) or static RAM. Typically, volatile memory 112 is characterized by random access, although this is not required unless explicitly stated. In computer 101, volatile memory 112 is located in a single package and is internal to computer 101; however, alternatively or additionally, volatile memory may be distributed across multiple packages and / or located external to computer 101.
[0038] Persistent storage 113 is any form of non-volatile storage for a computer, now known or developed in the future. The non-volatility of this storage means that stored data is maintained regardless of whether power is supplied to computer 101 and / or directly to persistent storage 113. While persistent storage 113 may be read-only memory (ROM), typically at least a portion of persistent storage allows data to be written, data to be deleted, and data to be rewritten. Some well-known forms of persistent storage include magnetic disks and solid-state storage devices. Operating system 122 can take several forms, such as various known proprietary operating systems using a kernel or open-source Portable Operating System Interface-type operating systems. The code contained in block 200 typically includes at least some of the computer code involved in performing the methods of the present invention.
[0039] The peripheral device set 114 includes the set of peripheral devices of the computer 101. Data communication connections between the peripheral devices and other components of the computer 101 may 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), insertion-type 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, the UI device set 123 may include components such as display screens, speakers, microphones, wearable devices (such as goggles and smartwatches), keyboards, mice, printers, touchpads, game controllers, and haptic devices. The storage 124 may be external storage, such as an external hard disk, or insertable storage, such as an SD card. The storage 124 may be persistent and / or volatile. In some embodiments, the storage 124 may 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 storage (e.g., computer 101 stores and manages a large database locally), this storage may be provided by a peripheral storage device 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 may be used in Internet of Things applications. For example, one sensor may be a thermometer and another sensor may be a motion detector.
[0040] Network module 115 is a collection of computer software, hardware, and firmware that enables computer 101 to communicate with other computers over WAN 102. Network module 115 may include hardware such as a modem or Wi-Fi signal transceiver, software for packetizing and / or depacketizing data for communication network transmission, and / or web browser software for communicating data over the Internet. In some embodiments, the network control and network forwarding functions of network module 115 are performed on the same physical hardware device. In other embodiments (e.g., embodiments utilizing Software-Defined Networking (SDN)), the control and forwarding functions of network module 115 are performed on physically separate devices, such that the control function manages several different network hardware devices. Computer-readable program instructions for implementing the methods of the present invention may be downloaded to computer 101 from an external computer or external storage device, typically through a network adapter card or network interface included in network module 115.
[0041] WAN 102 is any wide area network (e.g., the Internet) capable of communicating computer data over non-local distances using any technology for communicating computer data, now known or later developed. In some embodiments, WAN 102 may be replaced and / or supplemented by a local area network (LAN) designed to communicate data between devices located in a local area, such as a Wi-Fi network. WANs and / or LANs typically include computer hardware such as copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and edge servers.
[0042] End-user device (EUD) 103 is any computer system used and controlled by an end user (e.g., a customer of the enterprise operating computer 101) and may take any of the forms described above in connection with computer 101. EUD 103 typically receives useful and useful data from the operation of computer 101. For example, in the hypothetical case where computer 101 is designed to provide recommendations to the end user, the recommendations would typically be communicated from network module 115 of computer 101 over WAN 102 to EUD 103. In this manner, EUD 103 can 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 heavy client, a mainframe computer, or a desktop computer.
[0043] Remote server 104 is any computer system that provides 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 useful and useful data for use by other computers, such as computer 101. For example, in the hypothetical case where computer 101 is designed and programmed to provide recommendations based on historical data, this historical data may be provided to computer 101 from remote database 130 of remote server 104.
[0044] Public cloud 105 is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and / or other computer functionality, particularly data storage (cloud storage) and computing power, without direct active management by users. Cloud computing typically leverages resource sharing to achieve coherence and economies of scale. Direct active management of public cloud 105's computing resources is performed by computer hardware and / or software in cloud orchestration module 141. The computing resources provided by public cloud 105 are typically implemented by virtual computing environments running on various computers comprising host physical machine set 142, a universe of physical computers within and / or available to public cloud 105. Virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set 143 and / or containers from container set 144. It is understood that these VCEs may be stored as images and can be transferred among and between various physical machine hosts either as images or after instantiation of the VCE. The cloud orchestration module 141 manages the transfer and storage of images, deploys new instantiations of the VCE, and manages active instantiations of VCE deployments. The gateway 140 is a collection of computer software, hardware, and firmware that enables the public cloud 105 to communicate over the WAN 102.
[0045] Some further description of virtualized computing environments (VCEs) is now provided. VCEs can be stored as "images." New active instances of a VCE can be instantiated from images. Two well-known types of VCEs are virtual machines and containers. A container is a VCE that uses operating system-level virtualization. This refers to an operating system feature in which the kernel allows the existence of multiple isolated user space instances called containers. These isolated user space instances typically behave as actual computers from the perspective of programs running within them. A computer program running on a typical operating system can utilize all of the computer's resources, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, a program running inside a container can only use the contents of the container and the devices assigned to the container; this feature is known as containerization.
[0046] Private cloud 106 is similar to public cloud 105, except that its computing resources are available only for use by a single enterprise. While private cloud 106 is shown in communication with WAN 102, in other embodiments, the private cloud may be completely disconnected from the Internet and accessible only through a local / private network. A hybrid cloud is a composite of multiple clouds of different types (e.g., private, community, or public cloud types), often implemented by different vendors. While each of the multiple clouds remains a separate and independent entity, the larger hybrid cloud architecture is bound together by standardized or proprietary technologies that enable orchestration, management, and / or data / application portability between the constituent clouds. In this embodiment, both public cloud 105 and private cloud 106 are part of a larger hybrid cloud.
[0047] A logical unit number (LUN) is a unique identifier for a collection of physical or logical storage. A LUN can refer to a single disk, a partition of multiple disks, or an entire RAID array. A logical block address (LBA) is a way of specifying the location of a block of data on a storage device.
[0048] Small Computer System Interface (SCSI) is a set of command set 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 is available in several interfaces, for example, SSA, 1 Gigabit Fibre Channel (1GFC), and SAS. SCSI can be parallel or serial.
[0049] The IBM® DS8000® series, IBM Storwize®, and IBM FlashSystem storage subsystems use the SAS (Serial Attached SCSI) protocol for internal disks. The storage subsystems have a controller that provides the necessary hardware adapters for host connectivity to the subsystem. A RAID adapter is used to create virtual disks or logical unit numbers (LUNs) configured in one of the supported RAID levels using multiple SAS hard disks based on the level of RAID used. Various levels of RAID are available for configuring the internal SAS HDDs or SDDs. IBM, DS8000, Storwize, and FlashCopy are registered trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide.
[0050] There are several RAID architectures depending on the required balance between fault tolerance and performance. These architectures are known 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 these disks, and a parity checksum of all block data is written to one disk. The parity data is not written to the fixed disk, but is distributed across all disks. If a disk fails, the data can be reconstructed using the remaining block data and blocks. In RAID level 6, data blocks, and also dual parity, are striped across these disks. RAID 6 can handle dual disk failures.
[0051] There are other RAID levels that can be used: RAID level 2, where data bits are striped across a set of data disks and error correction code is written to a redundancy disk; RAID level 3, where data bytes are striped across a set of data disks and a parity value is written to a parity disk; and RAID level 4, where data blocks are striped across a set of data disks and a parity value is written to a parity disk.
[0052] Additionally, other nested combinations of RAID are possible. Nested RAID levels are typically numbered with at least two digits: the first digit designates the lowest RAID level, and the second digit designates the next higher level. For example, RAID 10 is a combination of RAID 1 and RAID 0, with a RAID 1 stripe on top of a RAID 1 mirror. Other examples include RAID 15, which combines RAID 5 on top of RAID 1; RAID 51, which combines RAID 1 on top of RAID 5; and RAID 61, which combines RAID 1 on top of RAID 6.
[0053] On each physical disk, data is stored in predefined blocks of data having generally the same size. A predefined number of blocks of data, and any appropriate parity information, are mapped to define stripes of data distributed across the elements of the RAID array 220. A typical size of a strip is 8k to 64k bytes. A "stripe" is a group of corresponding stripe units.
[0054] Common RAID levels are: RAID 0: Data is striped across one or more disks with no redundancy RAID 1: Data is mirrored between two disks RAID 5: Data is striped across a minimum of three disks with one rotating parity. RAID 6: Data is striped across a minimum of five disks with two rotating parities. RAID 10: Using a minimum of two disks, data is striped across a mirrored pair of disks.
[0055] RAID arrays can be configured using a hardware adapter, which is referred to as "hardware RAID." RAID arrays can also be configured using operating system software, which is referred to as "software RAID."
[0056] In a storage system, if a disk on which data is stored fails, the data may be lost. For example, in fault-tolerant RAID levels such as RAID 1, RAID 5, and RAID 6, such data may be reconstructed from the remaining disks and rewritten to a repaired or spare disk. This array is said to be "reconstructed."
[0057] A RAID controller or "disk array controller" is a device that manages physical disks and presents them as logical units to a computer. A RAID controller has a front-end interface to a computer system's host adapter. An example of an interface is SCSI. A RAID controller also has a back-end interface for communicating with the underlying disks. A RAID controller performs many functions in addition to RAID management and I / O functions. Examples are controller failover and array copy services.
[0058] JBOD (Just a Bunch of Disks) is another architecture that uses an array of multiple disks. These can be made available to the host system as a set of independent disks or as a single volume expanded without RAID technology.
[0059] There are many levels of abstraction in a storage system. Storage disks manage the physical placement of data blocks on the disk media. Built-in functionality handles data block placement. For example, drives can identify media errors and therefore relocate blocks to appropriate media locations while presenting logically contiguous block space to the upstream storage controller 210.
[0060] Consider a RAID 5 array with a "stride" length of 5 blocks. This stride includes four data blocks and one parity block. Writing a file involves caching the data to the RAID controller. The RAID controller calculates parity values for the file's four data blocks at a time. The first "stripe" of five blocks, P, is written to the drive array: the first data block of P to drive N, the second data block of P to drive N+1, the third data block of P to drive N+2, the fourth data block of P to drive N+3, and the parity value for P to drive N+3. In a rotational system, the subsequent "stripe" of block P+1 is written to the drive array, at which point the following writes are initiated: the first data block of P+1 to drive N+1, the second first data block of P+1 to drive N+1, the third data block of P+1 to drive N+2, the fourth data block of P+1 to drive N+3, and the parity value for P+1 to drive N. Data and parity are rotated around the five drive array. The advantage of rotating writes is that it evens out drive writes.
[0061] If a drive fails in a RAID 5 array, the data blocks of a stride can be reconstructed using the stride blocks of the surviving drives. For example, if drive N fails in the example above, the second, third, and fourth data blocks of stripe P are XORed with the parity bit of drive N+3 to reconstruct data block N of stripe P.
[0062] Embodiments of the present invention combine the use of different compression strategies on storage devices that contain copies of data. An example of a storage device is a storage disk, such as an IBM® FlashCore Module (FCM). The embodiments are described with respect to block storage technology, but are equally applicable to other technologies, such as file storage technology.
[0063] Compression can be implemented without impacting existing environments and can be used with other storage processes, such as mirroring volumes and copy service functions. Compressed volumes provide the same level of availability as fixed volumes. When reading compressed blocks from a disk, the data is uncompressed. Compressed read block performance can vary between disk types. However, IBM FCM disks offer similar compressed block read performance across different compression algorithms. In fact, the higher the compression ratio, the better the read performance of LZ compression can be, because the CPU needs to process less compressed data compared to lower compression ratios. Currently, FCM has a fixed compression algorithm, but other disks exist that have variable compression algorithms.
[0064] One example of creating copies 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 also applies to other RAID mirroring technologies, such as, but not limited to, RAID 10, RAID 51, or RAID 61.
[0065] When a server writes to a mirrored volume, the system writes the data to both copies. When a server reads a mirrored volume, the system chooses one of the copies to read from. If one of the mirrored volume copies is temporarily unavailable; for example, if the storage system providing the pool is unavailable, the volume remains accessible to the server. The system remembers which areas of the volume have been written to and resynchronizes those areas when both copies become available.
[0066] When a volume is created, compression can be used to conserve the capacity of this volume. With a compressed volume, data is compressed when written to disk, saving more space. When data is read by the host 605, the data is uncompressed.
[0067] To illustrate an embodiment of the present invention, one embodiment comprises 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.
[0068] FIG. 2 shows a high-level exemplary schematic diagram 200 illustrating a storage drive.
[0069] For illustrative purposes only, these figures show storage blocks being written sequentially onto the drive starting from the bottom of the drive. Those skilled in the art will appreciate that different write patterns may be used and that storage blocks may actually be removed.
[0070] Figure 2 illustrates mirroring data written to two drives, DISK_1 225 and DISK_2 275. As used herein, the term "storage block" refers to a block of data written to or read from a disk. The size of the storage block is set by the host 205, but common sizes are 4kB, 8kB, 16kB, 32kB, 64kB, 128kB, and 256kB. Sizes from 32kB to 256kB are typical.
[0071] Three storage blocks, VOL_1, VOL_2, and VOL_3, are rewritten to mirrored disks, DISK_1 225 and DISK_2 275. Storage blocks are written to DISK_1 225 with compression ratio C1, and storage blocks are written to DISK_2 275 with compression ratio C2. This results in DISK_1 225 containing compressed volumes, VOL_1_C1 210, VOL_2_C1 215, and VOL_3_C1 220. DISK_2 275 contains compressed volumes, VOL_1_C2 260, VOL_2_C1 265, and VOL_3_C1 270. The highly compressed storage blocks on DISK_2 275 consume less space. If all writes were directed to a disk with this pattern, eventually one disk would fill up (the low compression disk) while the other still had space available (the high compression disk).
[0072] FIG. 3, which should be read in conjunction with FIGS. 4 through 7, depicts a high level exemplary schematic flow diagram 300 illustrating steps in an operational method for writing storage blocks to a storage array, in accordance with a preferred embodiment of the present invention.
[0073] FIG. 4 depicts a high-level exemplary schematic diagram 400 illustrating a storage disk according to a preferred embodiment of the present invention.
[0074] FIG. 5 depicts a high-level exemplary schematic diagram 500 illustrating a storage controller in accordance with a preferred embodiment of the present invention.
[0075] FIG. 6 shows a high-level, exemplary schematic diagram 600 of a computer system in accordance with a preferred embodiment of the present invention. It illustrates 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 stack of components, such as a copy service component 608 and a cache component 610. The RAID array 620 includes two storage disks 425, 475. SCSI commands are used to pass commands between the host 605, the storage controller 501, and the disk enclosure 615. If the cache 610 is available, data is written to the cache 610 and destaged to disk according to a caching algorithm. For reads, data is first read from the cache 610; only if it is not present (known as a cache miss) is the data read from disk. Data is read and written via the interfaces shown.
[0076] In a method embodiment, the analysis component 525 analyzes a set of compression rates C1, C2 used for a set of storage blocks VOL_1, VOL_2, VOL_3 (not shown) previously written to at least two storage devices 425, 475 to determine a pattern of writing. In response to this pattern, the determination component 530 determines a compression rate for writing a subsequent volume VOL_4 (not shown). Those skilled in the art will understand that the set of storage blocks can be an empty set.
[0077] In one embodiment, the method analyzes the set of compression ratios C1, C2 to be used for the set of previously written storage blocks VOL_1, VOL_2, VOL_3 by analyzing the spare capacity (also known as space) SPACE_1 430 of DISK_1 425 and the spare capacity SPACE_2 480 of DISK_2 475.
[0078] The method begins at step 301. In step 303, the method analyzes a set of compression ratios used 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, in step 305, the spatial component 502 determines the spare capacity SPACE_1 430 of DISK_1 425 and the spare capacity SPACE_2 480 of DISK_2 475. In step 310, the comparison component 504 compares SPACE_1 430 with SPACE_2 480. The comparison component 504 determines whether SPACE_1 430 is greater than SPACE_2 480 by a threshold THRES. This algorithm uses the threshold THRES to allow a tolerance to be set when determining whether to switch compression ratios. Alternatively, the comparison component 504 determines whether SPACE_1 430 is not greater than SPACE_2 480 by a threshold THRES. The algorithm allows a tolerance to be set when deciding whether to switch compression rates by using a threshold THRES, which can also be set to zero.
[0079] 4 also illustrates data mirroring written to two disks, DISK_1 425 and DISK_2 475. Three storage blocks, VOL_1, VOL_2, and VOL_3, are written to the mirrored disks, DISK_1 425 and DISK_2 475. The storage blocks, VOL_1 and VOL_3, were written to DISK_1 425 with a compression ratio of C1, and the storage block, VOL_2, was written to DISK_1 425 with a compression ratio of C2. The storage blocks, VOL_1 and VOL_3, were written to DISK_2 475 with a compression ratio of C2, and the storage block, VOL_2, was written to DISK_2 475 with a compression ratio of C1. This results in DISK_1 425 containing 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_C1 465, and VOL_3_C2 470. Figure 4 shows that SPACE_1 430 is smaller than SPACE_2 480. Less space is used (and therefore more space) on DISK_2 475 than on its partner disk DISK_1 425. Therefore, DISK_2 475 is a good candidate for the next low-compression write.
[0080] In step 315, if SPACE_1 430 is greater than SPACE_2 480 by the threshold THRES, the data read / write component 512 writes storage block VOL_4 to DISK_1 425 with compression ratio C2 and to DISK_2 475 with compression ratio C1.
[0081] In step 320, if SPACE_1 430 is not greater than SPACE_2 480 by the threshold THRES, the data read / write component 512 writes storage block VOL_4 to DISK_1 425 with compression ratio C1 and to DISK_2 475 with compression ratio C2.
[0082] At step 325, it is determined whether there are more storage blocks to write. If there are more storage blocks to write, the method returns to step 305. If there are no more storage blocks to write, the method ends at step 330.
[0083] Advantageously, by measuring the space capacity, an appropriate compression ratio for subsequent writes can be determined, taking into account the actual compression ratio achieved for storage blocks already written to disk.
[0084] FIG. 7 depicts a high-level exemplary diagram 700 illustrating a table used to determine compression ratio patterns, according to a preferred embodiment of the present invention.
[0085] In an alternative embodiment, in step 303, the method analyzes the set of compression rates C1, C2 used 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_1 425 and the VOL_N written on DISK_2 475. A pattern is stored in a compression table named Table 1 702 for DISK_1 425. This pattern is denoted as {C1,...C2,C1,C2,C1}. The most recently used compression rate is for the write of VOL_N on DISK_1 425, with T as C1. NThe pattern is also stored in a compression table (not shown) for DISK_2 475. The compression rate most recently used for writing VOL_N to DISK_2 475 is determined to be C2. The method determines that for writing VOL_N+1 to DISK_1 425, the compression rate most recently used for writing VOL_N to DISK_2 475 in C2 will be used. The method also determines that for writing VOL_N+1 to DISK_2 475, the compression rate most recently used for writing VOL_N to DISK_1 425 in C1 will be used. The method rotates which disks are using which compression technique so that the total storage capacity used by the disks remains balanced. The method rotates after each write, resulting in VOL_N+1 (not shown) being written to DISK_1 425 with compression rate C2 and VOL_N+1 being written to DISK_2 475 with compression rate C1.
[0086] In an alternative embodiment, in step 303, the method rotates which disks are using which compression techniques so that the total storage capacity used by the disks remains balanced after a set number of writes Y=4 have been mirrored or copied to each disk. In step 303, the method analyzes the set of compression rates C1, C2 to be used for the set of previously written storage blocks VOL_X (X=1 to N) by analyzing the most recently written storage blocks VOL_N through VOL_1 on DISK_1 425 and VOL_N through VOL_1 written on DISK_2 475. A pattern is stored in a compression table, Table 2 712, for DISK_1 425. This pattern is shown as {C1,...C2,C2,C2,C2}. A count of the number of times the compression rates are used sequentially is also stored in column C 720. A table called Table 2 712 would show that the most recent volumes, VOL_N through VOL_N-3, used a compression rate of C2 for writes to DISK_1 425, and that this compression rate is used four times in one row. A corresponding table (not shown) for DISK_2 475 would show that the most recent volumes, VOL_N through VOL_N-3, used a compression rate of C1 for writes to DISK_2 475. In this embodiment, Y is set to 4 if VOL_N+1 is mirrored written to DISK_1 425 and DISK_2 475, so a compression rate of C1 is used for DISK_1 425 and a compression rate of C2 is used for DISK_2 475.
[0087] Those skilled in the art will appreciate that Y can be any integer, and that in fact other patterns may be established as triggers for changing the compression ratio for the next write. Such patterns may depend on the relative sizes of the compression ratios C1 and C2. Those skilled in the art will also appreciate that multiple compression ratios C1 through C N may be used in embodiments of the present invention.
[0088] By using this algorithm, the space-saving benefits of high compression can be obtained and the impact of the performance degradation can be hidden: writes can complete when the faster, less compressed writes complete, and reads will not be affected by having to perform the slower decompression because they can always be directed to a mirrored, less compressed version of the data.
[0089] In an alternative embodiment, the RAID array is configured for RAID 51, which represents a logical RAID 1-equivalent stack of RAIDs on top of a RAID 5 array. The present invention still applies, with two disks, DISK_1 425 and DISK_2 475, replaced by two logical disks, LDISK_1 and LDISK_2 (not shown). Each of these two disks is configured with two RAID 5 arrays. To analyze spare space, the spare space on the disks that make up the RAID 5 arrays must be taken into account, as well as the compression ratio used on these disks.
[0090] Embodiments of the present invention also apply to other copy function technologies, such as point-in-time copy functions for creating snapshot and clone copies, asynchronous remote copies, and synchronous remote copies. An example of a point-in-time offering is IBM Flashcopy®.
[0091] IBM Remote mirror and copy is a storage function that constantly updates a 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 point in time; rather, it reflects all changes made to the source volume to the target volume.
[0092] IBM Global Copy provides an asynchronous long-distance copy option in which write operations to an on-site storage unit are considered complete before they are transmitted to a storage unit at the recovery site. IBM Metro Mirror provides a synchronous long-distance copy option in which a secondary copy of a volume is constantly updated to match changes made to the source volume. On-site writes are considered complete only when they are transmitted to a storage unit at the recovery site.
[0093] Point-in-time copy is a feature supported in various storage devices that allows a near-instantaneous point-in-time copy of an entire logical volume or data set to be made. The point-in-time feature allows a full-volume copy of data to be made, and this copy is immediately available for read or write access. This copy can be used with standard backup tools available in the computing environment to generate backup copies to tape.
[0094] A "snapshot" provides the ability to record the state of a storage device at any given moment and retain the snapshot as a guide for restoring the storage device in the event of a failure. A snapshot primarily creates a point-in-time copy of data. Typically, the snapshot copy function occurs instantaneously and is made available for use by other applications, such as data protection, data analysis and reporting, and data replication applications. The original copy of the data remains uninterruptedly available to these applications while the snapshot copy is used to perform other functions on the data. A snapshot is a point-in-time copy that is dependent on the primary disk. For example, a snapshot can be implemented using a copy-on-write procedure in which existing data in a region on the primary disk is written to a backup disk as that region on the primary disk is being written to. Thus, the backup disk will contain data that was overwritten on the primary disk, as opposed to a complete copy of the primary disk. This type of backup copy typically results in a more finely provisioned volume, which reduces storage capacity. A series of snapshot copies can be cascaded together to represent the primary disk at various times. However, snapshot copies typically remain dependent on the primary disk to reassemble a complete copy of the primary disk. Thus, a snapshot is a point-in-time copy in which the target holds only the changed data necessary to represent a point-in-time copy of the source. Data is only copied to the target disk if it has changed at the source. The target disk generally always relies on some of the data on the source disk to represent the point-in-time copy.
[0095] In contrast, a "clone" is a point-in-time copy that is independent of the primary disk. A clone can be created, for example, by performing a background copy procedure in which regions of a disk are sequentially copied to a backup disk, and by performing a copy-on-write procedure to immediately copy any primary disk regions that are about to be overwritten due to a write and have not yet been processed by the background copy procedure. Clones are typically used when a copy is required and input / output (I / O) to the copy must never affect I / O to the primary volume. Clones can also be used when the copy is not affected by the availability of the source. Clones can also be used in cascades. Thus, a clone is a point-in-time copy in which the target disk maintains a complete copy of the data that was on the source disk when the point-in-time copy was initiated. Once the data copy from the source to the target is complete, the target disk is independent of the source.
[0096] Point-in-time copies are performed using a bitmap to track data grains being copied from the source disk to the target disk. When data is copied between the source and target, it is copied in chunks known as "grains." The grain size is determined at the time of mapping creation. Typical sizes are 256KB and 64KB. Data grains are copied using a background copy process. If a data grain is read to the target drive before it is copied through the target, the read is redirected to the source drive. If a data grain is read to the target drive after it is copied through the target, the read is directed to the target drive. If a data grain is written to the target drive before it is copied through the target, the corresponding entry in the bitmap is marked as completed. If a data grain is written to the target drive after it is copied through the target, the write is directed to the target drive. If data grains are written to the source drive before they are copied over to the target, the data grains are first copied to the target drive before the source disk data grains are overwritten with new data. In this way, the source and target drives are presented to the host as instantly available, even before all data has actually been copied over to the target drive.
[0097] In a RAID 1 write, a storage block is written to two disks simultaneously, in contrast to a remote copy where an existing storage block is copied from the source to the target, equivalent to performing a read from the source and a write to the target.
[0098] In an alternative embodiment of the invention, DISK_2 475 is a target volume for a copy operation from DISK_1 425. The method includes analyzing a set of compression ratios to be 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 on subsequent writes to the source disk and a second compression ratio to be used for subsequent writes to the target disk. When writing to the target as part of the copy process, the compression ratio of the source grain should also be taken into account to determine the compression ratio of the target write.
[0099] In another embodiment, the target is a point-in-time copy of the source. If a grain of the source is to be overwritten, a copy of the grain is first made to the target of the existing data on the source drive. By analyzing the compression ratio, the existing data may be written to the target disk using one compression ratio, and the new data may be written to the source using another different ratio.
[0100] The description of various embodiments of the present disclosure has been presented for illustrative purposes, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein has been selected to best explain the principles, practical applications, or technical improvements of the embodiments over technologies found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. It will be readily understood that the components of the present application, as generally described and illustrated herein, could be arranged and designed in a wide variety of different configurations, and thus, the detailed description of the embodiments is not intended to limit the scope of the present application, as claimed, but merely represents selected embodiments of the present application.
[0101] Those skilled in the art will readily appreciate that the above invention may be implemented in a different order of steps and / or with hardware elements in different configurations than those disclosed. Accordingly, while the present application has been described in terms of these preferred embodiments, it will be apparent to those skilled in the art that certain modifications, variations and alternative implementations will be apparent.
[0102] While preferred embodiments of the present application have been described, it should be understood that the described embodiments are by way of example only, and that the scope of the present application is defined solely by the appended claims when considered together with all equivalents and modifications thereof (e.g., protocols, hardware devices, software platforms, etc.).
[0103] Furthermore, the same or similar reference numbers are used throughout the drawings to indicate the same or similar features, elements, or structures, and therefore, detailed descriptions of the same or similar features, elements, or structures are not repeated for each drawing. The terms "about" or "substantially" used herein with respect to thickness, width, ratio, range, etc. are intended to indicate closeness or approximation rather than exactness. For example, the terms "about" or "substantially" used herein suggest the existence of a small margin of error. Furthermore, the terms "vertical" or "vertical direction" or "vertical height" used herein refer to the Z direction of the Cartesian coordinate system shown in the drawings, 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 drawings.
[0104] Additionally, the word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any embodiment or design described herein is intended as "exemplary" and should not necessarily be construed as preferred or advantageous over other embodiments or designs.
[0105] Although this disclosure includes detailed descriptions of cloud computing, it is understood that implementation of the teachings described herein is not limited to cloud computing environments. Rather, embodiments of the present invention can be implemented in conjunction with any other type of computing environment now known or later developed.
[0106] For the avoidance of doubt, the term "comprising" as used throughout this specification and claims should not be construed to mean "consisting only of".
Claims
1. 1. A computer-implemented method for managing a storage system including a first storage device and a second storage device, comprising: analyzing a set of compression ratios used for a set of storage blocks written to 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, wherein the first compression ratio is different from the second compression ratio; and writing storage blocks to the first storage device at the first compression rate and writing storage blocks to the second storage device at the second compression rate; A method comprising:
2. analyzing the set of compression ratios includes determining a first spare capacity of the first storage device and a second spare capacity of the second storage device; The step of determining the first compression ratio and the second compression ratio comprises: determining the first compression ratio and the second compression ratio in response to determining that the first spare capacity is greater than the second spare capacity by a threshold value, wherein the first compression ratio is less than the second compression ratio; determining the first compression ratio and the second compression ratio in response to determining that the first spare capacity is smaller than the second spare capacity by the threshold value, wherein the first compression ratio is greater than the second compression ratio. Including, The method of claim 1.
3. Analyzing the set of compression ratios includes determining that a third compression ratio has been used for the last Y writes to the first storage device and that a fourth compression ratio has been used for the last Y writes to the 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. The method of claim 1.
4. 10. The method of any preceding claim, wherein the first storage device and the second storage device are members of a RAID array.
5. 5. The method of claim 4, wherein the RAID array is a member of a list, the list including RAID 1, RAID 10, RAID 51, and RAID 61.
6. 10. The method of any of the preceding claims, wherein the second storage device is a copy of the first storage device.
7. The method of claim 6 , wherein the second storage device is a point-in-time copy of the first storage device.
8. 1. 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 comprising: an analysis component for analyzing a set of compression ratios used for a set of storage blocks written to the first storage device and the second storage device to determine a pattern; a determination component for determining a first compression rate and a second compression rate in response to the pattern, wherein the first compression rate is different from the second compression rate; and a data read / write component for writing storage blocks to the first storage device at the first compression rate and for writing the storage blocks to the second storage device at the second compression rate; Including, the system.
9. The analysis component further includes a spatial component for determining a first spare capacity of the first storage device and a second spare capacity of the second storage device; and In response to determining that the first spare capacity is greater than the second spare capacity by a threshold value, the determination component is further operable to determine the first compression ratio and the second compression ratio, where the first compression ratio is less than the second compression ratio; and In response to determining that the first spare capacity is less than the second spare capacity by the threshold value, the determination component is further operable to determine the first compression ratio and the second compression ratio, where the first compression ratio is greater than the second compression ratio. The system of claim 8.
10. The analysis component is further operable to determine that a third compression rate has been used for the last y writes to the first storage device and that a fourth compression rate has been used for the last y writes to the second storage device; and The determination component is further operable to determine 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 comprises the third compression ratio. The system of claim 8.
11. 9. The system of claim 8, wherein the first storage device and the second storage device are members of a RAID array.
12. 12. The system of claim 11, wherein the RAID array is a member of a list, the list including RAID 1, RAID 10, RAID 51, and RAID 61.
13. The system of claim 8 , wherein the second storage device is a copy of the first storage device.
14. 14. The system of claim 13, wherein the second storage device is a point-in-time copy of the first storage device.
15. 8. 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 and storing instructions for execution by the processing circuit to perform the method of any 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, the computer program comprising software code portions for performing the method according to any one of claims 1 to 7 when said program is run on a computer.