WO2017054690A1 - Method and device for detecting slow disk - Google Patents

Method and device for detecting slow disk Download PDF

Info

Publication number
WO2017054690A1
WO2017054690A1 PCT/CN2016/100133 CN2016100133W WO2017054690A1 WO 2017054690 A1 WO2017054690 A1 WO 2017054690A1 CN 2016100133 W CN2016100133 W CN 2016100133W WO 2017054690 A1 WO2017054690 A1 WO 2017054690A1
Authority
WO
WIPO (PCT)
Prior art keywords
hard disk
preset period
different types
service time
disk
Prior art date
Application number
PCT/CN2016/100133
Other languages
French (fr)
Chinese (zh)
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 WO2017054690A1 publication Critical patent/WO2017054690A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a slow disk detection method and apparatus.
  • a disk array system may include a plurality of Redundant Array of Independent Disks (RAID), and the RAID is a disk group (logic) formed by combining a plurality of independent hard disks (physical hard disks) in different manners. hard disk).
  • RAID Redundant Array of Independent Disks
  • the RAID is a disk group (logic) formed by combining a plurality of independent hard disks (physical hard disks) in different manners. hard disk).
  • the input/output (I/O) response time of the hard disk needs to be monitored periodically or irregularly to respond to I/O. The time determines the slow disk, and then implements RAID reconfiguration, hard disk isolation, and the like for the slow disk.
  • the method of detecting the slow disk is mostly to set a threshold.
  • the hard disk In a certain period of time or a plurality of identical time periods, if the average service time of the I/O request of the hard disk reaches the threshold, the hard disk is determined to be Slow disk.
  • the average service time of the I/O request is the average of the n I/O response times sent in the time period.
  • the I/O request access pressure is different, and the same slow disk threshold cannot meet various service requirements.
  • the I/O response time is also different, making the same slow disk.
  • the threshold cannot adapt to different types of hard Disks and even hard disks have different degrees of aging after different service hours. If the same slow disk threshold is used, the real problematic hard disk cannot be accurately located. Therefore, the accuracy of this slow disk detection method is not accurate. low.
  • the embodiment of the invention provides a slow disk detection method and device, which can solve the problem of low accuracy of slow disk detection.
  • a method for detecting a slow disk including:
  • the slow disk in the next preset period is determined according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period.
  • the obtaining an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period includes:
  • the obtaining an average service time of an I/O request corresponding to each hard disk in the current preset period includes:
  • the obtaining an average service time of an I/O request corresponding to each hard disk in the current preset period includes:
  • the method according to each of the different types of hard disks includes:
  • AvgT Average service time of the I/O request corresponding to any type of hard disk of different types of hard disks
  • AvgT X1*Z1+X2*Z2+...Xn*Zn
  • X1 represents any of the types.
  • the average value of the first hard disk in the hard disk Z1 indicates the ratio corresponding to the first hard disk
  • X2 indicates the average value corresponding to the second hard disk in the hard disk of any type
  • Z2 indicates the first
  • Xn represents the average value corresponding to the nth hard disk in the hard disk of any type
  • Zn represents the ratio corresponding to the nth hard disk.
  • the average service time and the preset value of the I/O request according to different types of hard disks are The relationship between the slow disk thresholds corresponding to different types of hard disks in the next preset period is as follows:
  • the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
  • the method further includes:
  • the slow disks in different types of hard disks are determined according to the initial thresholds corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
  • a device for slow disk detection including:
  • the obtaining unit is configured to obtain an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period;
  • the obtaining unit is further configured to obtain, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period;
  • a determining unit configured to determine, according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period, the slow disks in the next preset period.
  • the acquiring unit is specifically configured to:
  • the acquiring unit is specifically configured to:
  • the acquiring unit is specifically configured to:
  • the obtaining unit is specifically configured to:
  • the acquiring unit is specifically configured to:
  • AvgT Average service time of the I/O request corresponding to any type of hard disk of different types of hard disks
  • AvgT X1*Z1+X2*Z2+...Xn*Zn
  • X1 represents any of the types.
  • the average value of the first hard disk in the hard disk Z1 indicates the ratio corresponding to the first hard disk
  • X2 indicates the average value corresponding to the second hard disk in the hard disk of any type
  • Z2 indicates the first
  • Xn represents the average value corresponding to the nth hard disk in the hard disk of any type
  • Zn represents the ratio corresponding to the nth hard disk.
  • the acquiring unit is specifically configured to:
  • the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
  • the determining unit is also used to:
  • the slow disks in different types of hard disks are determined according to the initial thresholds corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
  • the embodiment of the invention provides a slow disk detection method and device, which acquires an average service time of input and output I/O requests corresponding to different types of hard disks in a current preset period, and then according to I/O requests corresponding to different types of hard disks.
  • the relationship between the average service time and the preset value is obtained by the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I corresponding to each hard disk in the next preset period.
  • the average service time of the /O request determines the slow disk in the next preset period. Therefore, the present invention can determine the slow disk of the next preset period according to the average service time of different types of hard disks in the current preset period.
  • Threshold which can make different slow disk thresholds for different types of hard disks due to different I/O service time, and also because I/O response time of different service types of hard disks is different, I/ of hard disks with different service years.
  • the response time of O is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent to the hard disk in the system.
  • different types of differentiated slow disk thresholds of the present invention can also adapt to different service types and different service years of hard disks, and can solve slow disks according to different hard disk types, different service types, and different service years of hard disks.
  • the problem of low accuracy is improved, and the accuracy of slow disk detection is improved.
  • FIG. 1 is a schematic flowchart of a slow disk detecting method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a slow disk detecting method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a slow disk detection apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a slow disk detection apparatus according to an embodiment of the present invention.
  • the embodiment of the present invention provides a slow disk detection method.
  • the execution body of the embodiment is a processing device for detecting a slow disk.
  • the device may be implemented by using hardware and/or software.
  • the processing device may be configured to be loaded.
  • On the array system of the hard disk it is convenient to detect the hard disk in the array system, as shown in Figure 1, including:
  • the device for slow disk detection may first determine the type of the hard disk in the array system.
  • the hard disk type may include Solid State Drives (SSD), Serial Attached Small Computer System Interface (SAS), and Near Line SAS (Near Line_SAS, NL_SAS) and Serial Advanced Technology Attachment (SATA), etc., and then obtain the average service time of I/O requests for each type of hard disk in the current preset period.
  • SSD Solid State Drives
  • SAS Serial Attached Small Computer System Interface
  • SAS Near Line SAS
  • SATA Serial Advanced Technology Attachment
  • the average service time of the I/O request refers to the average response time of multiple I/O requests received within 1 s of the single hard disk.
  • the response time of the I/O request refers to the hard disk from the hard disk. The time until the end of the service is reached when the received I/O request arrives at the array system.
  • the average service time of the I/O requests of each type of hard disk in the current preset period is obtained.
  • the preset period may be one hour or other values, which is not limited in this application.
  • Average service time and pre-payment according to I/O requests corresponding to different types of hard disks Set the value to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period.
  • the I/O response time of one or several hard disks is larger than the weighted average of the I/O response time of other hard disks in the array system, and the numerical value shows a multiple trend, then This hard disk or these hard disks is considered as a slow disk, that is, the concept of a slow disk is to make a horizontal comparison with all other hard disks.
  • the determination of the slow disk threshold may be that different types of hard disks pass the weighting.
  • the algorithm obtains the average service time of the I/O request corresponding to different types, that is, the weighted average value, so that when the average service time of the I/O request of the hard disk can be a multiple of the weighted average value of the hard disk of the type to which the hard disk belongs, Slow disk.
  • the slow disk threshold corresponding to the different types of hard disks in the next preset period may be obtained according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value.
  • the preset value here may be set to 10 according to experience, and may of course be other values, which is not limited in this application.
  • the average service time of the I/O request according to the fixed time of each hard disk may be slower than the hard disk of the type of the hard disk.
  • the disk threshold is compared. If the average service time of the I/O request of any hard disk is greater than or equal to the slow disk threshold of the disk of the type to which it belongs, it can be determined that the hard disk is a slow disk.
  • the certain time here refers to the average service time of the I/O request received by any hard disk in a certain period of time at a certain time in the next preset period. For example, the certain time is 5 minutes, and the preset period is one. hour.
  • the embodiment of the present invention provides a slow disk detection method, which obtains an average service time of input and output I/O requests corresponding to different types of hard disks in a current preset period, and then averages the I/O requests corresponding to different types of hard disks.
  • the relationship between the service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to different types.
  • the slow disk threshold corresponding to the hard disk and the average service time of the I/O request corresponding to each hard disk in the next preset period determine the slow disk in the next preset period, and thus, the present invention can be different according to the current preset period.
  • the average service time of the type of hard disk determines the slow disk threshold of the next preset period, so that different types of hard disks can be differentiated from the slow disk threshold due to the different service time of the I/O, and also the different services of the hard disk.
  • the I/O response time of the type is different, and the response time of the I/O of the hard disk of different service years is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent.
  • Different types of differentiated slow disk thresholds of the present invention can also be adapted to hard disks of different service types and different service years, and can be hard disks according to different hard disk types, different service types, and different service years. The difference solves the problem of low accuracy of slow disk detection and improves the accuracy of slow disk detection.
  • An embodiment of the present invention provides a slow disk detection method, as shown in FIG. 2, including:
  • the slow disk threshold of different types of hard disks in the first preset period may be determined according to a preset initial threshold, which may be determined according to test data and current network service conditions, for example, a preset period, for example. Can be an hour or so.
  • the average service time of the I/O request of any one of the hard disks may be an average of the response time of the I/O request of the hard disk for a period of time, and the time may be, for example, 5 minutes, that is, every 5 minutes.
  • the average service time of the I/O request of any hard disk is compared with the initial threshold of the hard disk of the type to which it belongs. If it is greater than the initial threshold, it is determined to be a slow disk.
  • the average service time of the input/output I/O request corresponding to the different types of hard disks in the current preset period can be obtained by the weighting calculation, which can be implemented by step 202 to step 204.
  • the sum of the response times of the I/O requests received by each hard disk in the current preset period may be obtained, and the number of I/O requests corresponding to each hard disk in the current preset period according to the sum of the response times
  • the ratio of the average value Xn of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained.
  • the average service time of the I/O request is the average of the response times of the Z I/O requests received per unit time (for example, 1 s)
  • adds the response time of each I/O request of M adds the sum and divides by a single hard disk.
  • the number of I/O requests received in the current preset period is the average value Xn of the average service time of the I/O requests corresponding to a single hard disk in the current preset period.
  • the sum of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained, and the current preset is obtained according to the ratio of the average service time to the number of unit time.
  • the average value Xn of the average service time of the I/O request corresponding to each hard disk in the cycle For example, if the unit time is 1 s and the preset period is one hour, then for a single hard disk, the average service time of each I/O per 1 s can be added in one hour, and then divided by 3600 s to get the current preset.
  • the average value Xn of the average service time of the I/O request corresponding to a single hard disk in the cycle is if the unit time is 1 s and the preset period is one hour, then for a single hard disk, the average service time of each I/O per 1 s can be added in one hour, and then divided by 3600 s to get the current preset.
  • the number Yn of I/O requests received in the current preset period may be counted, and for each type of hard disk, the I received by all the hard disks in each type. The number of /O requests is added to obtain the total amount of I/O requests for each type of hard disk, and then, for one type of hard disk, the I/O received by the single hard disk in this type is received within the current preset period.
  • the number of O requests Yn occupies the corresponding type of this type
  • the average value and the ratio of each of the different types of hard disks may be weighted to obtain an average service time of the I/O request corresponding to different types of hard disks in the current preset period.
  • AvgT Average service time of the I/O request corresponding to any type of hard disk of different types of hard disks
  • AvgT X 1 *Z 1 +X 2 *Z 2 +...X n *Z n
  • X 1 represents an average value corresponding to the first hard disk of any one of the hard disks
  • Z 1 represents a ratio corresponding to the first hard disk
  • X 2 represents a second hard disk of the hard disk of any type.
  • Z 2 represents the ratio corresponding to the second hard disk
  • X n represents the average value corresponding to the nth hard disk in the hard disk of any type
  • Z n represents the corresponding nth hard disk. ratio.
  • the hard disk with high I/O pressure has higher weight in the hard disk of its own type.
  • the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value may be a product, and the preset value may be, for example, 10.
  • the determination of the preset value may also be determined according to the fault tolerance capability of the array system, and the higher the fault tolerance capability, the larger the preset value here.
  • the preset period can be determined by the volatility of the I/O request of the array system. The greater the volatility, the longer the preset period can be set.
  • the slowest disk threshold corresponding to different types of hard disks may be determined in the next preset period. plate.
  • the average service time of each I/O request of each hard disk may be based on any of the times Compare the slow disk thresholds of the type of hard disks, for example, calculate the average service time of a single hard disk every 5 minutes. If the average service time of the single hard disk determined by the 5 minutes is greater than or equal to the slow disk threshold of the hard disk of the type to which it belongs, then it is determined.
  • a single hard disk is a slow disk.
  • a hard disk is determined to be a slow disk
  • data of the slow disk can be obtained through data reconstruction, and the data of the slow disk is transferred to another idle disk, the slow disk is isolated, and an alarm message is sent to notify the administrator.
  • the embodiment of the present invention is to perform a horizontal comparison of the hard disks in the array system. Therefore, the response time of the I/O of the hard disk in the array system is different for different service types. Therefore, the slow disk detection mode in the embodiment of the present invention is different. It also adapts to different business types. Similarly, after the service life of the hard disk is increased, the hard disk in the array system is aged, and the response time of the I/O is slowed accordingly. In this embodiment of the present invention, the horizontal comparison method determines the slow disk and adapts different services. Years of hard drive.
  • the embodiment of the present invention provides a slow disk detection method, which obtains an average service time of input and output I/O requests corresponding to different types of hard disks in a current preset period, and then averages the I/O requests corresponding to different types of hard disks.
  • the relationship between the service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I/O corresponding to each hard disk in the next preset period.
  • the average service time of the request determines the slow disk in the next preset period.
  • the present invention can determine the slow disk threshold of the next preset period according to the average service time of different types of hard disks in the current preset period, so that Different types of hard disks have different slow disk thresholds due to different I/O service time, and I/O response time of hard disks with different service years due to different I/O response times of different service types of hard disks. Differently, the average service time of the I/O of the hard disk is different, so that the differential determination of the slow disk threshold of the present invention is equivalent to horizontally comparing the hard disks in the system.
  • different types of differentiated slow disk thresholds of the present invention can also be adapted to different service types and different service years of hard disks, and can solve slow disk detection accuracy according to different hard disk types, different service types, and different service years of hard disks.
  • the low problem improves the accuracy of slow disk detection.
  • the embodiment of the present invention provides a device 3 for slow disk detection, as shown in FIG. 3, including:
  • the obtaining unit 301 is configured to obtain an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period;
  • the obtaining unit 301 is further configured to obtain, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period;
  • the determining unit 302 is configured to determine a slow disk in the next preset period according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period.
  • the obtaining unit 301 can be specifically configured to:
  • the average service time of I/O requests corresponding to different types of hard disks in the current preset period is obtained according to the average value and ratio of each hard disk in different types of hard disks.
  • the obtaining unit 301 can be specifically configured to:
  • the average value of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained according to the ratio of the sum of the response times and the number of I/O requests corresponding to each hard disk in the current preset period.
  • the obtaining unit 301 can be specifically configured to:
  • the average value of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained according to the ratio of the sum of the average service time and the number of unit time.
  • the obtaining unit 301 can be specifically configured to:
  • AvgT Average service time of the I/O request corresponding to any type of hard disk of different types of hard disks
  • AvgT X 1 *Z 1 +X 2 *Z 2 +...X n *Z n
  • X 1 represents an average value corresponding to the first hard disk of any one of the hard disks
  • Z 1 represents a ratio corresponding to the first hard disk
  • X 2 represents a second hard disk of the hard disk of any type.
  • Z 2 represents the ratio corresponding to the second hard disk
  • X n represents the average value corresponding to the nth hard disk in the hard disk of any type
  • Z n represents the corresponding nth hard disk. ratio.
  • the obtaining unit 301 can be specifically configured to:
  • the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
  • the determining unit 302 is further configured to:
  • the slow disks in different types of hard disks are determined according to the initial threshold corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
  • the embodiment of the invention provides a device for detecting a slow disk, which obtains an average service time of an input/output I/O request corresponding to different types of hard disks in a current preset period, and then according to I/O requests corresponding to different types of hard disks.
  • the relationship between the average service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I/ corresponding to each hard disk in the next preset period.
  • the average service time of the O request determines the slow disk in the next preset period.
  • the present invention can determine the slow disk threshold of the next preset period according to the average service time of different types of hard disks in the current preset period. Different types of hard disks can be differentiated from the slow disk threshold due to the different service time of the I/O, and the I/O response time of the hard disk with different service years due to different I/O response times of different service types of the hard disk. The time is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent to horizontal comparison of the hard disks in the system.
  • the present invention is different types of slow disk difference threshold can be adapted to different service types and service life of the hard disk, the root can be According to different hard disk types, different service types, and different service years, the difference of hard disks solves the problem of low accuracy of slow disk detection, which improves the accuracy of slow disk detection.
  • the embodiment of the present invention provides a slow disk detecting device 4, as shown in FIG. 4, comprising: a memory 401, a processor 402, and a communication bus 403.
  • the memory 401 is configured to store instructions and data
  • the processor 402 is configured to execute the instruction for obtaining an average service time of input and output I/O requests corresponding to different types of hard disks in the current preset period; according to different types of hard disks.
  • the relationship between the average service time of the corresponding I/O request and the preset value is obtained by the slow disk threshold corresponding to the different types of hard disks in the next preset period; according to the slow disk threshold corresponding to different types of hard disks and each of the next preset periods
  • the average service time of the I/O request corresponding to each hard disk determines the slow disk in the next preset period.
  • the data stored in the memory 401 includes an average service time of the input and output I/O requests corresponding to different types of hard disks in the current preset period, a preset value, and a slow disk threshold corresponding to different types of hard disks in the next preset period.
  • the processor 402 is configured to perform an average service time for obtaining input and output I/O requests corresponding to different types of hard disks in the current preset period, including:
  • the average service time of I/O requests corresponding to different types of hard disks in the current preset period is obtained according to the average value and ratio of each hard disk in different types of hard disks.
  • the data stored by the memory 401 may also include the above average values and ratios.
  • the average value of the average service time of the processor 402 for performing the I/O request corresponding to each hard disk in the current preset period includes:
  • the average value of the average service time of the processor 402 for performing the I/O request corresponding to each hard disk in the current preset period includes:
  • the average value of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained according to the ratio of the sum of the average service time and the number of unit time.
  • the processor 402 is configured to perform an average of the I/O requests corresponding to different types of hard disks in the current preset period according to the average value and the ratio of each of the different types of hard disks.
  • Service hours include:
  • AvgT Average service time of the I/O request corresponding to any type of hard disk of different types of hard disks
  • AvgT X 1 *Z 1 +X 2 *Z 2 +...X n *Z n
  • X 1 represents an average value corresponding to the first hard disk of any one of the hard disks
  • Z 1 represents a ratio corresponding to the first hard disk
  • X 2 represents a second hard disk of the hard disk of any type.
  • Z 2 represents the ratio corresponding to the second hard disk
  • X n represents the average value corresponding to the nth hard disk in the hard disk of any type
  • Z n represents the corresponding nth hard disk. ratio.
  • the processor 402 is configured to perform, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, to obtain the hard disk corresponding to the different types of hard disks in the next preset period.
  • the slow disk threshold includes:
  • the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
  • the processor 402 is configured to execute the instruction, and may also be used to:
  • the embodiment of the invention provides a device for detecting a slow disk, which obtains an average service time of an input/output I/O request corresponding to different types of hard disks in a current preset period, and then according to I/O requests corresponding to different types of hard disks.
  • the relationship between the average service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I/ corresponding to each hard disk in the next preset period.
  • the average service time of the O request determines the slow disk in the next preset period.
  • the present invention can determine the slow disk threshold of the next preset period according to the average service time of different types of hard disks in the current preset period. Different types of hard disks can be differentiated from the slow disk threshold due to the different service time of the I/O, and the I/O response time of the hard disk with different service years due to different I/O response times of different service types of the hard disk. The time is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent to horizontal comparison of the hard disks in the system.
  • different types of differentiated slow disk thresholds of the present invention can also adapt to different service types and different service years of hard disks, and can solve slow disk detection accuracy according to different hard disk types, different service types, and different service years of hard disks.
  • the low problem improves the accuracy of slow disk detection.
  • the disclosed 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 various embodiments of the present invention can be integrated into one process In the unit, each unit may be physically included 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 hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions 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, and the program code can be stored. Medium.

Abstract

A method and a device for detecting a slow disk, relating to the technical field of computers, and being capable of solving the problem of low accuracy of slow disk detection. The method comprises: acquiring average service time, in a current pre-set period, for input/output (I/O) requests corresponding to disks of different types (101); acquiring, according to the relationship between the average service time for the I/O requests corresponding to the disks of different types and pre-set values, slow disk thresholds corresponding to the disks of different types in a next preset period (102); determining, according to the slow disk thresholds corresponding to disks of different types and the average service time for the I/O requests corresponding to each of the disks in the next pre-set period, a slow disk in the next pre-set period (103). The present solution is used for dynamically adjusting the slow disk thresholds.

Description

一种慢盘检测方法和装置Slow disk detecting method and device 技术领域Technical field
本发明涉及计算机技术领域,尤其涉及一种慢盘检测方法和装置。The present invention relates to the field of computer technologies, and in particular, to a slow disk detection method and apparatus.
背景技术Background technique
磁盘阵列系统可包括多组独立磁盘冗余阵列(Redundant Array of Independent Disks,RAID),其RAID是一种把多块独立的硬盘(物理硬盘)按不同的方式组合起来形成的一个硬盘组(逻辑硬盘)。通过把数据放在多个硬盘上,输入输出操作能以平衡的方式交叠,改良性能,从而提供比单个硬盘更高的存储性能和提供数据备份技术。同时,在储存数据时,将数据切割成许多区段,分别存放在各个硬盘上。A disk array system may include a plurality of Redundant Array of Independent Disks (RAID), and the RAID is a disk group (logic) formed by combining a plurality of independent hard disks (physical hard disks) in different manners. hard disk). By placing data on multiple hard drives, input and output operations can be balanced in a balanced manner, improving performance, providing higher storage performance and data backup technology than a single hard drive. At the same time, when storing data, the data is cut into a number of sections, which are stored on each hard disk.
对于该磁盘阵列系统来说,当系统中出现硬盘老化、磁头退化、硬盘坏道等多种情况时会导致硬盘响应速度变慢,而由于数据切割为多个区段分别存放在各个硬盘上,因而会由于一块硬盘的响应变慢会拖累整个系统的响应速度,因此,需要定期或不定期对硬盘的输入/输出(input/output,I/O)响应时间进行监控,以根据I/O响应时间确定出慢盘,进而对该慢盘实施RAID重构、硬盘隔离等相关措施。For the disk array system, when the hard disk aging, head degradation, bad sectors of the hard disk, and the like occur in the system, the response speed of the hard disk is slowed down, and since the data is cut into multiple segments and stored on the respective hard disks, Therefore, the slow response of a hard disk will drag down the response speed of the entire system. Therefore, the input/output (I/O) response time of the hard disk needs to be monitored periodically or irregularly to respond to I/O. The time determines the slow disk, and then implements RAID reconfiguration, hard disk isolation, and the like for the slow disk.
目前,检测慢盘的方式大多是设定一个阀值,在的一定的时间周期或多个相同的时间周期内,如果硬盘的I/O请求的平均服务时间达到的阈值,则认定该硬盘为慢盘。其中,I/O请求的平均服务时间为时间周期内发送的n个I/O响应时间的平均值。但是,对于不同的业务类型,I/O请求访问压力大小不同,相同的慢盘阀值无法适应各种业务需求;对于不同的硬盘类型,其I/O响应时间也不同,使得相同的慢盘阀值也无法适应不同类型的硬 盘,甚至硬盘在不同的服务时间后,其老化程度也不尽相同,如果使用相同的慢盘阀值,则无法精确定位出真正有问题的硬盘,因此,这种慢盘检测方法的精确度低。At present, the method of detecting the slow disk is mostly to set a threshold. In a certain period of time or a plurality of identical time periods, if the average service time of the I/O request of the hard disk reaches the threshold, the hard disk is determined to be Slow disk. The average service time of the I/O request is the average of the n I/O response times sent in the time period. However, for different service types, the I/O request access pressure is different, and the same slow disk threshold cannot meet various service requirements. For different hard disk types, the I/O response time is also different, making the same slow disk. The threshold cannot adapt to different types of hard Disks and even hard disks have different degrees of aging after different service hours. If the same slow disk threshold is used, the real problematic hard disk cannot be accurately located. Therefore, the accuracy of this slow disk detection method is not accurate. low.
发明内容Summary of the invention
本发明实施例提供一种慢盘检测方法和装置,能够解决慢盘检测精确度低的问题。The embodiment of the invention provides a slow disk detection method and device, which can solve the problem of low accuracy of slow disk detection.
第一方面,提供一种慢盘的检测方法,包括:In a first aspect, a method for detecting a slow disk is provided, including:
获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间;Obtain an average service time of input and output I/O requests corresponding to different types of hard disks in the current preset period;
根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值;Obtaining a slow disk threshold corresponding to a different type of hard disk in the next preset period according to the relationship between the average service time of the I/O request corresponding to the type of the hard disk and the preset value;
根据不同类型的硬盘对应的慢盘阈值与所述下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定所述下一预设周期中的慢盘。The slow disk in the next preset period is determined according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period.
结合第一方面,在第一方面的第一种可能实现的方式中,所述获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间包括:With reference to the first aspect, in the first possible implementation manner of the first aspect, the obtaining an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period includes:
获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值;Obtaining an average value of an average service time of an I/O request corresponding to each hard disk in the current preset period;
获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的数量占所述每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率;Obtaining a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk;
根据不同类型的硬盘中的每个硬盘的所述平均值以及所述比率获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。Obtain an average service time of an I/O request corresponding to different types of hard disks in the current preset period according to the average value of each of the different types of hard disks and the ratio.
结合第一方面的第一种可能实现的方式,在第一方面的第二种可能实现的方式中,所述获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值包括: With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the obtaining an average service time of an I/O request corresponding to each hard disk in the current preset period The average value includes:
获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的响应时间之和;Obtaining a sum of response times of the I/O requests received by each of the hard disks in the current preset period;
根据所述响应时间之和与所述当前预设周期内所述每个硬盘对应的I/O请求个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。Obtain an average service of the I/O request corresponding to each hard disk in the current preset period according to a ratio of the sum of the response times and the number of I/O requests corresponding to each hard disk in the current preset period. The average of the time.
结合第一方面的第一种可能实现的方式,在第一方面的第三种可能实现的方式中,所述获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值包括:In conjunction with the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the obtaining an average service time of an I/O request corresponding to each hard disk in the current preset period The average value includes:
获取所述当前预设周期内的单位时间内所述每个硬盘对应的I/O请求的平均服务时间之和;Obtaining, by the sum of the average service time of the I/O request corresponding to each hard disk in the unit time within the current preset period;
根据所述平均服务时间之和与所述单位时间的个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。And obtaining an average value of the average service time of the I/O request corresponding to each hard disk in the current preset period according to the ratio of the sum of the average service time and the number of the unit time.
结合第一方面的第一种可能实现的方式至第三种可能实现的方式,在第一方面的第四种可能实现的方式中,所述根据不同类型的硬盘中的每个硬盘的所述平均值以及所述比率获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间包括:In combination with the first possible implementation of the first aspect to the third possible implementation manner, in a fourth possible implementation manner of the first aspect, the method according to each of the different types of hard disks The average value and the ratio of the average service time for obtaining the I/O request corresponding to different types of hard disks in the current preset period include:
将不同类型的硬盘中的每个硬盘的平均值和所述比率进行加权计算获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间;Weighting the average value of each of the different types of hard disks and the ratio to obtain an average service time of the I/O request corresponding to different types of hard disks in the current preset period;
其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。If the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is represented as AvgT, then AvgT=X1*Z1+X2*Z2+...Xn*Zn, and X1 represents any of the types. The average value of the first hard disk in the hard disk, Z1 indicates the ratio corresponding to the first hard disk, X2 indicates the average value corresponding to the second hard disk in the hard disk of any type, and Z2 indicates the first The ratio corresponding to the two hard disks, Xn represents the average value corresponding to the nth hard disk in the hard disk of any type, and Zn represents the ratio corresponding to the nth hard disk.
结合第一方面,在第一方面的第五种可能实现的方式中,所述根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值 的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值包括:With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the average service time and the preset value of the I/O request according to different types of hard disks are The relationship between the slow disk thresholds corresponding to different types of hard disks in the next preset period is as follows:
根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积获取下一预设周期不同类型的硬盘对应的慢盘阈值。According to the product of the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
结合第一方面,在第一方面的第六种可能实现的方式中,所述方法还包括:With reference to the first aspect, in a sixth possible implementation manner of the first aspect, the method further includes:
在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与所述每个硬盘对应的I/O请求的平均服务时间确定不同类型的硬盘中的慢盘。During the first preset period after the storage array is powered on, the slow disks in different types of hard disks are determined according to the initial thresholds corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
第二方面,提供一种慢盘检测的装置,包括:In a second aspect, a device for slow disk detection is provided, including:
获取单元,用于获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间;The obtaining unit is configured to obtain an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period;
所述获取单元,还用于根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值;The obtaining unit is further configured to obtain, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period;
确定单元,用于根据不同类型的硬盘对应的慢盘阈值与所述下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定所述下一预设周期中的慢盘。And a determining unit, configured to determine, according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period, the slow disks in the next preset period.
结合第二方面,在第二方面的第一种可能实现的方式中,所述获取单元具体用于:With reference to the second aspect, in a first possible implementation manner of the second aspect, the acquiring unit is specifically configured to:
获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值;Obtaining an average value of an average service time of an I/O request corresponding to each hard disk in the current preset period;
获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的数量占所述每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率;Obtaining a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk;
根据不同类型的硬盘中的每个硬盘的所述平均值以及所述比率获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。Obtain an average service time of an I/O request corresponding to different types of hard disks in the current preset period according to the average value of each of the different types of hard disks and the ratio.
结合第二方面的第一种可能实现的方式,在第二方面的第二种可能实现的方式中,所述获取单元具体用于:With reference to the first possible implementation of the second aspect, in a second possible implementation manner of the second aspect, the acquiring unit is specifically configured to:
获取所述当前预设周期内所述每个硬盘对应接收到的I/O请 求的响应时间之和;Obtaining the I/O received by each of the hard disks in the current preset period The sum of the response times sought;
根据所述响应时间之和与所述当前预设周期内所述每个硬盘对应的I/O请求个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。Obtain an average service of the I/O request corresponding to each hard disk in the current preset period according to a ratio of the sum of the response times to the number of I/O requests corresponding to each hard disk in the current preset period. The average of the time.
结合第二方面的第一种可能实现的方式,在第二方面的第三种可能实现的方式中,所述获取单元具体用于:With reference to the first possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the acquiring unit is specifically configured to:
所述获取单元具体用于:The obtaining unit is specifically configured to:
获取所述当前预设周期内的单位时间内所述每个硬盘对应的I/O请求的平均服务时间之和;Obtaining, by the sum of the average service time of the I/O request corresponding to each hard disk in the unit time within the current preset period;
根据所述平均服务时间之和与所述单位时间的个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。And obtaining an average value of the average service time of the I/O request corresponding to each hard disk in the current preset period according to the ratio of the sum of the average service time and the number of the unit time.
结合第二方面的第一种可能实现的方式至第三种可能实现的方式,在第二方面的第四种可能实现的方式中,所述获取单元具体用于:With reference to the first possible implementation manner of the second aspect to the third possible implementation manner, in a fourth possible implementation manner of the second aspect, the acquiring unit is specifically configured to:
将不同类型的硬盘中的每个硬盘的平均值和所述比率进行加权计算获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间;Weighting the average value of each of the different types of hard disks and the ratio to obtain an average service time of the I/O request corresponding to different types of hard disks in the current preset period;
其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。If the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is represented as AvgT, then AvgT=X1*Z1+X2*Z2+...Xn*Zn, and X1 represents any of the types. The average value of the first hard disk in the hard disk, Z1 indicates the ratio corresponding to the first hard disk, X2 indicates the average value corresponding to the second hard disk in the hard disk of any type, and Z2 indicates the first The ratio corresponding to the two hard disks, Xn represents the average value corresponding to the nth hard disk in the hard disk of any type, and Zn represents the ratio corresponding to the nth hard disk.
结合第二方面,在第二方面的第五种可能实现的方式中,所述获取单元具体用于:With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the acquiring unit is specifically configured to:
根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积获取下一预设周期不同类型的硬盘对应的慢盘阈值。According to the product of the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
结合第二方面,在第二方面的第六种可能实现的方式中,所 述确定单元还用于:In conjunction with the second aspect, in a sixth possible implementation of the second aspect, The determining unit is also used to:
在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与所述每个硬盘对应的I/O请求的平均服务时间确定不同类型的硬盘中的慢盘。During the first preset period after the storage array is powered on, the slow disks in different types of hard disks are determined according to the initial thresholds corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
本发明实施例提供一种慢盘检测方法和装置,通过获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间,再根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值,进而根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定所述下一预设周期中的慢盘,由此,本发明能够根据当前预设周期内不同类型的硬盘的平均服务时间确定出下一预设周期的慢盘阈值,这样可对不同类型的硬盘由于其I/O的平均服务时间的不同制定差异化的慢盘阈值,也由于硬盘不同业务类型的I/O响应时间不同,不同服务年限的硬盘的I/O的响应时间也不同,导致硬盘的I/O的平均服务时间不同,使得本发明这种慢盘阈值的差异化确定相当于对系统内的硬盘做横向比较,因此,本发明不同类型的差异化的慢盘阈值也能够适应不同业务类型和不同服务年限的硬盘,能够根据不同硬盘类型、不同业务类型和不同服务年限的硬盘的差异化解决慢盘检测精确度低的问题,提升了慢盘检测的精确度。The embodiment of the invention provides a slow disk detection method and device, which acquires an average service time of input and output I/O requests corresponding to different types of hard disks in a current preset period, and then according to I/O requests corresponding to different types of hard disks. The relationship between the average service time and the preset value is obtained by the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I corresponding to each hard disk in the next preset period. The average service time of the /O request determines the slow disk in the next preset period. Therefore, the present invention can determine the slow disk of the next preset period according to the average service time of different types of hard disks in the current preset period. Threshold, which can make different slow disk thresholds for different types of hard disks due to different I/O service time, and also because I/O response time of different service types of hard disks is different, I/ of hard disks with different service years. The response time of O is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent to the hard disk in the system. To compare, therefore, different types of differentiated slow disk thresholds of the present invention can also adapt to different service types and different service years of hard disks, and can solve slow disks according to different hard disk types, different service types, and different service years of hard disks. The problem of low accuracy is improved, and the accuracy of slow disk detection is improved.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1为本发明实施例提供的一种慢盘检测方法的流程示意图;1 is a schematic flowchart of a slow disk detecting method according to an embodiment of the present invention;
图2为本发明实施例提供的一种慢盘检测方法的流程示意图; 2 is a schematic flowchart of a slow disk detecting method according to an embodiment of the present invention;
图3为本发明实施例提供的一种慢盘检测的装置。FIG. 3 is a schematic diagram of a slow disk detection apparatus according to an embodiment of the present invention.
图4为本发明实施例提供的一种慢盘检测的装置。FIG. 4 is a schematic diagram of a slow disk detection apparatus according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供一种慢盘检测方法,本实施例的执行主体为检测慢盘的处理装置,该装置可以采用硬件和/或软件的方式实现,优选的,该处理装置可以设置在装载了硬盘的阵列系统上,便于对阵列系统中的硬盘进行检测,如图1所示,包括:The embodiment of the present invention provides a slow disk detection method. The execution body of the embodiment is a processing device for detecting a slow disk. The device may be implemented by using hardware and/or software. Preferably, the processing device may be configured to be loaded. On the array system of the hard disk, it is convenient to detect the hard disk in the array system, as shown in Figure 1, including:
101、获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间。101. Obtain an average service time of input and output I/O requests corresponding to different types of hard disks in the current preset period.
用于慢盘检测的装置可首先确定阵列系统中的硬盘类型,例如,该硬盘类型可以包括固态硬盘(Solid State Drives,SSD)、串行连接SCSI(Serial Attached Small computer system interface,SAS)、近线SAS(Near Line_SAS,NL_SAS)以及串口硬盘(Serial Advanced Technology Attachment,SATA)等,而后获取每种类型的硬盘在当前预设周期内的I/O请求的平均服务时间。The device for slow disk detection may first determine the type of the hard disk in the array system. For example, the hard disk type may include Solid State Drives (SSD), Serial Attached Small Computer System Interface (SAS), and Near Line SAS (Near Line_SAS, NL_SAS) and Serial Advanced Technology Attachment (SATA), etc., and then obtain the average service time of I/O requests for each type of hard disk in the current preset period.
通常来讲,对于单个硬盘,I/O请求的平均服务时间是指该单个硬盘1s内接收到的多个I/O请求的响应时间的平均值,I/O请求的响应时间是指硬盘从接收到的I/O请求到达阵列系统时起到服务结束时为止的时间。而在将硬盘分类后,按照硬盘类型,获取每一类硬盘在当前预设周期内的I/O请求的平均服务时间。其中,预设周期可以为一小时,也可以为其它值,本申请不做限定。Generally speaking, for a single hard disk, the average service time of the I/O request refers to the average response time of multiple I/O requests received within 1 s of the single hard disk. The response time of the I/O request refers to the hard disk from the hard disk. The time until the end of the service is reached when the received I/O request arrives at the array system. After classifying the hard disks, according to the hard disk type, the average service time of the I/O requests of each type of hard disk in the current preset period is obtained. The preset period may be one hour or other values, which is not limited in this application.
102、根据不同类型的硬盘对应的I/O请求的平均服务时间与预 设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值。102. Average service time and pre-payment according to I/O requests corresponding to different types of hard disks Set the value to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period.
本发明实施例中,假设该阵列系统中,如果有一个或几个硬盘的I/O响应时间比其它硬盘的I/O响应时间的加权平均值大,且数值上呈现出倍数趋势,那么将这一个硬盘或这几个硬盘视为慢盘,也即慢盘的概念是将其与其它所有硬盘做一个横向比较。In the embodiment of the present invention, if the I/O response time of one or several hard disks is larger than the weighted average of the I/O response time of other hard disks in the array system, and the numerical value shows a multiple trend, then This hard disk or these hard disks is considered as a slow disk, that is, the concept of a slow disk is to make a horizontal comparison with all other hard disks.
由于硬盘的I/O请求的平均服务时间为单位时间内的接收到的I/O请求的响应时间的平均值,且硬盘是分类的,那么慢盘阈值的确定可以是不同类型的硬盘通过加权算法获取不同类型对应的I/O请求的平均服务时间,即加权平均值,于是当硬盘的I/O请求的平均服务时间可以是比其所属类型的硬盘的加权平均值高出倍数时确定为慢盘。于是,这里根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值可以包括:根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积,获取下一预设周期不同类型的硬盘对应的慢盘阈值。这里的预设值根据经验可设置为10,当然也可为其它值,本申请不做限定。Since the average service time of the I/O request of the hard disk is the average of the response time of the received I/O request per unit time, and the hard disk is classified, the determination of the slow disk threshold may be that different types of hard disks pass the weighting. The algorithm obtains the average service time of the I/O request corresponding to different types, that is, the weighted average value, so that when the average service time of the I/O request of the hard disk can be a multiple of the weighted average value of the hard disk of the type to which the hard disk belongs, Slow disk. Therefore, the slow disk threshold corresponding to the different types of hard disks in the next preset period may be obtained according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value. The product of the average service time of the /O request and the preset value, and obtains the slow disk threshold corresponding to different types of hard disks in the next preset period. The preset value here may be set to 10 according to experience, and may of course be other values, which is not limited in this application.
103、根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘。103. Determine, according to the slow disk threshold corresponding to different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period, the slow disks in the next preset period.
在根据下一预设周期内不同类型的硬盘的慢盘阈值后,在下一预设周期内,可根据每个硬盘的一定时间内的I/O请求的平均服务时间与其所属类型的硬盘的慢盘阈值进行比较,如果任一硬盘的I/O请求的平均服务时间大于或等于其所属类型的硬盘的慢盘阈值,则可确定该任一硬盘为慢盘。这里的一定时间是指在下一预设周期内,每隔一定时间获取一次任一硬盘在一定时间内接收到的I/O请求的平均服务时间,比如,一定时间为5min,预设周期为一小时。After the slow disk threshold of different types of hard disks according to the next preset period, in the next preset period, the average service time of the I/O request according to the fixed time of each hard disk may be slower than the hard disk of the type of the hard disk. The disk threshold is compared. If the average service time of the I/O request of any hard disk is greater than or equal to the slow disk threshold of the disk of the type to which it belongs, it can be determined that the hard disk is a slow disk. The certain time here refers to the average service time of the I/O request received by any hard disk in a certain period of time at a certain time in the next preset period. For example, the certain time is 5 minutes, and the preset period is one. hour.
本发明实施例提供一种慢盘检测方法,通过获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间,再根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值,进而根据不同类型的 硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘,由此,本发明能够根据当前预设周期内不同类型的硬盘的平均服务时间确定出下一预设周期的慢盘阈值,这样可对不同类型的硬盘由于其I/O的平均服务时间的不同制定差异化的慢盘阈值,也由于硬盘不同业务类型的I/O响应时间不同,不同服务年限的硬盘的I/O的响应时间也不同,导致硬盘的I/O的平均服务时间不同,使得本发明这种慢盘阈值的差异化确定相当于对系统内的硬盘做横向比较,因此,本发明不同类型的差异化的慢盘阈值也能够适应不同业务类型和不同服务年限的硬盘,能够根据不同硬盘类型、不同业务类型和不同服务年限的硬盘的差异化解决慢盘检测精确度低的问题,提升了慢盘检测的精确度。The embodiment of the present invention provides a slow disk detection method, which obtains an average service time of input and output I/O requests corresponding to different types of hard disks in a current preset period, and then averages the I/O requests corresponding to different types of hard disks. The relationship between the service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to different types. The slow disk threshold corresponding to the hard disk and the average service time of the I/O request corresponding to each hard disk in the next preset period determine the slow disk in the next preset period, and thus, the present invention can be different according to the current preset period. The average service time of the type of hard disk determines the slow disk threshold of the next preset period, so that different types of hard disks can be differentiated from the slow disk threshold due to the different service time of the I/O, and also the different services of the hard disk. The I/O response time of the type is different, and the response time of the I/O of the hard disk of different service years is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent. Different types of differentiated slow disk thresholds of the present invention can also be adapted to hard disks of different service types and different service years, and can be hard disks according to different hard disk types, different service types, and different service years. The difference solves the problem of low accuracy of slow disk detection and improves the accuracy of slow disk detection.
下面对上述实施例进行具体说明。The above embodiment will be specifically described below.
本发明实施例提供一种慢盘检测方法,如图2所示,包括:An embodiment of the present invention provides a slow disk detection method, as shown in FIG. 2, including:
201、在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与每个硬盘对应的I/O请求的平均服务时间确定不同类型的硬盘中的慢盘。201. Determine, in a first preset period after the storage array is powered on, a slow disk in a different type of hard disk according to an initial threshold corresponding to different types of hard disks and an average service time of an I/O request corresponding to each hard disk.
如果该存储阵列刚上电,第一个预设周期内不同类型的硬盘的慢盘阈值可根据预设的初始阈值确定,该初始阈值可根据测试数据和现网业务情况制定,预设周期例如可以为一小时等。其中任一硬盘的I/O请求的平均服务时间可以是该任一硬盘在一段时间内的I/O请求的响应时间的平均值,该一段时间例如可以为5min等,即每隔5min获取一次任一硬盘的I/O请求的平均服务时间,并与其所属类型的硬盘的初始阈值进行比较,如果大于初始阈值,则确定为慢盘。If the storage array is powered on, the slow disk threshold of different types of hard disks in the first preset period may be determined according to a preset initial threshold, which may be determined according to test data and current network service conditions, for example, a preset period, for example. Can be an hour or so. The average service time of the I/O request of any one of the hard disks may be an average of the response time of the I/O request of the hard disk for a period of time, and the time may be, for example, 5 minutes, that is, every 5 minutes. The average service time of the I/O request of any hard disk is compared with the initial threshold of the hard disk of the type to which it belongs. If it is greater than the initial threshold, it is determined to be a slow disk.
而后,可通过加权计算获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间,具体可由步骤202至步骤204实现。Then, the average service time of the input/output I/O request corresponding to the different types of hard disks in the current preset period can be obtained by the weighting calculation, which can be implemented by step 202 to step 204.
202、获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。202. Obtain an average value of an average service time of an I/O request corresponding to each hard disk in the current preset period.
具体地,在当前预设周期与下一预设周期间的临界时间,获取当 前预设周期内的每个硬盘对应的I/O请求的平均服务时间的平均值,例如在第一个预设周期与第二个预设周期的临界时间,获取第一个预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。Specifically, when the critical time between the current preset period and the next preset period is obtained, The average value of the average service time of the I/O request corresponding to each hard disk in the pre-preset period, for example, in the first preset period and the critical time of the second preset period, the first preset period is acquired. The average of the average service time of the I/O requests for each hard disk.
示例性的,可获取当前预设周期内每个硬盘对应接收到的I/O请求的响应时间之和,根据响应时间之和与当前预设周期内每个硬盘对应的I/O请求个数的比值获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值Xn。For example, the sum of the response times of the I/O requests received by each hard disk in the current preset period may be obtained, and the number of I/O requests corresponding to each hard disk in the current preset period according to the sum of the response times The ratio of the average value Xn of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained.
也即,对于单个硬盘来说,由于I/O请求的平均服务时间为单位时间(例如1s)内接收到的Z个I/O请求的响应时间的平均值,那么对于单个硬盘来说,可统计当前预设周期(例如一小时)内单个硬盘接收到的M个I/O请求的响应时间,然后将M各I/O请求的响应时间相加,相加的和再除以单个硬盘在当前预设周期内接收到的I/O请求的个数,得到当前预设周期内单个硬盘对应的I/O请求的平均服务时间的平均值Xn。That is, for a single hard disk, since the average service time of the I/O request is the average of the response times of the Z I/O requests received per unit time (for example, 1 s), then for a single hard disk, Counts the response time of M I/O requests received by a single hard disk in the current preset period (for example, one hour), and then adds the response time of each I/O request of M, adds the sum and divides by a single hard disk. The number of I/O requests received in the current preset period is the average value Xn of the average service time of the I/O requests corresponding to a single hard disk in the current preset period.
可选的,还可以获取当前预设周期内的单位时间内每个硬盘对应的I/O请求的平均服务时间之和,根据平均服务时间之和与单位时间的个数的比值获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值Xn。例如,单位时间为1s,预设周期为一小时,那么对于单个硬盘来说,可将一小时内单个硬盘每1s的I/O的平均服务时间相加,再除以3600s,得到当前预设周期内单个硬盘对应的I/O请求的平均服务时间的平均值Xn。Optionally, the sum of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained, and the current preset is obtained according to the ratio of the average service time to the number of unit time. The average value Xn of the average service time of the I/O request corresponding to each hard disk in the cycle. For example, if the unit time is 1 s and the preset period is one hour, then for a single hard disk, the average service time of each I/O per 1 s can be added in one hour, and then divided by 3600 s to get the current preset. The average value Xn of the average service time of the I/O request corresponding to a single hard disk in the cycle.
203、获取当前预设周期内每个硬盘对应接收到的I/O请求的数量占每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率。203. Obtain a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk.
具体地,对于单个硬盘来说,可统计其在当前预设周期内接收到的I/O请求的数量Yn,对于每一类型的硬盘来说,将每一类型中的所有硬盘接收到的I/O请求的数量相加得到每一类型的硬盘的I/O请求的总量,而后,对其中一类型的硬盘,获取这一类型中的单个硬盘在当前预设周期内接收到的I/O请求的数量Yn占这一类型对应的所 有硬盘接收到的I/O请求的总量的比率Zn。Specifically, for a single hard disk, the number Yn of I/O requests received in the current preset period may be counted, and for each type of hard disk, the I received by all the hard disks in each type. The number of /O requests is added to obtain the total amount of I/O requests for each type of hard disk, and then, for one type of hard disk, the I/O received by the single hard disk in this type is received within the current preset period. The number of O requests Yn occupies the corresponding type of this type The ratio Zn of the total number of I/O requests received by the hard disk.
204、根据不同类型的硬盘中的每个硬盘的平均值以及比率获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。204. Obtain an average service time of an I/O request corresponding to different types of hard disks in the current preset period according to an average value and a ratio of each of the different types of hard disks.
具体地,可将不同类型的硬盘中的每个硬盘的平均值和比率进行加权计算获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。Specifically, the average value and the ratio of each of the different types of hard disks may be weighted to obtain an average service time of the I/O request corresponding to different types of hard disks in the current preset period.
其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。Wherein, if the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is expressed as AvgT, then AvgT=X 1 *Z 1 +X 2 *Z 2 +...X n *Z n , X 1 represents an average value corresponding to the first hard disk of any one of the hard disks, Z 1 represents a ratio corresponding to the first hard disk, and X 2 represents a second hard disk of the hard disk of any type. Corresponding average value, Z 2 represents the ratio corresponding to the second hard disk, X n represents the average value corresponding to the nth hard disk in the hard disk of any type, and Z n represents the corresponding nth hard disk. ratio.
这里如果一个硬盘接收到更多的I/O请求,其业务更繁忙,那么I/O压力大的硬盘在其所属类型的硬盘中的权值就更高。Here, if a hard disk receives more I/O requests and its service is more busy, the hard disk with high I/O pressure has higher weight in the hard disk of its own type.
205、根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值。205. Acquire, according to the relationship between the average service time of the I/O request corresponding to the type of the hard disk and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period.
具体地,根据上述对于慢盘的概念的定义,不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系可以为乘积的关系,预设值例如可以为10。Specifically, according to the definition of the concept of the slow disk, the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value may be a product, and the preset value may be, for example, 10.
本发明实施例中,预设值的确定也可以根据阵列系统的容错能力来确定,容错能力越高,这里的预设值越大。预设周期可与阵列系统的I/O请求的波动性确定,波动性越大,预设周期可设置越长。In the embodiment of the present invention, the determination of the preset value may also be determined according to the fault tolerance capability of the array system, and the higher the fault tolerance capability, the larger the preset value here. The preset period can be determined by the volatility of the I/O request of the array system. The greater the volatility, the longer the preset period can be set.
206、根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘。206. Determine a slow disk in the next preset period according to the slow disk threshold corresponding to different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period.
在根据上一周期的I/O请求情况确定了不同类型的硬盘对应的慢盘阈值后,可在下一预设周期根据不同类型的硬盘对应的慢盘阈值确定出下一预设周期中的慢盘。具体地,对于其中任一类型的硬盘来说,可根据一段时间内每个硬盘的I/O请求的平均服务时间与该任一 类型的硬盘的慢盘阈值进行比较,例如每5min计算一次单个硬盘的平均服务时间,如果该5min确定的单个硬盘的平均服务时间大于或等于其所属类型的硬盘的慢盘阈值,那么就确定该单个硬盘为慢盘。After determining the slow disk threshold corresponding to different types of hard disks according to the I/O request of the previous cycle, the slowest disk threshold corresponding to different types of hard disks may be determined in the next preset period. plate. Specifically, for any type of hard disk, the average service time of each I/O request of each hard disk may be based on any of the times Compare the slow disk thresholds of the type of hard disks, for example, calculate the average service time of a single hard disk every 5 minutes. If the average service time of the single hard disk determined by the 5 minutes is greater than or equal to the slow disk threshold of the hard disk of the type to which it belongs, then it is determined. A single hard disk is a slow disk.
207、启动慢盘数据重构,并发送告警信息。207. Start slow disk data reconstruction and send alarm information.
如果某个硬盘确定为慢盘,可通过数据重构获取该慢盘的数据,并将该慢盘的数据转移至另一空闲硬盘,隔离该慢盘,并发送告警信息以通知管理人员。If a hard disk is determined to be a slow disk, data of the slow disk can be obtained through data reconstruction, and the data of the slow disk is transferred to another idle disk, the slow disk is isolated, and an alarm message is sent to notify the administrator.
由于本发明实施例是对阵列系统内的硬盘做横向比较,所以对于不同的业务类型,阵列系统内的硬盘的I/O的响应时间是不同的,因此,本发明实施例的慢盘检测方式也自适应了不同的业务类型。同样的,硬盘的服务年限增加后,阵列系统内的硬盘就有老化,其I/O的响应时间会相应变慢,本发明实施例这种横向比较确定慢盘的方式也自适应了不同服务年限的硬盘。The embodiment of the present invention is to perform a horizontal comparison of the hard disks in the array system. Therefore, the response time of the I/O of the hard disk in the array system is different for different service types. Therefore, the slow disk detection mode in the embodiment of the present invention is different. It also adapts to different business types. Similarly, after the service life of the hard disk is increased, the hard disk in the array system is aged, and the response time of the I/O is slowed accordingly. In this embodiment of the present invention, the horizontal comparison method determines the slow disk and adapts different services. Years of hard drive.
本发明实施例提供一种慢盘检测方法,通过获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间,再根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值,进而根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘,由此,本发明能够根据当前预设周期内不同类型的硬盘的平均服务时间确定出下一预设周期的慢盘阈值,这样可对不同类型的硬盘由于其I/O的平均服务时间的不同制定差异化的慢盘阈值,也由于硬盘不同业务类型的I/O响应时间不同,不同服务年限的硬盘的I/O的响应时间也不同,导致硬盘的I/O的平均服务时间不同,使得本发明这种慢盘阈值的差异化确定相当于对系统内的硬盘做横向比较,因此,本发明不同类型的差异化的慢盘阈值也能够适应不同业务类型和不同服务年限的硬盘,能够根据不同硬盘类型、不同业务类型和不同服务年限的硬盘的差异化解决慢盘检测精确度低的问题,提升了慢盘检测的精确度。The embodiment of the present invention provides a slow disk detection method, which obtains an average service time of input and output I/O requests corresponding to different types of hard disks in a current preset period, and then averages the I/O requests corresponding to different types of hard disks. The relationship between the service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I/O corresponding to each hard disk in the next preset period. The average service time of the request determines the slow disk in the next preset period. Therefore, the present invention can determine the slow disk threshold of the next preset period according to the average service time of different types of hard disks in the current preset period, so that Different types of hard disks have different slow disk thresholds due to different I/O service time, and I/O response time of hard disks with different service years due to different I/O response times of different service types of hard disks. Differently, the average service time of the I/O of the hard disk is different, so that the differential determination of the slow disk threshold of the present invention is equivalent to horizontally comparing the hard disks in the system. Therefore, different types of differentiated slow disk thresholds of the present invention can also be adapted to different service types and different service years of hard disks, and can solve slow disk detection accuracy according to different hard disk types, different service types, and different service years of hard disks. The low problem improves the accuracy of slow disk detection.
本发明实施例提供一种慢盘检测的装置3,如图3所示,包括: The embodiment of the present invention provides a device 3 for slow disk detection, as shown in FIG. 3, including:
获取单元301,用于获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间;The obtaining unit 301 is configured to obtain an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period;
获取单元301,还用于根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值;The obtaining unit 301 is further configured to obtain, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period;
确定单元302,用于根据不同类型的硬盘对应的慢盘阈值与下一预设周期内每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘。The determining unit 302 is configured to determine a slow disk in the next preset period according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period.
可选的,获取单元301可以具体用于:Optionally, the obtaining unit 301 can be specifically configured to:
获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值;Obtain an average value of the average service time of the I/O request corresponding to each hard disk in the current preset period;
获取当前预设周期内每个硬盘对应接收到的I/O请求的数量占每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率;Obtain a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk;
根据不同类型的硬盘中的每个硬盘的平均值以及比率获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。The average service time of I/O requests corresponding to different types of hard disks in the current preset period is obtained according to the average value and ratio of each hard disk in different types of hard disks.
可选的,获取单元301可以具体用于:Optionally, the obtaining unit 301 can be specifically configured to:
获取当前预设周期内每个硬盘对应接收到的I/O请求的响应时间之和;Obtaining the sum of response times of each hard disk corresponding to the received I/O request in the current preset period;
根据响应时间之和与当前预设周期内每个硬盘对应的I/O请求个数的比值获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。The average value of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained according to the ratio of the sum of the response times and the number of I/O requests corresponding to each hard disk in the current preset period.
可选的,获取单元301可以具体用于:Optionally, the obtaining unit 301 can be specifically configured to:
获取当前预设周期内的单位时间内每个硬盘对应的I/O请求的平均服务时间之和;Obtaining the sum of the average service time of the I/O request corresponding to each hard disk in the unit time within the current preset period;
根据平均服务时间之和与单位时间的个数的比值获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。The average value of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained according to the ratio of the sum of the average service time and the number of unit time.
可选的,获取单元301可以具体用于: Optionally, the obtaining unit 301 can be specifically configured to:
将不同类型的硬盘中的每个硬盘的平均值和比率进行加权计算获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间;Weighting the average value and ratio of each hard disk in different types of hard disks to obtain an average service time of I/O requests corresponding to different types of hard disks in the current preset period;
其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。Wherein, if the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is expressed as AvgT, then AvgT=X 1 *Z 1 +X 2 *Z 2 +...X n *Z n , X 1 represents an average value corresponding to the first hard disk of any one of the hard disks, Z 1 represents a ratio corresponding to the first hard disk, and X 2 represents a second hard disk of the hard disk of any type. Corresponding average value, Z 2 represents the ratio corresponding to the second hard disk, X n represents the average value corresponding to the nth hard disk in the hard disk of any type, and Z n represents the corresponding nth hard disk. ratio.
可选的,获取单元301可以具体用于:Optionally, the obtaining unit 301 can be specifically configured to:
根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积获取下一预设周期不同类型的硬盘对应的慢盘阈值。According to the product of the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
可选的,确定单元302还可以用于:Optionally, the determining unit 302 is further configured to:
在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与每个硬盘对应的I/O请求的平均服务时间确定不同类型的硬盘中的慢盘。During the first preset period after the storage array is powered on, the slow disks in different types of hard disks are determined according to the initial threshold corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
本发明实施例提供一种慢盘检测的装置,通过获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间,再根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值,进而根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘,由此,本发明能够根据当前预设周期内不同类型的硬盘的平均服务时间确定出下一预设周期的慢盘阈值,这样可对不同类型的硬盘由于其I/O的平均服务时间的不同制定差异化的慢盘阈值,也由于硬盘不同业务类型的I/O响应时间不同,不同服务年限的硬盘的I/O的响应时间也不同,导致硬盘的I/O的平均服务时间不同,使得本发明这种慢盘阈值的差异化确定相当于对系统内的硬盘做横向比较,因此,本发明不同类型的差异化的慢盘阈值也能够适应不同业务类型和不同服务年限的硬盘,能够根 据不同硬盘类型、不同业务类型和不同服务年限的硬盘的差异化解决慢盘检测精确度低的问题,提升了慢盘检测的精确度。The embodiment of the invention provides a device for detecting a slow disk, which obtains an average service time of an input/output I/O request corresponding to different types of hard disks in a current preset period, and then according to I/O requests corresponding to different types of hard disks. The relationship between the average service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I/ corresponding to each hard disk in the next preset period. The average service time of the O request determines the slow disk in the next preset period. Therefore, the present invention can determine the slow disk threshold of the next preset period according to the average service time of different types of hard disks in the current preset period. Different types of hard disks can be differentiated from the slow disk threshold due to the different service time of the I/O, and the I/O response time of the hard disk with different service years due to different I/O response times of different service types of the hard disk. The time is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent to horizontal comparison of the hard disks in the system. Accordingly, the present invention is different types of slow disk difference threshold can be adapted to different service types and service life of the hard disk, the root can be According to different hard disk types, different service types, and different service years, the difference of hard disks solves the problem of low accuracy of slow disk detection, which improves the accuracy of slow disk detection.
本发明实施例提供一种慢盘的检测装置4,如图4所示,包括:存储器401、处理器402以及通信总线403。其中:存储器401用于存储指令和数据,处理器402,用于执行该指令用于获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间;根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值;根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘。存储器401存储的数据包括当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间、预设值和下一预设周期不同类型的硬盘对应的慢盘阈值等。The embodiment of the present invention provides a slow disk detecting device 4, as shown in FIG. 4, comprising: a memory 401, a processor 402, and a communication bus 403. The memory 401 is configured to store instructions and data, and the processor 402 is configured to execute the instruction for obtaining an average service time of input and output I/O requests corresponding to different types of hard disks in the current preset period; according to different types of hard disks. The relationship between the average service time of the corresponding I/O request and the preset value is obtained by the slow disk threshold corresponding to the different types of hard disks in the next preset period; according to the slow disk threshold corresponding to different types of hard disks and each of the next preset periods The average service time of the I/O request corresponding to each hard disk determines the slow disk in the next preset period. The data stored in the memory 401 includes an average service time of the input and output I/O requests corresponding to different types of hard disks in the current preset period, a preset value, and a slow disk threshold corresponding to different types of hard disks in the next preset period.
在本发明实施例中,可选的,处理器402用于执行获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间包括:In the embodiment of the present invention, optionally, the processor 402 is configured to perform an average service time for obtaining input and output I/O requests corresponding to different types of hard disks in the current preset period, including:
获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值;Obtain an average value of the average service time of the I/O request corresponding to each hard disk in the current preset period;
获取当前预设周期内每个硬盘对应接收到的I/O请求的数量占每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率;Obtain a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk;
根据不同类型的硬盘中的每个硬盘的平均值以及比率获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。The average service time of I/O requests corresponding to different types of hard disks in the current preset period is obtained according to the average value and ratio of each hard disk in different types of hard disks.
存储器401存储的数据还可以包括上述平均值和比率。The data stored by the memory 401 may also include the above average values and ratios.
在本发明实施例中,可选的,处理器402用于执行获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值包括:In the embodiment of the present invention, optionally, the average value of the average service time of the processor 402 for performing the I/O request corresponding to each hard disk in the current preset period includes:
获取当前预设周期内每个硬盘对应接收到的I/O请求的响应时间之和;Obtaining the sum of response times of each hard disk corresponding to the received I/O request in the current preset period;
根据响应时间之和与当前预设周期内每个硬盘对应的I/O请求个数的比值获取当前预设周期内每个硬盘对应的I/O请求的平均服 务时间的平均值。Obtain an average of the I/O requests corresponding to each hard disk in the current preset period according to the ratio of the sum of the response times and the number of I/O requests corresponding to each hard disk in the current preset period. The average value of the time.
在本发明实施例中,可选的,处理器402用于执行获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值包括:In the embodiment of the present invention, optionally, the average value of the average service time of the processor 402 for performing the I/O request corresponding to each hard disk in the current preset period includes:
获取当前预设周期内的单位时间内每个硬盘对应的I/O请求的平均服务时间之和;Obtaining the sum of the average service time of the I/O request corresponding to each hard disk in the unit time within the current preset period;
根据平均服务时间之和与单位时间的个数的比值获取当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。The average value of the average service time of the I/O request corresponding to each hard disk in the current preset period is obtained according to the ratio of the sum of the average service time and the number of unit time.
在本发明实施例中,可选的,处理器402用于执行根据不同类型的硬盘中的每个硬盘的平均值以及比率获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间包括:In the embodiment of the present invention, the processor 402 is configured to perform an average of the I/O requests corresponding to different types of hard disks in the current preset period according to the average value and the ratio of each of the different types of hard disks. Service hours include:
将不同类型的硬盘中的每个硬盘的平均值和比率进行加权计算获取当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间;Weighting the average value and ratio of each hard disk in different types of hard disks to obtain an average service time of I/O requests corresponding to different types of hard disks in the current preset period;
其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。Wherein, if the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is expressed as AvgT, then AvgT=X 1 *Z 1 +X 2 *Z 2 +...X n *Z n , X 1 represents an average value corresponding to the first hard disk of any one of the hard disks, Z 1 represents a ratio corresponding to the first hard disk, and X 2 represents a second hard disk of the hard disk of any type. Corresponding average value, Z 2 represents the ratio corresponding to the second hard disk, X n represents the average value corresponding to the nth hard disk in the hard disk of any type, and Z n represents the corresponding nth hard disk. ratio.
在本发明实施例中,可选的,处理器402用于执行根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值包括:In the embodiment of the present invention, the processor 402 is configured to perform, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, to obtain the hard disk corresponding to the different types of hard disks in the next preset period. The slow disk threshold includes:
根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积获取下一预设周期不同类型的硬盘对应的慢盘阈值。According to the product of the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
在本发明实施例中,可选的,处理器402用于执行指令还可以用于:In the embodiment of the present invention, optionally, the processor 402 is configured to execute the instruction, and may also be used to:
在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与每个硬盘对应的I/O请求的平均服务时间确定不同类 型的硬盘中的慢盘。In the first preset period after the storage array is powered on, different types are determined according to the initial threshold corresponding to different types of hard disks and the average service time of I/O requests corresponding to each hard disk. A slow disk in a type of hard disk.
本发明实施例提供一种慢盘检测的装置,通过获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间,再根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值,进而根据不同类型的硬盘对应的慢盘阈值与下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定下一预设周期中的慢盘,由此,本发明能够根据当前预设周期内不同类型的硬盘的平均服务时间确定出下一预设周期的慢盘阈值,这样可对不同类型的硬盘由于其I/O的平均服务时间的不同制定差异化的慢盘阈值,也由于硬盘不同业务类型的I/O响应时间不同,不同服务年限的硬盘的I/O的响应时间也不同,导致硬盘的I/O的平均服务时间不同,使得本发明这种慢盘阈值的差异化确定相当于对系统内的硬盘做横向比较,因此,本发明不同类型的差异化的慢盘阈值也能够适应不同业务类型和不同服务年限的硬盘,能够根据不同硬盘类型、不同业务类型和不同服务年限的硬盘的差异化解决慢盘检测精确度低的问题,提升了慢盘检测的精确度。The embodiment of the invention provides a device for detecting a slow disk, which obtains an average service time of an input/output I/O request corresponding to different types of hard disks in a current preset period, and then according to I/O requests corresponding to different types of hard disks. The relationship between the average service time and the preset value is used to obtain the slow disk threshold corresponding to different types of hard disks in the next preset period, and then according to the slow disk threshold corresponding to different types of hard disks and the I/ corresponding to each hard disk in the next preset period. The average service time of the O request determines the slow disk in the next preset period. Therefore, the present invention can determine the slow disk threshold of the next preset period according to the average service time of different types of hard disks in the current preset period. Different types of hard disks can be differentiated from the slow disk threshold due to the different service time of the I/O, and the I/O response time of the hard disk with different service years due to different I/O response times of different service types of the hard disk. The time is also different, resulting in different average service time of the I/O of the hard disk, so that the difference of the slow disk threshold of the present invention is determined to be equivalent to horizontal comparison of the hard disks in the system. Therefore, different types of differentiated slow disk thresholds of the present invention can also adapt to different service types and different service years of hard disks, and can solve slow disk detection accuracy according to different hard disk types, different service types, and different service years of hard disks. The low problem improves the accuracy of slow disk detection.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, 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. In addition, 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.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理 单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in various embodiments of the present invention can be integrated into one process In the unit, each unit may be physically included 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 hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions 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, and the program code can be stored. Medium.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (14)

  1. 一种慢盘检测方法,其特征在于,包括:A slow disk detecting method, comprising:
    获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间;Obtain an average service time of input and output I/O requests corresponding to different types of hard disks in the current preset period;
    根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值;Obtaining a slow disk threshold corresponding to a different type of hard disk in the next preset period according to the relationship between the average service time of the I/O request corresponding to the type of the hard disk and the preset value;
    根据不同类型的硬盘对应的慢盘阈值与所述下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定所述下一预设周期中的慢盘。The slow disk in the next preset period is determined according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period.
  2. 根据权利要求1所述的方法,其特征在于,所述获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间包括:The method according to claim 1, wherein the obtaining an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period comprises:
    获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值;Obtaining an average value of an average service time of an I/O request corresponding to each hard disk in the current preset period;
    获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的数量占所述每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率;Obtaining a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk;
    根据不同类型的硬盘中的每个硬盘的所述平均值以及所述比率获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。Obtain an average service time of an I/O request corresponding to different types of hard disks in the current preset period according to the average value of each of the different types of hard disks and the ratio.
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值包括:The method according to claim 2, wherein the obtaining an average value of the average service time of the I/O request corresponding to each hard disk in the current preset period comprises:
    获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的响应时间之和;Obtaining a sum of response times of the I/O requests received by each of the hard disks in the current preset period;
    根据所述响应时间之和与所述当前预设周期内所述每个硬盘对应的I/O请求个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。Obtain an average service of the I/O request corresponding to each hard disk in the current preset period according to a ratio of the sum of the response times to the number of I/O requests corresponding to each hard disk in the current preset period. The average of the time.
  4. 根据权利要求2所述的方法,其特征在于,所述获取所述当 前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值包括:The method of claim 2 wherein said obtaining said The average of the average service time of the I/O requests for each hard disk in the previous preset period includes:
    获取所述当前预设周期内的单位时间内所述每个硬盘对应的I/O请求的平均服务时间之和;Obtaining, by the sum of the average service time of the I/O request corresponding to each hard disk in the unit time within the current preset period;
    根据所述平均服务时间之和与所述单位时间的个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。And obtaining an average value of the average service time of the I/O request corresponding to each hard disk in the current preset period according to the ratio of the sum of the average service time and the number of the unit time.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述根据不同类型的硬盘中的每个硬盘的所述平均值以及所述比率获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间包括:The method according to any one of claims 2-4, wherein the obtaining the different types of the current preset period according to the average value of each of the different types of hard disks and the ratio The average service time of the I/O request corresponding to the hard disk includes:
    将不同类型的硬盘中的每个硬盘的平均值和所述比率进行加权计算获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间;Weighting the average value of each of the different types of hard disks and the ratio to obtain an average service time of the I/O request corresponding to different types of hard disks in the current preset period;
    其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。Wherein, if the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is expressed as AvgT, then AvgT=X 1 *Z 1 +X 2 *Z 2 +...X n *Z n , X 1 represents an average value corresponding to the first hard disk of any one of the hard disks, Z 1 represents a ratio corresponding to the first hard disk, and X 2 represents a second hard disk of the hard disk of any type. Corresponding average value, Z 2 represents the ratio corresponding to the second hard disk, X n represents the average value corresponding to the nth hard disk in the hard disk of any type, and Z n represents the corresponding nth hard disk. ratio.
  6. 根据权利要求1所述的方法,其特征在于,所述根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值包括:The method according to claim 1, wherein the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value is obtained, and the slow disk corresponding to the different types of hard disks in the next preset period is obtained. Thresholds include:
    根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积获取下一预设周期不同类型的硬盘对应的慢盘阈值。According to the product of the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与所述每个硬盘对应的I/O请求的平均服务时间确定不同类型的硬盘中的慢盘。During the first preset period after the storage array is powered on, the slow disks in different types of hard disks are determined according to the initial thresholds corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
  8. 一种慢盘检测的装置,其特征在于,包括: A device for slow disk detection, comprising:
    获取单元,用于获取当前预设周期内不同类型的硬盘对应的输入输出I/O请求的平均服务时间;The obtaining unit is configured to obtain an average service time of the input/output I/O request corresponding to different types of hard disks in the current preset period;
    所述获取单元,还用于根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的关系获取下一预设周期不同类型的硬盘对应的慢盘阈值;The obtaining unit is further configured to obtain, according to the relationship between the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period;
    确定单元,用于根据不同类型的硬盘对应的慢盘阈值与所述下一预设周期中每个硬盘对应的I/O请求的平均服务时间确定所述下一预设周期中的慢盘。And a determining unit, configured to determine, according to the slow disk threshold corresponding to the different types of hard disks and the average service time of the I/O request corresponding to each hard disk in the next preset period, the slow disks in the next preset period.
  9. 根据权利要求8所述的装置,其特征在于,所述获取单元具体用于:The device according to claim 8, wherein the obtaining unit is specifically configured to:
    获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值;Obtaining an average value of an average service time of an I/O request corresponding to each hard disk in the current preset period;
    获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的数量占所述每个硬盘所属类型对应的所有硬盘接收到的I/O请求的总量的比率;Obtaining a ratio of the number of I/O requests received by each hard disk in the current preset period to the total amount of I/O requests received by all the hard disks corresponding to each type of the hard disk;
    根据不同类型的硬盘中的每个硬盘的所述平均值以及所述比率获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间。Obtain an average service time of an I/O request corresponding to different types of hard disks in the current preset period according to the average value of each of the different types of hard disks and the ratio.
  10. 根据权利要求9所述的装置,其特征在于,所述获取单元具体用于:The device according to claim 9, wherein the obtaining unit is specifically configured to:
    获取所述当前预设周期内所述每个硬盘对应接收到的I/O请求的响应时间之和;Obtaining a sum of response times of the I/O requests received by each of the hard disks in the current preset period;
    根据所述响应时间之和与所述当前预设周期内所述每个硬盘对应的I/O请求个数的比值获取所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。Obtain an average service of the I/O request corresponding to each hard disk in the current preset period according to a ratio of the sum of the response times to the number of I/O requests corresponding to each hard disk in the current preset period. The average of the time.
  11. 根据权利要求9所述的装置,其特征在于,所述获取单元具体用于:The device according to claim 9, wherein the obtaining unit is specifically configured to:
    获取所述当前预设周期内的单位时间内所述每个硬盘对应的I/O请求的平均服务时间之和;Obtaining, by the sum of the average service time of the I/O request corresponding to each hard disk in the unit time within the current preset period;
    根据所述平均服务时间之和与所述单位时间的个数的比值获取 所述当前预设周期内每个硬盘对应的I/O请求的平均服务时间的平均值。Obtaining according to the ratio of the sum of the average service time to the number of the unit time The average value of the average service time of the I/O request corresponding to each hard disk in the current preset period.
  12. 根据权利要求9-11任一项所述的装置,其特征在于,所述获取单元具体用于:The device according to any one of claims 9-11, wherein the obtaining unit is specifically configured to:
    将不同类型的硬盘中的每个硬盘的平均值和所述比率进行加权计算获取所述当前预设周期内不同类型的硬盘对应的I/O请求的平均服务时间;Weighting the average value of each of the different types of hard disks and the ratio to obtain an average service time of the I/O request corresponding to different types of hard disks in the current preset period;
    其中,若不同类型的硬盘中的任一类型的硬盘对应的I/O请求的平均服务时间表示为AvgT,则AvgT=X1*Z1+X2*Z2+…Xn*Zn,X1表示所述任一类型的硬盘中的第1个硬盘对应的平均值,Z1表示所述第1个硬盘对应的比率,X2表示所述任一类型的硬盘中的第2个硬盘对应的平均值,Z2表示所述第2个硬盘对应的比率,Xn表示所述任一类型的硬盘中的第n个硬盘对应的平均值,Zn表示所述第n个硬盘对应的比率。Wherein, if the average service time of the I/O request corresponding to any type of hard disk of different types of hard disks is expressed as AvgT, then AvgT=X 1 *Z 1 +X 2 *Z 2 +...X n *Z n , X 1 represents an average value corresponding to the first hard disk of any one of the hard disks, Z 1 represents a ratio corresponding to the first hard disk, and X 2 represents a second hard disk of the hard disk of any type. Corresponding average value, Z 2 represents the ratio corresponding to the second hard disk, X n represents the average value corresponding to the nth hard disk in the hard disk of any type, and Z n represents the corresponding nth hard disk. ratio.
  13. 根据权利要求8所述的装置,其特征在于,所述获取单元具体用于:The device according to claim 8, wherein the obtaining unit is specifically configured to:
    根据不同类型的硬盘对应的I/O请求的平均服务时间与预设值的乘积获取下一预设周期不同类型的硬盘对应的慢盘阈值。According to the product of the average service time of the I/O request corresponding to the different types of hard disks and the preset value, the slow disk threshold corresponding to the different types of hard disks in the next preset period is obtained.
  14. 根据权利要求8所述的装置,其特征在于,所述确定单元还用于:The device according to claim 8, wherein the determining unit is further configured to:
    在存储阵列上电后第一个预设周期内,根据不同类型的硬盘对应的初始阈值与所述每个硬盘对应的I/O请求的平均服务时间确定不同类型的硬盘中的慢盘。 During the first preset period after the storage array is powered on, the slow disks in different types of hard disks are determined according to the initial thresholds corresponding to different types of hard disks and the average service time of the I/O requests corresponding to each hard disk.
PCT/CN2016/100133 2015-09-29 2016-09-26 Method and device for detecting slow disk WO2017054690A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510634651.0A CN106557389B (en) 2015-09-29 2015-09-29 A kind of slow disk detection method and device
CN201510634651.0 2015-09-29

Publications (1)

Publication Number Publication Date
WO2017054690A1 true WO2017054690A1 (en) 2017-04-06

Family

ID=58414841

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100133 WO2017054690A1 (en) 2015-09-29 2016-09-26 Method and device for detecting slow disk

Country Status (2)

Country Link
CN (1) CN106557389B (en)
WO (1) WO2017054690A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241343A (en) * 2019-07-19 2021-01-19 深信服科技股份有限公司 Slow disk detection method and device, electronic equipment and readable storage medium
CN114327266A (en) * 2021-12-24 2022-04-12 深信服科技股份有限公司 Card slow identification method, device and medium of storage device
CN115934003A (en) * 2023-03-09 2023-04-07 浪潮电子信息产业股份有限公司 Slow disk identification method, device and equipment in disk array and readable storage medium
CN116149894A (en) * 2023-02-28 2023-05-23 哈尔滨工业大学(深圳) Method for detecting slow card and related equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815037B (en) * 2017-11-22 2021-07-20 华为技术有限公司 Slow disk detection method and storage array
CN108319527B (en) * 2017-12-21 2021-08-24 深圳创新科技术有限公司 Bad track disk detection method and device
CN109032851B (en) * 2018-06-26 2021-01-12 华为技术有限公司 Link fault determination method and device
CN112579379B (en) * 2020-12-24 2024-02-23 深信服科技股份有限公司 Card slow disc identification processing method, system and device and readable storage medium
CN114415973B (en) * 2022-03-28 2022-08-30 阿里云计算有限公司 Slow disk detection method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279775A (en) * 2011-08-19 2011-12-14 西安交通大学 Method for processing failure of hard disk under Linux system
CN103793292A (en) * 2012-11-03 2014-05-14 上海欧朋软件有限公司 Disaster recovery method for disk array
CN103810062A (en) * 2014-03-05 2014-05-21 华为技术有限公司 Slow disk detection method and device
CN104813290A (en) * 2012-12-06 2015-07-29 康佩伦特科技公司 Raid surveyor

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4472617B2 (en) * 2005-10-28 2010-06-02 富士通株式会社 RAID system, RAID controller and rebuild / copy back processing method thereof
CN102147708B (en) * 2010-02-10 2012-12-12 华为数字技术(成都)有限公司 Method and device for detecting discs
CN102568522B (en) * 2011-12-31 2015-08-19 曙光信息产业股份有限公司 The method of testing of hard disk performance and device
CN103488544B (en) * 2013-09-26 2016-08-17 华为技术有限公司 Detect the treating method and apparatus of slow dish

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279775A (en) * 2011-08-19 2011-12-14 西安交通大学 Method for processing failure of hard disk under Linux system
CN103793292A (en) * 2012-11-03 2014-05-14 上海欧朋软件有限公司 Disaster recovery method for disk array
CN104813290A (en) * 2012-12-06 2015-07-29 康佩伦特科技公司 Raid surveyor
CN103810062A (en) * 2014-03-05 2014-05-21 华为技术有限公司 Slow disk detection method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241343A (en) * 2019-07-19 2021-01-19 深信服科技股份有限公司 Slow disk detection method and device, electronic equipment and readable storage medium
CN112241343B (en) * 2019-07-19 2024-02-23 深信服科技股份有限公司 Slow disk detection method and device, electronic equipment and readable storage medium
CN114327266A (en) * 2021-12-24 2022-04-12 深信服科技股份有限公司 Card slow identification method, device and medium of storage device
CN114327266B (en) * 2021-12-24 2024-04-09 深信服科技股份有限公司 Method, device and medium for slowly identifying card of storage device
CN116149894A (en) * 2023-02-28 2023-05-23 哈尔滨工业大学(深圳) Method for detecting slow card and related equipment
CN116149894B (en) * 2023-02-28 2023-10-27 哈尔滨工业大学(深圳) Method for detecting slow card and related equipment
CN115934003A (en) * 2023-03-09 2023-04-07 浪潮电子信息产业股份有限公司 Slow disk identification method, device and equipment in disk array and readable storage medium

Also Published As

Publication number Publication date
CN106557389B (en) 2019-03-08
CN106557389A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
WO2017054690A1 (en) Method and device for detecting slow disk
EP2515233A1 (en) Detecting and diagnosing misbehaving applications in virtualized computing systems
US8935563B1 (en) Systems and methods for facilitating substantially continuous availability of multi-tier applications within computer clusters
US8627143B2 (en) Dynamically modeling and selecting a checkpoint scheme based upon an application workload
US20230188452A1 (en) Performance monitoring in a distributed storage system
US8230238B2 (en) Estimating power consumption in a computing environment
US11256595B2 (en) Predictive storage management system
WO2017012392A1 (en) Disk check method and apparatus
US10310937B2 (en) Dynamically restoring disks based on array properties
US20150074468A1 (en) SAN Vulnerability Assessment Tool
KR102219826B1 (en) Technologies for limiting performance variation in a storage device
US9535619B2 (en) Enhanced reconstruction in an array of information storage devices by physical disk reduction without losing data
US20210035011A1 (en) Machine Learning-Based Anomaly Detection Using Time Series Decomposition
US11126501B2 (en) Method, device and program product for avoiding a fault event of a disk array
JP2018514027A (en) System and method for improving quality of service in a hybrid storage system
US10275312B1 (en) Systems and methods for selecting a set of storage nodes for use in reconstructing data on a faulted node in an erasure-coded system
US9069819B1 (en) Method and apparatus for reliable I/O performance anomaly detection in datacenter
WO2019101087A1 (en) Slow-disk detection method, and storage array
US20150286548A1 (en) Information processing device and method
US20230342174A1 (en) Intelligent capacity planning for storage in a hyperconverged infrastructure
CN111831389A (en) Data processing method and device and storage medium
WO2021159687A1 (en) Data reconstruction method, storage device, and storage medium
CN115269289A (en) Slow disk detection method and device, electronic equipment and storage medium
CN113495680B (en) Data migration method and device, storage system and storage medium
US20230179501A1 (en) Health index of a service

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: 16850314

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: 16850314

Country of ref document: EP

Kind code of ref document: A1