WO2020224500A1 - Data processing method and apparatus for solid state disk - Google Patents
Data processing method and apparatus for solid state disk Download PDFInfo
- Publication number
- WO2020224500A1 WO2020224500A1 PCT/CN2020/087728 CN2020087728W WO2020224500A1 WO 2020224500 A1 WO2020224500 A1 WO 2020224500A1 CN 2020087728 W CN2020087728 W CN 2020087728W WO 2020224500 A1 WO2020224500 A1 WO 2020224500A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- solid state
- read
- time period
- intensity
- hard disk
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0659—Command handling arrangements, e.g. command buffers, queues, command scheduling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Definitions
- the present invention relates to the technical field of solid-state hard disk data processing, in particular to a solid-state hard disk data processing method and device.
- the read and write buffer of the SSD is relatively small, generally a few MB to tens of MB. Due to the asymmetric problem of the bus bandwidth of the SSD interface and the storage speed of the SSD solid state drive, the internal storage Buffer often becomes the bottleneck of write performance.
- the embodiment of the present invention provides a data processing method and device for a solid state drive, which are used to predict the I/O information of the first time period in the future according to a prediction model, so as to perform active management on the solid state drive based on the prediction result to reduce the number of hosts Terminal operation response time.
- the first aspect of the embodiments of the present application provides a data processing method for a solid-state hard disk, including:
- the I/O type includes read operation and write operation
- the performing management of the solid state drive according to the prediction result includes:
- the adjusting the cache allocation in the solid state hard disk according to the second read-write ratio includes:
- the performing management on the solid state disk according to the prediction result includes:
- the solid state disk is in an idle state.
- the performing management on the solid state disk according to the prediction result includes:
- the performing management on the solid state disk according to the prediction result includes:
- the performing management on the solid state disk according to the prediction result includes:
- the prediction model is built into the solid state hard disk and/or the host side to reduce the operation response time of the host side.
- An embodiment of the present application also provides a data processing device for a solid state hard disk, including:
- the prediction unit is used to predict the I/O information of the first time period in the future through the prediction model, and the I/O information includes at least I/O type and/or I/O size;
- the management unit is used to perform management on the solid state drive according to the prediction result, so as to reduce the operation response time of the host side.
- the I/O type includes read operation and write operation
- the management unit is specifically used for:
- the management unit is specifically used for:
- the management unit is specifically used for:
- the solid state disk is in an idle state.
- the management unit is specifically used for:
- the management unit is specifically used for:
- the management unit is specifically used for:
- the prediction model is built in the solid state hard disk and/or the host.
- the embodiment of the present application also provides a computer device, including a processor, which is used to implement the data processing method of the solid-state hard disk provided in the first aspect of the embodiment of the present application when the processor executes the computer program stored on the memory.
- the embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
- the computer program When the computer program is executed by a processor, it is used to implement the data processing method of the solid state hard disk provided in the first aspect of the embodiment of the present application.
- the I/O information of the first time period in the future is predicted according to the prediction model, and the I/O information includes I/O type and I/O intensity. Active management is performed on the solid state drive according to the prediction result to Reduce the operation response time on the host side. Because in the embodiment of this application, the I/O information of the first time period in the future can be predicted based on the prediction model, and the solid state drive can be actively managed based on the predicted result to reduce the operation response time of the host side, thereby improving the performance of the solid state drive. The main control performance improves the user experience of the solid state drive.
- FIG. 1 is a schematic diagram of an embodiment of a data processing method of a solid-state hard disk in an embodiment of the application
- FIG. 2 is a detailed step of step 101 in the embodiment of FIG. 1 in the embodiment of this application;
- FIG. 3 is a detailed step of step 203 in the embodiment of FIG. 2 in the embodiment of this application;
- FIG. 4 is a detailed step of step 301 in the embodiment of FIG. 3 in the embodiment of this application;
- FIG. 5 is a detailed step of step 303 in the embodiment of FIG. 3 in the embodiment of this application;
- Fig. 6 is a schematic diagram of a neuron set in an embodiment of the application.
- FIG. 7 is a schematic diagram of the calculation process of each neuron cell in an embodiment of the application.
- FIG. 8 is a detailed step of step 102 in the embodiment of FIG. 1 in the embodiment of this application;
- FIG. 9 is another detailed step of step 102 in the embodiment of FIG. 1 in the embodiment of this application.
- FIG. 10 is another detailed step of step 102 in the embodiment of FIG. 1 in the embodiment of this application;
- FIG. 11 is a schematic diagram of an embodiment of a data processing device for a solid-state hard disk in an embodiment of the application.
- the embodiment of the present invention provides a data processing method and device for a solid state drive, which are used to predict the I/O information of the first time period in the future according to a prediction model, so as to perform active management on the solid state drive based on the prediction result to reduce the number of hosts Terminal operation response time.
- the embodiment of the application proposes A data processing method and device for a solid state hard disk are used to solve the problem that the write buffer Buffer is small and the response time of the host side operation is too long.
- An embodiment of the data processing method of the solid state drive in the embodiment of the present application includes:
- I/O information for the first time period in the future through a prediction model, where the I/O information includes at least I/O type and/or I/O intensity;
- the embodiment of the present application can use the data processing device of the solid state hard disk to use the predictive model to analyze the I/O in the first time period in the future.
- Information is predicted, where the I/O information includes at least I/O type and I/O intensity, so as to perform step 102 according to the predicted result.
- the data processing device of the solid-state hard disk After obtaining the I/O prediction results for the first time period in the future, the data processing device of the solid-state hard disk performs active management on the solid-state hard disk according to the predicted result, so as to reduce the operation impact time of the host side and improve the user's practical experience of the solid-state hard disk.
- the I/O information of the first time period in the future is predicted according to the prediction model, and the I/O information includes I/O type and I/O intensity. Active management is performed on the solid state drive according to the prediction result to Reduce the operation response time on the host side. Because in the embodiment of this application, the I/O information of the first time period in the future can be predicted based on the prediction model, and the solid state drive can be actively managed based on the predicted result to reduce the operation response time of the host side, thereby improving the performance of the solid state drive. The main control performance improves the user experience of the solid state drive.
- step 101 is described in detail below. Please refer to Fig. 2 for details.
- Fig. 2 shows the detailed steps of step 101:
- the interface protocol command is a communication protocol command used between the host and the memory (solid state drive SSD), mainly including SATA, PCIe, NVMe and other protocol interfaces.
- the interface protocol instructions in this embodiment are NVMe instructions.
- NVMe is an interface specification for connecting storage to a server through a PCI Express bus. Simply put, NVMe makes the communication between the SSD and the host system faster. In the embodiment of the present application, during the data interaction process between the SSD disk and the host system, the NVMe protocol commands are used to implement fast data input and output.
- SSD uses passive solid-state drive management (passive buffer scheduling, passive garbage collection, etc.) to implement hardware resource configuration and instruction queue management in SSD.
- hardware resource configuration includes buffer scheduling and garbage collection. Wait.
- the solid state drive SSD receives the NVMe protocol instruction sent by the host system
- the data processing device of the solid state drive obtains the protocol instruction, and executes step 202 according to the protocol instruction, so as to realize the first time period in the future. Forecast of I/O information.
- the data processing device of the solid state hard disk may actively obtain the NVMe protocol command from the SSD, or may passively receive the NVMe protocol command sent by the SSD, and there is no specific limitation here.
- the interface protocol command parse the interface protocol command to obtain I/O information in the protocol command, where the I/O information includes at least an I/O time stamp, an I/O type, and an I/O size;
- the data processing device of the solid state hard disk After the data processing device of the solid state hard disk obtains the interface protocol instruction, it parses the interface protocol instruction to obtain the I/O information in the protocol instruction, and the parsing action can be embodied in accordance with specific protocol specifications (such as NVMe protocol specifications), Read the I/O information in the protocol command, where the I/O information includes at least I/O timestamp, I/O type and I/O size.
- specific protocol specifications such as NVMe protocol specifications
- the I/O timestamp is the generation time of the I/O operation
- the I/O type includes read operation or write operation
- the I/O size is the data length of the read operation or write operation.
- the data processing device of the solid state hard disk After the data processing device of the solid state hard disk obtains the I/O information of the current time period, it can learn the I/O information of the past time period according to the machine learning algorithm, so as to predict the I/O information of the first time period in the future .
- machine learning algorithms include but are not limited to neural networks, support vector machines, linear regression, time series, etc. There are no specific restrictions on the machine learning algorithms here.
- step 203 in the embodiment in FIG. 2 will be described in detail below. Please refer to FIG. 3 for details.
- FIG. 3 is a detailed step of step 203 in the embodiment in FIG.
- the data processing device of the solid state hard disk obtains the I/O information in the instruction by parsing the interface protocol instruction (such as the NVMe protocol instruction), and performs preprocessing on the I/O information to obtain the first I/O information table.
- the interface protocol instruction such as the NVMe protocol instruction
- the data processing device of the solid-state hard disk After acquiring the first I/O information table, the data processing device of the solid-state hard disk merges multiple adjacent I/O operations in the first I/O information table into one I/O operation, where the combination can be understood as Connect the 8 adjacent I/Os processed in the following table 2 and merge them into one I/O input, so that compared with the existing one I/O operation input, multiple I/Os can be input at the same time Calculate once, thereby greatly reducing the amount of calculation and meeting the needs of real-time calculation.
- I/O operations may be combined into one I/O operation, or 8 adjacent I/O operations may be combined into one I/O operation.
- “multiple "It is mainly determined by the processing performance of the processor (that is, the computing power of the processor). If the computing power of the processor is weak, more adjacent numbers of I/O operations can be combined. If the computing power of the processor is strong , You can combine a smaller number of adjacent I/O operations to adapt to the processing performance of the processor.
- a set of I/O operation characteristic values can be obtained.
- the specific I/O operation characteristic values are related to I/O timestamp, I/O type and Variables of the I/O size, and in order to predict the I/O information in the first time period in the future, a machine learning algorithm is generally used for prediction.
- the machine learning algorithm in this embodiment is preferably a neural network learning algorithm.
- the training process of the neural network learning model according to the known I/O information is described in detail in the prior art, and will not be repeated here, and the neural network is executed for the combined I/O operation characteristic values
- model learning that is, model inference
- I/O prediction is required Information performs post-processing, such as deleting the abnormal prediction value in the I/O prediction information, and obtaining the normal prediction result.
- FIG. 4 shows the detailed steps of step 301 in the embodiment in FIG. 3.
- the I/O timestamp calculate the time interval between multiple sets of I/O operations that meet the first preset number.
- step 301 it is assumed that after the data processing device of the solid-state hard disk performs analysis on the NVMe instruction, the I/O information obtained is as shown in Table 1:
- the preprocessing process is to first perform step 401, that is, to calculate the time between multiple sets of I/O operations that meet the first preset number Specifically, step 401 can be to calculate the time interval between 32 I/O operations, or to calculate the time interval between 16 I/O operations.
- the selection of the preset number depends on the processing capacity of the host system. To make specific restrictions, the following takes 32 I/O operations as an example.
- timestepi represents the timestamp of the i-th I/O instruction.
- the sum of the number of read operations and write operations of the first preset number of I/O operations in each group within the time interval and the corresponding data size can be calculated according to the above formula.
- the combined data size needs to be compressed to a reasonable range (0-500), so the size of the read I/O corresponding to a set of 32 I/Os needs to be accumulated, and then divided by 200K for compression, similarly accumulate the size of read I/O corresponding to a set of 32 I/Os, and then divide by 200K for compression to obtain the processed first I/O information table as shown in Table 2. .
- the size of the compression ratio can be customized according to actual needs (for example, the size of the read I/O corresponding to a set of 32 I/Os can be accumulated, and then divided by 400K or 500K for compression), as long as the compression
- the size of the latter data only needs to meet the data range for regression analysis, and there is no specific restriction here.
- the time interval in Table 2 above represents the time interval between 32 I/O operations.
- the total I/O type represents the total number of read operations and write operations in 32 I/O operations. For example, when the sum is 0, then Indicates that the 32 I/O operations are all read operations, and when the sum is 4, it indicates that there are 4 write operations and 28 read operations in the 32 I/O operations, and the read operations and write operations correspond to compression
- the latter data size is the compressed data size corresponding to the total read operations and total write operations in the total of 32 I/Os.
- the preprocessing process of the I/O information is described in detail, that is, the generation process of the first I/O information table is described in detail, which improves the implementability of the embodiments of the present application.
- FIG. 5 shows the detailed steps of step 303 in the embodiment of FIG. 3.
- /O operation characteristic value is related to the I/O timestamp, the I/O type, and the I/O size;
- multiple adjacent I/O operations in Table 2 are combined into one I/O operation, and then multiple combined I/O operation characteristic values are input to
- the input fully connected layer of the neural network uses linear transformation to map the merged I/O operation characteristic values into a high-dimensional vector space, that is, to map low-dimensional I/O operation characteristic values to high-dimensional I/O operation characteristics Value, where I/O operation characteristic value is related to I/O timestamp, I/O type and I/O size.
- the characteristic value of each combined I/O operation can be obtained by the following methods:
- the combination here can be understood as connecting the 8 adjacent I/Os processed in Table 2 to combine them into one I/O O input, because each I/O in Table 2 is combined from the 32 I/Os in Table 1, so 8 adjacent I/Os in Table 2 are combined into one I/O input, which is equivalent
- the specific merge operation can be as follows to obtain a merged I/O operation characteristic value, where each I/O operation characteristic The values are variables related to I/O timestamp, I/O type, and I/O size.
- a set of 32*1 vectors can be transformed into a set of 128*1 vectors through a weight matrix.
- a neuron set is formed by a plurality of neural network cells LSTM Cells, so that the feature values after the high-dimensional vector space mapping are sequentially input into the neuron set to perform operations, to obtain an operation result;
- multiple neural network cells LSTM Cells are used to form a neuron set (specifically as shown in FIG. 6, assuming that the embodiment of this application includes 128 neuron cells LSTM Cell), and The characteristic values of high-dimensional I/O operations are sequentially and cyclically input into the neuron set for operation to obtain the operation result.
- the data volume of neuron cells is generally determined by the accuracy of the calculation results and the processing power of the processor.
- each neuron cell As shown in Figure 7, the calculation process of each neuron cell is shown in Figure 7.
- the neural network structure of each neuron cell includes input gate, forget gate and output gate, as well as new and past memory states. Among them, the function of each door or state has been described in detail in the prior art, and will not be repeated here.
- the calculation result is looped 128 times in sequence to improve the accuracy of the calculation.
- the data output from the output gate is input to the output fully connected layer of the neural network to map the calculation result to the output dimension of the prediction result.
- the output dimension of depends on the user's choice, that is, it can output feature values of any dimension, such as outputting 32-dimensional feature values, or outputting 16-dimensional feature values, or feature values of other dimensions.
- the embodiment of the present application takes an example of outputting 32-dimensional feature values for description:
- the eigenvalue is mapped to a 32-dimensional eigenvalue, where b 32 ⁇ 1 is the matrix offset, which represents the influence of noise in data processing.
- the time interval corresponding to 1024 x in the input sample is about 32* 8*3*1024 ⁇ 1s
- the neural network model when used to predict the I/O information in the first time period in the future, it is generally required that the amount of historical data is greater than the amount of predicted data. For example, the actual I/O information amount within 1s is used in this implementation. Predict the amount of I/O information in the future 800ms. In order to improve the accuracy, it can also predict the amount of I/O information in the future 400ms. Generally, the larger the amount of historical data, the smaller the amount of predicted data, and the corresponding The higher the prediction accuracy rate, on the contrary, the lower the prediction accuracy rate.
- y 1 , y 2 ,..., y 16 can be the predicted value of the write operation at an interval of 50 ms in the future, and y 17 ,..., y 32 are the predicted value of each write operation in the future.
- the predicted value of the read operation with an interval of 50ms that is, the output value in the Y value mainly depends on the previous model training process. If the previous model training process, y 1 , y 2 ,..., y 16 are the future 50ms is the predicted value of the size of the read operation at an interval. When the later model outputs, y 1 , y 2 ,..., y 16 are the predicted values of the size of the read operation at every 50ms interval.
- the data processing device of the solid state drive when it performs active management on the solid state drive according to the prediction result, it can obtain the first read/write ratio of the current time period, where the current time period may be the current 100ms, the current 100ms, or the current 200ms, etc. , No specific restrictions here
- the first read/write ratio corresponds to the ratio of the number of read operations to the number of write operations in the current time period. In practical applications, it can also be used to directly obtain the number of read operations or write operations in the current time period. Calculate the first read-write ratio, because the first read-write ratio is mainly used to facilitate the comparison with the second read-write ratio in the first time in the future. In actual use, the user can make a decision based on the convenience of comparison.
- the data processing device of the solid-state hard disk may also calculate the second read/write ratio in the first time period in the future based on the prediction result of step 101, and calculate according to the first read/write ratio.
- Step 803 is executed for the ratio and the second read-write ratio.
- the data processing device of the solid-state hard disk judges whether the second read-write ratio and the first read-write ratio are the same, if not, execute step 804, if yes, execute step 805 .
- the second read-write ratio is different from the first read-write ratio, it means that the read cache or write cache occupied in the first time period will change compared with the current time period. You can use the second read
- the write ratio is adjusted to the cache allocation in the SSD.
- the buffer occupied by the read operation will be adjusted accordingly, and if the intensity of the write operation in the next first time period will change, the amount of the write operation will be adjusted accordingly Cache, so that the read operation or write operation in the first time period can be quickly responded to by the SSD disk, so as to improve the control performance of the solid-state hard disk controller and reduce the response time of the host.
- the prediction model in this embodiment can be built into the solid-state hard disk or the host side, and the prediction model can be fixed, or it can be learned in real time and updated in real time, and there is no specific limitation here.
- FIG. 9 is another detailed step of step 102 in the embodiment of FIG. 1.
- the data processing device of the solid-state hard disk After the data processing device of the solid-state hard disk obtains the I/O prediction result for the first time period in the future, it can obtain the I/O intensity in the first time period according to the prediction result, where the I/O intensity refers to the reading per unit time.
- the size of the data processed by the operation or write operation is the size of the data processed by the operation or write operation.
- the I/O throughput of a solid state drive refers to the data intensity of a read operation or a write operation that can be processed by the solid state drive per unit time, which is an indicator of the solid state drive, and is generally marked when the solid state drive is shipped.
- step 903. According to the I/O intensity and the I/O throughput in the first time period, determine whether the solid state disk is in an idle state, if so, perform step 904, and if not, perform step 907.
- the state of the solid state drive when judging the state of the solid state drive, such as whether the solid state drive is in an idle state during the first time period, it can be determined according to the I/O intensity in the first time period and the I/O throughput of the solid state drive. It is judged that if the ratio of the I/O intensity to the I/O throughput in the first time period is less than the preset threshold, such as 40%, it is considered that the solid state drive is idle in the first time period, and step 904 is performed, otherwise , It is considered that the solid state disk is busy in the first time period, and step 907 is executed.
- the preset threshold such as 40%
- the size of the aforementioned preset threshold can be customized according to actual needs, such as 30% or 20%, etc., and there is no specific limitation here.
- step 905 is performed, and if not, step 906 is performed.
- the remaining space of the SSD is less than the first threshold, it indicates that the remaining space in the SSD is insufficient, and a garbage collection event in the SSD is triggered.
- this application can predict the I/O intensity of the first time period in the future based on the prediction result, and determine whether the solid state drive is idle according to the prediction result.
- the garbage collection event in the solid state drive is actively triggered, thereby improving the main control performance of the solid state drive controller and reducing the operation response time of the host side.
- the remaining space of the solid state disk is not less than the first threshold, it means that there is enough space in the SSD disk to respond to the I/O operation in the first time period, and other processes are executed, and no specific limitation is made here.
- step 903 if the solid state drive is not in an idle state, and in order to ensure that the solid state drive has enough space to respond to I/O operations in the first time period in the future, the allocatable remaining space in the solid state drive can be further obtained, and the steps are performed 908.
- the I/O intensity in the first time period After the I/O intensity in the first time period is obtained, it can be further determined whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space, if yes, go to step 905, if not, go to step 906;
- step 908 is to determine that when the I/O intensity of the solid state drive in the first time period is greater than the remaining space that can be allocated, a garbage collection event in the solid state drive is triggered. If the I/O intensity in the first time period is not If it is greater than the remaining space that can be allocated, other processes are executed, and there is no specific restriction here.
- the prediction model in this embodiment can be built into the solid-state hard disk or the host side, and the prediction model can be fixed, or it can be learned in real time and updated in real time, and there is no specific limitation here.
- the method for performing active management of the solid state drive is described in detail from the perspective of active garbage collection, which improves the implementability of the embodiment of the present application.
- FIG. 10 is another detailed step of step 102 in the embodiment of FIG. 1.
- the data processing device of the solid state drive can also obtain the I/O intensity of multiple applications in the first time in the future according to the prediction result.
- the I/O intensity of the first application, the second application, and the third application in the first time period are obtained respectively, and the I/O intensity of each application Intensity executes step 1002.
- the data processing device of the solid-state hard disk determines whether there is a plurality of applications where the I/O intensity difference between the two applications is greater than the second threshold.
- the size of the second threshold can be customized according to the needs of the user, and no specifics are made here. limit.
- step 1002 is mainly to judge the I/O intensity of each application according to the I/O intensity of each application, and execute step 1003 according to the judgment result.
- the application with the lower I/O intensity of the above two applications is prioritized to improve the user experience of the host.
- this embodiment will give priority to the B application, which is equivalent to inserting the B application before A, the average response time of the application will be greatly reduced, and the host will not feel the B Delay, thereby enhancing the user experience of the SSD.
- An embodiment of the data processing device of the solid state drive in the embodiment of the present application includes:
- the prediction unit 1101 is configured to predict the I/O information of the first time period in the future through the prediction model, the I/O information at least including the I/O type and/or the I/O size;
- the management unit 1102 is configured to perform management on the solid state disk according to the prediction result, so as to reduce the operation response time of the host side.
- the I/O type includes read operation and write operation
- the prediction unit 1102 is specifically configured to:
- the management unit 1102 is further configured to:
- the management unit 1102 is specifically configured to:
- the solid state disk is in an idle state.
- the management unit 1102 is further configured to:
- the management unit 1102 is further configured to:
- the management unit 1102 is further configured to:
- the prediction model is built in the solid state hard disk and/or the host.
- the prediction unit 1101 predicts the I/O information for the first time period in the future, the I/O information includes I/O type and I/O intensity, and the management unit 1102 performs active management on the solid state drive , In order to reduce the operation response time of the host. Because in the embodiment of this application, the I/O information of the first time period in the future can be predicted based on the prediction model, and the solid state drive can be actively managed based on the predicted result to reduce the operation response time of the host side, thereby improving the performance of the solid state drive. The main control performance improves the user experience of the solid state drive.
- the computer device is used to implement the function of the data processing device of the solid state hard disk.
- An embodiment of the computer device in the embodiment of the present invention includes:
- the memory is used to store computer programs, and when the processor is used to execute the computer programs stored in the memory, the following steps can be implemented:
- the I/O information Predicting the I/O information for the first time period in the future through the prediction model, the I/O information at least including the I/O type and/or the I/O size;
- the processor may also be used to implement the following steps:
- the processor may also be used to implement the following steps:
- the processor may also be used to implement the following steps:
- the solid state disk is in an idle state.
- the processor may also be used to implement the following steps:
- the processor may also be used to implement the following steps:
- the processor may also be used to implement the following steps:
- the processor in the computer device described above executes the computer program, it can also implement the functions of the units in the corresponding device embodiments described above, which will not be repeated here.
- the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the memory and executed by the processor to complete the present invention.
- the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the data processing device of the solid state hard disk.
- the computer program may be divided into units in the data processing device of the above-mentioned solid-state hard disk, and each unit can implement specific functions as described in the data processing device of the corresponding solid-state hard disk.
- the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the computer device may include, but is not limited to, a processor and a memory.
- the processor and the memory are only examples of the computer device and do not constitute a limitation on the computer device. They may include more or fewer components, or combine certain components, or different components, such as
- the computer device may also include input and output devices, network access devices, buses, and the like.
- the processor may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (ASIC), off-the-shelf Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
- the processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
- the memory may be used to store the computer program and/or module, and the processor implements the computer by running or executing the computer program and/or module stored in the memory, and calling data stored in the memory.
- the memory may mainly include a program storage area and a data storage area.
- the program storage area may store an operating system, an application program required by at least one function, etc.; the data storage area may store data created according to the use of the terminal, etc.
- the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards , Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
- non-volatile memory such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards , Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
- the present invention also provides a computer-readable storage medium, which is used to implement the functions of a data processing device of a solid-state hard disk, and has a computer program stored thereon.
- the computer program When the computer program is executed by a processor, it can be used to execute The following steps:
- the I/O information Predicting the I/O information for the first time period in the future through the prediction model, the I/O information at least including the I/O type and/or the I/O size;
- a computer program stored in a computer-readable storage medium when executed by a processor, it may be specifically used to execute the following steps:
- a computer program stored in a computer-readable storage medium when executed by a processor, it may be specifically used to execute the following steps:
- a computer program stored in a computer-readable storage medium when executed by a processor, it may be specifically used to execute the following steps:
- the solid state disk is in an idle state.
- a computer program stored in a computer-readable storage medium when executed by a processor, it may be specifically used to execute the following steps:
- a computer program stored in a computer-readable storage medium when executed by a processor, it may be specifically used to execute the following steps:
- a computer program stored in a computer-readable storage medium when executed by a processor, it may be specifically used to execute the following steps:
- the 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 corresponding computer readable storage medium.
- the present invention implements all or part of the processes in the above-mentioned corresponding embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
- the computer program can be stored in a computer-readable storage medium.
- the computer program is executed by the processor, it can implement the steps of the foregoing method embodiments.
- the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate form.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media.
- ROM Read-Only Memory
- RAM Random Access Memory
- electrical carrier signal telecommunications signal
- software distribution media any entity or device capable of carrying the computer program code
- recording medium U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media.
- the disclosed system, device, and method may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- 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, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the 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 storage medium.
- the technical solution of the present invention 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 storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
A data processing method and apparatus for a solid state disk, for use in predicting I/O information in a first time period in the future by means of a prediction model, so as to perform active management on a solid state disk according to the prediction result to reduce the operation response time of a host. The method according to embodiments of the present invention comprises: predicting I/O information in a first time period in the future by means of a prediction model, the I/O information comprising at least an I/O type and/or I/O intensity; and performing active management on a solid state disk according to the prediction result to reduce the operation response time of a host.
Description
本申请要求于2019年5月9日提交中国专利局、申请号为201910385553.6、发明名称为“一种固态硬盘的数据处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910385553.6, and the invention title is "a data processing method and device for solid-state hard disks" on May 9, 2019, the entire content of which is incorporated by reference In this application.
本发明涉及固态硬盘数据处理技术领域,尤其涉及一种固态硬盘的数据处理方法及装置。The present invention relates to the technical field of solid-state hard disk data processing, in particular to a solid-state hard disk data processing method and device.
在SSD固态硬盘中,SSD的读写缓存Buffer是相对较小的,一般是为几MB到几十MB,由于SSD接口的总线带宽与SSD固态硬盘的存储速度不对称的问题,使得盘内的Buffer经常为成为写性能的瓶颈。In the SSD solid state drive, the read and write buffer of the SSD is relatively small, generally a few MB to tens of MB. Due to the asymmetric problem of the bus bandwidth of the SSD interface and the storage speed of the SSD solid state drive, the internal storage Buffer often becomes the bottleneck of write performance.
故如何执行固态硬盘的管理,减少主机用户端操作响应的时间,有效分配有限的硬件资源,以更好的发挥SSD的主控性能,是亟待解决的一个问题。Therefore, how to perform the management of the solid state drive, reduce the response time of the host client's operation, and effectively allocate the limited hardware resources to better utilize the main control performance of the SSD is an urgent problem to be solved.
发明内容Summary of the invention
本发明实施例提供了一种固态硬盘的数据处理方法及装置,用于根据预测模型对未来第一时间段的I/O信息进行预测,以便根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。The embodiment of the present invention provides a data processing method and device for a solid state drive, which are used to predict the I/O information of the first time period in the future according to a prediction model, so as to perform active management on the solid state drive based on the prediction result to reduce the number of hosts Terminal operation response time.
本申请实施例第一方面提供了一种固态硬盘的数据处理方法,包括:The first aspect of the embodiments of the present application provides a data processing method for a solid-state hard disk, including:
通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O强度;Predicting the I/O information for the first time period in the future through the prediction model, where the I/O information includes at least I/O type and/or I/O intensity;
根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。Actively manage the solid state drive based on the predicted result to reduce the response time of the host.
优选的,所述I/O类型包括读操作和写操作;Preferably, the I/O type includes read operation and write operation;
所述根据预测结果对固态硬盘执行管理,包括:The performing management of the solid state drive according to the prediction result includes:
获取当前时间段的第一读写比例;Get the first read/write ratio of the current time period;
根据预测结果,获取所述第一时间段的第二读写比例;According to the prediction result, obtain the second read-write ratio in the first time period;
判断所述第二读写比例与所述第一读写比例是否相同;Determine whether the second read-write ratio is the same as the first read-write ratio;
若否,则按照所述第二读写比例调整固态硬盘中的缓存分配。If not, adjust the cache allocation in the solid state disk according to the second read-write ratio.
优选的,所述按照所述第二读写比例调整固态硬盘中的缓存分配,包括:Preferably, the adjusting the cache allocation in the solid state hard disk according to the second read-write ratio includes:
若所述第二读写比例中的读操作或写操作强度变化,则对应调整所述读操作或所述写操作所需占用的缓存。If the intensity of the read operation or the write operation in the second read-write ratio changes, correspondingly adjust the buffer occupied by the read operation or the write operation.
优选的,所述根据预测结果对固态硬盘执行管理,包括:Preferably, the performing management on the solid state disk according to the prediction result includes:
根据预测结果,获取所述第一时间段内的I/O强度;According to the prediction result, obtain the I/O intensity in the first time period;
获取固态硬盘的I/O吞吐量;Obtain the I/O throughput of the solid state drive;
根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断所述固态硬盘是否处于空闲状态。According to the I/O intensity and the I/O throughput in the first time period, it is determined whether the solid state disk is in an idle state.
优选的,所述根据预测结果对固态硬盘执行管理,包括:Preferably, the performing management on the solid state disk according to the prediction result includes:
若所述固态硬盘处于空闲状态;If the solid state drive is in an idle state;
判断所述固态硬盘的剩余空间是否小于第一阈值;Judging whether the remaining space of the solid-state hard disk is less than a first threshold;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
优选的,所述根据预测结果对固态硬盘执行管理,包括:Preferably, the performing management on the solid state disk according to the prediction result includes:
若所述固态硬盘未处于空闲状态;If the solid state hard disk is not in an idle state;
获取固态硬盘中可分配的剩余空间;Obtain the remaining space that can be allocated in the SSD;
判断所述第一时间段内的I/O写操作强度是否大于所述可分配的剩余空间;Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
优选的,所述根据预测结果对固态硬盘执行管理,包括:Preferably, the performing management on the solid state disk according to the prediction result includes:
根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;According to the prediction result, respectively obtain the I/O intensity of the multiple applications in the first time period;
判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值;Judging whether there is an I/O intensity difference between two applications in the multiple applications that is greater than a second threshold;
若是,则优先处理所述两个应用中I/O强度较小的应用。If so, the application with the lower I/O intensity among the two applications is processed first.
优选的,所述预测模型内置于固态硬盘和/或主机端中,以减少主机端的操作响应时间。Preferably, the prediction model is built into the solid state hard disk and/or the host side to reduce the operation response time of the host side.
本申请实施例还提供了一种固态硬盘的数据处理装置,包括:An embodiment of the present application also provides a data processing device for a solid state hard disk, including:
预测单元,用于通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O大小;The prediction unit is used to predict the I/O information of the first time period in the future through the prediction model, and the I/O information includes at least I/O type and/or I/O size;
管理单元,用于根据预测结果对固态硬盘执行管理,以减少主机端的操作响应时间。The management unit is used to perform management on the solid state drive according to the prediction result, so as to reduce the operation response time of the host side.
优选的,所述I/O类型包括读操作和写操作;Preferably, the I/O type includes read operation and write operation;
优选的,管理单元,具体用于:Preferably, the management unit is specifically used for:
获取当前时间段的第一读写比例;Get the first read/write ratio of the current time period;
根据预测结果,获取所述第一时间段的第二读写比例;According to the prediction result, obtain the second read-write ratio in the first time period;
判断所述第二读写比例与所述第一读写比例是否相同;Determine whether the second read-write ratio is the same as the first read-write ratio;
若否,则按照所述第二读写比例调整固态硬盘中的缓存分配。If not, adjust the cache allocation in the solid state disk according to the second read-write ratio.
优选的,管理单元,具体用于:Preferably, the management unit is specifically used for:
若所述第二读写比例中的读操作或写操作强度变化,则对应调整所述读操作或所述写操作所需占用的缓存。If the intensity of the read operation or the write operation in the second read-write ratio changes, correspondingly adjust the buffer occupied by the read operation or the write operation.
优选的,管理单元,具体用于:Preferably, the management unit is specifically used for:
根据预测结果,获取所述第一时间段内的I/O强度;According to the prediction result, obtain the I/O intensity in the first time period;
获取固态硬盘的I/O吞吐量;Obtain the I/O throughput of the solid state drive;
根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断所述固态硬盘是否处于空闲状态。According to the I/O intensity and the I/O throughput in the first time period, it is determined whether the solid state disk is in an idle state.
优选的,管理单元,具体还用于:Preferably, the management unit is specifically used for:
若所述固态硬盘处于空闲状态;If the solid state drive is in an idle state;
判断所述固态硬盘的剩余空间是否小于第一阈值;Judging whether the remaining space of the solid-state hard disk is less than a first threshold;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
优选的,管理单元,具体还用于:Preferably, the management unit is specifically used for:
若所述固态硬盘未处于空闲状态;If the solid state hard disk is not in an idle state;
获取固态硬盘中可分配的剩余空间;Obtain the remaining space that can be allocated in the SSD;
判断所述第一时间段内的I/O写操作强度是否大于所述可分配的剩余空间;Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
优选的,管理单元具体用于:Preferably, the management unit is specifically used for:
根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;According to the prediction result, respectively obtain the I/O intensity of the multiple applications in the first time period;
判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值;Judging whether there is an I/O intensity difference between two applications in the multiple applications that is greater than a second threshold;
若是,则优先处理所述两个应用中I/O强度较小的应用。If so, the application with the lower I/O intensity among the two applications is processed first.
优选的,所述预测模型内置于固态硬盘和/或主机端中。Preferably, the prediction model is built in the solid state hard disk and/or the host.
本申请实施例还提供了一种计算机装置,包括处理器,该处理器在执行存储于存储器上的计算机程序时,用于实现本申请实施例第一方面提供的固态硬盘的数据处理方法。The embodiment of the present application also provides a computer device, including a processor, which is used to implement the data processing method of the solid-state hard disk provided in the first aspect of the embodiment of the present application when the processor executes the computer program stored on the memory.
本申请实施例还提供了一种计算机可读存储介质,其上存储由计算机程序,该计算机程序被处理器执行时,用于实现本申请实施例第一方面提供的固态硬盘的数据处理方法。The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the data processing method of the solid state hard disk provided in the first aspect of the embodiment of the present application.
从以上技术方案可以看出,本发明实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
本申请实施例中,根据预测模型对未来第一时间段的I/O信息进行预测,该I/O信息包括I/O类型及I/O强度,根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。因为本申请实施例中,可以根据预测模型对未来第一时间段的I/O信息进行预测,并根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间,从而提升了固态硬盘的主控性能,提升了用户对固态硬盘的使用体验。In the embodiment of the present application, the I/O information of the first time period in the future is predicted according to the prediction model, and the I/O information includes I/O type and I/O intensity. Active management is performed on the solid state drive according to the prediction result to Reduce the operation response time on the host side. Because in the embodiment of this application, the I/O information of the first time period in the future can be predicted based on the prediction model, and the solid state drive can be actively managed based on the predicted result to reduce the operation response time of the host side, thereby improving the performance of the solid state drive. The main control performance improves the user experience of the solid state drive.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work.
图1为本申请实施例中固态硬盘的数据处理方法的一个实施例示意图;FIG. 1 is a schematic diagram of an embodiment of a data processing method of a solid-state hard disk in an embodiment of the application;
图2为本申请实施例中图1实施例步骤101的细化步骤;FIG. 2 is a detailed step of step 101 in the embodiment of FIG. 1 in the embodiment of this application;
图3为本申请实施例中图2实施例中步骤203的细化步骤;FIG. 3 is a detailed step of step 203 in the embodiment of FIG. 2 in the embodiment of this application;
图4为本申请实施例中图3实施例中步骤301的细化步骤;FIG. 4 is a detailed step of step 301 in the embodiment of FIG. 3 in the embodiment of this application;
图5为本申请实施例中图3实施例中步骤303的细化步骤;FIG. 5 is a detailed step of step 303 in the embodiment of FIG. 3 in the embodiment of this application;
图6为本申请实施例中神经元集合的示意图;Fig. 6 is a schematic diagram of a neuron set in an embodiment of the application;
图7为本申请实施例中每个神经元细胞计算过程示意图;FIG. 7 is a schematic diagram of the calculation process of each neuron cell in an embodiment of the application;
图8为本申请实施例中图1实施例步骤102的细化步骤;FIG. 8 is a detailed step of step 102 in the embodiment of FIG. 1 in the embodiment of this application;
图9为本申请实施例中图1实施例步骤102的另一细化步骤;FIG. 9 is another detailed step of step 102 in the embodiment of FIG. 1 in the embodiment of this application;
图10为本申请实施例中图1实施例步骤102的另一细化步骤;FIG. 10 is another detailed step of step 102 in the embodiment of FIG. 1 in the embodiment of this application;
图11为本申请实施例中固态硬盘的数据处理装置的一个实施例示意图。FIG. 11 is a schematic diagram of an embodiment of a data processing device for a solid-state hard disk in an embodiment of the application.
本发明实施例提供了一种固态硬盘的数据处理方法及装置,用于根据预测模型对未来第一时间段的I/O信息进行预测,以便根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。The embodiment of the present invention provides a data processing method and device for a solid state drive, which are used to predict the I/O information of the first time period in the future according to a prediction model, so as to perform active management on the solid state drive based on the prediction result to reduce the number of hosts Terminal operation response time.
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe specific Order or precedence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than the content illustrated or described herein. In addition, the terms "including" and "having" and any variations of them 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 necessarily limited to the clearly listed Those steps or units may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
针对现有技术中,很容易因为写缓存Buffer较小,且固态硬盘SSD的接口总线带宽与SSD盘存储速度不对称,而造成的写缓存Buffer成为写性能瓶颈的问题,本申请实施例提出了一种固态硬盘的数据处理方法及装置,以用于解决写缓存Buffer较小,而导致主机端操作响应时间过长的问题。In view of the problem that the write buffer buffer becomes a write performance bottleneck caused by the small write buffer buffer and the asymmetrical interface bus bandwidth of the solid state drive SSD and the storage speed of the SSD disk in the prior art, the embodiment of the application proposes A data processing method and device for a solid state hard disk are used to solve the problem that the write buffer Buffer is small and the response time of the host side operation is too long.
为方便理解,下面对本申请实施例中的固态硬盘的数据处理方法进行 描述,具体请参阅图1,本申请实施例中一种固态硬盘的数据处理方法的一个实施例,包括:To facilitate understanding, the following describes the data processing method of the solid state drive in the embodiment of the present application. For details, please refer to FIG. 1. An embodiment of the data processing method of the solid state drive in the embodiment of the present application includes:
101、通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O强度;101. Predict I/O information for the first time period in the future through a prediction model, where the I/O information includes at least I/O type and/or I/O intensity;
针对现有技术中因为写缓存Buffer较小,而导致主机端操作响应时间过长的问题,本申请实施例可以通过固态硬盘的数据处理装置,采用预测模型对未来第一时间段的I/O信息进行预测,其中,I/O信息至少包括I/O类型及I/O强度,以便根据预测结果执行步骤102。In view of the problem that the response time of the host side operation is too long due to the small write buffer Buffer in the prior art, the embodiment of the present application can use the data processing device of the solid state hard disk to use the predictive model to analyze the I/O in the first time period in the future. Information is predicted, where the I/O information includes at least I/O type and I/O intensity, so as to perform step 102 according to the predicted result.
具体的,如何根据预测模型对未来第一时间段的I/O信息进行预测,将在下面的实施例中进行详细描述,此处不再赘述。Specifically, how to predict the I/O information of the first time period in the future according to the prediction model will be described in detail in the following embodiments, and will not be repeated here.
102、根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。102. Perform active management of the solid-state hard drive according to the prediction result to reduce the operation response time of the host side.
固态硬盘的数据处理装置获取到未来第一时间段的I/O预测结果后,根据预测结果对固态硬盘执行主动管理,以减少主机端的操作影响时间,提高用户对固态硬盘的实用体验。After obtaining the I/O prediction results for the first time period in the future, the data processing device of the solid-state hard disk performs active management on the solid-state hard disk according to the predicted result, so as to reduce the operation impact time of the host side and improve the user's practical experience of the solid-state hard disk.
具体的,对于根据预测结果对固态硬盘执行主动管理的过程将在下面的实施例中进行详细描述,此处也不再赘述。Specifically, the process of performing active management of the solid state disk according to the prediction result will be described in detail in the following embodiments, and will not be repeated here.
本申请实施例中,根据预测模型对未来第一时间段的I/O信息进行预测,该I/O信息包括I/O类型及I/O强度,根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。因为本申请实施例中,可以根据预测模型对未来第一时间段的I/O信息进行预测,并根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间,从而提升了固态硬盘的主控性能,提升了用户对固态硬盘的使用体验。In the embodiment of the present application, the I/O information of the first time period in the future is predicted according to the prediction model, and the I/O information includes I/O type and I/O intensity. Active management is performed on the solid state drive according to the prediction result to Reduce the operation response time on the host side. Because in the embodiment of this application, the I/O information of the first time period in the future can be predicted based on the prediction model, and the solid state drive can be actively managed based on the predicted result to reduce the operation response time of the host side, thereby improving the performance of the solid state drive. The main control performance improves the user experience of the solid state drive.
基于图1所述的实施例,下面详细描述步骤101,具体请参与图2,图2为步骤101的细化步骤:Based on the embodiment described in Fig. 1, step 101 is described in detail below. Please refer to Fig. 2 for details. Fig. 2 shows the detailed steps of step 101:
201、获取固态硬盘SSD接收到的接口协议指令;201. Obtain the interface protocol command received by the solid state drive SSD;
接口协议指令是用于主机与存储器(固态硬盘SSD)之间的通信协议指令,主要有SATA、PCIe、NVMe等协议接口。优选的,本实施例中的接口协议指令为NVMe指令。The interface protocol command is a communication protocol command used between the host and the memory (solid state drive SSD), mainly including SATA, PCIe, NVMe and other protocol interfaces. Preferably, the interface protocol instructions in this embodiment are NVMe instructions.
具体的,NVMe是通过PCI Express总线将存储器连接到服务器的接口规范,简单来说,NVMe使SSD与主机系统通信的速度更快。本申请实施例中,SSD盘在与主机系统的数据交互过程中,通过NVMe协议指令,以实现数据的快速输入及输出。Specifically, NVMe is an interface specification for connecting storage to a server through a PCI Express bus. Simply put, NVMe makes the communication between the SSD and the host system faster. In the embodiment of the present application, during the data interaction process between the SSD disk and the host system, the NVMe protocol commands are used to implement fast data input and output.
区别于现有技术中,SSD通过被动的固态硬盘管理(被动buffer调度,被动垃圾回收等)来实现SSD中硬件资源的配置、指令队列管理等,其中,硬件资源的配置包括buffer调度、垃圾回收等。本申请实施例中,在固态硬盘SSD接收到主机系统发送的NVMe协议指令时,固态硬盘的数据处理装置获取该协议指令,并根据该协议指令执行步骤202,以实现对未来第一时间段内I/O信息的预测。Different from the prior art, SSD uses passive solid-state drive management (passive buffer scheduling, passive garbage collection, etc.) to implement hardware resource configuration and instruction queue management in SSD. Among them, hardware resource configuration includes buffer scheduling and garbage collection. Wait. In the embodiment of the present application, when the solid state drive SSD receives the NVMe protocol instruction sent by the host system, the data processing device of the solid state drive obtains the protocol instruction, and executes step 202 according to the protocol instruction, so as to realize the first time period in the future. Forecast of I/O information.
具体的,固态硬盘的数据处理装置可以是主动从SSD中获取NVMe协议指令,也可以是被动接收SSD发送的NVMe协议指令,此处不做具体限制。Specifically, the data processing device of the solid state hard disk may actively obtain the NVMe protocol command from the SSD, or may passively receive the NVMe protocol command sent by the SSD, and there is no specific limitation here.
202、解析所述接口协议指令,以获取所述协议指令中的I/O信息,所述I/O信息至少包括I/O时间戳、I/O类型及I/O大小;202. Parse the interface protocol command to obtain I/O information in the protocol command, where the I/O information includes at least an I/O time stamp, an I/O type, and an I/O size;
固态硬盘的数据处理装置获取到接口协议指令后,解析该接口协议指令,以获取该协议指令中的I/O信息,而解析动作可以具体表现为根据具体的协议规范(如NVMe协议规范),读取出协议指令中的I/O信息,其中,该I/O信息至少包括I/O时间戳,I/O类型及I/O大小。After the data processing device of the solid state hard disk obtains the interface protocol instruction, it parses the interface protocol instruction to obtain the I/O information in the protocol instruction, and the parsing action can be embodied in accordance with specific protocol specifications (such as NVMe protocol specifications), Read the I/O information in the protocol command, where the I/O information includes at least I/O timestamp, I/O type and I/O size.
具体的,I/O时间戳为该I/O操作的产生时间,I/O类型包括读操作或写操作,I/O大小为读操作或写操作的数据长度。Specifically, the I/O timestamp is the generation time of the I/O operation, the I/O type includes read operation or write operation, and the I/O size is the data length of the read operation or write operation.
203、对所述I/O信息执行机器学习,以对未来第一时间段的I/O信息进行预测。203. Perform machine learning on the I/O information to predict the I/O information for the first time period in the future.
固态硬盘的数据处理装置获取到当前时间段的I/O信息后,可以根据机器学习算法,对以往时间段的I/O信息进行学习,以对未来第一时间段的I/O信息进行预测。After the data processing device of the solid state hard disk obtains the I/O information of the current time period, it can learn the I/O information of the past time period according to the machine learning algorithm, so as to predict the I/O information of the first time period in the future .
其中,机器学习算法包括但不限于神经网络,支持向量机,线性回归,时间序列等,此处对机器学习的算法不做具体限制。Among them, machine learning algorithms include but are not limited to neural networks, support vector machines, linear regression, time series, etc. There are no specific restrictions on the machine learning algorithms here.
基于图2所述的实施例,下面对图2实施例中的步骤203进行详细描述, 具体请参阅图3,图3为图2实施例中步骤203的细化步骤:Based on the embodiment shown in FIG. 2, step 203 in the embodiment in FIG. 2 will be described in detail below. Please refer to FIG. 3 for details. FIG. 3 is a detailed step of step 203 in the embodiment in FIG.
301、对所述I/O信息执行预处理,以得到第一I/O信息表;301. Perform preprocessing on the I/O information to obtain a first I/O information table;
固态硬盘的数据处理装置通过解析接口协议指令(如NVMe协议指令),获取到该指令中的I/O信息后,对该I/O信息执行预处理,以得到第一I/O信息表。The data processing device of the solid state hard disk obtains the I/O information in the instruction by parsing the interface protocol instruction (such as the NVMe protocol instruction), and performs preprocessing on the I/O information to obtain the first I/O information table.
具体的,对于预处理操作的具体过程,将在下面的实施例中详细描述,此处不再赘述。Specifically, the specific process of the preprocessing operation will be described in detail in the following embodiments, and will not be repeated here.
302、将所述第一I/O信息表中的多个相邻I/O操作合并为一次I/O操作;302. Combine multiple adjacent I/O operations in the first I/O information table into one I/O operation.
固态硬盘的数据处理装置在获取到第一I/O信息表后,将该第一I/O信息表中的多个相邻I/O操作合并为一次I/O操作,这里合并可以理解为将下述表2中处理后的8个相邻I/O相连起来,合并为一次I/O输入,这样相比于现有一个一个I/O操作输入,可以把多个I/O同时输入计算一次,从而大大减少了计算量,满足了实时计算的需求。After acquiring the first I/O information table, the data processing device of the solid-state hard disk merges multiple adjacent I/O operations in the first I/O information table into one I/O operation, where the combination can be understood as Connect the 8 adjacent I/Os processed in the following table 2 and merge them into one I/O input, so that compared with the existing one I/O operation input, multiple I/Os can be input at the same time Calculate once, thereby greatly reducing the amount of calculation and meeting the needs of real-time calculation.
具体的,可以是将相邻的4个I/O操作合并为一次I/O操作,或将相邻的8个I/O操作合并为一次I/O操作,本实施例中的“多个”主要决定于处理器的处理性能(即处理器的算力),若处理器的算力较弱,则可以将更多相邻数目的I/O操作进行合并,若处理器的算力强大,则可以将较少相邻数目的I/O操作进行合并,以适应于处理器的处理性能。Specifically, 4 adjacent I/O operations may be combined into one I/O operation, or 8 adjacent I/O operations may be combined into one I/O operation. In this embodiment, “multiple "It is mainly determined by the processing performance of the processor (that is, the computing power of the processor). If the computing power of the processor is weak, more adjacent numbers of I/O operations can be combined. If the computing power of the processor is strong , You can combine a smaller number of adjacent I/O operations to adapt to the processing performance of the processor.
303、将多个合并后的I/O操作特征值用于神经网络LSTM模型学习,以得到所述第一时间段的I/O预测结果;303. Use a plurality of combined I/O operation characteristic values for neural network LSTM model learning to obtain an I/O prediction result in the first time period.
将多个I/O操作合并为1个I/O操作后,可以得到一组I/O操作特征值,具体的该I/O操作特征值是关于I/O时间戳,I/O类型及I/O大小的变量,而为了对未来第一时间段内的I/O信息进行预测,一般是采用机器学习算法进行预测,本实施例中的机器学习算法优选为神经网络学习算法。After combining multiple I/O operations into one I/O operation, a set of I/O operation characteristic values can be obtained. The specific I/O operation characteristic values are related to I/O timestamp, I/O type and Variables of the I/O size, and in order to predict the I/O information in the first time period in the future, a machine learning algorithm is generally used for prediction. The machine learning algorithm in this embodiment is preferably a neural network learning algorithm.
需要说明的是,采用神经网络学习算法,对未来第一时间段的I/O信息进行预测时,需要先对已知的I/O信息采用神经网络学习模型进行训练,以得到神经网络训练模型,然后根据神经网络训练模型,及当前的I/O信息对未来第一时间段内的I/O信息进行预测。It should be noted that when using a neural network learning algorithm to predict the I/O information for the first time period in the future, it is necessary to train the known I/O information using a neural network learning model to obtain a neural network training model , And then predict the I/O information in the first time period in the future based on the neural network training model and the current I/O information.
而根据已知的I/O信息对神经网络学习模型的训练过程,在现有技术中 有详细描述,此处不再赘述,而对于将多个合并后的I/O操作特征值执行神经网络模型学习(也即模型推理),以得到第一时间段的I/O预测信息的具体实现过程将在下面的实施例中进行描述,此处也不再赘述。The training process of the neural network learning model according to the known I/O information is described in detail in the prior art, and will not be repeated here, and the neural network is executed for the combined I/O operation characteristic values The specific implementation process of model learning (that is, model inference) to obtain I/O prediction information in the first time period will be described in the following embodiments, and will not be repeated here.
304、将所述I/O预测结果执行后期处理,以调整所述预测结果。304. Perform post-processing on the I/O prediction result to adjust the prediction result.
因为预测算法,更多靠的是假设和特征的选择,故在得到I/O预测信息后,可能会出现较大偏差的预测结果,而该预测结果明显偏离实际,故需要对I/O预测信息执行后期处理,如删除I/O预测信息中的异常预测值,得到正常的预测结果。Because the prediction algorithm relies more on the selection of assumptions and features, after getting the I/O prediction information, there may be a large deviation in the prediction result, and the prediction result is obviously deviating from the reality, so I/O prediction is required Information performs post-processing, such as deleting the abnormal prediction value in the I/O prediction information, and obtaining the normal prediction result.
本申请实施例中,对根据I/O信息执行机器学习,以对未来第一时间段的I/O信息进行预测的过程做了详细描述,提升了本申请实施例的可实施性。In the embodiments of the present application, the process of performing machine learning based on I/O information to predict I/O information for the first time period in the future is described in detail, which improves the implementability of the embodiments of the present application.
基于图3所述的实施例,下面对步骤301中I/O信息的预处理过程做详细描述,具体请参阅图4,图4为图3实施例中步骤301的细化步骤:Based on the embodiment described in FIG. 3, the preprocessing process of I/O information in step 301 is described in detail below. For details, please refer to FIG. 4. FIG. 4 shows the detailed steps of step 301 in the embodiment in FIG. 3.
401、根据所述I/O时间戳,计算出多组满足第一预设数目的I/O操作间的时间间隔;401. According to the I/O timestamp, calculate the time interval between multiple sets of I/O operations that meet the first preset number.
对应于步骤301中的描述,假设固态硬盘的数据处理装置在对NVMe指令执行解析后,获取到的I/O信息如表1所示:Corresponding to the description in step 301, it is assumed that after the data processing device of the solid-state hard disk performs analysis on the NVMe instruction, the I/O information obtained is as shown in Table 1:
表1Table 1
则下面以表1为例,对I/O信息的预处理过程进行描述,其中,预处理过程是先执行步骤401,即计算出多组满足第一预设数目的I/O操作间的时间间隔,具体的,步骤401可以是计算32个I/O操作间的时间间隔,或计算 16个I/O操作间的时间间隔,预设数目的选取决定于主机系统的处理能力,此处不做具体限制,下面以32个I/O操作为例进行说明。Then take Table 1 as an example to describe the preprocessing process of I/O information. The preprocessing process is to first perform step 401, that is, to calculate the time between multiple sets of I/O operations that meet the first preset number Specifically, step 401 can be to calculate the time interval between 32 I/O operations, or to calculate the time interval between 16 I/O operations. The selection of the preset number depends on the processing capacity of the host system. To make specific restrictions, the following takes 32 I/O operations as an example.
具体的,每间隔32个I/O的时间戳进行求差,计算出间隔时间;interval=timestep
i+31-timestep
i
Specifically, the time stamp of 32 I/Os is calculated every interval, and the interval time is calculated; interval=timestep i+31 -timestep i
其中,timestepi表示第i个I/O指令的时间戳。Among them, timestepi represents the timestamp of the i-th I/O instruction.
402、统计出每组中第一预设数目的I/O操作在所述时间间隔内的读操作及写操作的次数总和及对应的数据大小;402. Calculate the total number of read operations and write operations of the first preset number of I/O operations in each group within the time interval and the corresponding data size;
得到多组满足第一预设数目的I/O操作间的时间间隔后,统计出每组中第一预设数目的I/O操作在所述时间间隔内的读操作及写操作的次数总和及对应的数据大小。After obtaining the time intervals between multiple groups of I/O operations that satisfy the first preset number, count the total number of read operations and write operations of the first preset number of I/O operations in each group within the time interval And the corresponding data size.
进一步的,将读写I/O数据进行数字转化,写I/O表示为1,读I/O表示为0,然后每组32个I/O进行累加,计算出读I/O数量和写I/O数量,公式如下:Further, digital conversion of read and write I/O data, write I/O as 1, and read I/O as 0, and then each group of 32 I/Os are accumulated to calculate the number of read I/O and write I/O quantity, the formula is as follows:
具体的,可以根据上述公式对每组中第一预设数目的I/O操作在所述时间间隔内的读操作及写操作的次数总和及对应的数据大小进行计算。Specifically, the sum of the number of read operations and write operations of the first preset number of I/O operations in each group within the time interval and the corresponding data size can be calculated according to the above formula.
403、将所述数据大小执行压缩操作,以得到所述第一I/O信息表。403. Perform a compression operation on the data size to obtain the first I/O information table.
为了有利于做回归预测,需要将合并后的数据大小压缩至一个合理的范围(0-500),故需将一组32个I/O对应的读I/O的大小进行累加,然后除以200K进行压缩,同理将一组32个I/O对应的读I/O的大小进行累加,然后除以200K进行压缩,以得到如表2所示的处理后的第一I/O信息表。In order to facilitate regression prediction, the combined data size needs to be compressed to a reasonable range (0-500), so the size of the read I/O corresponding to a set of 32 I/Os needs to be accumulated, and then divided by 200K for compression, similarly accumulate the size of read I/O corresponding to a set of 32 I/Os, and then divide by 200K for compression to obtain the processed first I/O information table as shown in Table 2. .
具体的,压缩时的倍率大小可以根据实际需求进行自定义设置(如可以将一组32个I/O对应的读I/O的大小进行累加,然后除以400K或500K进行压缩),只要压缩后的数据大小符合做回归分析的数据范围即可,此处不做具体限制。Specifically, the size of the compression ratio can be customized according to actual needs (for example, the size of the read I/O corresponding to a set of 32 I/Os can be accumulated, and then divided by 400K or 500K for compression), as long as the compression The size of the latter data only needs to meet the data range for regression analysis, and there is no specific restriction here.
表2Table 2
上述表2中的时间间隔,表示32个I/O操作间的时间间隔,I/O类型总和表示32个I/O操作中读操作和写操作的数目总和,如当总和为0时,则表明该32个I/O操作全部为读操作,而当总和为4时,则表明该32个I/O操作中有4个写操作,28个读操作,而读操作和写操作对应的压缩后的数据大小,则为32个I/O总和中总的读操作及总的写操作对应的压缩后的数据大小。The time interval in Table 2 above represents the time interval between 32 I/O operations. The total I/O type represents the total number of read operations and write operations in 32 I/O operations. For example, when the sum is 0, then Indicates that the 32 I/O operations are all read operations, and when the sum is 4, it indicates that there are 4 write operations and 28 read operations in the 32 I/O operations, and the read operations and write operations correspond to compression The latter data size is the compressed data size corresponding to the total read operations and total write operations in the total of 32 I/Os.
上述实施例中,对I/O信息的预处理过程做了详细描述,即对第一I/O信息表的生成过程做了详细描述,提升了本申请实施例的可实施性。In the foregoing embodiment, the preprocessing process of the I/O information is described in detail, that is, the generation process of the first I/O information table is described in detail, which improves the implementability of the embodiments of the present application.
基于图/3所述的实施例,下面对步骤303中将多个合并后的I/O操作特征值执行神经网络LSTM模型学习(也即模型推理),以得到所述第一时间段的I/O预测信息的过程做详细描述,具体请参阅图5,图5为图3实施例中步骤303的细化步骤:Based on the embodiment described in Figure /3, the following is to perform neural network LSTM model learning (ie model inference) on the multiple combined I/O operation feature values in step 303 to obtain the first time period The process of I/O prediction information is described in detail. Please refer to FIG. 5 for details. FIG. 5 shows the detailed steps of step 303 in the embodiment of FIG. 3.
501、将多个合并后的I/O操作特征值,输入到神经网络的输入全连接层,以通过线性变换,将合并后的I/O操作特征值做高维向量空间映射,所述I/O操作特征值相关于所述I/O时间戳、所述I/O类型及所述I/O大小;501. Input multiple combined I/O operation eigenvalues to the input fully connected layer of the neural network to map the combined I/O operation eigenvalues into a high-dimensional vector space through linear transformation. /O operation characteristic value is related to the I/O timestamp, the I/O type, and the I/O size;
对应于图3所述实施例的步骤302,将如表2中的多个相邻I/O操作合并为一次I/O操作,然后将多个合并后的I/O操作特征值,输入到神经网络的输入全连接层,以通过线性变换,将合并后的I/O操作特征值做高维向量空 间映射,即将低维度的I/O操作特征值映射为高维度的I/O操作特征值,其中,I/O操作特征值相关于I/O时间戳、I/O类型和I/O大小。Corresponding to step 302 of the embodiment described in FIG. 3, multiple adjacent I/O operations in Table 2 are combined into one I/O operation, and then multiple combined I/O operation characteristic values are input to The input fully connected layer of the neural network uses linear transformation to map the merged I/O operation characteristic values into a high-dimensional vector space, that is, to map low-dimensional I/O operation characteristic values to high-dimensional I/O operation characteristics Value, where I/O operation characteristic value is related to I/O timestamp, I/O type and I/O size.
具体的,每个合并后的I/O操作特征值的可以通过以下方法来获得:Specifically, the characteristic value of each combined I/O operation can be obtained by the following methods:
如将表2中处理后的8个相邻I/O合并为一次I/O输入,这里合并可以理解为将表2中处理后的8个相邻I/O相连起来,合并为一次I/O输入,因为表2中的每个I/O是由表1中的32个I/O合并而来,故将8个表2中的相邻I/O合并为一次I/O输入,相当于将32*8=256个I/O合并为一次I/O输入,具体的合并操作可以如下所示,以得到一个合并后的I/O操作特征值,其中,每个I/O操作特征值都是与I/O时间戳、I/O类型及I/O大小相关的变量。For example, if the 8 adjacent I/Os processed in Table 2 are combined into one I/O input, the combination here can be understood as connecting the 8 adjacent I/Os processed in Table 2 to combine them into one I/O O input, because each I/O in Table 2 is combined from the 32 I/Os in Table 1, so 8 adjacent I/Os in Table 2 are combined into one I/O input, which is equivalent To merge 32*8=256 I/O into one I/O input, the specific merge operation can be as follows to obtain a merged I/O operation characteristic value, where each I/O operation characteristic The values are variables related to I/O timestamp, I/O type, and I/O size.
[interval
1,ioTypeSum
1,rSize
1,wSize
1,interval
2,ioTypeSum
2,rSize
2,wSize
2,...,interval
8,ioTypeSum
8,rSize
8,wSize
8]
[interval 1 ,ioTypeSum 1 ,rSize 1 ,wSize 1 ,interval 2 ,ioTypeSum 2 ,rSize 2 ,wSize 2 ,...,interval 8 ,ioTypeSum 8 ,rSize 8 ,wSize 8 ]
得到多个合并后的I/O特征值后,将多个合并后的I/O特征值,输入到神经网络的输入全连接层,以通过线性变换,将合并后的I/O操作特征值做高维向量空间映射,即将低维度的I/O操作特征值映射为高维度的I/O操作特征值,以发现更多的特征值。After obtaining multiple merged I/O characteristic values, input the multiple merged I/O characteristic values into the input fully connected layer of the neural network to transform the merged I/O operation characteristic values through linear transformation Do high-dimensional vector space mapping, that is, map low-dimensional I/O operation characteristic values to high-dimensional I/O operation characteristic values to discover more characteristic values.
具体的,可以是将32*1的一组向量,通过权重矩阵变换为128*1的一组向量,具体的变换过程可以为X
128×1=W
128×32·S
32×1+b
128×1,其中,W
128×
32为权重矩阵,b
128×1为偏移量,以将32维的I/O操作特征值映射为128维的I/O操作特征值。
Specifically, a set of 32*1 vectors can be transformed into a set of 128*1 vectors through a weight matrix. The specific transformation process can be X 128×1 =W 128×32 ·S 32×1 +b 128 ×1 , where W 128× 32 is the weight matrix, and b 128×1 is the offset to map the 32-dimensional I/O operation characteristic value to the 128-dimensional I/O operation characteristic value.
502、通过多个神经网络细胞LSTM Cell组成神经元集合,以将所述高维向量空间映射后的特征值依次循环输入所述神经元集合中进行运算,以得到运算结果;502. A neuron set is formed by a plurality of neural network cells LSTM Cells, so that the feature values after the high-dimensional vector space mapping are sequentially input into the neuron set to perform operations, to obtain an operation result;
得到高维度的I/O操作特征值后,通过多个神经网络细胞LSTM Cell组成神经元集合(具体如图6所示,假设本申请实施例中包括128个神经元细胞LSTM Cell),并将高维度的I/O操作特征值依次循环输入该神经元集合中进行运算,以得到运算结果。After obtaining the high-dimensional I/O operation characteristic values, multiple neural network cells LSTM Cells are used to form a neuron set (specifically as shown in FIG. 6, assuming that the embodiment of this application includes 128 neuron cells LSTM Cell), and The characteristic values of high-dimensional I/O operations are sequentially and cyclically input into the neuron set for operation to obtain the operation result.
具体的,在实际运算中,一定范围内,神经元细胞的数目越多,运算结果就越准确,但过多的运算量将给处理器带来过多的负重,从而影响实时输出的效率,故神经元细胞的数据量一般由运算结果的准确率及处理器的处理能力共同来决定。Specifically, in actual calculations, within a certain range, the greater the number of neuron cells, the more accurate the calculation results, but too much calculation will put too much load on the processor, which will affect the efficiency of real-time output. Therefore, the data volume of neuron cells is generally determined by the accuracy of the calculation results and the processing power of the processor.
下面以单个神经元细胞为例,对高维度特征值的运算过程进行描述:The following takes a single neuron cell as an example to describe the calculation process of high-dimensional feature values:
具体如图7所示,每个神经元细胞的计算过程如图7所示,每个神经元细胞的神经网络结构都包括输入门、遗忘门及输出门,以及新记忆状态和过去记忆状态,其中,每个门或状态的功能在现有技术中都有详细描述,此处不再赘述。As shown in Figure 7, the calculation process of each neuron cell is shown in Figure 7. The neural network structure of each neuron cell includes input gate, forget gate and output gate, as well as new and past memory states. Among them, the function of each door or state has been described in detail in the prior art, and will not be repeated here.
而本实施例中,假设有128个神经元细胞,则是将运算结果依次循环128次,以提高运算的准确率。However, in this embodiment, assuming that there are 128 neuron cells, the calculation result is looped 128 times in sequence to improve the accuracy of the calculation.
503、将所述运算结果输入到神经网络的输出全连接层,以将所述运算结果映射为预测结果输出维度,所述预测结果输出维度反映了所述第一时间段的I/O预测结果。503. Input the operation result to the output fully connected layer of the neural network to map the operation result into a prediction result output dimension, where the prediction result output dimension reflects the I/O prediction result of the first time period .
将高维度的特征向量值经过多个神经元细胞的运算后,将从输出门中输出的数据输入到神经网络的输出全连接层,以将运算结果映射为预测结果的输出维度,其中,具体的输出维度取决于用户的选择,即可以是输出任意维度的特征值,如输出32维的特征值,还可以是输出16维的特征值,或其他维度的特征值等。After the high-dimensional feature vector value is processed by multiple neuron cells, the data output from the output gate is input to the output fully connected layer of the neural network to map the calculation result to the output dimension of the prediction result. The output dimension of depends on the user's choice, that is, it can output feature values of any dimension, such as outputting 32-dimensional feature values, or outputting 16-dimensional feature values, or feature values of other dimensions.
具体的,本申请实施例以输出32维的特征值为例进行说明:Specifically, the embodiment of the present application takes an example of outputting 32-dimensional feature values for description:
将运算结果映射为32维的特征值,具体的映射过程如下:Y
32×1=W
32
×128·X
128×1+b
32×1,即通过权重矩阵W
32×128,将128维的特征值映射为32维的特征值,其中,b
32×1为矩阵偏移量,代表数据处理中的噪声影响。
The operation result is mapped to 32-dimensional eigenvalues, the specific mapping process is as follows: Y 32×1 = W 32 × 128 · X 128×1 + b 32×1 , that is, through the weight matrix W 32×128 , the 128-dimensional The eigenvalue is mapped to a 32-dimensional eigenvalue, where b 32×1 is the matrix offset, which represents the influence of noise in data processing.
下面以具体的实施例对图5所述的数据处理过程进行详细描述:The data processing process shown in FIG. 5 will be described in detail below with specific embodiments:
假设在LSTM网络模型中,一次样本输入为X={x
1,x
2,...,x
T},这里T为输入序列的时间步长(暂定T=1024),具体的,对应于步骤401,每个x
T为32*8=256个I/O操作的特征值,因为每个I/O操作的时长大约为3us,故输入样本中1024个x对应的时间间隔大约为32*8*3*1024≈1s,而经过步骤403后的模型输出为Y={y
1,y
2,...,y
16,y
17,...,y
32},其中y
1,y
2,...,y
16为未来每50ms为间隔的读操作的大小的预测值,也就是说未来0~50ms、50~100ms、…、750ms~800ms读操作的强度大小预测值,而y
17,...,y
32则是未来每50ms为间隔的写操作的大小的预测值,也就是说未来0~50ms、50~100ms、…、750ms~800ms写操作的强度大小预测值。
Suppose that in the LSTM network model, one sample input is X={x 1 ,x 2 ,...,x T }, where T is the time step of the input sequence (tentatively T=1024), specifically, corresponding to Step 401, each x T is the characteristic value of 32*8=256 I/O operations. Because the duration of each I/O operation is about 3 us, the time interval corresponding to 1024 x in the input sample is about 32* 8*3*1024≈1s, and the model output after step 403 is Y={y 1 ,y 2 ,...,y 16 ,y 17 ,...,y 32 }, where y 1 ,y 2 ,...,y 16 is the predicted value of the read operation size every 50ms in the future, that is to say, the predicted value of the intensity of the read operation in the future 0-50ms, 50-100ms,...,750ms-800ms, and y 17 ,...,y 32 is the predicted value of the size of the write operation every 50ms in the future, that is, the predicted value of the strength of the write operation in the future 0-50ms, 50-100ms,...,750ms-800ms.
需要说明的是,在使用神经网络模型对未来第一时间段的I/O信息执行预测时,一般要求历史数据量大于预测数据量,如本实施中采用1s内的实际I/O信息量,对未来800ms的I/O信息量进行预测,而为了提高准确率,还可以是对未来400ms的I/O信息量进行预测,一般是历史数据量越大,预测数据量越小,则相应的预测准确率就越高,反之,预测准确率就越低。而模型输出的Y值中,也可以是y
1,y
2,...,y
16为未来每50ms为间隔的写操作的大小的预测值,y
17,...,y
32为未来每50ms为间隔的读操作的大小的预测值,即Y值中的输出值主要取决于前期的模型训练过程,若前期模型训练过程中,y
1,y
2,...,y
16为未来每50ms为间隔的读操作的大小的预测值,则后期的模型输出时,y
1,y
2,...,y
16即为每50ms为间隔的读操作的大小的预测值。
It should be noted that when the neural network model is used to predict the I/O information in the first time period in the future, it is generally required that the amount of historical data is greater than the amount of predicted data. For example, the actual I/O information amount within 1s is used in this implementation. Predict the amount of I/O information in the future 800ms. In order to improve the accuracy, it can also predict the amount of I/O information in the future 400ms. Generally, the larger the amount of historical data, the smaller the amount of predicted data, and the corresponding The higher the prediction accuracy rate, on the contrary, the lower the prediction accuracy rate. In the Y value output by the model, y 1 , y 2 ,..., y 16 can be the predicted value of the write operation at an interval of 50 ms in the future, and y 17 ,..., y 32 are the predicted value of each write operation in the future. The predicted value of the read operation with an interval of 50ms, that is, the output value in the Y value mainly depends on the previous model training process. If the previous model training process, y 1 , y 2 ,..., y 16 are the future 50ms is the predicted value of the size of the read operation at an interval. When the later model outputs, y 1 , y 2 ,..., y 16 are the predicted values of the size of the read operation at every 50ms interval.
基于图1所述的实施例,上面实施例中对预测模型及预测过程做了详细描述,下面接着对根据预测结果对固态硬盘执行主动管理的步骤做详细描述,具体请参与图8,图8为图1实施例中步骤102的细化步骤:Based on the embodiment described in Figure 1, the prediction model and prediction process are described in detail in the above embodiment, and the steps for active management of the solid state drive based on the prediction result will be described in detail below. For details, please refer to Figure 8, Figure 8. It is a detailed step of step 102 in the embodiment of FIG. 1:
801、获取当前时间段的第一读写比例;801: Obtain the first read-write ratio of the current time period;
具体的,固态硬盘的数据处理装置在根据预测结果对固态硬盘执行主动管理时,可以获取当前时间段的第一读写比例,其中,当前时间段可以是当前100ms、当前100ms、或当前200ms等,此处不做具体限制Specifically, when the data processing device of the solid state drive performs active management on the solid state drive according to the prediction result, it can obtain the first read/write ratio of the current time period, where the current time period may be the current 100ms, the current 100ms, or the current 200ms, etc. , No specific restrictions here
而第一读写比例,则是对应当前时间段内读操作的次数与写操作的次数的比值,在实际应用中,还可以是直接获取当前时间段内读操作或写操作的次数,而不用计算第一读写比例,因为第一读写比例主要是用于方便与未来第一时间内的第二读写比例进行比较,实际运用中,用户可以根据比较的方便度来进行决定。The first read/write ratio corresponds to the ratio of the number of read operations to the number of write operations in the current time period. In practical applications, it can also be used to directly obtain the number of read operations or write operations in the current time period. Calculate the first read-write ratio, because the first read-write ratio is mainly used to facilitate the comparison with the second read-write ratio in the first time in the future. In actual use, the user can make a decision based on the convenience of comparison.
802、根据预测结果,获取所述第一时间段的第二读写比例;802. Obtain a second read/write ratio in the first time period according to the prediction result.
得到当前时间段内的第一读写比例后,固态硬盘的数据处理装置还可以根据步骤101的预测结果,对未来第一时间段内的第二读写比例进行计算,并根据第一读写比例和第二读写比例执行步骤803。After obtaining the first read/write ratio in the current time period, the data processing device of the solid-state hard disk may also calculate the second read/write ratio in the first time period in the future based on the prediction result of step 101, and calculate according to the first read/write ratio. Step 803 is executed for the ratio and the second read-write ratio.
803、判断所述第二读写比例与所述第一读写比例是否相同,若否,则执行步骤804,若是,则执行步骤805;803. Determine whether the second read-write ratio is the same as the first read-write ratio, if not, execute step 804, and if yes, execute step 805;
固态硬盘的数据处理装置获取到第一读写比例和第二读写比例后,判 断第二读写比例和第一读写比例是否相同,若否,则执行步骤804,若是,则执行步骤805。After obtaining the first read-write ratio and the second read-write ratio, the data processing device of the solid-state hard disk judges whether the second read-write ratio and the first read-write ratio are the same, if not, execute step 804, if yes, execute step 805 .
804、按照所述第二读写比例调整固态硬盘中的缓存分配;804. Adjust the cache allocation in the solid state hard disk according to the second read-write ratio.
若第二读写比例和第一读写比例不同,则说明接下来第一时间段内所占用的读缓存或写缓存的情况较当前时间段而言,会发生变化,则可以根据第二读写比例对调整固态硬盘中的缓存分配。If the second read-write ratio is different from the first read-write ratio, it means that the read cache or write cache occupied in the first time period will change compared with the current time period. You can use the second read The write ratio is adjusted to the cache allocation in the SSD.
具体的,若接下来第一时间段的读操作强度会变化,则对应调整读操作所占用的缓存,而若接下来第一时间段的写操作强度会变化,则对应调整写操作所占用的缓存,以使得第一时间段的读操作或写操作,可以快速被SSD盘响应,以提高固态硬盘控制器的控制性能,减少主机端的响应时间。Specifically, if the intensity of the read operation in the next first time period will change, the buffer occupied by the read operation will be adjusted accordingly, and if the intensity of the write operation in the next first time period will change, the amount of the write operation will be adjusted accordingly Cache, so that the read operation or write operation in the first time period can be quickly responded to by the SSD disk, so as to improve the control performance of the solid-state hard disk controller and reduce the response time of the host.
805、执行其他流程。805. Perform other processes.
若第二读写比例和第一读写比例相同,则执行其他流程,此处不做具体限制。If the second read-write ratio is the same as the first read-write ratio, other processes are executed, and no specific restrictions are made here.
需要说明的是,本实施例中的预测模型可以内置于固态硬盘或主机端中,且预测模型可以是固定不变的,也可以是实时学习,实时更新的,此处也不做具体限制。It should be noted that the prediction model in this embodiment can be built into the solid-state hard disk or the host side, and the prediction model can be fixed, or it can be learned in real time and updated in real time, and there is no specific limitation here.
本申请实施例中,对缓存调度上对固态硬盘执行主动管理的方式做了详细描述,提升了本申请实施例的可实施性。In the embodiment of the present application, a detailed description of the manner of performing active management of the solid-state hard disk in the cache scheduling is provided, which improves the implementability of the embodiment of the present application.
基于图1所述的实施例,下面接着对根据预测结果对固态硬盘执行主动管理的步骤做详细描述,具体请参与图9,图9为图1实施例中步骤102的另一细化步骤:Based on the embodiment described in FIG. 1, the following describes in detail the steps of performing active management of the solid state drive according to the prediction result. Please refer to FIG. 9 for details. FIG. 9 is another detailed step of step 102 in the embodiment of FIG. 1.
901、根据预测结果,获取所述第一时间段内的I/O强度;901. Obtain the I/O intensity in the first time period according to the prediction result.
固态硬盘的数据处理装置获取到未来第一时间段的I/O预测结果后,可以根据预测结果,获取第一时间段内的I/O强度,其中,I/O强度是指单位时间内读操作或写操作所处理的数据大小。After the data processing device of the solid-state hard disk obtains the I/O prediction result for the first time period in the future, it can obtain the I/O intensity in the first time period according to the prediction result, where the I/O intensity refers to the reading per unit time. The size of the data processed by the operation or write operation.
902、获取固态硬盘的I/O吞吐量;902. Obtain the I/O throughput of the solid state drive;
具体的,固态硬盘的I/O吞吐量指的是固态硬盘单位时间内可以处理的读操作或写操作的数据强度,是固态硬盘的一个指标,一般会在固态硬盘 出厂时进行标注。Specifically, the I/O throughput of a solid state drive refers to the data intensity of a read operation or a write operation that can be processed by the solid state drive per unit time, which is an indicator of the solid state drive, and is generally marked when the solid state drive is shipped.
903、根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断固态硬盘是否处于空闲状态,若是,则执行步骤904,若否,则执行步骤907。903. According to the I/O intensity and the I/O throughput in the first time period, determine whether the solid state disk is in an idle state, if so, perform step 904, and if not, perform step 907.
具体的,在对固态硬盘的状态进行判断时,如该固态硬盘在第一时间段内是否处于空闲状态,可以根据第一时间段内的I/O强度和固态硬盘的I/O吞吐量进行判断,若第一时间段内的I/O强度与I/O吞吐量的比值小于预设阈值,如40%,则认为固态硬盘在第一时间段内处于空闲状态,则执行步骤904,反之,则认为固态硬盘在第一时间段内处于繁忙状态,则执行步骤907。Specifically, when judging the state of the solid state drive, such as whether the solid state drive is in an idle state during the first time period, it can be determined according to the I/O intensity in the first time period and the I/O throughput of the solid state drive. It is judged that if the ratio of the I/O intensity to the I/O throughput in the first time period is less than the preset threshold, such as 40%, it is considered that the solid state drive is idle in the first time period, and step 904 is performed, otherwise , It is considered that the solid state disk is busy in the first time period, and step 907 is executed.
容易理解的是,上述预设阈值的大小,可以根据实际需求进行自定义设置,如30%或20%等,此处不做具体限制。It is easy to understand that the size of the aforementioned preset threshold can be customized according to actual needs, such as 30% or 20%, etc., and there is no specific limitation here.
904、判断所述固态硬盘的剩余空间是否小于第一阈值,若是,则执行步骤905,若否,则执行步骤906;904. Determine whether the remaining space of the solid-state hard disk is less than the first threshold, if yes, execute step 905, and if not, execute step 906;
为了使得SSD盘中保持足够大的剩余空间,用于处理接下来第一时间段的写操作或读操作,以使得SSD盘可以快速响应写操作或读操作,可以进一步获取硬盘中的剩余空间,并判断该固态硬盘的剩余空间是否小于第一阈值,以判断SSD盘是否有足够大的剩余空间来响应读操作或写操作,若是,则执行步骤905,若否,则执行步骤906。In order to maintain a large enough remaining space in the SSD disk, it is used to process the write operation or read operation in the next first time period, so that the SSD disk can quickly respond to the write operation or read operation, and further obtain the remaining space in the hard disk. It is determined whether the remaining space of the solid-state hard disk is less than the first threshold to determine whether the SSD disk has a large enough remaining space to respond to the read operation or the write operation. If so, step 905 is performed, and if not, step 906 is performed.
905、触发固态硬盘的垃圾回收事件;905. Trigger the garbage collection event of the solid state hard disk;
若固态硬盘的剩余空间小于第一阈值,则表明SSD盘中的剩余空间不足,则触发固态硬盘中的垃圾回收事件。If the remaining space of the SSD is less than the first threshold, it indicates that the remaining space in the SSD is insufficient, and a garbage collection event in the SSD is triggered.
与现有技术中,被动执行垃圾回收的策略不同,本申请中可以根据预测结果,对未来第一时间段的I/O强度进行预测,并根据预测结果判断固态硬盘是否处于空闲状态,若该固态硬盘处于空闲状态,且固态硬盘的剩余空间小于第一阈值,则主动触发固态硬盘中的垃圾回收事件,从而提高了固态硬盘控制器的主控性能,减少了主机端的操作响应时间。Different from the strategy of passively performing garbage collection in the prior art, this application can predict the I/O intensity of the first time period in the future based on the prediction result, and determine whether the solid state drive is idle according to the prediction result. When the solid state drive is in an idle state and the remaining space of the solid state drive is less than the first threshold, the garbage collection event in the solid state drive is actively triggered, thereby improving the main control performance of the solid state drive controller and reducing the operation response time of the host side.
906、执行其他流程。906. Perform other processes.
若固态硬盘的剩余空间不小于第一阈值,则说明SSD盘中有足够的空间响应第一时间段内的I/O操作,则执行其他流程,此处不做具体限制。If the remaining space of the solid state disk is not less than the first threshold, it means that there is enough space in the SSD disk to respond to the I/O operation in the first time period, and other processes are executed, and no specific limitation is made here.
907、获取固态硬盘的可分配剩余空间;907. Obtain allocatable remaining space of the solid state hard disk;
对应于步骤903,若固态硬盘未处于空闲状态,而为了保证固态硬盘有足够的空间响应未来第一时间段的I/O操作,则可以进一步获取固态硬盘中的可分配剩余空间,并执行步骤908。Corresponding to step 903, if the solid state drive is not in an idle state, and in order to ensure that the solid state drive has enough space to respond to I/O operations in the first time period in the future, the allocatable remaining space in the solid state drive can be further obtained, and the steps are performed 908.
908、判断第一时间段内的I/O写操作强度是否大于可分配的剩余空间,若是,则执行步骤905,若否,则执行步骤906;908. Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space, if yes, perform step 905, if not, perform step 906;
获取到第一时间段内的I/O强度后,可以进一步判断第一时间段内的I/O写操作强度是否大于可分配的剩余空间,若是,则执行步骤905,若否,则执行步骤906;After the I/O intensity in the first time period is obtained, it can be further determined whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space, if yes, go to step 905, if not, go to step 906;
具体的,步骤908为判断固态硬盘在第一时间段内的I/O强度大于可分配的剩余空间时,则触发固态硬盘中的垃圾回收事件,若第一时间段内的I/O强度不大于可分配的剩余空间,则执行其他流程,此处不做具体限制。Specifically, step 908 is to determine that when the I/O intensity of the solid state drive in the first time period is greater than the remaining space that can be allocated, a garbage collection event in the solid state drive is triggered. If the I/O intensity in the first time period is not If it is greater than the remaining space that can be allocated, other processes are executed, and there is no specific restriction here.
需要说明的是,本实施例中的预测模型可以内置于固态硬盘或主机端中,且预测模型可以是固定不变的,也可以是实时学习,实时更新的,此处也不做具体限制。It should be noted that the prediction model in this embodiment can be built into the solid-state hard disk or the host side, and the prediction model can be fixed, or it can be learned in real time and updated in real time, and there is no specific limitation here.
本申请实施例中,从主动垃圾回收的角度对固态硬盘执行主动管理的方式做了详细描述,提升了本申请实施例的可实施性。In the embodiment of the present application, the method for performing active management of the solid state drive is described in detail from the perspective of active garbage collection, which improves the implementability of the embodiment of the present application.
基于图1所述的实施例,下面接着对根据预测结果对固态硬盘执行主动管理的步骤做详细描述,具体请参与图10,图10为图1实施例中步骤102的另一细化步骤:Based on the embodiment described in FIG. 1, the following is a detailed description of the steps of performing active management of the solid state drive according to the prediction result. Please refer to FIG. 10 for details. FIG. 10 is another detailed step of step 102 in the embodiment of FIG. 1.
1001、根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;1001. According to the prediction result, respectively obtain the I/O intensity of multiple applications in the first time period;
作为对固态硬盘执行主动管理的另一种方式,固态硬盘的数据处理装置还可以根据预测结果,分别获取未来第一时间内多个应用的I/O强度。As another way to perform active management of the solid state drive, the data processing device of the solid state drive can also obtain the I/O intensity of multiple applications in the first time in the future according to the prediction result.
具体的,如未来第一时间段运行的有3个应用,则分别获取第一应用、第二应用和第三应用在第一时间段内的I/O强度,并根据各个应用的I/O强度执行步骤1002。Specifically, if there are 3 applications running in the first time period in the future, the I/O intensity of the first application, the second application, and the third application in the first time period are obtained respectively, and the I/O intensity of each application Intensity executes step 1002.
1002、判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值,若是,则执行步骤1003;若否,则执行步骤1004;1002. Determine whether the I/O strength difference of two applications among the multiple applications is greater than a second threshold; if yes, perform step 1003; if not, perform step 1004;
固态硬盘的数据处理装置判断多个应用中是否存在两个应用的I/O强 度差大于第二阈值,具体的,第二阈值的大小可以根据用户的需求进行自定义设置,此处不做具体限制。The data processing device of the solid-state hard disk determines whether there is a plurality of applications where the I/O intensity difference between the two applications is greater than the second threshold. Specifically, the size of the second threshold can be customized according to the needs of the user, and no specifics are made here. limit.
具体的,步骤1002主要是根据各个应用的I/O强度,对各个应用的I/O强度进行判断,并根据判断结果执行步骤1003。Specifically, step 1002 is mainly to judge the I/O intensity of each application according to the I/O intensity of each application, and execute step 1003 according to the judgment result.
1003、优先处理所述两个应用中I/O强度较小的应用;1003. Prioritize the application with lower I/O intensity among the two applications;
若存在两个应用的I/O强度大于第二阈值,则优先处理上述两个应用中I/O强度较小的应用,以提升主机端的用户体验。If the I/O intensity of two applications is greater than the second threshold, the application with the lower I/O intensity of the above two applications is prioritized to improve the user experience of the host.
具体的,假设第一时间段内有两个应用,而A应用在执行一个长时间的高强度读操作时,而应用B只需要读取较少的数据,即A应用与B应用的I/O强度差满足大于第二阈值的条件,则本实施例优先处理B应用,即相当于将B应用插队在A前,则应用的平均响应时间会大大降低,而主机端也感受不到B的延迟,从而提升用户对固态硬盘的使用体验。Specifically, suppose there are two applications in the first time period, and when application A performs a long-time high-intensity read operation, application B only needs to read less data, that is, the I/ of application A and application B If the O intensity difference satisfies the condition of being greater than the second threshold, this embodiment will give priority to the B application, which is equivalent to inserting the B application before A, the average response time of the application will be greatly reduced, and the host will not feel the B Delay, thereby enhancing the user experience of the SSD.
1004、执行其他流程。1004. Perform other processes.
若不存在两个应用的I/O强度大于第二阈值,则执行其他流程,此处不做具体限制。If there are no two applications whose I/O intensity is greater than the second threshold, other processes are executed, and there is no specific limitation here.
上面对固态硬盘的数据处理方法进行了描述,下面对本实施例中的固态硬盘处理装置进行描述,具体请参阅图11,本申请实施例中固态硬盘的数据处理装置的一个实施例,包括:The data processing method of the solid state drive is described above, and the solid state drive processing device in this embodiment is described below. For details, please refer to FIG. 11. An embodiment of the data processing device of the solid state drive in the embodiment of the present application includes:
预测单元1101,用于通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O大小;The prediction unit 1101 is configured to predict the I/O information of the first time period in the future through the prediction model, the I/O information at least including the I/O type and/or the I/O size;
管理单元1102,用于根据预测结果对固态硬盘执行管理,以减少主机端的操作响应时间。The management unit 1102 is configured to perform management on the solid state disk according to the prediction result, so as to reduce the operation response time of the host side.
优选的,所述I/O类型包括读操作和写操作;Preferably, the I/O type includes read operation and write operation;
优选的,所述预测单元1102,具体用于:Preferably, the prediction unit 1102 is specifically configured to:
获取当前时间段的第一读写比例;Get the first read/write ratio of the current time period;
根据预测结果,获取所述第一时间段的第二读写比例;According to the prediction result, obtain the second read-write ratio in the first time period;
判断所述第二读写比例与所述第一读写比例是否相同;Determine whether the second read-write ratio is the same as the first read-write ratio;
若否,则按照所述第二读写比例调整固态硬盘中的缓存分配。If not, adjust the cache allocation in the solid state disk according to the second read-write ratio.
优选的,所述管理单元1102,还用于:Preferably, the management unit 1102 is further configured to:
若所述第二读写比例中的读操作或写操作强度变化,则对应调整所述读操作或所述写操作所需占用的缓存。If the intensity of the read operation or the write operation in the second read-write ratio changes, correspondingly adjust the buffer occupied by the read operation or the write operation.
优选的,所述管理单元1102,具体用于:Preferably, the management unit 1102 is specifically configured to:
根据预测结果,获取所述第一时间段内的I/O强度;According to the prediction result, obtain the I/O intensity in the first time period;
获取固态硬盘的I/O吞吐量;Obtain the I/O throughput of the solid state drive;
根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断所述固态硬盘是否处于空闲状态。According to the I/O intensity and the I/O throughput in the first time period, it is determined whether the solid state disk is in an idle state.
优选的,所述管理单元1102,还用于:Preferably, the management unit 1102 is further configured to:
若所述固态硬盘处于空闲状态;If the solid state drive is in an idle state;
判断所述固态硬盘的剩余空间是否小于第一阈值;Judging whether the remaining space of the solid-state hard disk is less than a first threshold;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
优选的,所述管理单元1102,还用于:Preferably, the management unit 1102 is further configured to:
若所述固态硬盘未处于空闲状态;If the solid state hard disk is not in an idle state;
获取固态硬盘中可分配的剩余空间;Obtain the remaining space that can be allocated in the SSD;
判断所述第一时间段内的I/O写操作强度是否大于所述可分配的剩余空间;Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
优选的,所述管理单元1102,还用于:Preferably, the management unit 1102 is further configured to:
根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;According to the prediction result, respectively obtain the I/O intensity of the multiple applications in the first time period;
判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值;Judging whether there is an I/O intensity difference between two applications in the multiple applications that is greater than a second threshold;
若是,则优先处理所述两个应用中I/O强度较小的应用。If so, the application with the lower I/O intensity among the two applications is processed first.
优选的,所述预测模型内置于固态硬盘和/或主机端中。Preferably, the prediction model is built in the solid state hard disk and/or the host.
需要说明的是,本实施例中各单元的作用与图1至图10中描述的类型,此处不再赘述。It should be noted that the functions of each unit in this embodiment are the same as those described in FIGS. 1 to 10, and will not be repeated here.
本申请实施例中,根据预测单元1101对未来第一时间段的I/O信息进行预测,该I/O信息包括I/O类型及I/O强度,根据管理单元1102对固态硬盘执行主动管理,以减少主机端的操作响应时间。因为本申请实施例中,可以根据预测模型对未来第一时间段的I/O信息进行预测,并根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间,从而提升了固态硬 盘的主控性能,提升了用户对固态硬盘的使用体验。In this embodiment of the application, the prediction unit 1101 predicts the I/O information for the first time period in the future, the I/O information includes I/O type and I/O intensity, and the management unit 1102 performs active management on the solid state drive , In order to reduce the operation response time of the host. Because in the embodiment of this application, the I/O information of the first time period in the future can be predicted based on the prediction model, and the solid state drive can be actively managed based on the predicted result to reduce the operation response time of the host side, thereby improving the performance of the solid state drive. The main control performance improves the user experience of the solid state drive.
上面从模块化功能实体的角度对本发明实施例中的固态硬盘的数据处理装置进行了描述,下面从硬件处理的角度对本发明实施例中的计算机装置进行描述:The above describes the data processing device of the solid-state hard disk in the embodiment of the present invention from the perspective of modularized functional entities, and the following describes the computer device in the embodiment of the present invention from the perspective of hardware processing:
该计算机装置用于实现固态硬盘的数据处理装置的功能,本发明实施例中计算机装置一个实施例包括:The computer device is used to implement the function of the data processing device of the solid state hard disk. An embodiment of the computer device in the embodiment of the present invention includes:
处理器以及存储器;Processor and memory;
存储器用于存储计算机程序,处理器用于执行存储器中存储的计算机程序时,可以实现如下步骤:The memory is used to store computer programs, and when the processor is used to execute the computer programs stored in the memory, the following steps can be implemented:
通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O大小;Predicting the I/O information for the first time period in the future through the prediction model, the I/O information at least including the I/O type and/or the I/O size;
根据预测结果对固态硬盘执行管理,以减少主机端的操作响应时间。Perform management on the solid state drive based on the predicted result to reduce the response time of the host side operation.
在本发明的一些实施例中,处理器,还可以用于实现如下步骤:In some embodiments of the present invention, the processor may also be used to implement the following steps:
获取当前时间段的第一读写比例;Get the first read/write ratio of the current time period;
根据预测结果,获取所述第一时间段的第二读写比例;According to the prediction result, obtain the second read-write ratio in the first time period;
判断所述第二读写比例与所述第一读写比例是否相同;Determine whether the second read-write ratio is the same as the first read-write ratio;
若否,则按照所述第二读写比例调整固态硬盘中的缓存分配。If not, adjust the cache allocation in the solid state disk according to the second read-write ratio.
在本发明的一些实施例中,处理器,还可以用于实现如下步骤:In some embodiments of the present invention, the processor may also be used to implement the following steps:
若所述第二读写比例中的读操作或写操作强度变化,则对应调整所述读操作或所述写操作所需占用的缓存。If the intensity of the read operation or the write operation in the second read-write ratio changes, correspondingly adjust the buffer occupied by the read operation or the write operation.
在本发明的一些实施例中,处理器,还可以用于实现如下步骤:In some embodiments of the present invention, the processor may also be used to implement the following steps:
根据预测结果,获取所述第一时间段内的I/O强度;According to the prediction result, obtain the I/O intensity in the first time period;
获取固态硬盘的I/O吞吐量;Obtain the I/O throughput of the solid state drive;
根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断所述固态硬盘是否处于空闲状态。According to the I/O intensity and the I/O throughput in the first time period, it is determined whether the solid state disk is in an idle state.
在本发明的一些实施例中,处理器,还可以用于实现如下步骤:In some embodiments of the present invention, the processor may also be used to implement the following steps:
若所述固态硬盘处于空闲状态;If the solid state drive is in an idle state;
判断所述固态硬盘的剩余空间是否小于第一阈值;Judging whether the remaining space of the solid-state hard disk is less than a first threshold;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
在本发明的一些实施例中,处理器,还可以用于实现如下步骤:In some embodiments of the present invention, the processor may also be used to implement the following steps:
若所述固态硬盘未处于空闲状态;If the solid state hard disk is not in an idle state;
获取固态硬盘中可分配的剩余空间;Obtain the remaining space that can be allocated in the SSD;
判断所述第一时间段内的I/O写操作强度是否大于所述可分配的剩余空间;Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
在本发明的一些实施例中,处理器,还可以用于实现如下步骤:In some embodiments of the present invention, the processor may also be used to implement the following steps:
根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;According to the prediction result, respectively obtain the I/O intensity of the multiple applications in the first time period;
判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值;Judging whether there is an I/O intensity difference between two applications in the multiple applications that is greater than a second threshold;
若是,则优先处理所述两个应用中I/O强度较小的应用。If so, the application with the lower I/O intensity among the two applications is processed first.
可以理解的是,上述说明的计算机装置中的处理器执行所述计算机程序时,也可以实现上述对应的各装置实施例中各单元的功能,此处不再赘述。示例性的,所述计算机程序可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器中,并由所述处理器执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序在所述固态硬盘的数据处理装置中的执行过程。例如,所述计算机程序可以被分割成上述固态硬盘的数据处理装置中的各单元,各单元可以实现如上述相应固态硬盘的数据处理装置说明的具体功能。It is understandable that when the processor in the computer device described above executes the computer program, it can also implement the functions of the units in the corresponding device embodiments described above, which will not be repeated here. Exemplarily, the computer program may be divided into one or more modules/units, and the one or more modules/units are stored in the memory and executed by the processor to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the data processing device of the solid state hard disk. For example, the computer program may be divided into units in the data processing device of the above-mentioned solid-state hard disk, and each unit can implement specific functions as described in the data processing device of the corresponding solid-state hard disk.
所述计算机装置可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机装置可包括但不仅限于处理器、存储器。本领域技术人员可以理解,处理器、存储器仅仅是计算机装置的示例,并不构成对计算机装置的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述计算机装置还可以包括输入输出设备、网络接入设备、总线等。The computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the processor and the memory are only examples of the computer device and do not constitute a limitation on the computer device. They may include more or fewer components, or combine certain components, or different components, such as The computer device may also include input and output devices, network access devices, buses, and the like.
所述处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器 件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述计算机装置的控制中心,利用各种接口和线路连接整个计算机装置的各个部分。The processor may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (ASIC), off-the-shelf Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
所述存储器可用于存储所述计算机程序和/或模块,所述处理器通过运行或执行存储在所述存储器内的计算机程序和/或模块,以及调用存储在存储器内的数据,实现所述计算机装置的各种功能。所述存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory may be used to store the computer program and/or module, and the processor implements the computer by running or executing the computer program and/or module stored in the memory, and calling data stored in the memory. Various functions of the device. The memory may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function, etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards , Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
本发明还提供了一种计算机可读存储介质,该计算机可读存储介质用于实现固态硬盘的数据处理装置的功能,其上存储有计算机程序,计算机程序被处理器执行时,可以用于执行如下步骤:The present invention also provides a computer-readable storage medium, which is used to implement the functions of a data processing device of a solid-state hard disk, and has a computer program stored thereon. When the computer program is executed by a processor, it can be used to execute The following steps:
通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O大小;Predicting the I/O information for the first time period in the future through the prediction model, the I/O information at least including the I/O type and/or the I/O size;
根据预测结果对固态硬盘执行管理,以减少主机端的操作响应时间。Perform management on the solid state drive based on the predicted result to reduce the response time of the host side operation.
在本发明的一些实施例中,计算机可读存储介质存储的计算机程序被处理器执行时,可以具体用于执行如下步骤:In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, it may be specifically used to execute the following steps:
获取当前时间段的第一读写比例;Get the first read/write ratio of the current time period;
根据预测结果,获取所述第一时间段的第二读写比例;According to the prediction result, obtain the second read-write ratio in the first time period;
判断所述第二读写比例与所述第一读写比例是否相同;Determine whether the second read-write ratio is the same as the first read-write ratio;
若否,则按照所述第二读写比例调整固态硬盘中的缓存分配。If not, adjust the cache allocation in the solid state disk according to the second read-write ratio.
在本发明的一些实施例中,计算机可读存储介质存储的计算机程序被处理器执行时,可以具体用于执行如下步骤:In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, it may be specifically used to execute the following steps:
若所述第二读写比例中的读操作或写操作强度变化,则对应调整所述读操作或所述写操作所需占用的缓存。If the intensity of the read operation or the write operation in the second read-write ratio changes, correspondingly adjust the buffer occupied by the read operation or the write operation.
在本发明的一些实施例中,计算机可读存储介质存储的计算机程序被处理器执行时,可以具体用于执行如下步骤:In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, it may be specifically used to execute the following steps:
根据预测结果,获取所述第一时间段内的I/O强度;According to the prediction result, obtain the I/O intensity in the first time period;
获取固态硬盘的I/O吞吐量;Obtain the I/O throughput of the solid state drive;
根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断所述固态硬盘是否处于空闲状态。According to the I/O intensity and the I/O throughput in the first time period, it is determined whether the solid state disk is in an idle state.
在本发明的一些实施例中,计算机可读存储介质存储的计算机程序被处理器执行时,可以具体用于执行如下步骤:In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, it may be specifically used to execute the following steps:
若所述固态硬盘处于空闲状态;If the solid state drive is in an idle state;
判断所述固态硬盘的剩余空间是否小于第一阈值;Judging whether the remaining space of the solid-state hard disk is less than a first threshold;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
在本发明的一些实施例中,计算机可读存储介质存储的计算机程序被处理器执行时,可以具体用于执行如下步骤:In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, it may be specifically used to execute the following steps:
若所述固态硬盘未处于空闲状态;If the solid state hard disk is not in an idle state;
获取固态硬盘中可分配的剩余空间;Obtain the remaining space that can be allocated in the SSD;
判断所述第一时间段内的I/O写操作强度是否大于所述可分配的剩余空间;Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space;
若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
在本发明的一些实施例中,计算机可读存储介质存储的计算机程序被处理器执行时,可以具体用于执行如下步骤:In some embodiments of the present invention, when a computer program stored in a computer-readable storage medium is executed by a processor, it may be specifically used to execute the following steps:
根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;According to the prediction result, respectively obtain the I/O intensity of the multiple applications in the first time period;
判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值;Judging whether there is an I/O intensity difference between two applications in the multiple applications that is greater than a second threshold;
若是,则优先处理所述两个应用中I/O强度较小的应用。If so, the application with the lower I/O intensity among the two applications is processed first.
可以理解的是,所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在相应的一个计算机可读取存储介质中。基于这样的理解,本发明实现上述相应的实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程 序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。It can be understood that if the 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 corresponding computer readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned corresponding embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the foregoing method embodiments. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted in accordance with the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described system, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。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, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the 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 storage medium. Based on this understanding, the technical solution of the present invention 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 storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
- 一种固态硬盘数据处理方法,其特征在于,包括:A data processing method for a solid state hard disk, which is characterized in that it comprises:通过预测模型对未来第一时间段的I/O信息进行预测,所述I/O信息至少包括I/O类型和/或I/O强度;Predicting the I/O information for the first time period in the future through the prediction model, where the I/O information includes at least I/O type and/or I/O intensity;根据预测结果对固态硬盘执行主动管理,以减少主机端的操作响应时间。Actively manage the solid state drive based on the predicted result to reduce the response time of the host.
- 根据权利要求1所述的方法,其特征在于,所述I/O类型包括读操作和写操作;The method according to claim 1, wherein the I/O type includes read operation and write operation;所述根据预测结果对固态硬盘执行管理,包括:The performing management of the solid state drive according to the prediction result includes:获取当前时间段的第一读写比例;Get the first read/write ratio of the current time period;根据预测结果,获取所述第一时间段的第二读写比例;According to the prediction result, obtain the second read-write ratio in the first time period;判断所述第二读写比例与所述第一读写比例是否相同;Determine whether the second read-write ratio is the same as the first read-write ratio;若否,则按照所述第二读写比例调整固态硬盘中的缓存分配。If not, adjust the cache allocation in the solid state disk according to the second read-write ratio.
- 根据权利要求2所述的方法,其特征在于,所述按照所述第二读写比例调整固态硬盘中的缓存分配,包括:The method according to claim 2, wherein the adjusting the cache allocation in the solid state hard disk according to the second read-write ratio comprises:若所述第二读写比例中的读操作或写操作强度变化,则对应调整所述读操作或所述写操作所需占用的缓存。If the intensity of the read operation or the write operation in the second read-write ratio changes, correspondingly adjust the buffer occupied by the read operation or the write operation.
- 根据权利要求1所述的方法,其特征在于,所述根据预测结果对固态硬盘执行管理,包括:The method according to claim 1, wherein the performing management on the solid state disk according to the prediction result comprises:根据预测结果,获取所述第一时间段内的I/O强度;According to the prediction result, obtain the I/O intensity in the first time period;获取固态硬盘的I/O吞吐量;Obtain the I/O throughput of the solid state drive;根据所述第一时间段内的I/O强度和所述I/O吞吐量,判断所述固态硬盘是否处于空闲状态。According to the I/O intensity and the I/O throughput in the first time period, it is determined whether the solid state disk is in an idle state.
- 根据权利要求4所述的方法,其特征在于,所述根据预测结果对固态硬盘执行管理,包括:The method according to claim 4, wherein the performing management on the solid state drive according to the prediction result comprises:若所述固态硬盘处于空闲状态;If the solid state drive is in an idle state;判断所述固态硬盘的剩余空间是否小于第一阈值;Judging whether the remaining space of the solid-state hard disk is less than a first threshold;若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
- 根据权利要求4所述的方法,其特征在于,所述根据预测结果对固 态硬盘执行管理,包括:The method according to claim 4, wherein the performing management on the solid state hard disk according to the prediction result comprises:若所述固态硬盘未处于空闲状态;If the solid state hard disk is not in an idle state;获取固态硬盘中可分配的剩余空间;Obtain the remaining space that can be allocated in the SSD;判断所述第一时间段内的I/O写操作强度是否大于所述可分配的剩余空间;Determine whether the I/O write operation intensity in the first time period is greater than the allocatable remaining space;若是,则触发固态硬盘中的垃圾回收事件。If it is, a garbage collection event in the solid state drive is triggered.
- 根据权利要求1所述的方法,其特征在于,所述根据预测结果对固态硬盘执行管理,包括:The method according to claim 1, wherein the performing management on the solid state disk according to the prediction result comprises:根据预测结果,分别获取所述第一时间段内多个应用的I/O强度;According to the prediction result, respectively obtain the I/O intensity of the multiple applications in the first time period;判断所述多个应用中是否存在两个应用的I/O强度差大于第二阈值;Judging whether there is an I/O intensity difference between two applications in the multiple applications that is greater than a second threshold;若是,则优先处理所述两个应用中I/O强度较小的应用。If so, the application with the lower I/O intensity among the two applications is processed first.
- 根据权利要求1至7中任一项所述的方法,其特征在于,所述预测模型内置于固态硬盘和/或主机端中。The method according to any one of claims 1 to 7, wherein the prediction model is built in the solid state hard disk and/or the host.
- 一种计算机装置,包括处理器,其特征在于,所述处理器在执行存储于存储器上的计算机程序时,用于实现如权利要求1至8中任一项所述的硬盘数据处理方法。A computer device comprising a processor, wherein the processor is used to implement the hard disk data processing method according to any one of claims 1 to 8 when the processor executes a computer program stored on a memory.
- 一种计算机可读存储介质,其上存储由计算机程序,其特征在于,所述计算机程序在被处理器执行时,用于实现如权利要求1至8中任一项所述的硬盘处理方法。A computer-readable storage medium with a computer program stored thereon, wherein the computer program is used to implement the hard disk processing method according to any one of claims 1 to 8 when the computer program is executed by a processor.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910385553.6 | 2019-05-09 | ||
CN201910385553.6A CN111913649B (en) | 2019-05-09 | 2019-05-09 | Data processing method and device for solid state disk |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020224500A1 true WO2020224500A1 (en) | 2020-11-12 |
Family
ID=73051453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/087728 WO2020224500A1 (en) | 2019-05-09 | 2020-04-29 | Data processing method and apparatus for solid state disk |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111913649B (en) |
WO (1) | WO2020224500A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113628675A (en) * | 2021-07-22 | 2021-11-09 | 成都思科瑞微电子股份有限公司 | SSD solid state disk testing method |
CN114356227A (en) * | 2021-12-17 | 2022-04-15 | 得一微电子股份有限公司 | Solid state disk instruction processing method, device and system and readable storage medium |
CN115547403A (en) * | 2022-10-25 | 2022-12-30 | 宁畅信息产业(北京)有限公司 | Hard disk hot plug test method, device, equipment and storage medium |
CN116662214A (en) * | 2023-05-06 | 2023-08-29 | 深圳市晶存科技有限公司 | Hard disk garbage recycling method, device, system and medium based on fio |
CN117742618A (en) * | 2024-02-19 | 2024-03-22 | 鑫硕泰(深圳)科技有限公司 | Data storage management method and device for solid state disk |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110764714B (en) * | 2019-11-06 | 2021-07-27 | 深圳大普微电子科技有限公司 | Data processing method, device and equipment and readable storage medium |
CN113011566A (en) * | 2021-03-30 | 2021-06-22 | 北京深演智能科技股份有限公司 | Data processing method, electronic device and computer readable storage medium |
CN114442935B (en) * | 2021-12-29 | 2023-08-04 | 天翼云科技有限公司 | Method and device for brushing dirty data, electronic equipment and storage medium |
CN114518849B (en) * | 2022-02-18 | 2023-01-10 | 深圳大学 | Data storage method and device and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102147767A (en) * | 2011-04-26 | 2011-08-10 | 记忆科技(深圳)有限公司 | Method and system for dynamically adjusting solid state disk garbage collection parameters |
CN102779017A (en) * | 2012-06-29 | 2012-11-14 | 华中科技大学 | Control method of data caching area in solid state disc |
CN105512051A (en) * | 2015-12-16 | 2016-04-20 | 鸿秦(北京)科技有限公司 | Self-learning type intelligent solid-state hard disk cache management method and device |
CN106250064A (en) * | 2016-08-19 | 2016-12-21 | 深圳大普微电子科技有限公司 | Solid state hard disc controls device and solid state hard disc data access method based on study |
CN106802772A (en) * | 2016-12-30 | 2017-06-06 | 北京联想核芯科技有限公司 | The method of data record, device and solid state hard disc |
US20180101477A1 (en) * | 2016-10-10 | 2018-04-12 | Dell Products, Lp | System and method for adaptive optimization for performance in solid state drives based on read/write intensity |
CN108595347A (en) * | 2018-04-25 | 2018-09-28 | 咪咕音乐有限公司 | A kind of buffer control method, device and computer readable storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130290601A1 (en) * | 2012-04-26 | 2013-10-31 | Lsi Corporation | Linux i/o scheduler for solid-state drives |
CN105630691A (en) * | 2015-04-29 | 2016-06-01 | 上海磁宇信息科技有限公司 | MRAM-using solid state hard disk and physical address-using reading/writing method |
CN109284233B (en) * | 2018-09-18 | 2022-02-18 | 郑州云海信息技术有限公司 | Garbage recovery method of storage system and related device |
CN109558287B (en) * | 2018-12-13 | 2020-10-30 | 腾讯科技(深圳)有限公司 | Method, device and system for predicting service life of solid state disk |
-
2019
- 2019-05-09 CN CN201910385553.6A patent/CN111913649B/en active Active
-
2020
- 2020-04-29 WO PCT/CN2020/087728 patent/WO2020224500A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102147767A (en) * | 2011-04-26 | 2011-08-10 | 记忆科技(深圳)有限公司 | Method and system for dynamically adjusting solid state disk garbage collection parameters |
CN102779017A (en) * | 2012-06-29 | 2012-11-14 | 华中科技大学 | Control method of data caching area in solid state disc |
CN105512051A (en) * | 2015-12-16 | 2016-04-20 | 鸿秦(北京)科技有限公司 | Self-learning type intelligent solid-state hard disk cache management method and device |
CN106250064A (en) * | 2016-08-19 | 2016-12-21 | 深圳大普微电子科技有限公司 | Solid state hard disc controls device and solid state hard disc data access method based on study |
US20180101477A1 (en) * | 2016-10-10 | 2018-04-12 | Dell Products, Lp | System and method for adaptive optimization for performance in solid state drives based on read/write intensity |
CN106802772A (en) * | 2016-12-30 | 2017-06-06 | 北京联想核芯科技有限公司 | The method of data record, device and solid state hard disc |
CN108595347A (en) * | 2018-04-25 | 2018-09-28 | 咪咕音乐有限公司 | A kind of buffer control method, device and computer readable storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113628675A (en) * | 2021-07-22 | 2021-11-09 | 成都思科瑞微电子股份有限公司 | SSD solid state disk testing method |
CN113628675B (en) * | 2021-07-22 | 2023-07-04 | 成都思科瑞微电子股份有限公司 | SSD solid state disk testing method |
CN114356227A (en) * | 2021-12-17 | 2022-04-15 | 得一微电子股份有限公司 | Solid state disk instruction processing method, device and system and readable storage medium |
CN115547403A (en) * | 2022-10-25 | 2022-12-30 | 宁畅信息产业(北京)有限公司 | Hard disk hot plug test method, device, equipment and storage medium |
CN116662214A (en) * | 2023-05-06 | 2023-08-29 | 深圳市晶存科技有限公司 | Hard disk garbage recycling method, device, system and medium based on fio |
CN116662214B (en) * | 2023-05-06 | 2024-05-07 | 深圳市晶存科技有限公司 | Hard disk garbage recycling method, device, system and medium based on fio |
CN117742618A (en) * | 2024-02-19 | 2024-03-22 | 鑫硕泰(深圳)科技有限公司 | Data storage management method and device for solid state disk |
CN117742618B (en) * | 2024-02-19 | 2024-05-07 | 鑫硕泰(深圳)科技有限公司 | Data storage management method and device for solid state disk |
Also Published As
Publication number | Publication date |
---|---|
CN111913649A (en) | 2020-11-10 |
CN111913649B (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020224500A1 (en) | Data processing method and apparatus for solid state disk | |
CN111176792B (en) | Resource scheduling method and device and related equipment | |
US11947829B2 (en) | Data writing method, device, storage server, and computer readable storage medium | |
JP7566027B2 (en) | Model training method and apparatus | |
CN102402399B (en) | With the virtual machine memory management in the system of asymmetric memory | |
CN113055308B (en) | Bandwidth scheduling method, traffic transmission method and related products | |
US11861210B2 (en) | Data processing method and apparatus for solid state disk | |
CN105607952B (en) | Method and device for scheduling virtualized resources | |
US8819685B2 (en) | Method and apparatus for adjusting I/O channel on virtual platform | |
CN113946431B (en) | Resource scheduling method, system, medium and computing device | |
CN108959399A (en) | Distributed data deletes flow control method, device, electronic equipment and storage medium | |
CN109788489A (en) | A kind of base station planning method and device | |
EP2772854A1 (en) | Regulation method and regulation device for i/o channels in virtualization platform | |
CN114118433A (en) | Recommendation method and device for configuration parameters of equipment | |
CN108874324A (en) | A kind of access request processing method, device, equipment and readable storage medium storing program for executing | |
CN110390315A (en) | A kind of image processing method and device | |
CN115129621B (en) | Memory management method, device, medium and memory management module | |
CN114911604A (en) | Resource scheduling method, device and management equipment | |
CN106406976A (en) | Method and apparatus for identifying IO intensive application in cloud computing environment | |
CN111625367A (en) | Method for dynamically adjusting read-write resources of file system | |
CN108762684B (en) | Hot spot data migration flow control method and device, electronic equipment and storage medium | |
CN117009072A (en) | Heterogeneous task migration system under computing power network scene | |
CN115730210A (en) | Data processing method, device and system | |
CN114168084A (en) | File merging method, file merging device, electronic equipment and storage medium | |
CN118502679B (en) | Data access scheduling method and device for memory |
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: 20802593 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: 20802593 Country of ref document: EP Kind code of ref document: A1 |