Steady-state detection method and device for SSD device, and SSD device
By collecting and analyzing the IOPS data of SSD devices, calculating the average IOPS value and judging the steady-state evaluation value, the problem of SSD devices' steady-state detection is not intelligent, and accurate steady-state detection and intelligence improvement are achieved.
Patent Information
- Application Number
- CN202411065036.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The steady-state detection of SSD devices is not intelligent enough, making it difficult to effectively improve the detection intelligence.
By collecting IOPS data for the preset time period, dividing multiple time periods, calculating the average IOPS value of each time period, determining the steady-state evaluation value of the SSD, and determining whether the SSD is in a steady-state data state based on the evaluation value.
Dynamic steady-state detection is realized, and the steady-state degree of SSD is accurately evaluated by using IOPS data changes, improving the steady-state detection intelligence of SSD devices.
Smart Images

Figure CN119003302B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology or solid-state hard disk technology, and specifically to a steady-state detection method and device for an SSD device, and an SSD device. Background Art
[0002] In practical applications, a solid state disk (SSD), also known as a solid state drive or SSD device, can be a hard disk made of a solid-state electronic storage chip array. At present, the steady-state detection of SSD devices is not intelligent enough. Therefore, how to improve the intelligence of the steady-state detection of SSD devices needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a method and apparatus for steady-state detection of an SSD device, and an SSD device, which can improve the intelligence of steady-state detection of the SSD device.
[0004] In a first aspect, an embodiment of the present application provides a steady-state detection method for an SSD device, which is applied to an SSD device. The method includes:
[0005] Collect IOPS data in a preset time period to obtain multiple IOPS data;
[0006] Dividing the preset time period into multiple time periods in chronological order, acquiring IOPS data corresponding to the multiple time periods from the multiple IOPS data, to obtain multiple IOPS data sets;
[0007] Determine the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values;
[0008] Determine a current SSD steady-state evaluation value according to the multiple average IOPS values;
[0009] When the current SSD steady-state evaluation value is greater than a preset threshold, determining that the SSD is in a steady-state data state;
[0010] When the current SSD steady-state evaluation value is less than or equal to the preset threshold, it is determined that the SSD is not in the steady-state data state.
[0011] In a second aspect, an embodiment of the present application provides a steady-state detection device for an SSD device, which is applied to an SSD device. The device includes: a collection unit, an acquisition unit, and a determination unit, wherein:
[0012] The collecting unit is used to collect IOPS data in a preset time period to obtain multiple IOPS data;
[0013] The acquisition unit is configured to divide the preset time period into a plurality of time periods in chronological order, and acquire the IOPS data corresponding to the plurality of time periods from the plurality of IOPS data to obtain a plurality of IOPS data sets;
[0014] The determination unit is used to determine the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values; determine a current SSD steady-state evaluation value according to the multiple average IOPS values; determine that the SSD is in a steady-state data state when the current SSD steady-state evaluation value is greater than a preset threshold; and determine that the SSD is not in the steady-state data state when the current SSD steady-state evaluation value is less than or equal to the preset threshold.
[0015] In a third aspect, an embodiment of the present application provides an SSD device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiment of the present application.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.
[0018] The implementation of the embodiments of the present application has the following beneficial effects:
[0019] It can be seen that the steady-state detection method, device and SSD device of the SSD device described in the embodiment of the present application are applied to the SSD device, collect IOPS data of a preset time period, obtain multiple IOPS data, divide the preset time period into multiple time periods in chronological order, obtain IOPS data corresponding to multiple time periods from the multiple IOPS data, obtain multiple IOPS data sets, determine the average IOPS of each time period in the multiple time periods according to the multiple IOPS data sets, obtain multiple average IOPS values, determine the current SSD steady-state evaluation value according to the multiple average IOPS values, and when the current SSD steady-state evaluation value is greater than the preset threshold, determine that the SSD is in a steady-state data state, and when the current SSD steady-state evaluation value is less than or equal to the preset threshold, determine that the SSD is not in a steady-state data state. In this way, dynamic steady-state detection can be realized by using IOPS data changes. Since the IOPS data of a period of time reflects the steady-state change process, such as changing from a non-steady state to a steady state, and the correlation between the IOPS data between different time periods can be used to realize accurate steady-state evaluation, the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby realizing accurate steady-state detection, which helps to improve the intelligence of steady-state detection of the SSD device. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 It is a flowchart of a steady-state detection method for an SSD device provided in an embodiment of the present application;
[0022] Figure 2 It is a flowchart of another steady-state detection method of an SSD device provided in an embodiment of the present application;
[0023] Figure 3 is a structural schematic diagram of an SSD device provided in an embodiment of the present application;
[0024] Figure 4 It is a block diagram of the functional units of a steady-state detection device for an SSD device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0027] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0028] In the embodiments of the present application, the steady state of the SSD device can be understood as the SSD device reaching stable performance after being used for a period of time. The steady state of the SSD device can also be referred to as a steady data state.
[0029] In the embodiment of the present application, the number of read / write (I / O) operations per second (Input / Output Operations Per Second, IOPS) can be understood as the input and output volume (or the number of read and write times) per second. IOPS is one of the main indicators for measuring disk performance. Of course, IOPS can also be used to implement SSD steady-state detection.
[0030] The embodiments of the present application are described in detail below.
[0031] See also Figure 1 , Figure 1 1 is a flow chart of a steady-state detection method for an SSD device provided in an embodiment of the present application. As shown in the figure, the steady-state detection method for the SSD device is applied to an SSD device. The steady-state detection method for the SSD device includes:
[0032] 101. Collect IOPS data in a preset time period to obtain multiple IOPS data.
[0033] The preset time period may be preset or set by system default.
[0034] In a specific implementation, IOPS data may be collected at preset time intervals, and then a plurality of IOPS data may be obtained. The preset time interval may be pre-set or set by system default.
[0035] 102. Divide the preset time period into multiple time periods in chronological order, and obtain IOPS data corresponding to the multiple time periods from the multiple IOPS data to obtain multiple IOPS data sets.
[0036] In a specific implementation, the preset time period can be divided into multiple time periods in chronological order, and the durations of the time periods in the multiple time periods can be the same or different. Then, the IOPS data corresponding to the multiple time periods can be obtained from the multiple IOPS data to obtain multiple IOPS data sets.
[0037] In some possible examples, the following steps may also be included:
[0038] A1. Count the number of IOPS data in a preset range among the plurality of IOPS data to obtain a target statistical result;
[0039] A2. Determine the total number of the plurality of IOPS data;
[0040] A3, according to the target ratio between the target statistical result and the total quantity;
[0041] A4. When the target ratio is greater than a preset threshold, executing the step of dividing the preset time period into a plurality of time periods in chronological order.
[0042] The preset range may be preset or set by system default. The preset range may be understood as the average range of IOPS data during the change from a non-steady data state to a steady data state, or may be understood as the average range of IOPS data during the change from a steady data state to a non-steady data state.
[0043] In a specific implementation, the number of IOPS data within a preset range among multiple IOPS data can be counted to obtain a target statistical result, and the total number of multiple IOPS data can be determined. Then, based on the target ratio between the target statistical result and the total number, that is, the target ratio = target statistical result / total number, when the target ratio is greater than the preset threshold, it means that the effective proportion of the IOPS data is high, which means that the state will enter a steady-state data state from a non-steady-state data state, or enter a non-steady-state data state from a steady-state data state, and the step of dividing the preset time period into multiple time periods in chronological order is executed. In this way, dynamic steady-state detection can be realized by using the change of effective IOPS data. Since the IOPS data of a period of time reflects the steady-state change process, such as the change from a non-steady-state to a steady-state, and the correlation between the IOPS data between different time periods can be used to realize accurate steady-state evaluation, the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby realizing accurate steady-state detection, which helps to improve the steady-state detection intelligence of the SSD device.
[0044] 103. Determine an average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values.
[0045] In a specific implementation, the average IOPS of each of the multiple time periods can be determined according to the multiple IOPS data sets to obtain multiple average IOPS values, that is, the mean of each IOPS data set in the multiple IOPS data sets can be determined to obtain multiple average IOPS values.
[0046] In some possible examples, the above step 103, determining the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values, includes:
[0047] 31. Determine an average value of IOPS values in a target IOPS data set to obtain a reference average IOPS value; the target IOPS data set is any IOPS data set among the multiple IOPS data sets;
[0048] 32. Count the number of IOPS data in the target IOPS data set that is within the preset range to obtain a first statistical result;
[0049] 33. Determine the total number of IOPS of the target IOPS data set;
[0050] 34. According to a first ratio between the first statistical result and the total number of IOPS;
[0051] 35. Determine a target optimization coefficient corresponding to the first ratio;
[0052] 36. Optimize the reference average IOPS value according to the target optimization coefficient to obtain an average IOPS value corresponding to the target IOPS data set.
[0053] In a specific implementation, taking a target IOPS data set as an example, the target IOPS data set is any IOPS data set among multiple IOPS data sets. Then, the average value of the IOPS values in the target IOPS data set can be determined to obtain a reference average IOPS value. The number of IOPS data in the target IOPS data set that are within a preset range can also be counted to obtain a first statistical result, and the total number of IOPS of the target IOPS data set can be determined. According to the first ratio between the first statistical result and the total number of IOPS, the validity of the IOPS data can be determined. The mapping relationship between the preset ratio and the optimization coefficient can also be pre-stored. Then, based on the mapping relationship, the target optimization coefficient corresponding to the first ratio can be determined, and the reference average IOPS value can be optimized according to the target optimization coefficient to obtain the average IOPS value corresponding to the target IOPS data set, that is, the average IOPS value corresponding to the target IOPS data set = (1 + target optimization coefficient) * reference average IOPS value. In this way, the validity of the IOPS data can be used to dynamically optimize the average value, so that the average value is more in line with the actual situation, thereby achieving accurate steady-state detection, which helps to improve the steady-state detection intelligence of the SSD device.
[0054] 104. Determine a current SSD steady-state evaluation value according to the multiple average IOPS values.
[0055] In a specific implementation, the multiple average IOPS values are continuous and gradual to a certain extent. For example, the change from non-steady state to steady state is not a sudden change but a gradual change. Therefore, the current SSD steady-state evaluation value can be determined based on the multiple average IOPS values.
[0056] In some possible examples, the above step 104, determining the current SSD steady-state evaluation value according to the multiple average IOPS values, may include the following steps:
[0057] 41. Obtain a target average IOPS value from among the multiple average IOPS values, where the time period corresponding to the target average IOPS value is closest to the current time;
[0058] 42. Determine a reference SSD steady-state evaluation value corresponding to the target average IOPS according to a mapping relationship between a preset IOPS value and an SSD steady-state evaluation value;
[0059] 43. Determine a plurality of coordinate points according to the plurality of average IOPS values and corresponding time periods, wherein the horizontal axis of each coordinate point is time and the vertical axis is the IOPS value;
[0060] 44. Fitting the multiple coordinate points to obtain a fitting straight line and a fitting curve;
[0061] 45. Obtaining a target slope of the fitting straight line;
[0062] 46. Determine the fitting IOPS value at the current moment according to the fitting curve;
[0063] 47. Determine a target deviation between the fitted IOPS value and the target average IOPS value;
[0064] 48. Determine a target adjustment parameter corresponding to the target deviation;
[0065] 49. Determine a target fine-tuning parameter corresponding to the target slope;
[0066] 50. Adjust the reference SSD steady-state evaluation value according to the target adjustment parameter and the target fine-tuning parameter to obtain the current SSD steady-state evaluation value.
[0067] In the embodiment of the present application, a target average IOPS value among multiple average IOPS values can be obtained, and the time period corresponding to the target average IOPS value is closest to the current time. A mapping relationship between a preset IOPS value and an SSD steady-state evaluation value can also be pre-stored, and the SSD steady-state evaluation value is used to evaluate the steady-state degree, and a reference SSD steady-state evaluation value corresponding to the target average IOPS is determined according to the mapping relationship.
[0068] Next, multiple coordinate points can be determined based on multiple average IOPS values and corresponding time periods. The horizontal axis of each coordinate point is time, and the vertical axis is IOPS value. Each coordinate point corresponds to an average IOPS value and a time point, which is the middle moment of the time period corresponding to the average IOPS value. Multiple coordinate points are then fitted to obtain a fitting line and a fitting curve. The fitting line reflects the speed trend of steady-state changes, and the fitting curve reflects the result trend of steady-state changes.
[0069] Specifically, the target slope of the fitting line can be obtained, and the fitting IOPS value at the current moment can be determined according to the fitting curve, as well as the target deviation between the fitting IOPS value and the target average IOPS value, target deviation = (fitted IOPS value - target average IOPS value) / (fitted IOPS value + target average IOPS value). Since the steady state is also a dynamically changing process, the fitting curve can be used to predict the actual IOPS value. Of course, since the IOPS is collected at every preset time interval, the actual IOPS value at the current moment may not be collected exactly. Therefore, fitting can be used to accurately predict the IOPS value at the current moment. The target average IOPS value is the average IOPS value of the most recent time period, which can better reflect the current situation. The deviation reflects the changing trend of the IOPS value in a short period of time.
[0070] Furthermore, a mapping relationship between a preset deviation and an adjustment parameter may be stored in advance, and the value range of the adjustment parameter may be -0.1 to 0.1. The target adjustment parameter corresponding to the target deviation may be determined based on the mapping relationship. A mapping relationship between a preset slope and a fine-tuning parameter may be stored in advance, and the value range of the fine-tuning parameter may be -0.02 to 0.02. The target fine-tuning parameter corresponding to the target slope may be determined based on the mapping relationship. Next, the reference SSD steady-state evaluation value is adjusted according to the target adjustment parameter and the target fine-tuning parameter to obtain the current SSD steady-state evaluation value, that is, the current SSD steady-state evaluation value = (1 + target adjustment parameter) * ( 1+target fine-tuning parameter), where the deviation not only represents the degree of deviation, but also represents the direction of deviation. By determining the corresponding adjustment parameters through the deviation, the gap between prediction and reality can be narrowed. The fitting straight line reflects the speed trend of steady-state change, and the slope reflects the rhythm of its steady-state change. Then, considering the correlation between different time periods, the gap between prediction and reality can be narrowed again, which further helps to realize accurate steady-state evaluation by utilizing the correlation between IOPS data between different time periods. Based on the SSD steady-state evaluation value, the steady-state degree can be quantified, thereby realizing accurate steady-state detection, which helps to improve the steady-state detection intelligence of SSD devices.
[0071] In some possible examples, the above step 49 of determining the target fine-tuning parameter corresponding to the target slope may include the following steps:
[0072] 491. Determine a reference fine-tuning parameter corresponding to the target slope;
[0073] 492. Determine an increment between two adjacent average IOPS values according to the multiple average IOPS values to obtain multiple increments;
[0074] 493. Determine a target mean square error corresponding to the multiple increments;
[0075] 494. Determine a target feedback adjustment parameter corresponding to the target mean square error;
[0076] 495. Adjust the reference fine-tuning parameter according to the target feedback adjustment parameter to obtain the target fine-tuning parameter.
[0077] In an embodiment of the present application, a mapping relationship between a preset slope and a fine-tuning parameter can be pre-stored, and then, a reference fine-tuning parameter corresponding to the target slope can be determined based on the mapping relationship. Then, the increment between two adjacent average IOPS values can be determined based on multiple average IOPS values to obtain multiple increments. Taking the i-th average IOPS value and the i+1-th average IOPS value as examples, the corresponding increment is: Increment = (i+1-th average IOPS value-i-th average IOPS value) / i-th average IOPS value. The increment reflects the law of steady-state stage-by-stage changes to a certain extent, and the target mean square deviation corresponding to the multiple increments can also be determined. The mean square deviation reflects the smoothness of the steady-state stage-by-stage changes to a certain extent.
[0078] Furthermore, a mapping relationship between a preset mean square error and a feedback adjustment parameter can be pre-stored, and a target feedback adjustment parameter corresponding to the target mean square error can be determined based on the mapping relationship. The feedback adjustment parameter can be used to suppress interference in the steady-state change evaluation process (the interference is caused by the properties of the SSD device itself). The reference fine-tuning parameter is then adjusted according to the target feedback adjustment parameter to obtain the target fine-tuning parameter, that is, the target fine-tuning parameter = (1 + target feedback adjustment parameter) * reference fine-tuning parameter. In this way, the smoothness of the steady-state stage-by-stage changes can be used to determine the corresponding feedback adjustment parameter to suppress interference in the steady-state change evaluation process, thereby helping to achieve accurate steady-state detection and improving the steady-state detection intelligence of the SSD device.
[0079] 105. When the current SSD steady-state evaluation value is greater than a preset threshold, determine that the SSD is in a steady-state data state.
[0080] The preset threshold value can be preset or set by the system default. When the current SSD steady-state evaluation value is greater than the preset threshold value, it is determined that the SSD is in a steady-state data state. In this way, dynamic steady-state detection can be achieved using IOPS data changes. Since IOPS data over a period of time reflects the steady-state change process, such as the change from non-steady state to steady state, and the correlation between IOPS data in different time periods can be used to achieve accurate steady-state evaluation, the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby achieving accurate steady-state detection, which helps to improve the steady-state detection intelligence of SSD devices.
[0081] In some possible examples, the following steps may also be included:
[0082] B1. Obtain target hardware environment parameters and target software environment parameters of the SSD device;
[0083] B2. Determine a first threshold value corresponding to the target hardware environment parameter;
[0084] B3, determining a second threshold value corresponding to the target software environment parameter;
[0085] B4. Obtain target physical environment parameters of the SSD device;
[0086] B5. Determine a target weight pair corresponding to the target physical environment parameter, wherein the target weight pair includes a target first weight and a target second weight; the target first weight is a weight corresponding to the target hardware environment parameter, and the target second weight is a weight corresponding to the target software environment parameter;
[0087] B6. Perform a weighted operation on the first threshold, the second threshold, and the target weight to obtain the preset threshold.
[0088] In a specific implementation, the target hardware environment parameters may include at least one of the following: SSD device model, SSD hardware configuration parameters, etc., which are not limited here; the target software environment parameters may include at least one of the following: network bandwidth, memory size, flash memory size, SSD software configuration parameters, etc., which are not limited here. The target physical environment parameters may include at least one of the following: ambient temperature, ambient humidity, magnetic field interference intensity, ambient light intensity, etc., which are not limited here.
[0089] In a specific implementation, the target hardware environment parameters and target software environment parameters of the SSD device can be obtained, and the mapping relationship between the preset hardware environment parameters and the thresholds can be pre-stored, and then the first threshold corresponding to the target hardware environment parameters can be determined based on the mapping relationship. The mapping relationship between the preset software environment parameters and the thresholds can also be pre-stored, and then the second threshold corresponding to the target software environment parameters can be determined based on the mapping relationship. The target physical environment parameters of the SSD device can also be obtained, and the mapping relationship between the preset physical environment parameters and the weight pair can be pre-stored, and then the target weight pair corresponding to the target physical environment parameters can be determined based on the mapping relationship. The target weight pair includes a target first weight and a target second weight. The target first weight is the weight corresponding to the target hardware environment parameter, and the target second weight is the weight corresponding to the target software environment parameter. The target first weight + target second weight = 1.
[0090] Next, a weighted operation can be performed based on the first threshold, the second threshold, and the target weight pair to obtain a preset threshold, that is, preset threshold = first threshold * target first weight + second threshold * target second weight. In this way, on the one hand, thresholds corresponding to hardware environment parameters and software environment parameters can be obtained, and on the other hand, weight pairs corresponding to physical environment parameters can also be obtained. Based on the thresholds corresponding to the hardware environment parameters and software environment parameters and the weight pair, operations are performed to obtain thresholds corresponding to the actual hardware environment parameters, software environment parameters, and physical environment parameters, which helps to ensure the accuracy of SSD steady-state evaluation.
[0091] 106. When the current SSD steady-state evaluation value is less than or equal to the preset threshold, determine that the SSD is not in the steady-state data state.
[0092] In a specific implementation, when the current SSD steady-state evaluation value is less than or equal to a preset threshold, it can be determined that the SSD is not in a steady-state data state, that is, in a non-steady-state data state.
[0093] It can be seen that the steady-state detection method of the SSD device described in the embodiment of the present application is applied to the SSD device, collects IOPS data of a preset time period, obtains multiple IOPS data, divides the preset time period into multiple time periods in chronological order, obtains IOPS data corresponding to multiple time periods from the multiple IOPS data, obtains multiple IOPS data sets, determines the average IOPS of each time period in the multiple time periods according to the multiple IOPS data sets, obtains multiple average IOPS values, determines the current SSD steady-state evaluation value according to the multiple average IOPS values, and determines the SSD in a steady-state data state when the current SSD steady-state evaluation value is greater than a preset threshold value, and determines that the SSD is not in a steady-state data state when the current SSD steady-state evaluation value is less than or equal to the preset threshold value. In this way, dynamic steady-state detection can be realized by using IOPS data changes, because the IOPS data of a period of time reflects the steady-state change process, such as, it can change from a non-steady state to a steady state, and the correlation between the IOPS data between different time periods can be used to realize accurate steady-state evaluation, and the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby realizing accurate steady-state detection, which helps to improve the intelligence of steady-state detection of the SSD device.
[0094] See also Figure 2 , Figure 2 1 is a flow chart of a steady-state detection method for an SSD device provided in an embodiment of the present application. As shown in the figure, the steady-state detection method for the SSD device is applied to an SSD device. The steady-state detection method for the SSD device includes:
[0095] 201. Collect IOPS data in a preset time period to obtain multiple IOPS data.
[0096] 202. Count the number of IOPS data within a preset range among the multiple IOPS data to obtain a target statistical result.
[0097] 203. Determine the total number of the plurality of IOPS data.
[0098] 204. According to a target ratio between the target statistical result and the total quantity.
[0099] 205. When the target ratio is greater than a preset threshold, divide the preset time period into multiple time periods in chronological order, obtain IOPS data corresponding to the multiple time periods from the multiple IOPS data, and obtain multiple IOPS data sets.
[0100] 206. Determine an average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values.
[0101] 207. Determine a current SSD steady-state evaluation value according to the multiple average IOPS values.
[0102] 208. When the current SSD steady-state evaluation value is greater than a preset threshold, determine that the SSD is in a steady-state data state.
[0103] 209. When the current SSD steady-state evaluation value is less than or equal to the preset threshold, determine that the SSD is not in the steady-state data state.
[0104] The specific description of the above steps 201 to 209 can refer to the above Figure 1 The corresponding steps of the described steady-state detection method for the SSD device are not repeated here.
[0105] It can be seen that the steady-state detection method for an SSD device described in the embodiment of the present application is applied to an SSD device, collects IOPS data of a preset time period, obtains multiple IOPS data, counts the number of IOPS data in a preset range among the multiple IOPS data, obtains a target statistical result, determines the total number of the multiple IOPS data, and divides the preset time period into multiple time periods in chronological order according to a target ratio between the target statistical result and the total number when the target ratio is greater than a preset threshold value, obtains IOPS data corresponding to multiple time periods from the multiple IOPS data, obtains multiple IOPS data sets, determines the average IOPS of each time period in the multiple time periods according to the multiple IOPS data sets, and obtains multiple The average IOPS value determines the current SSD steady-state evaluation value based on multiple average IOPS values. When the current SSD steady-state evaluation value is greater than a preset threshold, it is determined that the SSD is in a steady-state data state. When the current SSD steady-state evaluation value is less than or equal to the preset threshold, it is determined that the SSD is not in a steady-state data state. In this way, the IOPS data change can be used to realize dynamic steady-state detection. Since the IOPS data of a period of time reflects the steady-state change process, such as the change from non-steady-state to steady-state, and the correlation between the IOPS data between different time periods can be used to realize accurate steady-state evaluation, the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby realizing accurate steady-state detection, which helps to improve the steady-state detection intelligence of SSD devices.
[0106] In accordance with the above embodiment, please refer to Figure 3 , Figure 3 : is a structural diagram of an SSD device provided in an embodiment of the present application. As shown in the figure, the SSD device includes a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor. In the embodiment of the present application, the program includes instructions for executing the following steps:
[0107] Collect IOPS data in a preset time period to obtain multiple IOPS data;
[0108] Dividing the preset time period into multiple time periods in chronological order, acquiring IOPS data corresponding to the multiple time periods from the multiple IOPS data, to obtain multiple IOPS data sets;
[0109] Determine the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values;
[0110] Determine a current SSD steady-state evaluation value according to the multiple average IOPS values;
[0111] When the current SSD steady-state evaluation value is greater than a preset threshold, determining that the SSD is in a steady-state data state;
[0112] When the current SSD steady-state evaluation value is less than or equal to the preset threshold, it is determined that the SSD is not in the steady-state data state.
[0113] In some possible examples, in determining the current SSD steady-state evaluation value according to the multiple average IOPS values, the program includes instructions for performing the following steps:
[0114] Obtaining a target average IOPS value among the multiple average IOPS values, wherein a time period corresponding to the target average IOPS value is closest to the current time;
[0115] Determine a reference SSD steady-state evaluation value corresponding to the target average IOPS according to a mapping relationship between a preset IOPS value and an SSD steady-state evaluation value;
[0116] Determine a plurality of coordinate points according to the plurality of average IOPS values and corresponding time periods, wherein the horizontal axis of each coordinate point is time and the vertical axis is the IOPS value;
[0117] Fitting the multiple coordinate points to obtain a fitting straight line and a fitting curve;
[0118] Obtaining a target slope of the fitted straight line;
[0119] Determine the fitting IOPS value at the current moment according to the fitting curve;
[0120] Determining a target deviation between the fitted IOPS value and the target average IOPS value;
[0121] Determining a target adjustment parameter corresponding to the target deviation;
[0122] determining a target fine-tuning parameter corresponding to the target slope;
[0123] The reference SSD steady-state evaluation value is adjusted according to the target adjustment parameter and the target fine-tuning parameter to obtain the current SSD steady-state evaluation value.
[0124] In some possible examples, in determining the target fine-tuning parameter corresponding to the target slope, the program includes instructions for performing the following steps:
[0125] determining a reference fine-tuning parameter corresponding to the target slope;
[0126] Determine an increment between two adjacent average IOPS values according to the multiple average IOPS values to obtain multiple increments;
[0127] Determining target mean square errors corresponding to the plurality of increments;
[0128] Determining a target feedback adjustment parameter corresponding to the target mean square error;
[0129] The reference fine-tuning parameter is adjusted according to the target feedback adjustment parameter to obtain the target fine-tuning parameter.
[0130] In some possible examples, the above program also includes instructions for performing the following steps:
[0131] Obtain target hardware environment parameters and target software environment parameters of the SSD device;
[0132] Determining a first threshold value corresponding to the target hardware environment parameter;
[0133] Determining a second threshold value corresponding to the target software environment parameter;
[0134] Obtaining target physical environment parameters of the SSD device;
[0135] Determine a target weight pair corresponding to the target physical environment parameter, the target weight pair comprising a target first weight and a target second weight; the target first weight is a weight corresponding to the target hardware environment parameter, and the target second weight is a weight corresponding to the target software environment parameter;
[0136] A weighted operation is performed according to the first threshold, the second threshold, and the target weight to obtain the preset threshold.
[0137] In some possible examples, the above program also includes instructions for performing the following steps:
[0138] Counting the number of IOPS data within a preset range among the multiple IOPS data to obtain a target statistical result;
[0139] Determine the total number of the plurality of IOPS data;
[0140] According to a target ratio between the target statistical result and the total quantity;
[0141] When the target ratio is greater than a preset threshold, the step of dividing the preset time period into a plurality of time periods in chronological order is performed.
[0142] It can be seen that the SSD device described in the embodiment of the present application collects IOPS data of a preset time period to obtain multiple IOPS data, divides the preset time period into multiple time periods in chronological order, obtains IOPS data corresponding to multiple time periods from the multiple IOPS data, obtains multiple IOPS data sets, determines the average IOPS of each time period in the multiple time periods according to the multiple IOPS data sets, obtains multiple average IOPS values, determines the current SSD steady-state evaluation value according to the multiple average IOPS values, and determines the SSD in a steady-state data state when the current SSD steady-state evaluation value is greater than a preset threshold value, and determines that the SSD is not in a steady-state data state when the current SSD steady-state evaluation value is less than or equal to the preset threshold value. In this way, dynamic steady-state detection can be achieved by using IOPS data changes, because the IOPS data of a period of time reflects the steady-state change process, such as, it can change from a non-steady state to a steady state, and the correlation between IOPS data between different time periods can be used to achieve accurate steady-state evaluation, and the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby achieving accurate steady-state detection, which helps to improve the steady-state detection intelligence of the SSD device.
[0143] Figure 4 4 is a functional unit block diagram of a steady-state detection device 400 of an SSD device involved in an embodiment of the present application. The steady-state detection device 400 of the SSD device is applied to the SSD device, and the steady-state detection device 400 of the SSD device includes: a collection unit 401, an acquisition unit 402 and a determination unit 403, wherein:
[0144] The collecting unit 401 is used to collect IOPS data in a preset time period to obtain multiple IOPS data;
[0145] The acquisition unit 402 is configured to divide the preset time period into a plurality of time periods in chronological order, and acquire the IOPS data corresponding to the plurality of time periods from the plurality of IOPS data to obtain a plurality of IOPS data sets;
[0146] The determination unit 403 is used to determine the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values; determine the current SSD steady-state evaluation value according to the multiple average IOPS values; when the current SSD steady-state evaluation value is greater than a preset threshold, determine that the SSD is in a steady-state data state; when the current SSD steady-state evaluation value is less than or equal to the preset threshold, determine that the SSD is not in the steady-state data state.
[0147] In some possible examples, in determining the current SSD steady-state evaluation value according to the multiple average IOPS values, the determining unit 403 is specifically configured to:
[0148] Obtaining a target average IOPS value among the multiple average IOPS values, wherein a time period corresponding to the target average IOPS value is closest to the current time;
[0149] Determine a reference SSD steady-state evaluation value corresponding to the target average IOPS according to a mapping relationship between a preset IOPS value and an SSD steady-state evaluation value;
[0150] Determine a plurality of coordinate points according to the plurality of average IOPS values and corresponding time periods, wherein the horizontal axis of each coordinate point is time and the vertical axis is the IOPS value;
[0151] Fitting the multiple coordinate points to obtain a fitting straight line and a fitting curve;
[0152] Obtaining a target slope of the fitted straight line;
[0153] Determine the fitting IOPS value at the current moment according to the fitting curve;
[0154] Determining a target deviation between the fitted IOPS value and the target average IOPS value;
[0155] Determining a target adjustment parameter corresponding to the target deviation;
[0156] determining a target fine-tuning parameter corresponding to the target slope;
[0157] The reference SSD steady-state evaluation value is adjusted according to the target adjustment parameter and the target fine-tuning parameter to obtain the current SSD steady-state evaluation value.
[0158] In some possible examples, in determining the target fine-tuning parameter corresponding to the target slope, the determining unit 403 is specifically configured to:
[0159] determining a reference fine-tuning parameter corresponding to the target slope;
[0160] Determine an increment between two adjacent average IOPS values according to the multiple average IOPS values to obtain multiple increments;
[0161] Determining target mean square errors corresponding to the plurality of increments;
[0162] Determining a target feedback adjustment parameter corresponding to the target mean square error;
[0163] The reference fine-tuning parameter is adjusted according to the target feedback adjustment parameter to obtain the target fine-tuning parameter.
[0164] In some possible examples, the steady-state detection device 400 of the SSD device is further specifically used for:
[0165] Obtain target hardware environment parameters and target software environment parameters of the SSD device;
[0166] Determining a first threshold value corresponding to the target hardware environment parameter;
[0167] Determining a second threshold value corresponding to the target software environment parameter;
[0168] Obtaining target physical environment parameters of the SSD device;
[0169] Determine a target weight pair corresponding to the target physical environment parameter, the target weight pair comprising a target first weight and a target second weight; the target first weight is a weight corresponding to the target hardware environment parameter, and the target second weight is a weight corresponding to the target software environment parameter;
[0170] A weighted operation is performed according to the first threshold, the second threshold, and the target weight to obtain the preset threshold.
[0171] In some possible examples, the steady-state detection device 400 of the SSD device is further specifically used for:
[0172] Counting the number of IOPS data within a preset range among the multiple IOPS data to obtain a target statistical result;
[0173] Determine the total number of the plurality of IOPS data;
[0174] According to a target ratio between the target statistical result and the total quantity;
[0175] When the target ratio is greater than a preset threshold, the step of dividing the preset time period into a plurality of time periods in chronological order is performed.
[0176] It can be seen that the steady-state detection device of the SSD device described in the embodiment of the present application is applied to the SSD device, collects IOPS data of a preset time period, obtains multiple IOPS data, divides the preset time period into multiple time periods in chronological order, obtains IOPS data corresponding to multiple time periods from the multiple IOPS data, obtains multiple IOPS data sets, determines the average IOPS of each time period in the multiple time periods according to the multiple IOPS data sets, obtains multiple average IOPS values, determines the current SSD steady-state evaluation value according to the multiple average IOPS values, and determines the SSD in a steady-state data state when the current SSD steady-state evaluation value is greater than a preset threshold value, and determines that the SSD is not in a steady-state data state when the current SSD steady-state evaluation value is less than or equal to the preset threshold value. In this way, dynamic steady-state detection can be realized by using IOPS data changes. Since the IOPS data of a period of time reflects the steady-state change process, such as changing from a non-steady state to a steady state, and the correlation between the IOPS data between different time periods can be used to realize accurate steady-state evaluation, the steady-state degree can be quantified based on the SSD steady-state evaluation value, thereby realizing accurate steady-state detection, which helps to improve the intelligence of steady-state detection of the SSD device.
[0177] It can be understood that the functions of each program module of the steady-state detection device of the SSD device of this embodiment can be specifically implemented according to the method in the above method embodiment, and its specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0178] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments.
[0179] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the above method embodiment. The computer program product may be a software installation package.
[0180] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0181] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0182] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0183] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0185] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0186] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0187] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A steady-state detection method for an SSD device, characterized in that: Applied to an SSD device, the method comprises: Collect IOPS data in a preset time period to obtain multiple IOPS data; Dividing the preset time period into multiple time periods in chronological order, acquiring IOPS data corresponding to the multiple time periods from the multiple IOPS data, to obtain multiple IOPS data sets; Determine the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values; Determine a current SSD steady-state evaluation value according to the multiple average IOPS values; When the current SSD steady-state evaluation value is greater than a preset threshold, determining that the SSD is in a steady-state data state; When the current SSD steady-state evaluation value is less than or equal to the preset threshold, determining that the SSD is not in the steady-state data state; The step of determining the current SSD steady-state evaluation value according to the multiple average IOPS values includes: Obtaining a target average IOPS value among the multiple average IOPS values, wherein a time period corresponding to the target average IOPS value is closest to the current time; Determine a reference SSD steady-state evaluation value corresponding to the target average IOPS according to a mapping relationship between a preset IOPS value and an SSD steady-state evaluation value; Determine a plurality of coordinate points according to the plurality of average IOPS values and corresponding time periods, wherein the horizontal axis of each coordinate point is time and the vertical axis is the IOPS value; Fitting the multiple coordinate points to obtain a fitting straight line and a fitting curve; Obtaining a target slope of the fitted straight line; Determine the fitting IOPS value at the current moment according to the fitting curve; Determining a target deviation between the fitted IOPS value and the target average IOPS value; Determining a target adjustment parameter corresponding to the target deviation; determining a target fine-tuning parameter corresponding to the target slope; The reference SSD steady-state evaluation value is adjusted according to the target adjustment parameter and the target fine-tuning parameter to obtain the current SSD steady-state evaluation value.
2. The method according to claim 1, characterized in that The determining of a target fine-tuning parameter corresponding to the target slope includes: determining a reference fine-tuning parameter corresponding to the target slope; Determine an increment between two adjacent average IOPS values according to the multiple average IOPS values to obtain multiple increments; Determining target mean square errors corresponding to the plurality of increments; Determining a target feedback adjustment parameter corresponding to the target mean square error; The reference fine-tuning parameter is adjusted according to the target feedback adjustment parameter to obtain the target fine-tuning parameter.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtain target hardware environment parameters and target software environment parameters of the SSD device; Determining a first threshold value corresponding to the target hardware environment parameter; Determining a second threshold value corresponding to the target software environment parameter; Obtaining target physical environment parameters of the SSD device; Determine a target weight pair corresponding to the target physical environment parameter, the target weight pair comprising a target first weight and a target second weight; the target first weight is a weight corresponding to the target hardware environment parameter, and the target second weight is a weight corresponding to the target software environment parameter; A weighted operation is performed according to the first threshold, the second threshold, and the target weight to obtain the preset threshold.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Counting the number of IOPS data within a preset range among the multiple IOPS data to obtain a target statistical result; Determine the total number of the plurality of IOPS data; According to a target ratio between the target statistical result and the total quantity; When the target ratio is greater than a preset threshold, the step of dividing the preset time period into a plurality of time periods in chronological order is performed.
5. A steady-state detection device for an SSD device, characterized in that: Applied to SSD equipment, the device comprises: a collection unit, an acquisition unit and a determination unit, wherein: The collecting unit is used to collect IOPS data in a preset time period to obtain multiple IOPS data; The acquisition unit is configured to divide the preset time period into a plurality of time periods in chronological order, and acquire the IOPS data corresponding to the plurality of time periods from the plurality of IOPS data to obtain a plurality of IOPS data sets; The determining unit is used to determine the average IOPS of each of the multiple time periods according to the multiple IOPS data sets to obtain multiple average IOPS values; determine the current SSD steady-state evaluation value according to the multiple average IOPS values; when the current SSD steady-state evaluation value is greater than a preset threshold, determine that the SSD is in a steady-state data state; when the current SSD steady-state evaluation value is less than or equal to the preset threshold, determine that the SSD is not in the steady-state data state; Wherein, in determining the current SSD steady-state evaluation value according to the multiple average IOPS values, the determining unit is specifically used to: Obtaining a target average IOPS value among the multiple average IOPS values, wherein a time period corresponding to the target average IOPS value is closest to the current time; Determine a reference SSD steady-state evaluation value corresponding to the target average IOPS according to a mapping relationship between a preset IOPS value and an SSD steady-state evaluation value; Determine a plurality of coordinate points according to the plurality of average IOPS values and corresponding time periods, wherein the horizontal axis of each coordinate point is time and the vertical axis is the IOPS value; Fitting the multiple coordinate points to obtain a fitting straight line and a fitting curve; Obtaining a target slope of the fitted straight line; Determine the fitting IOPS value at the current moment according to the fitting curve; Determining a target deviation between the fitted IOPS value and the target average IOPS value; Determining a target adjustment parameter corresponding to the target deviation; determining a target fine-tuning parameter corresponding to the target slope; The reference SSD steady-state evaluation value is adjusted according to the target adjustment parameter and the target fine-tuning parameter to obtain the current SSD steady-state evaluation value.
6. The device according to claim 5, characterized in that In terms of determining the target fine-tuning parameter corresponding to the target slope, the determining unit is specifically configured to: determining a reference fine-tuning parameter corresponding to the target slope; Determine an increment between two adjacent average IOPS values according to the multiple average IOPS values to obtain multiple increments; Determining target mean square errors corresponding to the plurality of increments; Determining a target feedback adjustment parameter corresponding to the target mean square error; The reference fine-tuning parameter is adjusted according to the target feedback adjustment parameter to obtain the target fine-tuning parameter.
7. The device according to claim 5 or 6, characterized in that The device is also specifically used for: Obtain target hardware environment parameters and target software environment parameters of the SSD device; Determining a first threshold value corresponding to the target hardware environment parameter; Determining a second threshold value corresponding to the target software environment parameter; Obtaining target physical environment parameters of the SSD device; Determine a target weight pair corresponding to the target physical environment parameter, the target weight pair comprising a target first weight and a target second weight; the target first weight is a weight corresponding to the target hardware environment parameter, and the target second weight is a weight corresponding to the target software environment parameter; A weighted operation is performed according to the first threshold, the second threshold, and the target weight to obtain the preset threshold.
8. An SSD device, characterized in that: The method comprises a processor, a memory and a communication interface, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the programs include instructions for executing the steps in the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
NVMe solid state disk IOPS test method, system and device
CN110111835A