Method and device for reading RAID1 (Redundant Array of Inexpensive Disk 1) equipment

A technology for reading devices and equipment, which is used in instruments, electrical digital data processing, input/output to record carriers, etc., to achieve the effect of shortening response time and improving reading performance

Inactive Publication Date: 2011-06-01
INVENTEC CORP
4 Cites 5 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0004] In the existing RAID1 technology, some methods are fixed to read a disk, and some methods mainly consider the current I/O pos...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Method used

[0030] The read request processing module 28 comprehensively considers the above statistical information, distributes read requests to multiple member disks, and dynamically balances the load among member disks, so as to achieve the purpose of optimizing RAID1 read performance.
[0041] By comprehensivel...
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Abstract

The invention discloses a method and device for reading RAID1 (Redundant Array of Inexpensive Disk 1) equipment. The device comprises an information counting module, a reading block dividing module and a reading request processing module, wherein the information counting module is used for counting current state information of various member disks contained in the RAID1 equipment when a reading request of data of the RAID1 equipment is received; the reading block dividing module is used for dividing the size of reading blocks of the member disks according to the size of the data required to be read; and the reading request processing module is used for distributing the reading request onto the member disks to execute parallel data reading according to the current state information of all the member disks and the size of the reading blocks and informing idle member disks to read data of a next block into a cache in advance. The invention improves the reading efficiency of the RAID1 equipment.

Application Domain

Technology Topic

Image

  • Method and device for reading RAID1 (Redundant Array of Inexpensive Disk 1) equipment
  • Method and device for reading RAID1 (Redundant Array of Inexpensive Disk 1) equipment
  • Method and device for reading RAID1 (Redundant Array of Inexpensive Disk 1) equipment

Examples

  • Experimental program(1)

Example Embodiment

[0022] The following describes in detail the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar components or components having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but not to be construed as a limitation of the present invention.
[0023] First refer to figure 2 , which shows a schematic structural diagram of a reading device of a RAID1 device according to an embodiment of the present invention. like figure 2 As shown, for a RAID1 device 10 composed of a plurality of member disks, member disk 1, member disk 2, . . . Block dividing module 26 and read request processing module 28 . The information statistics module 22 collects statistics on the current status information of each member disk 1-n included in the RAID1 device when receiving the request for reading the data of the RAID1 device. The read block division module 26 divides the read block interval size of the member disk according to the size of the data read corresponding to the request, and the read request processing module 28 divides the read block interval according to the current state information of each member disk and the read block interval size. Fetch requests are distributed to member disks to perform parallel data reads. In the read request processing module 28, while processing the current read request, if it is found that there is an idle disk in the controller, the next interval data will be read in advance from the idle disk into the cache. In this way, there will be higher performance in the case of sequential reading.
[0024] In one embodiment, the current state information of each member disk collected by the information statistics module 22 includes: the busyness and/or the current I/O position of the member disk. Among them, for the statistics of the busyness of the disk, the changes of the read and write requests of the disk can be counted according to the total number of read and write requests recorded by the operating system since the disk is powered on, and the data can be dynamically updated. According to the information provided by the operating system, you can count the busyness of the disk for a period of time to the present. If this time is relatively short, such as the first 10 seconds, 30 seconds of historical data statistics, etc., this busyness can reflect the current state of the disk.
[0025] In addition, for the current I/O position statistics of member disks, in the RAID1 controller, member disks include two types of read and write requests: requests issued by users and requests from the controller itself to update metadata. Generally, the I/O position of the current disk is saved by recording the position of the last user's read and write request. This method is only suitable for tracking the request issued by the user. In addition to read and write requests issued by users, there are also metadata update requests on member disks. When processing these requests, the current I/O position must also be recorded. In an embodiment of the present invention, all I/O requests on the member disks can be taken into account, and the current I/O position can be accurately marked.
[0026] The read block division module 28 divides the read block interval size of the member disks to realize concurrent reading of multiple member disks, and is automatically set by the read block division module 28 . During automatic setting, the read block division module 28 lists some interval values, tests these interval values ​​respectively, and selects the best concurrency performance (eg, 64k, 32k). When testing the interval value, read the member disks sequentially, read data of a certain interval size from one member disk, and read the data of the next interval size from another member disk. If the interval size is used, the other member disk reads The data of the next interval fetched is mostly hit in the cache, and the read performance of the two disks is close, indicating that the interval size is appropriate. Therefore, the read block interval setting size of the member disk can be set to this fixed value accordingly.
[0027] In addition, when dividing the read block interval size of the member disk, the read block dividing module 28 may also consider the disk device type, and different types have different read and write performances. In RAID1, data will be written to each disk in parallel when processing write requests, so the size of the data block (CHUNK) has no effect on write performance; when processing read requests, CHUNK is the smallest unit read from the disk, and the size of CHUNK affects device performance. Very obvious, so you need to set a suitable CHUNK size. Generally speaking, when a large file is read and written, the read block dividing module 28 uses a larger CHUNK size, which will reduce the system consumption, and when a small file is read and written, it is more suitable for the read block dividing module 28 to use a smaller CHUNK.
[0028] Secondly, the read-ahead setting of the disk device can also be considered. In order to improve the hit rate in the cache during reading, the general system will read a certain interval of data into the cache in advance. Therefore, calculate the appropriate read interval size of the member disk. In this way, when a member disk is read at the same time, other member disks can accurately locate and read other ranges.
[0029]Furthermore, to set the appropriate CHUNK size, it is necessary to comprehensively consider multiple factors such as file system, disk type, and system configuration. Therefore, the read block division module 28 can also leave an interface for the user to set the CHUNK size. That is, the size of the read block interval can also be set or specified by the user as a parameter for performance adjustment according to the access characteristics.
[0030] The read request processing module 28 comprehensively considers the above statistical information, distributes the read requests to multiple member disks, and dynamically balances the load among the member disks, so as to achieve the purpose of optimizing the read performance of RAID1.
[0031] Specifically, each time a read request comes, the read request processing module 28 first determines whether the current CHUNK where the request is located has been read in advance by a certain member disk, and if so, assigns the request to this member disk. If it is not read in advance, select the target disk according to the busyness of the member disk: if there is an idle member disk, select an idle member disk as the target disk according to the position of the read request to perform data reading of the size of the read interval Pick. While selecting the target disk for reading, the read request processing module 28 checks the busyness of other disks again. If there is a free disk, set this free disk as the new target disk and notify it to read the next CHUNK data.
[0032] In this way, there are actually two disks being read concurrently, and the read interval positions are consecutive. The data read by the new target disk will be put into the cache, and the order and read position of the new target disk in the array will be recorded. In this way, when a new read request arrives, the read request processing module 28 determines whether the new request is within the range of the range read from the new target disk. If located, send these requests to the new target disk, since the data has already been read into the cache, the read request will fetch the data from the cache and return soon. If the location of the new read request is not within the read range of the new target disk, continue to select an idle member disk as the target disk according to the busyness of the member disk to allocate the new read request. The read request processing module 28 will continue to read the current target disk while searching for a new target disk.
[0033] In one embodiment, the read request processing module 28 may further select the corresponding target disk in combination with the current I/O position in the idle member disk that is closest to the position of the read request. That is to say, if the I/O position is the closest and the disk is not busy, select the current disk as the target disk; if the I/O position is the closest but the disk is busy, select the current I/O position in other disks for comparison close as the target disk.
[0034] image 3 Provided the flow chart of the reading method of the RAID1 device of the present invention, as shown in the figure, including the following steps: when receiving the read request of the RAID1 device data, count the current status information of each member disk included in the RAID1 device (step 202); Then, according to the data size of the request to read, divide the read interval size of the member disk (step 204); Finally, according to the current state information of each member disk and the read interval size, the read request is allocated to the member disks Parallel data reads are performed on (step 208).
[0035] In one embodiment, the statistics on the current status information of each member disk include: the busyness and/or the current I/O position of the member disks. The busyness of the member disks can be based on the total number of read and write requests recorded by the operating system since the disk was powered on, and the changes in read and write requests of the disks can be counted, and the data can be dynamically updated. According to the information provided by the operating system, you can count the busyness of the disk for a period of time to the present.
[0036] In addition, for the current I/O position statistics of member disks, in a RAID1 controller, member disks may include two types of read and write requests: requests issued by users and requests from the controller itself to update metadata. Therefore, the current I/O position of the member disk can be determined from the position of the last read and write request. When there is a metadata update request, the current I/O position is determined according to the metadata update request.
[0037] The read block size of the member disks is divided to achieve concurrent reading of multiple member disks, which can be automatically set by the RAID1 controller. In the automatic setting, list some interval values, test these interval values ​​respectively, and select the best concurrency performance (such as 64k, 32k). When testing the interval value, read the member disks sequentially, read data of a certain interval size from one member disk, and read the data of the next interval size from another member disk. If the interval size is used, the other member disk reads The data of the next interval fetched is mostly hit in the cache, and the read performance of the two disks is close, indicating that the interval size is appropriate. Therefore, the read block interval setting size of each member disk can be set to this fixed value accordingly.
[0038] In addition, when dividing the read block interval size of each member disk, the disk device type can also be considered, and different types have different read and write performances. When processing a read request, CHUNK is the smallest unit read from the disk. The CHUNK size has a significant impact on device performance, so you need to set an appropriate CHUNK size. Generally speaking, using a larger CHUNK size when reading and writing large files will reduce the system consumption, while it is more appropriate to use a smaller CHUNK when reading and writing small files.
[0039] Secondly, the read-ahead setting of the disk device can also be considered. In order to improve the hit rate in the cache during reading, the general system will read a certain interval of data into the cache in advance. Therefore, calculate the appropriate read interval size of the member disk. In this way, when a member disk is read at the same time, other member disks can accurately locate and read other ranges.
[0040] Furthermore, to set the appropriate CHUNK size, it is necessary to comprehensively consider multiple factors such as file system, disk type, and system configuration. Therefore, the method may further include the step of leaving an interface for the user to set the CHUNK size. That is, the size of the read block interval can also be set or specified by the user as a parameter for performance adjustment according to the access characteristics.
[0041] By comprehensively considering the above statistical information and the read interval of member disks of suitable size, the read requests are distributed to multiple member disks, and the load among the member disks is dynamically balanced, so as to achieve the purpose of optimizing the read performance of RAID1.
[0042] Specifically, when each read request arrives, for the data that has not been read in advance, the target disk is selected according to the busyness of the member disk: if there is an idle member disk, an idle one is selected according to the position of the read request. The member disk is used as the target disk to perform data reads of the size of the read interval. While selecting the target disk to read, check again how busy the other disks are. If there is a free disk, set this free disk as the new target disk and notify it to read the next CHUNK data.
[0043] In this way, the two disks are read concurrently, and the read interval positions are consecutive. The data read by the new target disk will be put into the cache, and the order and read position of the new target disk in the array will be recorded. In this way, when a new read request arrives, it is first determined whether the new request is within the range read from the new target disk. If located, send these requests to the new target disk, since the data has already been read into the cache, the read request will fetch the data from the cache and return soon. If the location of the new read request is not within the read range of the new target disk, continue to select an idle member disk as the target disk according to the busyness of the member disk to allocate the new read request. This reading of the current target disk while looking for a new target disk will continue.
[0044] The current I/O position relationship is used to select the target disk: if the I/O position is the closest and the disk is not busy, select the current disk as the target disk; if the I/O position is the closest, but the disk is busy, select other disks The current I/O position is relatively close to the target disk.
[0045] Figure 4 A flow chart of the read method of a RAID1 device according to an embodiment of the present invention is given. In this embodiment, the read method of the present invention also considers current status information such as the current I/O position and busyness of member disks.
[0046] Specifically, the RAID1 device first receives a new read request to read the data in it (step 302 ), and then judges whether the data in the read request is pre-read by a member disk (step 304 ). It is a data cache read operation for a previous read request. When the received read request is the first request, this step can be omitted.
[0047] If it is not read in advance, select the target disk to process the read request according to the position of the read request and the current I/O position of the member disk and the current busyness of the member disk (step 306): if the I/O position is the closest, and the disk If it is not in a busy state, select the current disk as the target disk; if the I/O position is the closest, but the disk is in a busy state, select the closest I/O position among other disks as the target disk.
[0048] Then, when the target disk is selected for reading in step 306, the busyness of other member disks is checked again. If there is a free disk, set the free disk as the new target disk, and read the next interval data adjacent to the request from the free member disk (step 308), and put the read data into the cache.
[0049] Finally, the direct read data or cached read data corresponding to the read request is returned (step 310). By repeating the above steps, each RAID1 data read request can be processed continuously.
[0050] Figure 5 An example of using the present invention to read data to a RAID1 composed of two member disks is given, wherein the member disks 30 and 40 store the same data A, B, C, and D respectively. Assuming that each data corresponds to a read interval, these four data are stored continuously. When the user needs to read data A, first select member disk 30 as the target disk to read data A, and check the status of member disk 40 at the same time.
[0051] If the device is in an idle state, select the member disk 40 as the new target disk and notify it to read data B, so when the user needs to read data B, the member disk 40 is used as the target disk, because the data has been read, you can directly back to the user. This action will continue until the corresponding read request is completed.
[0052] Since RAID1 adopts mirroring technology, the data stored on the member disks is consistent, so the present invention comprehensively considers various factors, such as the current I/O position of member disks, disk performance, disk busyness, user read request continuity, etc., so as to control multiple factors. Member disks work together efficiently and concurrently. In this way, there will be no idle disks when reading data, especially when reading large files sequentially. Thus, the read performance of the RAID1 device is improved, and the response time of the user's read request is shortened.
[0053] Of course, the present invention can also have other various embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention, but these corresponding Changes and deformations should belong to the protection scope of the appended claims of the present invention.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Similar technology patents

Non-contact infrared thermometer

ActiveCN104287697AShort response timeImprove measurement precision and accuracyDiagnostics using lightSensorsOlder peopleEngineering
Owner:广州市得仕医用科技有限公司

Classification and recommendation of technical efficacy words

Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products