The present invention generally relates to the field of storage devices and, more particularly, to a method and system for performing I/O operations on disk arrays.
The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
A redundant array of independent disks (RAID) combines a plurality of physical disks into an array. The array acts as a logical disk and stores data on different physical disks in blocks. When data is accessed, related physical disks in the array work in parallel, which significantly shortens the time to access data and improves space utilization. Although a RAID comprises a plurality of physical disks, it appears as an independent, monolithic large storage device to an operating system. Relative to a single storage device of the same capacity, the RAID can offer excellent fault tolerant capability in addition to improved performance. When any of the physical disks fails, the RAID can continue to function without being affected by the failed physical disk. RAID has several different levels (e.g. RAID0, RAID1, RAID0+1, RAID3, RAID5, etc.), which have different speeds, security performance and performance price ratios. A proper RAID level can be selected according to actual applications to satisfy a user's demand for memory availability, performance and capacity.
RAID0 represents the highest storage performance among all RAID levels. RAID0 improves storage performance as follows (as shown in
RAID5 is a RAID with fault tolerant capability. Its fault tolerance is not achieved by employing a dedicated parity physical disk but through evenly distributing parity information across all physical disks thereof. When one physical disk fails in a RAID5 disk array, the disk array can compute the lost data based on corresponding data on several other physical disks. Since lost information must be computed from data on other disks, an additional physical disk with a certain capacity is needed to ensure that other member disks can correctly reconstruct the lost data. The total capacity of a RAID5 disk array equals the product of the number of physical disks thereof (assumed to be N) minus 1 (N−1) and the capacity of the physical disk with the smallest capacity. When one physical disk in a RAID5 disk array fails, the data on the failed physical disk can be reconstructed based on the parity information on other physical disks. But if two physical disks fail at the same time, all data will be lost.
For ease of illustration herein, the RAID5 disk array with one failed physical disk is referred to as a degraded RAID5 disk array.
As previously mentioned, the read and write performance of a degraded RAID5 disk array is greatly weakened relative to that of a non-degraded RAID5 disk array. At the same time, a degraded RAID5 disk array has zero data redundancy and has the same protection against data loss as that of a RAID0 disk array, but the performance is much poorer than that of a RAID0 disk array.
In light of the above problems, the present disclosure provides a method and system for performing improved I/O operations on disk arrays.
The method for performing I/O operations on disk arrays according to embodiments of the present disclosure comprises: determining whether the data layout of a row of storage units in a disk array related to an I/O operation request is a first layout or a second layout; if it is a first layout, the I/O operation corresponding to the first layout is performed on the row of storage units; otherwise, the data layout of the row of storage units is converted from the second layout to the first layout, and the I/O operation corresponding to the first layout is performed on the row of storage units.
The system for performing I/O operations on disk arrays according to embodiments of the present disclosure comprises: a layout determination unit configured to determine whether the data layout of a row of storage units in a disk array related to an I/O operation request is a first layout or a second layout; and an execution unit configured to perform I/O operations corresponding to the first layout on the row of storage units when the data layout of the row of storage units is the first layout, or convert the data layout of the row of storage units from the second layout to the first layout when the data layout of the row of storage units is the second layout, and perform I/O operations corresponding to the first layout on the row of storage units.
The present disclosure can significantly improve I/O operation performance of disk arrays.
The present invention can be better understood by way of the description of embodiments of the present invention below with reference to the accompanying drawings, wherein:
Features in all aspects of the present disclosure and exemplary embodiments thereof will now be described in detail. The description below covers a lot of specific details to offer a full understanding of the present disclosure. However, it is obvious to those skilled in the art that the present disclosure can be embodied without some of these specific details. The description of embodiments below is intended to provide a clearer understanding of the present disclosure through various examples. The present disclosure is by no means limited to any specific configuration or algorithm described below. Various modifications, changes, replacements and/or improvements can be made to relevant elements, components and algorithms thereof without departing from the spirit of the present disclosure.
The method and system according to embodiments of the present disclosure are described below through an example of performing I/O operations on a degraded RAID5 disk array (e.g. as shown in
If the bit is not 0 as determined at S708, the process goes directly to S712. At S712, data is read from the stripe, and the process then goes to S714. At S714, the read data is stored.
If the bit is not 0 as determined at S808, the process goes directly to S812. At S812, data is written into the stripe.
For the degraded RAID5 disk array, the present disclosure changes one or more stripes thereof on which I/O operations are to be performed from RAID5 data layout to RAID0 data layout, such that the one or more stripes can achieve the processing performance equal to that of RAID0 in subsequent I/O operations. As a result, the overall I/O performance of the degraded RAID5 disk array is improved. In other words, the present disclosure improves the write and read performance of a degraded RAID5 disk array to that of a RAID0 disk array without compromising the data security.
Moreover, the present disclosure is not limited to applications in the above embodiments. When two disk arrays or disks have the same protection level (i.e. redundancy) and space utilization (i.e. capacity), but their performances are different due to different data layouts, the method and system according to the present disclosure can be employed to adjust the data layout of the disk array or disk that has the relatively poorer performance so as to improve performance of I/O operations on such disk array or disk. It should be noted that the adjustment of the data layout of the disk array or disk with the relatively poorer performance is a gradual process. Adjustment is only made on data layouts of accessed (i.e. being read or being written) stripes on an one-by-one basis.
The present disclosure is described above with reference to certain embodiments. However, it is obvious to those skilled in the art that various modifications, combinations and variations may be made to these embodiments without departing from the spirit and scope of the present disclosure as indicated by the appended claims or any equivalents thereof.
Hardware or software may be used to execute the steps if necessary. It should be noted that steps may be added into or eliminated from the flow charts herein or steps therein may be modified as long as they do not depart from the scope of the present disclosure. Generally speaking, flow charts are only used to indicate possible sequences to realize basic operations of a function.
Embodiments of the present disclosure can be realized by way of common digital computers for programming, special integrated circuits, programmable logic devices, field programmable gate arrays, and optical and nano engineering systems, components and mechanisms. Generally speaking, based on the disclosure and teachings provided herein, the functions according to the present disclosure can be realized via any known means in the field, such as distributed or connected systems, components and circuits. Data communication or transmission can be realized via wired, wireless or any other means.
It should also be noted that one or more elements indicated in the drawings may be realized in a further separated or further integrated manner, or even be removed or not implemented under certain circumstances as required by specific applications. It is also within the spirit and scope of the present disclosure to realize programs or codes stored in machine-readable media so as to allow computers to execute any of the above methods.
Furthermore, any signal, arrow in the drawings shall be deemed as illustrative only instead of restrictive, unless otherwise instructed. When the terms are not clear on separation or combination, the combination of components or steps shall be deemed having been recorded.
This application claims the benefit of U.S. Provisional Application No. 61/153,477, entitled “Method to Improve The Degrade RAID5 I/O Performance”, filed on Feb. 18, 2009, the disclosure of which is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
61153477 | Feb 2009 | US |