WO2017114232A1 - 一种数据读取方法、raid控制器及存储设备 - Google Patents

一种数据读取方法、raid控制器及存储设备 Download PDF

Info

Publication number
WO2017114232A1
WO2017114232A1 PCT/CN2016/111082 CN2016111082W WO2017114232A1 WO 2017114232 A1 WO2017114232 A1 WO 2017114232A1 CN 2016111082 W CN2016111082 W CN 2016111082W WO 2017114232 A1 WO2017114232 A1 WO 2017114232A1
Authority
WO
WIPO (PCT)
Prior art keywords
delay
read
interval
threshold
request
Prior art date
Application number
PCT/CN2016/111082
Other languages
English (en)
French (fr)
Inventor
江维
吴黎明
徐超
王永良
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017114232A1 publication Critical patent/WO2017114232A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Definitions

  • the present invention relates to the field of storage, and in particular, to a data reading method, a RAID controller, and a storage device.
  • SSDs Solid State Drives
  • the application range is more and more extensive.
  • IO input and output
  • the other processing measures in the SSD can read the correct data.
  • the delay of reading IO will be much larger than that of the normal read IO.
  • the overall performance of the SSD will gradually deteriorate. Because of the high rate of 4KB random read of a single disk of SSD.
  • Redundant Arrays of Inexpensive Disks are composed of at least two disks combined into a large-capacity disk group.
  • the data read and write addition effect provided by multiple hard disks improves the performance of the entire hard disk system.
  • the disks in the array can be either mechanical hard disks or SSDs.
  • slow IO which is for read IO, that is, if a return delay threshold is set for the IO request, the delay threshold is exceeded.
  • the returned IO is regarded as slow IO.
  • the way to solve the slow IO is to use the normal read mode for the non-slow IO in the disk system, and the downgrade read for the slow IO.
  • the mode that is, if it is a disk array, in some disk array modes, the same data will be stored simultaneously on two disks in the disk array, and the degraded read is not required to read the slow IO in the disk indicated by the slow IO.
  • the existing delay value in the running process has remained unchanged, and will not consider other influencing factors, the change of the delay distribution of IO caused by the change of the ratio of read and write IO and the size distribution of IO. This change usually leads to a large change in the IO delay value. Therefore, whether it is a disk array composed of a mechanical hard disk or a disk array composed of an SSD, the fixed delay threshold does not limit the timeout IO well.
  • the delay value of the slow IO completion is It is not necessarily slower than the delay value of the slow IO degradation read completion, so the effect of reducing the average latency of the system by slowing down the read IO does not always exist; in addition, the SKB 4KB random read rate is high, and the IO request Generally, it is also of the KB level. Therefore, in a disk array composed of SSDs, the degraded reading of some IOs does not significantly affect the performance of other SSDs in the disk array. Therefore, the square of the fixed delay threshold is Not well applied in the SSD disk array thereof.
  • the embodiment of the present invention provides a data reading method, a RAID controller, and a storage device, which can effectively reduce the average system delay and improve the quality of service (QoS) of the RAID according to the embodiment of the present invention. Maximize the use of RAID performance to improve RAID IO performance
  • the first aspect of the embodiments of the present invention provides a data reading method, which may include:
  • the intervals constitute a set of intervals, and each of the intervals in the set corresponds to setting a target delay threshold;
  • the target delay threshold is not constant, but is every
  • the preset first period adjusts the target delay threshold corresponding to each interval according to the preset threshold adjustment policy; in a first period, the read IO request issued by the host in the period is in accordance with the read IO request.
  • Size determines its corresponding interval and monitors the delay value of all read IO requests when returning; when determining When the delay value of the read IO request exceeds the target delay threshold corresponding to the interval to which the read IO request belongs, the read IO request exceeding the target delay threshold is subjected to a degraded read operation.
  • the read IO request of the approximate size has an approximate delay value in the multiple read IO requests issued by the host at one time, by setting different intervals corresponding to different sizes of read IO requests, each interval The read target IO request can use the same target delay threshold as the criterion for deciding whether to use the degraded read operation.
  • the host issues the read IO request every time, for example, the read IO request sent twice in the next two times is even
  • the size is similar, and the delay value is not necessarily similar.
  • the target delay threshold used for the read IO request sent by the previous host is in the latter time and can not distinguish the read IO request that needs to be degraded.
  • the target delay value is adjusted according to a preset threshold adjustment policy every predetermined first period to meet the requirement of the target delay value in the next first period, thereby enabling the target to be made.
  • the latency threshold can be dynamically adjusted to match the read IO request, thereby achieving a more reasonable definition of the read IO request that needs to be degraded, ultimately improving the performance of the disk array.
  • the method for adjusting the target delay threshold is to first set at least two delay thresholds for each interval, and the target delay threshold for each first period is adjusted from at least two times by a preset threshold adjustment strategy. Select from the threshold.
  • the method for adjusting the target delay threshold is to first set only one delay threshold for each interval, and the target delay threshold for each first period is obtained by updating the delay threshold by using a threshold adjustment policy. During the entire operation, there is only one delay threshold for each interval.
  • the foregoing two methods can implement the adjustment of the target delay threshold, so that the target delay threshold of each first period is a target delay threshold suitable for the first period.
  • the specific threshold adjustment strategy may be: first, calculate a delay average of the delay values of the read IO requests sent by the host in the current first period.
  • the delay average value can reflect the partial condition of the read IO request in the first period, and the average value of the delay is obtained by calculating the average value of the read IO request of all the sections sent by the host in the current first period, and then, according to The average of the delays is that each interval of the interval set selects a target delay from its corresponding at least two delay thresholds. Threshold.
  • the specific threshold adjustment strategy is to determine a target delay threshold for the next first period according to a comparison result of the delay averages of two adjacent first periods; for example, at least two of each interval
  • the delay threshold is arranged from small to large.
  • the delay threshold T1 to the delay threshold Tm of a certain interval are arranged from small to large, and m is an integer greater than 1, that is, a total of m levels of 1 to m.
  • the remaining intervals in the interval set also include m levels of delay thresholds, and each time the target delay threshold is adjusted, it is a unified adjustment for all the intervals in the interval set; for example, for the corresponding delay threshold T1 to For the interval of the delay threshold Tm, the specific adjustment process is to first confirm the delay threshold Tx in at least two delay thresholds of the interval in the interval set as the target in the first first cycle in the second cycle.
  • the second period includes at least two first periods; and then the statistical delay threshold is the first time of the read IO request in the first period when the delay threshold Tx is Extended average After so, because it is the first one of the first cycle, so the delay threshold directly Tx-1 as a target of the first delay threshold cycle corresponds to the target small delay threshold adjustment.
  • the second delay of the read IO request in the first period when the delay threshold Tx-1 is counted is Mean; then comparing the second delay average with the first delay average, and if the second delay average is not greater than the first delay average, the time in the at least two delay thresholds of the interval in the interval set
  • the delay threshold Tx-2 is confirmed as the target delay threshold. It can be seen that if the average value of the current first period relative to the previous first period becomes smaller or equal, it means that the segmentation condition of the read IO request does not deteriorate, and the target delay threshold is adjusted to be small. In order to meet the changing trend of the current read IO request distribution.
  • the delay threshold Tx in the at least two delay thresholds of the interval in the interval set is confirmed as the target of the next first cycle.
  • Delay threshold It can be seen that if the average value of the current first period relative to the previous first period becomes larger, the condition indicating that the IO request is read is deteriorated, and the target delay threshold is increased to meet the current read. Trends in the distribution of IO requests.
  • the delay threshold Tx is confirmed as the target delay threshold of the next first period; first, the third delay in the first period of the delay threshold Tx is counted. Mean value, if the third experimental average value is greater than the second delay average value, the segmentation condition indicating that the IO request is read is deteriorated twice in succession, and at this time, the delay threshold value Tm in the delay threshold of the interval in the interval set is Or the delay threshold Tx/2-1/2 is confirmed as the delay threshold of the next first period, wherein the rounding of x/2-1/2 is visible, and in the case of two consecutive deteriorations, the target is not
  • the delay threshold is adjusted to a level, but is directly adjusted to the maximum value, or adjusted to the middle position of the current level to the maximum level, so as to achieve a rapid adjustment to the trend of the current read IO request distribution.
  • At least two delay thresholds of all the intervals in the interval set are updated every second period, and at least two delay thresholds corresponding to the intervals in the interval set may be read according to a preset degraded read.
  • the percentage of the IO request is determined, for example, the calculation of each interval in the current second period is determined as the ratio of the read IO request of the degraded read to the total of the read IO requests and the corresponding target delay threshold, according to the The average of the ratio and the target delay threshold is set for at least two delay thresholds for the next second period.
  • each second period counts the IO read/write ratio and/or the IO queue depth of the read IO request issued by the host, when the IO read/write ratio and/or the IO queue depth of the read IO request changes. And updating at least two delay thresholds of all the intervals in the interval set. Since the IO read/write ratio and/or the IO queue depth of the read IO request change may cause the delay value of the read IO request to vary greatly, sometimes it may be an order of magnitude change, so this condition needs to be at least two corresponding to the interval. The basis for setting the delay threshold.
  • the data returned by the read IO request performing the degraded read and the data directly returned by the read IO request are determined as the return time data of the read IO request.
  • determining the first data returned between the two as the return time data of the read IO request can Improve the efficiency of data reading.
  • the second aspect of the embodiment of the present invention further provides a RAID controller, which may include:
  • a receiving module configured to receive a read input and output IO request issued by the host
  • a determining module configured to determine, according to the size of the read IO request, an interval in the interval set to which the read IO request belongs, the interval set includes at least two intervals, and the interval in the interval set is divided according to the size of the IO request in advance, and the interval set is Each interval corresponds to a target delay threshold;
  • the adjusting module is configured to adjust a target delay threshold of the interval in the set of the policy adjustment interval according to the preset threshold according to the preset first period;
  • a monitoring module for monitoring a delay value of a return of a read IO request
  • the degraded read module is configured to perform a degraded read operation on the read IO request when the delay value of the read IO request exceeds the target delay threshold corresponding to the interval in which the read IO request belongs.
  • the determining module determines the read IO request interval, and then the monitoring module monitors the delay value of the return of the read IO request, because each of the first cycles of the adjustment module is The target delay threshold of the interval is adjusted. Therefore, after the detection module detects the delay value of the read IO request, if the delay value exceeds the target delay threshold corresponding to the interval to which the read IO request belongs, the degraded read module is used. A degraded read operation is performed on the read IO request.
  • each of the interval sets corresponds to at least two delay thresholds, and the adjustment module is specifically configured to:
  • the target delay threshold is selected from at least two delay thresholds of the intervals in the interval set according to the preset threshold adjustment policy every preset first period.
  • the adjustment mode performed by the adjustment module is to select a target delay threshold from at least two delay thresholds according to a preset threshold adjustment policy; of course, only one delay threshold may be set in one interval, and then The threshold adjustment policy is updated to update the delay threshold.
  • the adjustment module is specifically configured to:
  • the target delay threshold is adjusted from at least two delay thresholds of the intervals in the interval set according to the delay average.
  • the specific threshold adjustment strategy may be to calculate the current first period. Reading the average of the delay of the delay value of the IO request, and then adjusting the target delay threshold from at least two delay thresholds of the interval based on the average of the delay, and the delay average value reflects the segmentation of the read IO request, Therefore, adjusting according to the average of the delay can achieve the purpose of meeting the expected changes.
  • the at least two delay thresholds include a delay threshold T1 from a small to a large array to a delay threshold Tm, where m is an integer greater than 1, and the adjustment module is specifically configured to:
  • a delay threshold Tx in at least two delay thresholds of the interval in the interval set as a target delay threshold the second period including at least two first periods
  • the statistical delay threshold is a first delay average value of the read IO request in the first period when the delay threshold Tx is 0, and x is an integer greater than 1 and less than m;
  • the delay threshold Tx-1 in at least two delay thresholds of the interval in the interval set is confirmed as the target delay threshold.
  • the above description is for one interval.
  • the other intervals in the interval set also have m delay thresholds, which are equivalent to the delay threshold equalization of the intervals in the interval set.
  • the delay thresholds of all the sections are uniformly adjusted. For example, one of the intervals is adjusted to the m-3 level, and all the intervals are adjusted to the m-3 level.
  • the adjustment module is further configured to:
  • the second delay average of the read IO request in the first period when the statistical delay threshold is the delay threshold Tx-1;
  • the delay threshold Tx-2 in the at least two delay thresholds of the interval in the interval set is confirmed as the target delay threshold of the next first period.
  • the average value of the current first period relative to the previous first period becomes smaller or equal, it means that the segmentation condition of the read IO request does not deteriorate, and the target delay threshold is adjusted to be small. In order to meet the changing trend of the current read IO request distribution.
  • the adjustment module is further configured to:
  • the interval in the interval set The delay threshold Tx in at least two delay thresholds is confirmed as the target delay threshold of the next first period.
  • a third aspect of the embodiments of the present invention further provides a RAID controller, including a RAID processor and a memory, a hard disk interface connected to the RAID processor for connecting to the hard disk, a communication interface for communicating with the external host, and a computer executed in the memory. Instructing, the RAID processor runs a computer in memory to execute instructions to perform the first aspect of the data reading method.
  • a fourth aspect of the embodiments of the present invention further provides a storage device, including at least two hard disks and a RAID controller that is communicably connected to at least two hard disks, and the RAID controller runs a computer stored in the RAID controller to execute an instruction to execute the first A method of reading data on the one hand.
  • the embodiment of the present invention has the following advantages: in the embodiment of the present invention, the read IO requests belong to different intervals according to the size, and the interval is the value range of the size of the read IO request in the interval.
  • the read IO request in an interval has a substantially similar size, and then a target delay threshold is set for each interval, and the target delay threshold may be adjusted according to a preset threshold adjustment policy, such as according to each statistics.
  • the average delay of the read IO request is selected from the at least two delay thresholds as the target delay threshold or directly updated to the target delay threshold, and then when the read IO request in an interval is judged, the interval is passed.
  • the target delay threshold is judged whether the read IO request is degraded or not.
  • the degraded read operation is performed, and it can be seen that the target delay threshold is not always in the running process. Invariant, but according to different read IO request distribution, select the target delay threshold determined in the corresponding at least two delay thresholds or straight The target delay threshold is directly updated, so that the average system delay can be effectively reduced, the QoS of the RAID in the embodiment of the present invention is improved, and the RAID performance of the SSD is utilized to the maximum extent, thereby improving the IO performance of the RAID.
  • 1a is a schematic structural diagram of a storage system using a disk array
  • 1b is a schematic structural diagram of a prior art storage system
  • Figure 1c is a flow chart of the operation of the prior art storage system
  • FIG. 2 is a diagram showing an embodiment of a data reading method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of determining a target delay threshold in a data reading method according to an embodiment of the present invention
  • FIG. 4 is a diagram showing an embodiment of a RAID controller according to an embodiment of the present invention.
  • FIG. 5 is a diagram showing an embodiment of a RAID controller according to an embodiment of the present invention.
  • Figure 6 is a diagram showing an embodiment of a storage device in accordance with an embodiment of the present invention.
  • the embodiment of the invention provides a data reading method, a RAID controller and a storage device, which are used for reasonably grouping read IO requests and dynamically adjusting a delay threshold, thereby effectively reducing the average system delay and improving the implementation of the present invention.
  • the disk array includes multiple modes, such as RAID0, which combines at least two disks into one logical disk. When data is read and written, the disks are simultaneously operated, different disks write different data, and the read/write performance is improved.
  • RAID1 is used. When two disks are used, the same data stored on the two disks, even if the data on one of the disks is damaged, can be read through another disk to improve data reliability; for example, RAID10, this mode is equivalent to combining RAID0.
  • RAID1 need at least four disks, first form two disks into RAID1, and combine multiple RAID1 into RAID0, while improving read and write performance and data reliability.
  • FIG. 1a is a schematic structural diagram of a storage device using a disk array.
  • the system using the disk array generally includes a host 101, a RAID system 102, and a hard disk 103.
  • the host 101 may be a local area network.
  • the client device such as a computer, may also be a server in the internetwork.
  • the RAID system may be a software module running in a system of the host or the storage server, or may be a RAID controller in the storage system, and the host 101 and the The RAID system 102 is generally connected in a wired manner, and some of the systems are connected in a wireless manner to form a remote storage system.
  • the RAID system runs on a data system and can respond to IO requests sent by the host 101, such as reading IO requests and writing.
  • the IO request, etc. returns the data requested by the read IO request or the data to be written in the write IO request.
  • the RAID system is used to implement a RAID redundancy algorithm at the software level (ie, Multiple hard disk spaces are pulled into a unified space and provide space management) and control data IO delivery decisions. It also implements the degraded read of timeout IO. It is also used to provide the degraded read function of each RAID system, provide the resource release function of timeout IO, and provide page replacement function. It can also be used for timeout detection of received read IO requests.
  • the RAID system 102 and the hard disk 103 can be connected by using different interfaces. If the server is a hard disk, the RAID system 102 and the hard disk are connected by a Small Computer System Interface (SCSI) interface, and the RAID system 102 is used.
  • SCSI Small Computer System Interface
  • a SCSI module is provided for assembling the information indicated in the read IO request into a hard disk 103 that is recognized by the hard disk through the SCSI interface and sent to the disk array in the disk array; the underlying driver in the hard disk 103 receives the SCSI command, and The hard disk 103 is driven to read data according to the SCSI command.
  • a RAID system includes a RAID module 1021 for receiving a read IO request, an IO timeout detection module 1022 for detecting whether a read IO request has timed out, and a downgrade read module 1023 for The timeout read IO request performs a downgrade read operation, and the SCSI module 1024 is configured to assemble the information indicated in the read IO request into a hard disk 103 that is recognized by the hard disk and sent to the hard disk 103 in the disk array through the SCSI interface.
  • FIG. 1c is a working flowchart of the storage system of the prior art, in which the host 101 sends a read IO request to the RAID module 1021, and the RAID module 1021 executes the read IO request, and is executed by the IO.
  • the timeout detecting module 1022 determines whether the read IO request is timed out.
  • the read IO request When it is determined that the read IO request times out, it sends a read IO request timeout information to the RAID module 1021, and after receiving the information, the RAID module 1021 will The read IO request is sent to the degraded read module 1023 for degraded read processing, and the read down IO request is processed by the degraded read module 1023, that is, another physical disk in the disk array 102 storing the data indicated in the read IO request is found, and Modifying the address of the address indicated in the read IO request on the new physical disk, and sending the modified read IO request to the SCSI module 1024, and the SCSI module 1023 converts the modified read IO request into the underlying driver
  • the SCSI command including the modified read IO request is recognized, and the command is sent to the corresponding hard disk, and the hard disk 103 is driven to read the modified read IO according to the SCSI command.
  • the return data is sequentially fed back to the SCSI module 1024, the degraded read module 1023, and the RAID module 1021, and finally the RAID module 1021 feeds back the returned data to the host to complete the process of degraded read of the read IO request.
  • the delay threshold there is only one delay threshold and the delay value remains unchanged during the operation, and other factors are not considered, such as the ratio of the read/write IO and the change of the IO size distribution.
  • the variation of the delay distribution which usually causes the IO delay value to change greatly. Therefore, whether it is a disk array composed of a mechanical hard disk or a disk array composed of an SSD, the fixed delay threshold does not perform well on the timeout IO. Limits are achieved to reduce the overall read IO latency.
  • FIG. 2 is a diagram of an embodiment of a data reading method according to an embodiment of the present invention.
  • the reading method can include the following:
  • the scenario applied by the embodiment of the present invention is data interaction between the host and the disk.
  • the host needs to read data from the hard disk of the disk array
  • the host sends a read IO request to the RAID system, so that the RAID system is configured according to the RAID system.
  • the read IO request retrieves the corresponding data from the hard disk of the disk array and feeds back to the host.
  • the interval set includes at least two intervals, and the interval in the interval set is divided according to the size of the IO request in advance, each interval in the interval set corresponds to a target delay threshold, and the range value of the interval is the size of the read IO request in the interval.
  • the range of values are the values.
  • each interval may further set at least two delay thresholds.
  • the RAID After receiving the read IO request for a certain period of time, the RAID will allocate the read IO request to different intervals according to its size.
  • the interval range corresponding to the interval a is 4 kb to 8 kb
  • the interval range corresponding to the interval b is 8 kb to 12 kb, that is, the read IO request having a size between 4 kb and 8 kb is divided into the interval a.
  • the read IO request between 8kb and 12kb will be divided into interval b.
  • Intervals such as interval c and interval d can be allocated in this way until all read IO requests are overwritten.
  • the interval range is generally not repeated except for the endpoint, and in order to make the interval division more average, it can be divided into consecutive sections connected end to end, that is, a section of 4 kb to 8 kb, an interval of 8 kb to 12 kb. And the interval from 12kb to 16kb.
  • the interval range of 20 kb to 24 kb may not be set.
  • the target delay threshold is dynamically adjusted, and the adjustment interval is adjusted every other first period.
  • One adjustment method is to directly update the target delay threshold, and the other is preset in the interval.
  • a preset threshold adjustment strategy is used for selection.
  • the at least two delay thresholds include at least two delay thresholds of different sizes, where the target delay threshold is one selected from at least two different delay thresholds corresponding to each interval.
  • the purpose of at least two delay threshold settings is to be able to subdivide the delay level corresponding to each interval, and adjust different delay thresholds according to the delay level, so that the processing of the read IO request is more accurate and efficient.
  • At least two delay thresholds include three delay thresholds m1, m2, and m3 arranged from small to large, and m1 corresponds to 99% of read IOs except for the slowest 1% read IO request.
  • m1 corresponds to 99% of read IOs except for the slowest 1% read IO request.
  • m2 corresponds to the 99.5% read IO request except the slowest 0.5% read IO request, which corresponds to 99.8. % of the average latency of the read IO request
  • m2 corresponds to the 99.8% read IO request except the slowest 0.2% read IO request, the delay average of the 99.8% read IO request Twice.
  • the delay threshold is twice the average of the corresponding delays when the read IO request of the preset percentage in the interval returns.
  • the preset percentage is adjustable.
  • m1 is twice the average of the corresponding delays when 99% of the read IO requests are returned
  • m2 is the corresponding time when 99.1% of the read IO requests are returned.
  • Double the average value m3 is twice the average of the corresponding delays when the read IO request returns from 99.2%. If there are still m4, m5, etc., the delay threshold can be set from small to large, m4 is 99.3.
  • the % read IO request returns twice the corresponding delay average
  • m5 is twice the average of the corresponding delays when 99.5% of the read IO requests are returned.
  • At least two delay thresholds corresponding to the intervals in the interval set are updated every second period, and the update is to update at least two delay thresholds of each interval;
  • the second period is a period including at least two first periods. If the first period is called a small period, the second period may be referred to as a large period.
  • calculating the interval of each interval in the current second period is the ratio of the read IO request of the degraded read to the total of the read IO requests and the corresponding target delay threshold, according to the ratio and the target delay threshold.
  • the average is set for at least two delay thresholds for the next second period, as set forth above as the percentage of the slowest read IO request to be resolved to a different level.
  • the second method is to count the IO read/write ratio and/or the IO queue depth of the read IO request delivered by the host.
  • the target delay threshold of the interval is updated.
  • the factor affecting the target delay threshold may also be the IO read/write ratio and/or the IO queue depth.
  • the magnitudes of the two values vary greatly, it may also be used as a condition for updating the target delay threshold, such as IO.
  • the read/write ratio becomes larger, indicating that the amount of read IO requests will increase.
  • the level of the target delay threshold can be appropriately lowered. For example, when the depth of the read IO queue is deep, the amount of read IO requests processed is very large. The level of the target delay threshold should also be reduced accordingly.
  • the range of the interval can be generally set to a fixed size, such as the range of 4 kb, 8 kb, etc.
  • the read IO request in each interval is less than the 4 kb range.
  • the number of delay thresholds in the interval of the 4 kb range division can be reduced relative to the 8 kb range, so the range of the interval can be reduced.
  • Each interval range is configured with at least two delay thresholds having different numbers of delay thresholds, that is, the number of delay thresholds for at least two delay thresholds of the large interval range is large, and at least two times corresponding to the inter-cell range The number of delay thresholds for delay thresholds is small.
  • the average delay is the average of the delay values returned by the read IO request.
  • the delay average corresponds to the distribution of the delay value of the read IO request. Specifically, the smaller the average of the delay, the better the distribution of the read IO request, and the larger the average of the delay indicates the read IO request. The worse the distribution is. Since a plurality of delay thresholds are set for at least two delay thresholds of each interval, the delay thresholds may be corresponding to the average of the delays, and the corresponding delay thresholds may be selected according to the average delay obtained by the statistics. The principle of selection may be that the smaller the average of the delays, the smaller the delay threshold.
  • a comparison mechanism can also be adopted for the setting of the delay threshold, which is described below.
  • FIG. 3 is a flowchart of determining a target delay threshold in a processing method according to an embodiment of the present invention, wherein at least two delay thresholds are included from small to small
  • the delay threshold T1 to the delay threshold Tm, m in the large arrangement is an integer greater than 1.
  • the adjustment process of the target delay threshold in step 203 may include:
  • the target delay threshold can be determined according to the rules. First, the maximum delay is followed. The threshold Tm is used as the target delay threshold, and then the corresponding delay threshold is selected according to the delay distribution value, or a value Tx between the delay threshold T1 and the delay threshold Tm is directly selected as the target delay threshold. The minimum delay threshold T1 can be selected as the target delay threshold.
  • the statistical delay threshold is a first delay average of the read IO request in the first period when the delay threshold Tx is used.
  • x is greater than 1 and less than m.
  • each delay threshold corresponds to a first period.
  • the delay threshold Tx is determined, the delay value of the read IO request in the first period is counted, and the delay value is calculated.
  • the average of the delay values obtains a first delay average value, which is a basis for measuring whether the target delay threshold needs to be changed. Since the first period is the first first period, the previous period is The average value of the delay does not exist. In this case, the distribution of the read IO request corresponding to the delay average does not occur in the previous period.
  • the threshold Tx is used as the read IO request in the first period.
  • the basis is that the delay threshold Tx is used as the delay threshold and all the read IO requests whose delay values exceed the delay threshold Tx are determined to be slow IO, and the read IO requests are subjected to the degraded read operation.
  • the delay threshold Tx-1 can be confirmed as the target delay threshold, and the delay threshold Tx-1 can be used as the next first.
  • the target delay threshold for the period.
  • the determining process of the target delay threshold may further include:
  • the second delay average of the read IO request in the first period when the statistical delay threshold is the delay threshold Tx-1;
  • the delay threshold Tx-1 is equivalent to a first period
  • the delay value of the read IO request is changed.
  • the second delay average is obtained again, and the second delay is flat.
  • the average value is the average value of the delay values returned by the read IO request in the first cycle.
  • the threshold value Tx-1 is used as the basis for the read-out IO request in the first cycle, that is, the delay threshold Tx-1. As the latency threshold and all read IO requests whose delay values exceed the latency threshold Tx-1, it is determined that a degraded read is required, and the read IO requests are subjected to a degraded read operation.
  • the delay threshold value Tx-2 in the at least two delay threshold values of the interval is confirmed as the target delay threshold value.
  • the second delay average value can be compared with the first delay average value, and the time is compared according to the comparison result.
  • the threshold is adjusted, for example, when the first delay average is not greater than the second delay average, that is, the average value of the delay value of the read IO request in the first period is not increased relative to the previous first period, and It is equal or reduced, indicating that the distribution of the read IO request is better as a whole.
  • the delay threshold can be adjusted by one level, that is, adjusted to a smaller delay threshold than the previous first period, such as
  • the delay threshold Tx-1 of the first period is adjusted to the delay threshold Tx-2, and the delay threshold Tx-2 is used as the delay threshold of the next first period.
  • the method further includes:
  • the delay threshold is required.
  • the stage is down-regulated, that is, adjusted to a larger delay threshold than the previous first period.
  • the determining process of the target delay threshold may further include:
  • the statistical delay threshold is a third delay average value of the read IO request when the delay threshold Tx is used;
  • the x/2-1/2 is rounded.
  • the third delay average is greater than the second delay average, it indicates that the situation is worse than the previous first period.
  • the delay threshold is not directly lowered by one level, but is adjusted.
  • the lowest level that is, the largest delay threshold of at least two delay thresholds or an intermediate level between the current delay threshold and the maximum delay threshold, in order to be able to adjust to the actual delay threshold more quickly.
  • the adjustment target is used each time the delay threshold is updated. All intervals, all of the adjusted delay threshold levels are adjusted according to the same level. For example, assume that each of the at least two delay thresholds has five delay thresholds, and one interval is adjusted to the delay threshold and the third delay. The level of the threshold, then all other intervals are adjusted to the level of the third delay threshold.
  • the target delay threshold of the interval in the interval set is confirmed as Tx-1.
  • the read IO request of the interval set can be monitored, and the monitoring is performed in units of the first period or the second period.
  • the delay beyond the target can be The read IO request of the threshold is judged.
  • the delay value of the read IO request exceeds the target delay threshold corresponding to the interval to which the read IO belongs, the read IO request is determined as a timeout IO request, and after determining the timeout IO requests, These timeout IO requests can be downgraded.
  • step 205 specifically includes:
  • Data is read from the hard disk in the storage device according to the indication of the read IO request of the degraded read.
  • the hard disk stores the data indicated by the timeout IO request, and the hard disk is different from the hard disk in the RAID indicated by the timeout IO request.
  • the RAID storage mode stores each data in at least two hard disks in the RAID.
  • the hard disk can be a mechanical hard disk or an SSD, and the read IO request is determined to require a downgrade read.
  • data is read from another hard disk in the storage device that stores the data indicated by the read IO request. Since the read path changes, generally, the read data will be read before the normal read IO request, but actually The situation is limited by the load of the hard disk that degrades the read indication, and the degraded read does not necessarily precede the normal read.
  • the read IO requests belong to different intervals according to the size, and the interval is the value range of the size of the read IO request in the interval, and the read IO request in each interval has a similar similarity.
  • the size, and then the target delay threshold is set for each interval, and the target delay threshold can be adjusted according to a preset threshold adjustment policy, such as the average of the delay of the read IO request according to each statistics from at least two Select one of the delay thresholds as the target delay threshold or directly update the target delay threshold, and then, when determining the read IO request in an interval, discard whether the read IO request is degraded by the target delay threshold of the interval.
  • the read judgement when the read IO request exceeds the target delay threshold of the interval, performs a degraded read operation, and it can be seen that the target delay threshold is not always constant during the running process, but is based on different read IO requests.
  • the distribution case selects the target delay threshold determined in the corresponding at least two delay thresholds or directly updates the target delay threshold, thereby being able to effectively reduce
  • the average latency of the small system improves the QoS of the RAID in the embodiment of the present invention, and maximizes the RAID performance of the SSD, thereby improving the IO performance of the RAID.
  • timeout IO request among the read IO requests may be delayed for a while.
  • the data is returned, but the data is still read normally.
  • the degraded read operation reads the same data in another way.
  • the data read by the two methods needs to be traded off.
  • the method further includes:
  • the data returned by the execution of the read IO request and the data returned first by the data returned by the read-down IO request are determined as the return data of the slow IO.
  • the method adopted by the embodiment of the present invention is that the two are returned as the return data in time, and the other is processed by using the method of ignoring or discarding, which can avoid waste of resources and improve the response speed of the system.
  • all the read IO requests are divided into sections according to the interval range of 4 kb, for example, divided into 10 sections, that is, section 1 to section 10, and the section 1 to section 10 at this time are divided.
  • the interval ranges from 0 kb to 4 kb, 4 kb to 8 kb, 8 kb to 12 kb, 12 kb to 16 kb, 16 kb to 20 kb, 20 kb to 24 kb, 24 kb to 28 kb, 28 kb to 32 kb, 32 kb to 36 kb, 36 kb to 40 kb, and the like.
  • At least two delay thresholds with a delay threshold of 10 may be set, which are arranged from small to large, and specifically correspond to ten levels from T1 to T10.
  • set a1 to A10 has a total of 10 delay thresholds.
  • set b1 to b10 for a total of 10 delay thresholds.
  • set c1 to c10 for a total of 10 delay thresholds.
  • For interval 5 set e1 to e10 for a total of 10 delay thresholds.
  • T1 to T10 have a total of ten levels corresponding to 0.1% to 1% of slow IO, wherein T10 corresponds to 99.9% of the IO returning to the corresponding time delay average of 2 times, T9 corresponds to 99.8% of the IO are returned when corresponding 2 times of delay; T8 corresponds to 2 times of the corresponding delay when 99.7% of IO returns; T7 corresponds to 2 times of the corresponding delay average when 99.6% of IO returns, and T6 corresponds to 99.5% of IO return The corresponding delay is 2 times; T5 corresponds to 29.4 times of the corresponding delay of 99.4% of the IO return; T4 corresponds to 99.3% of the IO return is 2 times the corresponding average of the delay, T3 corresponds to 99.2% of the IO 2 times of the corresponding delay when returning; T2 corresponds to 2 times of the corresponding delay when 99.1% of IOs return; Ti corresponds to 2 times of the corresponding delay when 99.0% of IOs return.
  • the specific delay threshold can be fine-tuned based on the measured data on the basis of 2 times fine adjustment: the IO of x+*% returns the corresponding delay*2. Note: where x represents 2 times the base value and is a fixed value.
  • the at least two delay thresholds of the specific interval corresponding to the delay threshold may be refreshed according to a large period, that is, the system is configured to set a plurality of at least two delay thresholds for each interval division.
  • Delay threshold in each of at least two delay thresholds The number of values can be the same or different.
  • the delay threshold first uses the maximum delay threshold, such as the delay threshold T10, first recognizes the read IO request that is not returned by the threshold of T10 as slow IO (T10 corresponds to 0.1% of IO), after a certain period of time, here For a first period, get a delay distribution returned by all read IO requests in the period, and the average value of the delay values returned by the read IO request, that is, the average delay of T10, the average delay of the T10 It can reflect the delay distribution at T10 and adjust the delay threshold of the next first cycle to T9.
  • T10 the maximum delay threshold
  • the delay threshold of the next first period can be set as the delay threshold T8, the processing of the next first period is continued, and the above processing is repeated to obtain Distribution and the average delay of T8.
  • the delay threshold of the next first period is adjusted to the delay threshold T9;
  • the above process is repeated to obtain a distribution and a delay average of the second T9, and adjust the delay threshold of the next first cycle to a delay threshold T8.
  • the delay distribution of all IOs in the cycle and the average delay of the second T8 are counted. If the average delay of the second T8 is greater than the average of the delay of the second T9, indicating that the delay distribution of the first period is significantly worse than the T9 period, then the identification processing of the slow IO or the half processing is started again from T10.
  • the half-folding process is to fall back to T5 if the current threshold is T1.
  • the optimal delay threshold is T9.
  • the threshold T9 is used. If a better threshold is found, then updating the baseline value identifying the slow IO is the better threshold. In the extreme case, the delay distribution of T8 has always been worse than that of T9, then T9 will always be used as the reference value for judging slow IO. In this way, the predetermined number of delay threshold changes are completed. A more number of times to complete a second cycle.
  • FIG. 4 is a diagram of an embodiment of a RAID controller according to an embodiment of the present invention.
  • the controller 4 can include:
  • the receiving module 401 is configured to receive a read input and output IO request sent by the host;
  • the receiving module 401 can implement step 201 in the embodiment shown in FIG. 2 .
  • the determining module 402 is configured to determine, according to the size of the read IO request, the interval in the interval set to which the read IO request belongs, the interval set includes at least two intervals, and the interval in the interval set is divided according to the size of the IO request in advance, and the interval set is Each interval corresponds to a target delay threshold;
  • the determining module 402 can implement the step 202 in the embodiment shown in FIG. 2, and the interval allocation of the specific read IO request is similar to the description of the step 202 in the embodiment shown in FIG. 2, and details are not described herein again.
  • the adjusting module 403 is configured to adjust a target delay threshold of the interval in the policy adjustment interval set according to the preset threshold according to the preset first period;
  • the adjustment module 403 can implement the step 203 in the embodiment shown in FIG. 2, and the specific target delay threshold is adjusted in a similar manner to the step 203 in the embodiment shown in FIG. 2, and details are not described herein again.
  • the monitoring module 404 is configured to monitor a delay value when the read IO request is returned;
  • the monitoring module 404 can implement the step 204 in the embodiment shown in FIG. 2, and the monitoring is performed in units of a first period or a second period.
  • the degraded read module 405 is configured to perform a degraded read operation on the read IO request when the delay value of the read IO request exceeds the target delay threshold corresponding to the interval in which the read IO request belongs.
  • the monitoring module 405 can implement the step 205 in the embodiment shown in FIG. 2, and can determine the read IO request exceeding the target delay threshold, and the delay value of the read IO request exceeds the corresponding interval of the read IO.
  • the read IO request is determined to be a timeout IO request, and after determining the timeout IO requests, the timeout IO requests can be downgraded.
  • the receiving module 401 first receives the read IO request sent by the host. Then, the determining module 402 determines a section to which the read IO request specifically belongs, and the section corresponds to a target delay threshold, which is adjusted by the adjusting module 403 according to a preset threshold according to a preset first period. After the adjustment is performed, the monitoring module 404 monitors the delay value of the return of the read IO request, and when the delay value exceeds the target delay value corresponding to the interval to which the read IO request belongs, the lower limit read is identified.
  • the module 405 performs a degraded read operation on the read IO request, and it can be seen that the target delay threshold is not constant during the running process, but is selected according to different read IO request distributions to select at least two delay thresholds.
  • each of the interval sets corresponds to at least two delay thresholds
  • the adjustment module 403 is specifically configured to:
  • the target delay threshold is selected from at least two delay thresholds of the intervals in the interval set according to the preset threshold adjustment policy every preset first period.
  • the specific adjustment manner of the adjustment module 403 may be: selecting one of the at least two different delay thresholds corresponding to each interval as the target delay threshold according to the preset threshold adjustment policy, and the specific two adjustment manners are
  • the two adjustment modes in step 203 of the embodiment shown in FIG. 2 are similar, and are not described herein again.
  • the target delay threshold may be directly updated according to the preset threshold adjustment strategy, instead of implementing multiple presets. And choose from them.
  • the adjusting module 403 is further configured to:
  • the target delay threshold is adjusted from at least two delay thresholds of the intervals in the interval set according to the delay average.
  • the specific threshold adjustment strategy may be to first calculate the delay average of the delay value of the read IO request in the current first period, and then based on the average of the delay, The target delay threshold is adjusted in at least two delay thresholds of the interval. Since the delay average reflects the segmentation of the read IO request, the adjustment according to the average of the delay can achieve the purpose of meeting the expected change.
  • the adjustment strategy of the specific delay average is similar to the adjustment strategy of the average delay in the description of step 203 in the embodiment shown in FIG. 2, and details are not described herein again.
  • the at least two delay thresholds include a delay threshold T1 and a delay threshold Tm in a small to large array, where m is an integer greater than 1.
  • the adjustment module 403 is further configured to:
  • a delay threshold Tx in at least two delay thresholds of the interval in the interval set as a target delay threshold the second period including at least two first periods
  • the statistical delay threshold is a first delay average value of the read IO request in the first period when the delay threshold Tx is 0, and x is an integer greater than 1 and less than m;
  • the delay threshold Tx-1 in at least two delay thresholds of the interval in the interval set is confirmed as the target delay threshold.
  • the above description is for one interval.
  • the other intervals in the interval set also have m delay thresholds, which are equivalent to the delay threshold equalization of the intervals in the interval set.
  • the delay thresholds of all the sections are uniformly adjusted.
  • one of the intervals is adjusted to the m-3 level, and all the intervals are adjusted to the m-3 level.
  • the adjustment strategy of the comparison of the average of the time delays is similar to the adjustment strategy of the average of the delays of the steps 301, 302, and 303 in the embodiment shown in FIG. 3, and details are not described herein again.
  • the adjustment module 403 is further configured to:
  • the second delay average of the read IO request in the first period when the statistical delay threshold is the delay threshold Tx-1;
  • the delay threshold Tx-2 in the at least two delay thresholds of the interval in the interval set is confirmed as the target delay threshold of the next first period.
  • the average value of the current first period relative to the previous first period becomes smaller or equal, it means that the segmentation condition of the read IO request does not deteriorate, and the target delay threshold is adjusted to be small. In order to meet the changing trend of the current read IO request distribution.
  • the adjustment strategy of the comparison of the average of the delays of the body is similar to the adjustment strategy of the average of the delays of the steps 304 and 305 in the embodiment shown in FIG. 3, and details are not described herein again.
  • the adjustment module 403 is further configured to:
  • the delay threshold Tx in at least two delay thresholds of the interval in the interval set is confirmed as the target delay threshold of the next first period.
  • FIG. 5 is a diagram of an embodiment of a RAID controller according to an embodiment of the present invention, where the RAID controller 5 may include both connected to the bus.
  • At least one RAID processor 501, at least one communication interface 502, and at least one hard disk interface 503, the RAID controller 5 according to the embodiment of the present invention may have more or less components than those shown in FIG.
  • the components or components may have different component configurations or arrangements, and the various components may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the RAID processor 501 can implement the functions of the determining module 402, the adjusting module 403, the monitoring module 404, and the downgrading reading module 405 in the embodiment shown in FIG. 502 can implement the function of the receiving module 401 in the embodiment shown in FIG. 4, and the hard disk interface 503 can implement the normal read command of the RAID controller to send a degraded read command or a read IO request to the disk.
  • the hard disk interface 503 can include various types, such as a SCSI interface, and a Serial Advanced Technology Attachment (SATA) interface.
  • FIG. 6 is a storage device of an embodiment of the present invention.
  • the storage device can include A RAID controller 601 in which at least two hard disks 602 are communicably connected to at least two hard disks, wherein the RAID controller 601 is capable of running a computer executed in the RAID controller 601 to execute instructions to implement the steps in the embodiment shown in FIG. 201 to step 205.
  • the RAID controller 601 further identifies the hard disk 602. If it is found that the hard disk is not a preset hard disk, for example, an identification code is set on the hard disk 602, the RAID controller 601 corresponds to the identification code range, and only needs to find If the accessed hard disk 602 does not have such an identification code or the identification code is not within the identifier range of the RAID controller 601, the hard disk 602 cannot be accessed into the disk array.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. based on It is understood that the technical solution of the present invention, which is essential to the prior art or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种数据读取方法、RAID控制器及存储设备。该方法包括:接收主机下发的读输入输出IO请求(201);根据读IO请求的大小确定读IO请求所属的区间集合中的区间(202),区间集合包括至少两个区间,区间集合中的每个区间对应目标时延阈值;每隔预设的第一周期按照预设的阈值调整策略调整区间集合中的区间的目标时延阈值(203);监测读IO请求的返回时的时延值(204);确定读IO请求的时延值超出目标时延阈值时,对读IO请求进行降级读操作(205)。该方法能够有效减小系统平均时延,将SSD的RAID性能最大限度的利用,从而提高RAID的IO性能。

Description

一种数据读取方法、RAID控制器及存储设备 技术领域
本发明涉及存储领域,具体涉及一种数据读取方法、RAID控制器及存储设备。
背景技术
随着固态硬盘(Solid State Drives,SSD)技术的飞速发展,SSD的存储容量越来越大且读写速度越来越快,应用范围越来越广泛。但是SSD在随着颗粒的擦写次数的增加,尤其是闪存芯片NAND Flash在快达到其磨损值的上限的时候,少量的输入输出(Input Output,IO)要经过多次读重试或是采用SSD内的其它处理措施才能读出正确的数据,此时读IO的时延会比正常的读IO大很多,此外随着颗粒擦写次数的增加,SSD整体的性能会逐步地变差,此外,由于SSD的单盘的4KB随机读的速率很高。
磁盘阵列(Redundant Arrays of Inexpensive Disks,RAID)磁盘阵列是由至少两个磁盘组合成一个具有大容量的磁盘组,利用多个硬盘提供的数据读写加成效果提升整个硬盘系统效能,所述磁盘阵列中的磁盘可以是机械硬盘,也可以是SSD。
不论是SSD组成的RAID还是机械硬盘组成的RAID,都会存在慢IO的情况,该慢IO是针对读IO来说的,即若针对IO请求设定一个返回的时延阈值,超过该时延阈值才返回的IO视为慢IO,以现有机械硬盘组成的RAID为例,解决慢IO的方式为在磁盘系统中对于非慢IO采用正常读取的方式,对于慢IO则是采用降级读的方式,即若为磁盘阵列,在一些磁盘阵列的模式中,对于同一数据会在磁盘阵列中的两个磁盘上同时存储,降级读则是不在慢IO指示的磁盘中读取慢IO所请求的数据,而是从另外一个存储有与慢IO指示的磁盘同样数据的磁盘上读取慢IO所请求的数据。现有技术的磁盘阵列系统中仅设置一个时阈 延值,并且这个时延阈值一旦确定,在整个运行过程中会一直保持不变。
然而,现有这种在运行过程中时延值一直保持不变的方式,并不会考虑其他影响因素,在读写IO的比例和IO的大小分布的变化导致的IO的时延分布的变化,这种变化通常导致IO的时延值变化较大,因此,不论是机械硬盘构成的磁盘阵列还是SSD构成的磁盘阵列,固定的延时阈值并不能很好的对超时IO进行限制达到降低整体读IO时延的水平;此外,对于SSD构成的磁盘阵列来说,由于时延值是固定的,在时延值固定的情况下,对一个慢IO来说,慢IO完成的时延值并不一定慢于该慢IO降级读完成的时延值,因此通过降级读慢IO减少系统的平均时延的效果并不总是存在;此外,SSD的4KB随机读的速率很高,而IO请求一般也都是KB级别的大小,因此,在SSD构成的磁盘阵列中,部分IO的降级读并不会对该磁盘阵列中的其他SSD的性能造成明显的影响,因此,固定延时阈值的方式并不能很好的适用在由SSD组成的磁盘阵列中。
发明内容
本发明实施例提供了一种数据读取方法、RAID控制器及存储设备,能够有效减小系统平均时延,提升采用本发明实施例的RAID的服务质量(Quanlity of Service,QoS),将SSD的RAID性能最大限度的利用,从而提高RAID的IO性能
有鉴于此,本发明实施例第一方面提供一种数据读取方法,可包括:
预先根据读IO请求的大小预先设置至少两个区间,这些区间构成区间集合,并且区间集合中的每个区间均对应设置目标时延阈值;该目标时延阈值并非不变的,而是每隔预设的第一周期按照预设的阈值调整策略调整每个区间对应的目标时延阈值;在一个第一周期内,针对主机在这个周期内下发的读IO请求,按照该读IO请求的大小确定其对应的区间,并监测所有读IO请求的返回时的时延值;当确定 读IO请求的时延值超出该读IO请求所属区间对应的目标时延阈值时,对超出该目标时延阈值的读IO请求进行降级读操作。
可以看出,由于在主机一次下发的多个读IO请求中,大小近似的读IO请求具有近似的时延值,因此通过设置不同的区间对应不同的大小的读IO请求,每一区间的读IO请求可采用相同的目标时延阈值作为界定是否采用降级读操作的标准;此外,又由于主机每一次下发读IO请求都不相同,例如,相邻两次下发的读IO请求即便大小近似,其时延值也不一定近似,导致用于前一次主机下发的读IO请求的目标时延阈值在后一次中并能不能很好的对需要降级读的读IO请求进行区分,因此本发明实施例中采用每隔预设的第一周期便按照预设的阈值调整策略对目标时延值进行调整,以满足下一第一周期对目标时延值的需求,从而能够使得目标时延阈值能够动态的调整以配合读IO请求,进而达到更加合理的界定需要降级读的读IO请求,最终提高磁盘阵列的性能。
在一些实施例中,调整目标时延阈值的方式是先对每个区间设置至少两个时延阈值,每一第一周期的目标时延阈值则通过预设的阈值调整策略从至少两个时延阈值中选取。
在一些实施例中,调整目标时延阈值的方式是先对每个区间设置仅一个时延阈值,每一第一周期的目标时延阈值是通过阈值调整策略更新该时延阈值得到的,在整个运行过程中,每个区间对应的时延阈值仅有一个。
其中,上述两种方式均能够实现目标时延阈值的调整,使得每一第一周期的目标时延阈值均为适合该第一周期的目标时延阈值。
在一些实施例中,若采用每个区间设置至少两个时延阈值时,具体阈值调整策略可以是,首先计算当前第一周期内的主机下发的读IO请求的时延值的时延平均值,该时延平均值能反应该第一周期内的读IO请求的分部情况,该时延平均值是当前第一周期内的主机下发的所有区间的读IO请求计算平均值获得,之后,根据该时延平均值为区间集合的每个区间从其对应的至少两个时延阈值中选取目标时延 阈值。
在一些实施例中,具体的阈值调整策略是按照两个相邻第一周期的时延平均值的比较结果决定下一第一周期的目标时延阈值;举例来说,每个区间的至少两个时延阈值是按照从小到大排列的,如某一区间的时延阈值T1至时延阈值Tm为从小到大排列,m为大于1的整数,即分为1到m共m个级别,此时,区间集合中的其余区间均也包括m个级别的时延阈值,每次进行目标时延阈值调整时,是针对区间集合内的所有区间进行的统一调整;如针对对应时延阈值T1至时延阈值Tm的区间来说,具体的调整过程为,首先在第二周期内的第一个第一周期将区间集合中区间的的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值,其中,x大于1且小于m的整数,第二周期包括至少两个第一周期;接着统计时延阈值为时延阈值Tx时的第一周期内的读IO请求的第一时延平均值,统计完成之后,由于是第一个第一周期,因此直接将时延阈值Tx-1作为下一个第一周期的目标时延阈值,相当于把目标时延阈值调小。
在一些实施例中,在上述将时延阈值Tx-1作为下一个第一周期的目标时延阈值后,统计时延阈值Tx-1时的第一周期内的读IO请求的第二时延平均值;接着将该第二时延平均值与第一时延平均值进行比较,若第二时延平均值不大于第一时延平均值时,将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-2确认为目标时延阈值。可以看出,若当前第一周期相对于上一第一周期的时延平均值变小或者相等,则表示读IO请求的分部情况并未发生恶化,此时会将目标延时阈值调小,以符合当前读IO请求分布情况的变化趋势。
在一些实施例中,当上述第二时延平均值大于第一时延平均值时,将区间集合中的区间的至少两个时延阈值中的时延阈值Tx确认为下一第一周期的目标时延阈值。可以看出,若当前第一周期相对于上一第一周期的时延平均值变大,则表示读IO请求的分部情况发生恶化,此时会将目标延时阈值调大,以符合当前读IO请求分布情况的变化趋势。
在一些实施例中,在上述读IO请求发生恶化后将时延阈值Tx确认为下一第一周期的目标时延阈值后;首先会统计时延阈值Tx的第一周期内的第三时延平均值,若该第三实验平均值大于第二时延平均值时,表示读IO请求的分部情况连续两次恶化,此时,会将区间集合中的区间的时延阈值中的时延阈值Tm或时延阈值Tx/2-1/2确认为下一第一周期的时延阈值,其中,对x/2-1/2取整,可见,在连续两次恶化的情况下,并非将目标时延阈值调大一个级别,而是直接调到最大值,或者调整为当前级别至最大级别的中间位置,从而实现快速调整至符合当前读IO请求分布情况的变化趋势。
在一些实施例中,每隔第二周期会对区间集合中所有区间的至少两个时延阈值进行更新,区间集合中的区间对应的至少两个时延阈值可按照预设的降级读的读IO请求的百分比来确定,举例来说,计算当前第二周期内的每一区间的确定为降级读的读IO请求占所有读IO请求的比例以及对应的目标时延阈值的平均值,根据该比例以及目标时延阈值的平均值对下一第二周期的至少两个时延阈值进行设置。
在一些实施例中,每个第二周期会统计主机下发的读IO请求的IO读写比例和/或IO队列深度,当读IO请求的IO读写比例和/或IO队列深度发生变化时,对区间集合中所有区间的至少两个时延阈值进行更新。由于读IO请求的IO读写比例和/或IO队列深度发生变化时可能导致读IO请求的时延值变化很大,有时可能是数量级的变化,因此需要将此条件作为区间对应的至少两个时延阈值的设置依据。
在一些实施例中,针对执行降级读的读IO请求返回的数据和直接执行该读IO请求返回的数据,确定两者之中先返回的数据作为该读IO请求的返回时数据。
由于,直接执行该读IO请求的时延值并不一定会比通过降级读该读IO请求的时延值慢,因此确定两者之中先返回的数据作为该读IO请求的返回时数据能够提高数据读取的效率。
本发明实施例第二方面还提供一种RAID控制器,可包括:
接收模块,用于接收主机下发的读输入输出IO请求;
确定模块,用于根据读IO请求的大小确定读IO请求所属的区间集合中的区间,区间集合包括至少两个区间,区间集合中的区间为预先根据IO请求的大小划分的,区间集合中的每个区间对应目标时延阈值;
调整模块,用于每隔预设的第一周期按照预设的阈值调整策略调整区间集合中的区间的目标时延阈值;
监测模块,用于监测读IO请求的返回时的时延值;
降级读模块,用于确定读IO请求的时延值超出读IO请求所属区间对应的目标时延阈值时,对读IO请求进行降级读操作。
可以看出,本发明实施例中,采用确定模块对读IO请求区间进行确定,而后会通过监测模块监测该读IO请求的返回时的时延值,由于调整模块每个一个第一周期都会对区间的目标时延阈值进行调整,因此在检测模块监测到该读IO请求的时延值之后,若该时延值超出该读IO请求所属区间对应的目标时延阈值时,会由降级读模块对该读IO请求执行降级读操作。
在一些实施例中,区间集合中的每个区间对应至少两个时延阈值,调整模块具体用于:
每隔预设的第一周期按照预设的阈值调整策略从区间集合中的区间的至少两个时延阈值中所选择出目标时延阈值。
可以看出,此时调整模块执行的调整方式是按照预设的阈值调整策略从至少两个时延阈值选取出目标时延阈值;当然也可采用一个区间仅设置一个时延阈值,而后根据预设的阈值调整策略对该时延阈值进行更新。
在一些实施例中,调整模块具体用于:
计算当前第一周期内的主机下发的读IO请求的时延值的时延平均值;
根据时延平均值从区间集合中的区间的至少两个时延阈值中调整目标时延阈值。
可以看出,具体的阈值调整策略可以是先计算当前第一周期内的 读IO请求的时延值的时延平均值,而后以该时延平均值为基础,从区间的至少两个时延阈值中调整目标时延阈值,由于时延平均值反应读IO请求的分部情况,因此按照时延平均值进行调整能够达到符合预期变化的目的。
在一些实施例中,至少两个时延阈值包括从小到大排列中的时延阈值T1至时延阈值Tm,m为大于1的整数,调整模块具体用于:
在第二周期内的第一个第一周期将区间集合中区间的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值,第二周期包括至少两个第一周期;
统计时延阈值为时延阈值Tx时的第一周期内的读IO请求的第一时延平均值,x大于1且小于m的整数;
将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-1确认为目标时延阈值。
可以看出,上述是针对一个区间进行的说明,在上述区间具有m个时延阈值时,区间集合内其他区间同样具有m个时延阈值,相当于区间集合内的区间的时延阈值均分为了m个级别,每次进行调整时,是对所有区间的时延阈值进行统一调整,如其中一个区间调整至m-3级别,所有区间均调整为m-3级别。
在一些实施例中,调整模块还用于:
统计时延阈值为时延阈值Tx-1时的第一周期内的读IO请求的第二时延平均值;
当第二时延平均值不大于第一时延平均值时,将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-2确认为下一第一周期的目标时延阈值。
可以看出,若当前第一周期相对于上一第一周期的时延平均值变小或者相等,则表示读IO请求的分部情况并未发生恶化,此时会将目标延时阈值调小,以符合当前读IO请求分布情况的变化趋势。
在一些实施例中,调整模块还用于:
当第二时延平均值大于第一时延平均值时,将区间集合中的区间 的至少两个时延阈值中的时延阈值Tx确认为下一第一周期的目标时延阈值。
可以看出,若当前第一周期相对于上一第一周期的时延平均值变大,则表示读IO请求的分部情况发生恶化,此时会将目标延时阈值调大,以符合当前读IO请求分布情况的变化趋势。
本发明实施例第三方面还提供一种RAID控制器,包括RAID处理器和内存,与RAID处理器连接的用于连接硬盘的硬盘接口,与外部主机通信的通信接口,内存中存储有计算机执行指令,RAID处理器运行内存中的计算机执行指令以执行第一方面的数据读取方法。
本发明实施例第四方面还提供一种存储设备,包括至少两块硬盘和与至少两块硬盘均通信连接的RAID控制器,RAID控制器运行存储于RAID控制器中的计算机执行指令以执行第一方面的数据读取方法。
从以上技术方案可以看出,本发明实施例具有以下优点:本发明实施例中将读IO请求按照大小分别属于不同的区间,区间为该区间内的读IO请求的大小的取值范围,每一区间内的读IO请求中具有大致类似的大小,而后为每个区间均设置目标时延阈值,该目标时延阈值可以按照预设的阈值调整策略进行调整,如可根据每次的统计的读IO请求的时延平均值从至少两个时延阈值中选取一个作为目标时延阈值或者对目标时延阈值直接更新,而后在对一个区间内的读IO请求进行判断时,通过该该区间的目标时延阈值丢该读IO请求是否进行降级读进行判断,当该读IO请求超出该区间的目标时延阈值时,进行降级读操作,可以看出,目标时延阈值在运行过程中并非一直不变的,而是根据不同的读IO请求分布情况选择对应的至少两个时延阈值中确定的目标时延阈值或者直接对目标时延阈值直接更新,从而能够有效减小系统平均时延,提升采用本发明实施例的RAID的QoS,将SSD的RAID性能最大限度的利用,从而提高RAID的IO性能。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1a是采用磁盘阵列的存储系统的结构示意图;
图1b是现有技术的存储系统的结构示意图;
图1c是现有技术的存储系统的工作流程图;
图2是本发明实施例的数据读取方法的一个实施例图;
图3是本发明实施例的数据读取方法中确定目标时延阈值的流程图;
图4是本发明实施例的RAID控制器的一个实施例图;
图5是本发明实施例的RAID控制器的一个实施例图;
图6是本发明实施例的存储设备的一个实施例图。
具体实施方式
本发明实施例提供了一种数据读取方法、RAID控制器及存储设备,用于通过对读IO请求合理分组并动态调整时延阈值,从而有效减小系统平均时延,提升采用本发明实施例的RAID的服务质量。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
以下分别进行详细说明。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。
磁盘阵列包括多种模式,如RAID0,将至少两个磁盘合并成一个逻辑磁盘使用,数据读写时对各磁盘同时操作,不同磁盘写入不同数据,提高读写性能;又如RAID1,若采用两块磁盘时,两块磁盘上存储的相同的数据,即便其中一个磁盘上的数据损坏,也能通过另一个磁盘进行读取,提高数据可靠性;又例如RAID10,该模式相当于结合了RAID0和RAID1,需要至少四块磁盘,先将两块磁盘组成RAID1在将多个RAID1组成RAID0,同时提高读写性能和数据可靠性,此外,还有一些其他的阵列方式会加入数据校验,在数据损坏时可根据校验码恢复数据。
请参阅图1a,图1a是采用磁盘阵列的存储设备的结构示意图,如图1a所示,采用这种磁盘阵列的系统一般包括主机101、RAID系统102和硬盘103,该主机101可以是局域网中的客户端设备,如计算机,也可以是互联网络中的服务器,该RAID系统可以是运行在主机或者存储服务器的系统内的软件模块,或者也可以是存储系统中的RAID控制器,主机101与RAID系统102或者之间一般采用有线方式连接,也有一部分采用无线方式连接形成远程存储的系统,这种RAID系统上运行有数据系统,能够响应主机101下发的IO请求,如读IO请求和写IO请求等,返回读IO请求所请求的数据或写入写IO请求中要写入的数据。
其中,该RAID系统用于在软件层面实现RAID冗余算法(即将 多块硬盘空间拉通成统一空间使用,并且提供空间管理)和控制数据IO下发盘的决策。并实现超时IO的降级读,还用于提供各个RAID系统的降级读功能,提供超时IO的资源释放功能,提供页面替换功能;还可用于对接收的读IO请求的超时检测。该RAID系统102与硬盘103之间可采用不同的接口进行连接,若为服务器硬盘时,该RAID系统102与硬盘之间采用小型计算机系统接口(Small Computer System Interface,SCSI)连接,RAID系统102中设有SCSI模块,将用于将读IO请求中指示的信息组装成硬盘能够识别的SCSI指令通过该SCSI接口下发到磁盘阵列中的硬盘103;硬盘103中的底层驱动接收SCSI指令,并将根据该SCSI指令驱动硬盘103读取数据。
图1b是现有技术的存储系统,该存储系统中RAID系统包括RAID模块1021,用于接收读IO请求;IO超时检测模块1022用于检测读IO请求是否超时;降级读模块1023,用于对超时的读IO请求进行降级读操作,SCSI模块1024,用于将读IO请求中指示的信息组装成硬盘能够识别的SCSI指令通过该SCSI接口下发到磁盘阵列中的硬盘103。
该存储系统的工作流程可参见图1c,图1c是现有技术的存储系统的工作流程图,其中,主机101向RAID模块1021发送读IO请求,RAID模块1021执行该读IO请求,并由IO超时检测模块1022对该读IO请求是否超时进行判断,当确定该读IO请求超时时,会向RAID模块1021发送一个读IO请求超时的信息,RAID模块1021在接收到该信息后,会将该读IO请求发送至降级读模块1023进行降级读处理,由降级读模块1023对该读IO请求进行处理,即找到磁盘阵列102中的另外一个存储有读IO请求中指示的数据的物理磁盘,并修改读IO请求中指示的数据的地址在新的物理磁盘上的地址,将该修改后的读IO请求发送至SCSI模块1024,由该SCSI模块1023将此修改后的读IO请求转换成底层驱动能识别的包含该修改后的读IO请求的SCSI指令,并将该指令发送至对应的硬盘,根据该SCSI指令驱动硬盘103读取该修改后的读IO请求指示的数据,将该数据作为 返回数据依次反馈给SCSI模块1024、降级读模块1023和RAID模块1021,最终由RAID模块1021将该返回数据反馈至主机,完成一次读IO请求的降级读的过程。
上述方案中,延时阈值仅有一个且在运行过程中时延值一直保持不变,并不会考虑其他影响因素,例如在读写IO的比例和IO的大小分布的变化导致的IO的时延分布的变化,这种变化通常导致IO的时延值变化较大,因此,不论是机械硬盘构成的磁盘阵列还是SSD构成的磁盘阵列,固定的延时阈值并不能很好的对超时IO进行限制达到降低整体读IO时延的水平。
并且随着QoS要求的增加,时延急剧上升。在SSD组成的磁盘阵列的环境中,SSD的4KB随机读的速率很高,而IO请求一般也都是KB级别的大小,因此,在SSD构成的磁盘阵列中,部分IO的降级读并不会对该磁盘阵列中的其他SSD的性能造成明显的影响,因此,固定延时阈值的方式并不能很好的适用在由SSD组成的磁盘阵列中,需要根据SSD的特征制定新的超时IO识别处理方案以减少超时IO对系统的影响。
为解决上述问题,本发明的一个实施例提供一种数据读取方法,请参阅图2,图2是本发明实施例的数据读取方法的一个实施例图,如图2所示,该数据读取方法可包括以下内容:
201、接收主机下发的读IO请求。
可以理解的是,本发明实施例应用的场景为主机和磁盘之间的数据交互,当主机需要从磁盘阵列的硬盘中读取数据时,会向RAID系统发送读IO请求,以使得RAID系统根据该读IO请求,从磁盘阵列的硬盘中取出对应数据反馈给主机。
202、根据读IO请求的大小确定读IO请求所属的区间集合中的区间。
其中,区间集合包括至少两个区间,区间集合中的区间为预先根据IO请求的大小划分的,区间集合中的每个区间对应目标时延阈值,区间的范围值对区间内读IO请求的大小的取值范围。
需要说明的是,每个区间除了对应目标时延阈值之外,还可对应设置至少两个时延阈值。
可以理解的是,RAID在接收到一段时间内的读IO请求后,会将这段时间内的读IO请求按照其大小分配至不同的区间。
举例来说,区间a对应的区间范围的区间是4kb至8kb,区间b对应的区间范围的区间是8kb至12kb,即大小在4kb至8kb之间的读IO请求会被划分在区间a内,而大小为8kb至12kb之间的读IO请求会被划分在区间b内,可按照此方式依次分配区间c和区间d等区间,直到覆盖到所有的读IO请求。
需要说明的是,设置区间范围一般来说除了端点之外没有重复的部分,并且为了使得区间划分上更加平均,可划分为首尾相连的连续区间,即4kb至8kb的区间、8kb至12kb的区间和12kb至16kb的区间等。当然若是一些读IO请求在某一区间内几乎不分布,如没有读IO请求的大小20kb至24kb的大小范围,则可不设置区间为20kb至24kb的区间范围。
203、每隔预设的第一周期按照预设的阈值调整策略调整区间集合中的区间的目标时延阈值。
其中,该目标时延阈值是动态调整的,其调整间隔为每隔第一周期调整一次,一种调整方式是采用直接更新目标时延阈值的方式,另外一种则是在区间对应预设了至少两个时延阈值时,采用预设的阈值调整策略进行选取。
可选的,至少两个时延阈值包括至少两个大小不同的时延阈值,该目标时延阈值是从每个区间对应的至少两个大小不同的时延阈值中选取的一个。
可以理解的是,至少两个时延阈值设置的目的在于对应每个区间能够细分延时级别,并按照延时级别调整不同的时延阈值,使得对读IO请求的处理更加精确和高效。
举例来说,至少两个时延阈值包括三个从小到大排列的时延阈值m1、m2和m3,m1对应除最慢1%的读IO请求之外的99%的读IO 请求的都返回时,对应该99%的读IO请求的时延平均值的两倍,m2对应除最慢0.5%的读IO请求之外的99.5%的读IO请求的都返回时,对应该99.8%的读IO请求的时延平均值的两倍,m2对应除最慢0.2%的读IO请求之外的99.8%的读IO请求的都返回时,对应该99.8%的读IO请求的时延平均值的两倍。
此时,对应m1时,表示要解决最慢1%的读IO请求的慢的问题,对应m2时,表示要解决最慢0.5%的读IO请求的慢的问题,对应m3时,表示要解决最慢0.2%的读IO请求的慢的问题。
作为可选的,该时延阈值为区间中预设百分比的读IO请求都返回时对应的时延平均值的两倍。
可以理解的是,该预设百分比是可调的,例如,m1是99%的读IO请求都返回时对应的时延平均值的两倍,m2是99.1%的读IO请求都返回时对应的时延平均值的两倍,m3是99.2%的读IO请求都返回时对应的时延平均值的两倍,若还有m4、m5等则可以按照延时阈值从小到大的规律进行设置,m4是99.3%的读IO请求都返回时对应的时延平均值的两倍,m5是99.5%的读IO请求都返回时对应的时延平均值的两倍等等。
需要说明的是,每隔第二周期还会对区间集合中的区间对应的至少两个时延阈值进行更新,该更新是将每一个区间的至少两个时延阈值均进行更新;该更新时设置时延阈值的方式包括两种,下面分别进行说明,第一种是区间集合中的区间对应的至少两个时延阈值可按照预设的降级读的读IO请求的百分比来确定。
其中,第二周期为包含至少两个第一周期的周期,若第一周期称之为小周期,则第二周期对应可称之为大周期。
举例来说,计算当前第二周期内的每一区间的确定为降级读的读IO请求占所有读IO请求的比例以及对应的目标时延阈值的平均值,根据该比例以及目标时延阈值的平均值对下一第二周期的至少两个时延阈值进行设置,如上述按照需要解决的最慢的读IO请求的百分比设置为不同的级别。
第二种方式是统计主机下发的读IO请求的IO读写比例和/或IO队列深度;
当读IO请求的IO读写比例和/或IO队列深度发生变化时,更新区间的目标时延阈值。
可以看出,影响目标时延阈值的因素还可以是IO读写比例和/或IO队列深度,当这两个值的变化幅度较大时,也可作为更新目标时延阈值的条件,例如IO读写比例变大,表示读IO请求的量会增多,此时可适当降低目标延时阈值的等级,又例如,当读IO队列深度较深时,表示处理的读IO请求量非常大,此时也应当相应降低目标时延阈值的等级。
需要说明的是,区间范围一般可设定为固定的大小,如范围是4kb、8kb等,对于读IO请求来说,按照4kb的范围划分时显然每一区间内的读IO请求明显要少于按照8kb的范围划分的情况,因此,相对于8kb的范围划分情况,4kb的范围划分情况下的区间可以具有的时延阈值的数量相对8kb的情况可以减少一些,因此可按照区间范围的大小为每一区间范围配置具有不同数量的时延阈值的至少两个时延阈值,即对于大区间范围的至少两个时延阈值的时延阈值的数量较多,对应小区间范围的至少两个时延阈值的时延阈值的数量较少。
其中,时延平均值是读IO请求都返回的时延值的平均值。
需要说明的是,时延平均值对应是读IO请求的时延值的分布情况,具体的,该时延平均值越小表示读IO请求的分布情况越好,该时延平均值越大表示读IO请求的分布情况越差。由于对每个区间的至少两个时延阈值都设置了多个时延阈值,可将这些时延阈值对应到时延平均值上,根据统计获得的时延平均值即可选取对应的时延阈值,选取的原则可以是时延平均值越小则对应越小的时延阈值。
除了简单对应选取之外,对于时延阈值的设置还可采用对比机制,下面进行介绍。
作为可选的,请参阅图3,图3是本发明实施例的处理方法中确定目标时延阈值的流程图,其中,一个至少两个时延阈值包括从小到 大排列中的时延阈值T1至时延阈值Tm,m为大于1的整数,此时,步骤203中目标时延阈值的调整流程可包括:
301、在第二周期内的第一个第一周期将区间集合中区间的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值。
可以理解的是,首次指的是每一个第二周期的第一个第一周期,在此第一周期确定目标时延阈值按照的规则可以有几种,其一是先按照将最大的时延阈值Tm作为目标时延阈值,然后再根据延时分布值选择对应的时延阈值,也可直接选取时延阈值T1至时延阈值Tm之间某一个值Tx作为目标时延阈值,当然,也可以选取最小的时延阈值T1作为目标时延阈值。
302、统计时延阈值为时延阈值Tx时的第一周期内的读IO请求的第一时延平均值。
其中,x大于1且小于m。
可以理解的是,每一个时延阈值对应一个第一周期,在确定出时延阈值Tx后,就会对此第一周期内的读IO请求都返回时的时延值进行统计,并计算出这些时延值的平均值得到第一时延平均值,该第一时延平均值是衡量是否需要变更目标时延阈值的依据,由于此第一周期是第一个第一周期,因此上一个周期的时延平均值并不存在,此时默认相对上一周期并未发生时延平均值对应的读IO请求的分布恶化的情况,此时延阈值Tx作为此第一周期内读IO请求是否为需要降级读的依据,即将时延阈值Tx作为时延阈值并对所有时延值超过该时延阈值Tx的读IO请求都确定为慢IO,并对这些读IO请求都进行降级读操作。
303、将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-1确认为目标时延阈值;
可以看出,在完成时延阈值为Tx时的第一时延平均值的统计后,可将时延阈值Tx-1确认为目标时延阈值,该时延阈值Tx-1可作为下一第一周期的目标时延阈值。
作为可选的,目标时延阈值的确定流程还可包括:
304、统计时延阈值为时延阈值Tx-1时的第一周期内的读IO请求的第二时延平均值;
可以理解的是,在时延阈值Tx-1时,相当于经过了一个第一周期,读IO请求的时延值发生了变化,此时再次统计得到第二时延平均值,该第二时延平均值是此第一周期中读IO请求都返回的时延值的平均值,此时延阈值Tx-1作为此第一周期内读IO请求是否需要降级读的依据,即将时延阈值Tx-1作为时延阈值并对所有时延值超过该时延阈值Tx-1的读IO请求都确定需要进行降级读,并对这些读IO请求都进行降级读操作。
305、将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-2确认为目标时延阈值。
其中,当第二时延平均值不大于第一时延平均值时,将区间的至少两个时延阈值中的时延阈值Tx-2确认为目标时延阈值。
可以理解的是,在获得第二时延平均值后,为了确认下一第一周期的时延阈值,可将该第二时延平均值与第一时延平均值进行比较,并根据比较的结果对时延阈值进行调整,比如,当第一时延平均值不大于第二时延平均值时,即相对于上一个第一周期,此第一周期中读IO请求的时延值的平均值没有增加,而是保持相等或者有所减小,表示整体上来看读IO请求的分布情况变好,此时可将时延阈值上调一个等级,即调整为比上一个第一周期更小的时延阈值,如将此第一周期的时延阈值Tx-1调整为时延阈值Tx-2,将时延阈值Tx-2作为下一个第一周期的时延阈值。
需要说明的是,当第二时延平均值大于第一时延平均值时,需要进行另外的阈值调整策略。
可选的,该方法还包括:
306、将区间集合中的区间的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值。
可以看出,当第二时延平均值大于第一时延平均值时,表示当前第一周期相对于上一第一周期的情况是恶化的,需要对时延阈值的等 级进行下调,即调整为比上一个第一周期的更大的时延阈值。
作为可选的,目标时延阈值的确定流程还可包括:
307、统计时延阈值为时延阈值Tx时的读IO请求的第三时延平均值;
308、将区间集合中的区间的目标时延阈值确认为Tm或Tx/2-1/2。
其中,对x/2-1/2取整。当第三时延平均值大于第二时延平均值时,表示相对上一个第一周期情况出现恶化。
可以理解的是,此时连续两次出现读IO请求的时延值的分布情况都是恶化时,表示恶化比较严重,此时不会直接将时延阈值仅仅下调一个等级,而是将其调整为最低等级,即至少两个时延阈值中的最大的时延阈值或者是当前时延阈值与最大的时延阈值的中间等级,以期能够更快的调整至实际的时延阈值。
需要说明的是,由于每个区间对应的至少两个时延阈值中的时延阈值的数量是相同的,即具有相同的时延阈值级别数量,在每次更新时延阈值时,调整对象是所有区间,调整的时延阈值的级别的全部按照相同的级别进行调整,举例来说,假设每个至少两个时延阈值具有五个时延阈值,一个区间调整为时延阈值第三时延阈值的级别,则其他所有区间均调整为第三时延阈值的级别。
309、当第三时延平均值不大于第二时延平均值时,将区间集合中区间的目标时延阈值确认为Tx-1。
可以看出,上调目标时延阈值时,不论是连续多少次读IO请求分布情况好于上一第一周期,每次调整仅上调一个级别。
204、监测读IO请求的返回时的时延值。
其中,在设定好各个区间的目标时延阈值后,即可对区间集合的读IO请求进行监控,该监控是以第一周期为单位或者第二周期为单位进行的。
205、读IO请求进行降级读操作。
可以理解是,在确定出目标时延阈值后,即可对超出该目标时延 阈值的读IO请求进行判断,将读IO请求的时延值超出该读IO所属区间对应的目标时延阈值时,该读IO请求确定为超时IO请求,在确定出这些超时IO请求之后,即可对这些超时IO请求进行降级读操作。
作为可选的,步骤205具体可包括:
根据降级读的读IO请求的指示从存储设备中的硬盘读取数据。
其中,硬盘中存储有超时IO请求指示的数据,该硬盘与超时IO请求中指示的RAID中的硬盘不相同。
可以理解的是,对于RAID0和RAID10来说,RAID存储方式每一数据在RAID中的至少两块硬盘上存储,该硬盘可以是机械硬盘,也可以是SSD,在读IO请求被确定为需要降级读时,则从存储设备中另外一个存储有该读IO请求指示的数据的硬盘上读取数据,由于读取的路径发生改变,一般来说读取数据会先于正常执行读IO请求,但是实际情况受限于降级读指示的硬盘的负荷,降级读也不一定先于正常读。
可以看出,本发明实施例中将读IO请求按照大小分别属于不同的区间,区间为该区间内的读IO请求的大小的取值范围,每一区间内的读IO请求中具有大致类似的大小,而后为每个区间均设置目标时延阈值,该目标时延阈值可以按照预设的阈值调整策略进行调整,如可根据每次的统计的读IO请求的时延平均值从至少两个时延阈值中选取一个作为目标时延阈值或者对目标时延阈值直接更新,而后在对一个区间内的读IO请求进行判断时,通过该该区间的目标时延阈值丢该读IO请求是否进行降级读进行判断,当该读IO请求超出该区间的目标时延阈值时,进行降级读操作,可以看出,目标时延阈值在运行过程中并非一直不变的,而是根据不同的读IO请求分布情况选择对应的至少两个时延阈值中确定的目标时延阈值或者直接对目标时延阈值直接更新,从而能够有效减小系统平均时延,提升采用本发明实施例的RAID的QoS,将SSD的RAID性能最大限度的利用,从而提高RAID的IO性能。
需要说明的是,读IO请求之中的超时IO请求虽然会延时一段时 间返回数据,但是仍旧会通过正常读取数据,该降级读操作会通过另外一条途径读取同样的数据,对于系统来说,需要对两种途径读取的数据进行取舍。
作为可选的,方法还包括:
将执行读IO请求返回的数据和通过降级读该读IO请求返回的数据中先返回的数据确定为慢IO的返回数据。
可以理解的是,本发明实施例采取的方式是,两者时间上先返回作为返回数据,而另外一个则采用忽略或者丢弃的方式进行处理,能够避免资源的浪费,同时提高系统响应速度。
上面对本发明实施例的数据读取方法进行了介绍,下面以一个具体的例子对数据读取方法进行介绍。
在接收到主机下发的读IO请求后,按照区间范围4kb对所有的读IO请求进行区间划分,例如划分为10个区间,即区间1至区间10,此时划分的区间1至区间10的区间范围依次为0kb至4kb、4kb至8kb、8kb至12kb、12kb至16kb、16kb至20kb、20kb至24kb、24kb至28kb、28kb至32kb、32kb至36kb、36kb至40kb等等。
针对区间范围4kb,可设置时延阈值数量为10个的至少两个时延阈值,按照从小到大进行排列,具体对应到T1至T10共十个级别,例如对于区间1来说,设置a1至a10共10个时延阈值,对于区间2来说,设置b1至b10共10个时延阈值,对于区间3来说,设置c1至c10共10个时延阈值,对于区间4来说,设置d1至d10共10个时延阈值,对于区间5来说,设置e1至e10共10个时延阈值,对于区间6来说,设置f1至f10共10个时延阈值,对于区间7来说,设置g1至g10共10个时延阈值,对于区间8来说,设置h1至h10共10个时延阈值,对于区间9来说,设置i1至i10共10个时延阈值,对于区间10来说,设置j1至j10共10个时延阈值,具体可参见下表1:
表1
Figure PCTCN2016111082-appb-000001
其中,T1至T10共十个级别分别对应0.1%至1%的慢IO,其中T10对应99.9%的IO都返回时对应的时延平均值的2倍,T9对应99.8%的IO都返回时对应的时延的2倍;T8对应99.7%的IO都返回时对应的时延的2倍;T7对应99.6%的IO都返回时对应的时延平均值的2倍,T6对应99.5%的IO都返回时对应的时延的2倍;T5对应99.4%的IO都返回时对应的时延的2倍;T4对应99.3%的IO都返回时对应的时延平均值的2倍,T3对应99.2%的IO都返回时对应的时延的2倍;T2对应99.1%的IO都返回时对应的时延的2倍;Ti对应99.0%的IO都返回时对应的时延的2倍。
可以理解的是,具体时延阈值可根据实测数据,在2倍微调的基础上做微调:x+*%的IO均返回对应的时延*2。注:这里x表示2倍的基础值,是一个固定值。
具体的一个区间对应具有多少个时延阈值的至少两个时延阈值可按照一个大周期进行刷新,即相当于系统中为每一种区间划分均对应设置了多个至少两个时延阈值,每一至少两个时延阈值中的时延阈 值的数量可以相同或者不相同。
下面对具体的调整过程进行介绍,以单个区间的读IO请求的调整为例,多个区间的调整为同时调整同一级别的时延阈值,与单个区间的调整类似,对于单个区间的IO,其时延阈值先采用最大的时延阈值,比如时延阈值T10,先把大于T10这个阈值没返回的读IO请求识别为慢IO(T10对应0.1%的IO),经过一定周期后,此处为一个第一周期,得到该周期内所有读IO请求都返回的一个延时分布情况,以及读IO请求都返回的时延值的平均值,即T10的时延平均值,该T10的时延平均值能够反映T10时的延时分布情况,并将下一个第一周期的时延阈值调整为T9。在下一个第一周期,即时延阈值T9的第一周期内,重复上面的过程,并统计该周期内所有IO的时延分布情况以及T9的时延平均值:如果T9的时延平均值不大于T10的时延平均值,即分布情况变好好或者没有明显的变化,可以将接下来一个第一周期的时延阈值设置为时延阈值T8,继续接下来一个第一周期的处理,重复上述处理过程,得到分布情况以及T8的时延平均值。
如果T8的时延平均值大于T9的时延平均值时,表示这个第一周期的时延分布情况明显比上一个周期恶化,则将下一个第一周期的时延阈值调整为时延阈值T9;在下一个第一周期,重复上述处理过程,得到分布情况以及第二个T9的时延平均值,并将下一个第一周期的时延阈值调整为时延阈值T8。下一个第一周期内,统计该周期内所有IO的时延分布情况以及第二个T8的时延平均值。如果第二个T8的时延平均值大于第二个T9的时延平均值,表示这个第一周期的时延分布情况明显比T9周期恶化,则此时重新从T10开始慢IO的识别处理或者折半处理,折半处理即如果当前的阈值是T1,则回退到T5。此时最优的时延阈值就是T9,在继续从T10到T1周期轮转过程中,如果没有找到比T9更优的阈值,就一直使用该阈值T9。如果找到更优的阈值,则更新识别慢IO的基准值为该更优的阈值。若极端情况下,T8的时延分布情况一直比T9的恶化,那么将一直使用T9作为判断慢IO的基准值。以此方式完成预定次数的时延阈值的变 更次数值,完成一个第二周期。
上面对本发明实施例的数据读取方法进行了介绍,下面对本发明实施例的RAID控制器进行介绍,请参阅图4,图4是本发明实施例的RAID控制器的一个实施例图,该RAID控制器4可包括:
接收模块401,用于接收主机下发的读输入输出IO请求;
其中,该接收模块401可以实现图2所示实施例中步骤201。
确定模块402,用于根据读IO请求的大小确定读IO请求所属的区间集合中的区间,区间集合包括至少两个区间,区间集合中的区间为预先根据IO请求的大小划分的,区间集合中的每个区间对应目标时延阈值;
其中,该确定模块402可以实现图2所示实施例中步骤202,具体的读IO请求的区间分配与图2所示实施例中针对步骤202的说明类似,此处不再赘述。
调整模块403,用于每隔预设的第一周期按照预设的阈值调整策略调整区间集合中的区间的目标时延阈值;
其中,调整模块403可以实现图2所示实施例中步骤203,具体的目标时延阈值的调整方式与图2所示实施例中步骤203类似,此处不再赘述。
监测模块404,用于监测读IO请求的返回时的时延值;
其中,该监测模块404可以实现图2所示实施例中步骤204,该监控是以第一周期为单位或者第二周期为单位进行的。
降级读模块405,用于确定读IO请求的时延值超出读IO请求所属区间对应的目标时延阈值时,对读IO请求进行降级读操作。
其中,该监测模块405可以实现图2所示实施例中步骤205,即可对超出该目标时延阈值的读IO请求进行判断,将读IO请求的时延值超出该读IO所属区间对应的目标时延阈值时,该读IO请求确定为超时IO请求,在确定出这些超时IO请求之后,即可对这些超时IO请求进行降级读操作。
可以看出,首先通过接收模块401接收主机下发的读IO请求, 而后由确定模块402确定该读IO请求具体所属的区间,该区间对应有目标时延阈值,该目标时延阈值是由调整模块403按照每隔预设的第一周期根据预设的阈值调整策略进行调整得到的,而后监测模块404会对该读IO请求的返回时的时延值进行监测,当该时延值超过该读IO请求所属区间对应的目标时延值时,标识该由降级读模块405对该读IO请求进行降级读操作,可以看出,目标时延阈值在运行过程中并非一直不变的,而是根据不同的读IO请求分布情况选择对应的至少两个时延阈值中确定的目标时延阈值或者直接对目标时延阈值直接更新,从而能够有效减小系统平均时延,提升采用本发明实施例的RAID的QoS,将SSD的RAID性能最大限度的利用,从而提高RAID的IO性能。
可选的,区间集合中的每个区间对应至少两个时延阈值,此时调整模块403可具体用于:
每隔预设的第一周期按照预设的阈值调整策略从区间集合中的区间的至少两个时延阈值中所选择出目标时延阈值。
其中,调整模块403的具体调整方式可以是按照预设的阈值调整策略从每个区间对应的至少两个大小不同的时延阈值中选取的一个作为目标时延阈值,具体的两种调整方式与图2所示实施例步骤203中的两种调整方式类似,此处不再赘述。
需要说明的是,除了上述预设至少两个时延阈值,并选择选取一个作为目标时延阈值之外,还可按照预设的阈值调整策略直接更新目标时延阈值,而非实现预设多个并从中选择。
可选的,调整模块403还具体用于:
计算当前第一周期内的主机下发的读IO请求的时延值的时延平均值;
根据时延平均值从区间集合中的区间的至少两个时延阈值中调整目标时延阈值。
可以看出,具体的阈值调整策略可以是先计算当前第一周期内的读IO请求的时延值的时延平均值,而后以该时延平均值为基础,从 区间的至少两个时延阈值中调整目标时延阈值,由于时延平均值反应读IO请求的分部情况,因此按照时延平均值进行调整能够达到符合预期变化的目的。具体的时延平均值的调整策略与图2所示实施例中步骤203的说明中时延平均值的调整策略类似,此处不再赘述。
可选的,至少两个时延阈值包括从小到大排列中的时延阈值T1至时延阈值Tm,m为大于1的整数,调整模块403还具体用于:
在第二周期内的第一个第一周期将区间集合中区间的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值,第二周期包括至少两个第一周期;
统计时延阈值为时延阈值Tx时的第一周期内的读IO请求的第一时延平均值,x大于1且小于m的整数;
将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-1确认为目标时延阈值。
可以看出,上述是针对一个区间进行的说明,在上述区间具有m个时延阈值时,区间集合内其他区间同样具有m个时延阈值,相当于区间集合内的区间的时延阈值均分为了m个级别,每次进行调整时,是对所有区间的时延阈值进行统一调整,如其中一个区间调整至m-3级别,所有区间均调整为m-3级别。具体的通过时延平均值对比的调整策略与图3所示实施例中步骤301、步骤302和步骤303的中通过时延平均值对比的调整策略类似,此处不再赘述。
可选的,调整模块403还可用于:
统计时延阈值为时延阈值Tx-1时的第一周期内的读IO请求的第二时延平均值;
当第二时延平均值不大于第一时延平均值时,将区间集合中的区间的至少两个时延阈值中的时延阈值Tx-2确认为下一第一周期的目标时延阈值。
可以看出,若当前第一周期相对于上一第一周期的时延平均值变小或者相等,则表示读IO请求的分部情况并未发生恶化,此时会将目标延时阈值调小,以符合当前读IO请求分布情况的变化趋势。具 体的通过时延平均值对比的调整策略与图3所示实施例中步骤304和步骤305的中通过时延平均值对比的调整策略类似,此处不再赘述。
可选的,调整模块403还可用于:
当第二时延平均值大于第一时延平均值时,将区间集合中的区间的至少两个时延阈值中的时延阈值Tx确认为下一第一周期的目标时延阈值。
可以看出,若当前第一周期相对于上一第一周期的时延平均值变大,则表示读IO请求的分部情况发生恶化,此时会将目标延时阈值调大,以符合当前读IO请求分布情况的变化趋势。具体的通过时延平均值对比的调整策略与图3所示实施例中步骤306的中通过时延平均值对比的调整策略类似,此处不再赘述。
下面对本发明实施例中RAID控制器的结构进行描述,请参阅图5,图5是本发明实施例的RAID控制器的一个实施例图,其中,RAID控制器5可包括均与总线相连接的至少一个RAID处理器501、至少一个通信接口502和至少一个硬盘接口503,本发明实施例涉及的RAID控制器5可以具有比图5所示出的更多或更少的部件,可以组合两个或更多个部件,或者可以具有不同的部件配置或设置,各个部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件或硬件和软件的组合实现。
具体的,对于图4所示的实施例来说,该RAID处理器501能实现图4所示实施例中确定模块402、调整模块403、监测模块404和降级读模块405的功能,该通信接口502能实现图4所示实施例中的接收模块401的功能,该硬盘接口503能实现该RAID控制器向磁盘发送降级读的指令或者读IO请求的正常读取指令。其中,硬盘接口503可包括多种类型,例如SCSI接口、和串行高级技术附件(Serial Advanced Technology Attachment,SATA)接口等。
上面对采用本发明实施例的RAID控制器进行了介绍,下面对采用本发明实施例的RAID控制器的存储设备进行介绍,请参阅图6,图6是本发明实施例的存储设备的一个实施例图,该存储设备可包括 至少两块硬盘602与至少两块硬盘均通信连接的RAID控制器601,其中,该RAID控制器601能够运行存储于该RAID控制器601中的计算机执行指令以实现图2所示实施例中步骤201至步骤205。
其中,在上述存储设备6中,RAID控制器601还会对硬盘602进行识别,若发现并非预设的硬盘,例如硬盘602上设置一个识别码,RAID控制器601对应有识别码范围,只要发现接入的硬盘602没有这种识别码或者识别码不在RAID控制器601的识别码范围内,则该硬盘602无法接入磁盘阵列中。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于 这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (14)

  1. 一种数据读取方法,其特征在于,包括:
    接收主机下发的读输入输出IO请求;
    根据所述读IO请求的大小确定所述读IO请求所属的区间集合中的区间,所述区间集合包括至少两个区间,所述区间集合中的区间为预先根据IO请求的大小划分的,所述区间集合中的每个区间对应目标时延阈值;
    每隔预设的第一周期按照预设的阈值调整策略调整所述区间集合中的区间的目标时延阈值;
    监测所述读IO请求的返回时的时延值;
    确定所述读IO请求的时延值超出所述读IO请求所属区间对应的目标时延阈值时,对所述读IO请求进行降级读操作。
  2. 根据权利要求1所述的数据读取方法,其特征在于,所述区间集合中的每个区间对应至少两个时延阈值,所述每隔预设的第一周期按照预设的阈值调整策略调整所述区间集合中的区间的时延阈值具体为:
    每隔预设的第一周期按照预设的阈值调整策略从所述区间集合中的区间的至少两个时延阈值中所选择出目标时延阈值。
  3. 根据权利要求2所述的数据读取方法,其特征在于,每隔预设的第一周期按照预设的阈值选取策略从所述区间集合中的区间的至少两个时延阈值中所选择出目标时延阈值包括:
    计算当前第一周期内的主机下发的所述读IO请求的时延值的时延平均值;
    根据所述时延平均值从所述区间集合中的区间的至少两个时延阈值中调整所述目标时延阈值。
  4. 根据权利要求3所述的数据读取方法,其特征在于,所述至少两个时延阈值包括从小到大排列的时延阈值T1至时延阈值Tm,m为大于1的整数,所述根据所述时延平均值从所述区间集合中的区间 的时延阈值中确定下一第一周期的目标时延阈值包括:
    在第二周期内的第一个第一周期将所述区间集合中区间的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值,所述第二周期包括至少两个第一周期;
    统计所述时延阈值为时延阈值Tx时的第一周期内的读IO请求的第一时延平均值,x大于1且小于m的整数;
    将所述区间集合中的区间的至少两个时延阈值中的时延阈值Tx-1确认为目标时延阈值。
  5. 根据权利要求4所述的数据读取方法,其特征在于,所述方法还包括:
    统计所述时延阈值为时延阈值Tx-1时的第一周期内的读IO请求的第二时延平均值;
    当所述第二时延平均值不大于所述第一时延平均值时,将所述区间集合中的区间的至少两个时延阈值中的时延阈值Tx-2确认为目标时延阈值。
  6. 根据权利要求5所述的数据读取方法,其特征在于,所述方法还包括:
    当所述第二时延平均值大于所述第一时延平均值时,将所述区间集合中的区间的至少两个时延阈值中的时延阈值Tx确认为下一第一周期的目标时延阈值。
  7. 一种RAID控制器,其特征在于,包括:
    接收模块,用于接收主机下发的读输入输出IO请求;
    确定模块,用于根据所述读IO请求的大小确定所述读IO请求所属的区间集合中的区间,所述区间集合包括至少两个区间,所述区间集合中的区间为预先根据IO请求的大小划分的,所述区间集合中的每个区间对应目标时延阈值;
    调整模块,用于每隔预设的第一周期按照预设的阈值调整策略调整所述区间集合中的区间的目标时延阈值;
    监测模块,用于监测所述读IO请求的返回时的时延值;
    降级读模块,用于确定所述读IO请求的时延值超出所述读IO请求所属区间对应的目标时延阈值时,对所述读IO请求进行降级读操作。
  8. 根据权利要求7所述的RAID控制器,其特征在于,所述区间集合中的每个区间对应至少两个时延阈值,所述调整模块具体用于:
    每隔预设的第一周期按照预设的阈值调整策略从所述区间集合中的区间的至少两个时延阈值中所选择出目标时延阈值。
  9. 根据权利要求8所述的RAID控制器,其特征在于,所述调整模块具体用于:
    计算当前第一周期内的主机下发的所述读IO请求的时延值的时延平均值;
    根据所述时延平均值从所述区间集合中的区间的至少两个时延阈值中调整所述目标时延阈值。
  10. 根据权利要求9所述的RAID控制器,其特征在于,所述至少两个时延阈值包括从小到大排列中的时延阈值T1至时延阈值Tm,m为大于1的整数,所述调整模块具体用于:
    在第二周期内的第一个第一周期将所述区间集合中区间的至少两个时延阈值中的时延阈值Tx确认为目标时延阈值,所述第二周期包括至少两个第一周期;
    统计所述时延阈值为时延阈值Tx时的第一周期内的读IO请求的第一时延平均值,x大于1且小于m的整数;
    将所述区间集合中的区间的至少两个时延阈值中的时延阈值Tx-1确认为目标时延阈值。
  11. 根据权利要求10所述的RAID控制器,其特征在于,所述调整模块还用于:
    统计所述时延阈值为时延阈值Tx-1时的第一周期内的读IO请求的第二时延平均值;
    当所述第二时延平均值不大于所述第一时延平均值时,将所述区 间集合中的区间的至少两个时延阈值中的时延阈值Tx-2确认为下一第一周期的目标时延阈值。
  12. 根据权利要求11所述的RAID控制器,其特征在于,所述调整模块还用于:
    当所述第二时延平均值大于所述第一时延平均值时,将所述区间集合中的区间的至少两个时延阈值中的时延阈值Tx确认为下一第一周期的目标时延阈值。
  13. 一种RAID控制器,其特征在于:包括RAID处理器和内存,与所述RAID处理器连接的用于连接硬盘的硬盘接口,与外部主机通信的通信接口,所述内存中存储有计算机执行指令,所述RAID处理器运行所述内存中的计算机执行指令以执行权利要求1至权利要求6中任一项所述的数据读取方法。
  14. 一种存储设备,其特征在于,包括至少两块硬盘和与所述至少两块硬盘均通信连接的RAID控制器,所述RAID控制器运行所述存储于所述RAID控制器中的计算机执行指令以执行权利要求1至权利要求6中任一项所述的数据读取方法。
PCT/CN2016/111082 2015-12-30 2016-12-20 一种数据读取方法、raid控制器及存储设备 WO2017114232A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511026599.7 2015-12-30
CN201511026599.7A CN106933495B (zh) 2015-12-30 2015-12-30 一种数据读取方法、raid控制器及存储设备

Publications (1)

Publication Number Publication Date
WO2017114232A1 true WO2017114232A1 (zh) 2017-07-06

Family

ID=59225663

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111082 WO2017114232A1 (zh) 2015-12-30 2016-12-20 一种数据读取方法、raid控制器及存储设备

Country Status (2)

Country Link
CN (1) CN106933495B (zh)
WO (1) WO2017114232A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399748A (zh) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 一种数据放置方法、装置和计算机可读存储介质
CN113911139A (zh) * 2021-11-12 2022-01-11 湖北芯擎科技有限公司 车辆控制方法、装置和电子设备
EP4056424A1 (en) * 2021-05-26 2022-09-14 Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Audio signal playback delay estimation for smart rearview mirror

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762685B (zh) * 2018-06-04 2021-06-22 平安科技(深圳)有限公司 Io挂死识别方法、装置、计算机装置及存储介质
CN108984121B (zh) * 2018-07-03 2021-04-20 深圳忆联信息系统有限公司 保障请求优先级的方法、装置及计算机设备
CN109358814A (zh) * 2018-10-17 2019-02-19 天津易众腾动力技术有限公司 一种eeprom存贮的方法
CN110287158B (zh) * 2019-05-05 2023-05-26 平安科技(深圳)有限公司 监测分布式文件系统io时延的方法、装置及存储介质
US11023138B2 (en) * 2019-06-28 2021-06-01 Western Digital Technologies, Inc. Management operations in predictable latency mode

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8255739B1 (en) * 2008-06-30 2012-08-28 American Megatrends, Inc. Achieving data consistency in a node failover with a degraded RAID array
CN103019623A (zh) * 2012-12-10 2013-04-03 华为技术有限公司 存储盘处理方法及装置
CN103699340A (zh) * 2013-12-16 2014-04-02 华为数字技术(苏州)有限公司 一种请求处理方法及设备
CN104991738A (zh) * 2015-06-19 2015-10-21 华中科技大学 一种固态盘及其读写操作方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9262321B2 (en) * 2011-11-17 2016-02-16 International Business Machines Corporation Adjustment of destage rate based on read and write response time requirements
CN103744623A (zh) * 2014-01-10 2014-04-23 浪潮电子信息产业股份有限公司 一种实现存储系统ssd缓存的数据智能降级的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8255739B1 (en) * 2008-06-30 2012-08-28 American Megatrends, Inc. Achieving data consistency in a node failover with a degraded RAID array
CN103019623A (zh) * 2012-12-10 2013-04-03 华为技术有限公司 存储盘处理方法及装置
CN103699340A (zh) * 2013-12-16 2014-04-02 华为数字技术(苏州)有限公司 一种请求处理方法及设备
CN104991738A (zh) * 2015-06-19 2015-10-21 华中科技大学 一种固态盘及其读写操作方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399748A (zh) * 2019-01-02 2020-07-10 中国移动通信有限公司研究院 一种数据放置方法、装置和计算机可读存储介质
CN111399748B (zh) * 2019-01-02 2023-09-05 中国移动通信有限公司研究院 一种数据放置方法、装置和计算机可读存储介质
EP4056424A1 (en) * 2021-05-26 2022-09-14 Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Audio signal playback delay estimation for smart rearview mirror
CN113911139A (zh) * 2021-11-12 2022-01-11 湖北芯擎科技有限公司 车辆控制方法、装置和电子设备
CN113911139B (zh) * 2021-11-12 2023-02-28 湖北芯擎科技有限公司 车辆控制方法、装置和电子设备

Also Published As

Publication number Publication date
CN106933495A (zh) 2017-07-07
CN106933495B (zh) 2019-07-23

Similar Documents

Publication Publication Date Title
WO2017114232A1 (zh) 一种数据读取方法、raid控制器及存储设备
TWI740110B (zh) 在固態儲存驅動器陣列中的工作量適應超容量快取
US10614888B2 (en) Memory system that selectively writes in single-level cell mode or multi-level cell mode to reduce program/erase cycles
US9652159B2 (en) Relocating data in tiered pool using multiple modes of moving data
CN108292195B (zh) 用于管理固态驱动器的操作特性的技术
US11138124B2 (en) Migrating data between block pools in a storage system
US10552288B2 (en) Health-aware garbage collection in a memory system
US11762569B2 (en) Workload based relief valve activation for hybrid controller architectures
JP6007667B2 (ja) 情報処理装置、情報処理方法、及び情報処理プログラム
US9542125B1 (en) Managing data relocation in storage systems
US9496051B2 (en) Efficient raid technique for reliable SSD
US20130262762A1 (en) Storage system and storage control method
US20180300066A1 (en) Method and device for managing disk pool
US20150081967A1 (en) Management of storage read requests
US20190347026A1 (en) Positional indexing for a tiered data storage system
US20190065404A1 (en) Adaptive caching in a storage device
US9015373B2 (en) Storage apparatus and method of controlling storage apparatus
Wang et al. {BCW}:{Buffer-Controlled} Writes to {HDDs} for {SSD-HDD} Hybrid Storage Server
US20120290789A1 (en) Preferentially accelerating applications in a multi-tenant storage system via utility driven data caching
JP2022539788A (ja) 読出しヒート・データ分離をサポートしている書込みキャッシュ・アーキテクチャ内でのデータ配置
US9946484B2 (en) Dynamic routing of input/output requests in array systems
CN114286989B (zh) 一种固态硬盘混合读写的实现方法以及装置
US10664412B2 (en) Performance booster with resolution of picket-fence I/O flushing in a storage system with heterogeneous I/O workloads
US10254814B2 (en) Storage system bandwidth determination
WO2022067686A1 (zh) 一种应用于固态硬盘ssd的数据读取方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16881021

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16881021

Country of ref document: EP

Kind code of ref document: A1