RAID10 self-adaptive read equalization method and device
The hardware driver module automatically allocates RAID10 read requests, and determines the target disk based on the command execution status difference and threshold of the physical disk, which solves the problem of unbalanced read I/O in the RAID10 system and improves system performance and stability.
Patent Information
- Application Number
- CN202411197080.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-27
AI Technical Summary
In actual applications, the RAID10 system has unbalanced read I/O operation problems, resulting in mismatch between the main disk and the backup disk, affecting the overall operating efficiency of the system and the stability of data storage.
The hardware driver module is used to automatically allocate RAID10 read requests to the physical disk. By obtaining the command execution status of each physical disk, calculating the status difference and determining the target physical disk based on the predefined threshold, thereby realizing adaptive reading between the master disk and the backup disk. balanced.
It realizes the balanced issuance of read I/O in the RAID10 system, reduces the overhead of the host software, fully utilizes the performance of each disk, and improves the robustness and read performance stability of the system.
Smart Images

Figure CN119200967A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of disk reading and writing, and in particular to a RAID10 adaptive read balancing method and device. Background Art
[0002] RAID technology uses multiple physical disks (PD) to form a virtual disk (VD), converting access to PD into access to VD. VD is a virtual disk obtained by dividing PD into stripes, and VD has space on each PD. The command of a VD will become the command of multiple PDs, thereby improving the concurrency of PD and the performance of VD. Redundant protection disks can further improve the security of VD data.
[0003] RAID10 achieves data redundancy protection through hard disk data mirroring, generating data for mutual backup on two disks. RAID10 technology combines the data mirroring backup of RAID1 / 1E and the data striping storage of RAID0, and has the fault tolerance capability of RAID1 / 1E and the multi-PD concurrency performance of RAID0. Figure 1 The following figure shows a RAID10 disk group DG (diskgroup), which contains a virtual disk VD disk group. The VD disk group includes two subgroups (SPANs), and each SPAN has four PDs. Each SPAN is a RAID1E disk group, and the four PDs are mirrored for backup every two. Figure 1 If you want to write a stripe in the VD of the master disk, you need to write to the same stripe position in both the master disk and the backup disk. If you want to read a piece of data from the VD, you can read it from the master disk or the mirror disk. How to assign the read I / O command to which PD is determined by the user or the driver software. Different read strategies will affect the final execution speed of the read I / O. Summary of the invention
[0004] The purpose of the present application is to provide a RAID10 adaptive read balancing method and device, aiming to solve the imbalance problem in the practical application of the RAID10 system.
[0005] According to a first aspect of the present application, a RAID 10 adaptive read balancing method is provided, comprising:
[0006] After the RAID card chip receives the RAID10 read request, the command execution status of each physical disk in the multiple physical disks associated with the virtual disk is obtained;
[0007] Determining a difference in command execution states of the various physical disks according to the command execution states, and determining a target physical disk from the various physical disks according to a relationship between the difference and a predefined comparison threshold;
[0008] The RAID10 read request is sent to the target physical disk, and the command execution status of each physical disk is updated.
[0009] In an optional implementation manner, obtaining the command execution status of each physical disk among the multiple physical disks associated with the virtual disk further includes:
[0010] When the command execution status of the physical disk is being updated, wait for the update to be completed, and then obtain the command execution status of each physical disk.
[0011] In an optional implementation manner, determining the target physical disk from each physical disk according to the relationship between the difference and a predefined comparison threshold further includes:
[0012] When the command execution status value of the first physical disk is greater than the command execution status value of the second physical disk, determine whether the difference between the command execution status value of the first physical disk and the command execution status value of the second physical disk is greater than the predefined comparison threshold; when the difference is greater than the predefined comparison threshold, determine the second physical disk as the target physical disk.
[0013] In an optional implementation, when the difference is not greater than the predefined comparison threshold, the physical disk with the smaller command execution status value between the first physical disk and the second physical disk is determined as the target physical disk.
[0014] In an optional implementation, the method is executed by a hardware driver module in RAID10.
[0015] According to a second aspect of the present application, a RAID10 adaptive read balancing device is provided, comprising:
[0016] An acquisition unit, configured to acquire a command execution status of each physical disk in a plurality of physical disks associated with a virtual disk after the RAID card chip receives a RAID10 read request;
[0017] a determination unit, configured to determine a difference in command execution states of the various physical disks according to the command execution states, and determine a target physical disk from the various physical disks according to a relationship between the difference and a predefined comparison threshold;
[0018] The sending unit is used to send the RAID10 read request to the target physical disk and update the command execution status of each physical disk.
[0019] Compared with the related art, the technical solution of the present application has at least the following advantages:
[0020] Automatic hardware adjustment is used to achieve balanced distribution of RAID10 read I / O between the primary disk and the spare disk. Comparison thresholds are set according to the performance of the primary disk and the spare disk to ensure balanced operation of the primary disk and the spare disk. Based on the command of the execution status of the physical disk being read, balanced reading of read I / O with any data length is supported. Read I / O no longer specifies reading the primary disk or the spare disk. The host only needs to issue the corresponding VD command, and the work of allocating and issuing I / O is automatically handled by the hardware, which reduces the overhead of the host software, gives full play to the performance of each disk, and improves the robustness of the RAID10 system.
[0021] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures and processes indicated in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 It is a schematic diagram of a virtual disk group of RAID10 according to the related art.
[0024] Figure 2 It is a schematic diagram of a RAID10 read access processing architecture according to related technology.
[0025] Figure 3 It is a schematic diagram of a RAID10 adaptive read balancing architecture according to an exemplary embodiment of the present application.
[0026] Figure 4 is a flow chart of a RAID 10 adaptive read balancing method according to an exemplary embodiment of the present application.
[0027] Figure 5 is a flowchart of RAID10 adaptive read balancing according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] like Figure 2 As shown in the figure, the host software initiates the read I / O of the RAID10 disk group to the RAID card chip. After receiving the read I / O from the host, the RAID chip will convert the host VD read I / O into the PD read I / O according to the disk group information, and finally choose to send it to the corresponding PD. In the traditional processing method, the driver software in the RAID card chip will convert the host's read I / O command to the corresponding PD. The driver software assigns commands in a relatively simple way, and the read I / O is cyclically assigned to the primary disk and the spare disk. However, in actual applications, this method will show uneven performance between the PDs in the disk group, and different PDs have different response speeds, which affects the overall efficiency of the system.
[0030] If the software driver wants to overcome the imbalance problem of the RAID10 system, it needs to issue different I / O commands to the corresponding PD according to the execution status of the disk. Therefore, the software driver will take time to read the execution status of the PD, and the judgment process will also take time. Reading and judgment processing will affect the speed of issuing I / O commands. At the same time, if the disk execution speed is fast, there will be a mismatch between the judgment result and the actual execution situation. As a result, one of the primary and backup disks is idle, and the other disk has too many commands and cannot be processed in time. This imbalance causes the performance of the PD group to not be fully utilized, which further leads to unstable read performance of the system. In the long-term use of the disk group, it will also cause different access frequencies to different disks, and disks with too high access frequencies will be damaged prematurely.
[0031] Based on the above analysis, in order to solve the problem of unbalanced PD reading in RAID10 disk group, this application proposes a RAID10 adaptive read balancing method and device, which uses a hardware driver module to automatically allocate read I / O to PD, so as to improve the read I / O performance in the RAID10 / 1E RAID card system. After the host sends the RAID1 0 read I / O to the hardware driver module, the hardware driver module compares the current execution status of each PD to determine the target PD for the I / O to be sent. Figure 3As shown, illustratively, the hardware driver module maintains the PD execution status table of the RAID10 disk group, which stores the status information of the commands being executed by each PD. When each PD completes executing a command, the response word triggers the hardware to automatically update the table. When a new read I / O is sent from the host, the hardware automatically compares the execution status information of the primary disk and the spare disk, and implements adaptive read balancing based on the status information.
[0032] See also Figure 4 , illustratively, the RAID10 adaptive read balancing method provided by the present application includes:
[0033] Step 401: After the RAID card chip receives the RAID10 read request, the command execution status of each physical disk in the multiple physical disks associated with the virtual disk is obtained.
[0034] Exemplarily, the processing flow chart of the hardware driver module is as follows: Figure 5 As shown in the figure, when the hardware driver module receives the read I / O command, it enters the arbitration module to determine whether there is a PD command to complete the update status request, which has a higher priority than the allocation of read I / O requests. When a PD command is completed and the execution status is being updated, the PD execution status is updated first, and I / O is allocated after the update is completed.
[0035] Then, the PD to be accessed by the read I / O command is parsed, the execution status information of the relevant master disk and spare disk is read, and the read status value is sent to the next level status value comparison judgment logic for judgment processing. The status value is a comprehensive value determined according to the number of commands and the amount of data accessed by the commands. For example, the more commands to be processed and the more data the commands access, the greater the status value. In a further preferred embodiment, the status value can be the product of the number of commands and the amount of data accessed by the commands.
[0036] Step 402: Determine the difference in command execution status of each physical disk according to the command execution status, and determine a target physical disk from each physical disk according to a relationship between the difference and a predefined comparison threshold.
[0037] According to a further embodiment, when the command execution status value of the first physical disk is greater than the command execution status value of the second physical disk, it is determined whether the difference between the command execution status value of the first physical disk and the command execution status value of the second physical disk is greater than the predefined comparison threshold; when the difference is greater than the predefined comparison threshold, the second physical disk is determined as the target physical disk.
[0038] The first physical disk may be a primary disk, and the second physical disk may be a spare disk.
[0039] Exemplarily, a comparison threshold is pre-set, and the status value comparison judgment logic queries the PD execution status table of the RAID10 disk group to determine the size of the execution status values of the primary disk and the spare disk. Preferably, the comparison threshold can be determined by the end user according to different server usage scenarios. For servers with large traffic, a larger threshold can be set.
[0040] Exemplarily, when the master disk status value is greater, the I / O command execution status value of the master disk is subtracted from the I / O command execution status value of the spare disk, and then compared with the comparison threshold. When it is greater than the comparison threshold, the spare disk is selected.
[0041] Exemplarily, when the spare disk status value is greater, the spare disk's I / O command execution status value is subtracted from the primary disk's I / O command execution status value and then compared with the comparison threshold. If it is greater than the preset comparison threshold, the primary disk is selected.
[0042] In an optional embodiment, if neither is greater than the comparison threshold, the PD disk with the smaller status value is selected for delivery. If the status values are completely equal, they are directly delivered to the master disk.
[0043] Step 403: Send the RAID10 read request to the target physical disk, and update the command execution status of each physical disk.
[0044] Exemplarily, after the master disk and the backup disk complete the read I / O, they respectively respond to the hardware driver module to update the PD execution status. For example, according to the command that has been executed, the status value is reduced accordingly, or according to the newly issued command, the status value is increased accordingly, and then the read data is forwarded to the host to ensure that the latest execution status is used to continue the judgment.
[0045] In the above-mentioned method in which the hardware automatically determines and allocates read I / O, the software is only responsible for sending it to the hardware for processing, eliminating the process of software reading information from the hardware and then processing it, shortening the time consumption to less than 1us, and being able to adapt well to the dynamic changes of PD load during the execution of a large number of commands, automatically balancing the performance between PDs, thereby improving the long-term performance of the entire system.
[0046] It can be seen that compared with the related art, the RAID10 adaptive read balancing method proposed in this application uses hardware automatic adjustment to achieve balanced issuance of RAID10 read I / O between the primary disk and the spare disk, sets a comparison threshold according to the performance of the primary disk and the spare disk, ensures the balanced operation of the primary disk and the spare disk, issues new commands according to the amount of data being read by the disk, and supports balanced reading of read I / O of any data length; read I / O no longer specifies reading the primary disk or spare disk, the host only needs to issue the corresponding VD command, and the work of allocating and issuing I / O is automatically handled by the hardware, which reduces the overhead of the host software, gives full play to the performance of each disk, and improves the robustness of the RAID10 system.
[0047] Accordingly, the present application exemplarily provides a RAID10 adaptive read balancing device in a second aspect, comprising:
[0048] An acquisition unit, configured to acquire a command execution status of each physical disk in a plurality of physical disks associated with a virtual disk after the RAID card chip receives a RAID10 read request;
[0049] a determination unit, configured to determine a difference in command execution states of the various physical disks according to the command execution states, and determine a target physical disk from the various physical disks according to a relationship between the difference and a predefined comparison threshold;
[0050] The sending unit is used to send the RAID10 read request to the target physical disk and update the command execution status of each physical disk.
[0051] The above-mentioned device can be implemented by the RAID10 adaptive read balancing method provided by the embodiment of the first aspect above. The specific implementation method can be found in the description of the embodiment of the first aspect, which will not be repeated here.
[0052] It is understood that the structures, names and parameters described in the above embodiments are only examples. Those skilled in the art can also easily think of combinations and adjustments to the structural features of the above embodiments according to the use requirements, and should not limit the concept of the present application to the specific details of the above examples.
[0053] Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that he or she may still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A RAID10 adaptive read balancing method, characterized in that: include: After the RAID card chip receives the RAID10 read request, the command execution status of each physical disk in the multiple physical disks associated with the virtual disk is obtained; Determining a difference in command execution states of the various physical disks according to the command execution states, and determining a target physical disk from the various physical disks according to a relationship between the difference and a predefined comparison threshold; The RAID10 read request is sent to the target physical disk, and the command execution status of each physical disk is updated.
2. The RAID 10 adaptive read balancing method according to claim 1, characterized in that: The obtaining of the command execution status of each physical disk among the plurality of physical disks associated with the virtual disk further comprises: When the command execution status of the physical disk is being updated, wait for the update to be completed, and then obtain the command execution status of each physical disk.
3. The RAID 10 adaptive read balancing method according to claim 1, characterized in that: The step of determining a target physical disk from each physical disk according to a relationship between the difference and a predefined comparison threshold value further comprises: When the command execution status value of the first physical disk is greater than the command execution status value of the second physical disk, determine whether the difference between the command execution status value of the first physical disk and the command execution status value of the second physical disk is greater than the predefined comparison threshold; when the difference is greater than the predefined comparison threshold, determine the second physical disk as the target physical disk.
4. The RAID10 adaptive read balancing method according to claim 3, characterized in that: When the difference is not greater than the predefined comparison threshold, the physical disk with a smaller command execution status value between the first physical disk and the second physical disk is determined as the target physical disk.
5. The RAID 10 adaptive read balancing method according to claim 1, characterized in that: The method is executed by a hardware driver module in RAID10.
6. A RAID10 adaptive read balancing device, characterized in that: include: An acquisition unit, configured to acquire a command execution status of each physical disk in a plurality of physical disks associated with a virtual disk after the RAID card chip receives a RAID10 read request; a determination unit, configured to determine a difference in command execution states of the various physical disks according to the command execution states, and determine a target physical disk from the various physical disks according to a relationship between the difference and a predefined comparison threshold; The sending unit is used to send the RAID10 read request to the target physical disk and update the command execution status of each physical disk.
7. The RAID10 adaptive read balancing device according to claim 6, characterized in that: The acquisition unit is further used for: When the command execution status of the physical disk is being updated, wait for the update to be completed, and then obtain the command execution status of each physical disk.
8. The RAID10 adaptive read balancing device according to claim 6, characterized in that: The determining unit is further configured to: When the command execution status value of the first physical disk is greater than the command execution status value of the second physical disk, determine whether the difference between the command execution status value of the first physical disk and the command execution status value of the second physical disk is greater than the predefined comparison threshold; when the difference is greater than the predefined comparison threshold, determine the second physical disk as the target physical disk.
9. The RAID10 adaptive read balancing device according to claim 8, characterized in that: When the difference is not greater than the predefined comparison threshold, the physical disk with a smaller command execution status value between the first physical disk and the second physical disk is determined as the target physical disk.
10. The RAID 10 adaptive read balancing device according to claim 6, characterized in that: The device is a hardware driver module in RAID10.
Citation Information
Patent Citations
Method for achieving parallel reconstruction of data on RAID
CN101923496A
Multi-backup nearby storage and reading method and system of cloud host mirror image file
CN103455577A
Method for building array by adding mirror image structure to check-based RAID and read-write system
CN104714758A
Load balancing method and apparatus
CN105117173A
File sharing system with data mirroring by storage system
JP2003157151A
Cited By
Read-write request access method and electronic equipment
CN121050661A