SSD intelligent scheduling method and device, SSD and computer storage medium
By obtaining the IO model data issued by the host, dynamically calculate the proportion of read and write data, matching gear control parameters, and adjusting the read and write scheduling strategy of SSD, the problem of fixed SSD scheduling strategy is solved, the read and write efficiency and performance are improved, and different business needs are met.
Patent Information
- Application Number
- CN202510410994.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-08-12
AI Technical Summary
The existing solid-state drive (SSD) scheduling strategies are fixed and cannot flexibly respond to diverse business needs. Especially in frequent write operation scenarios, the write efficiency is low, which affects the overall performance. The host and SSD lack an effective interaction mechanism, which limits the performance of SSD in different application scenarios.
By obtaining the IO model data issued by the host, dynamically calculate the proportion of read and write data, match the corresponding gear control parameters, adjust the read and write scheduling strategy, realize the coordinated decision-making between the host and SSD, and adapt to different business needs.
It improves the read and write efficiency and overall performance of SSD under various workloads, improves user satisfaction, and achieves effective adaptation to different business needs.
Smart Images

Figure CN120469629A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an SSD intelligent scheduling method, device, SSD, and computer storage medium. Background Art
[0002] In today's digital age, with the rapid development of information technology, solid-state drives (SSDs) are widely used as high-performance data storage devices due to their high speed and low latency. Especially with the advent of the big data era, performance demands on storage devices are increasing. SSDs, with their excellent read and write speeds and data processing capabilities, have become an ideal solution. However, most existing SSDs use a fixed read and write scheduling strategy that primarily focuses on read operations. While they perform well in certain application scenarios, they lack the flexibility to meet diverse business needs. For example, in workloads that require frequent write operations, a fixed read-first strategy leads to low write efficiency, severely hindering overall performance.
[0003] For this reason, most current solutions on the market are limited to internal optimization, using firmware algorithms to improve existing SSD scheduling policies. However, these policies typically only apply to limited scenarios and do not allow users to adjust them based on their business needs. Furthermore, the lack of an effective interaction mechanism between the host and SSD prevents the host from directly participating in SSD scheduling decisions, resulting in insufficient collaboration between the host and storage device. This further limits SSD performance in different application scenarios, leading to decreased customer satisfaction and even an inability to meet specific customer needs. Summary of the Invention
[0004] In order to overcome the deficiencies of the prior art, the present invention provides an SSD intelligent scheduling method, device, SSD and computer storage medium, which automatically adjust the read and write scheduling strategy to meet customer needs.
[0005] A first aspect of the present application provides an SSD intelligent scheduling method, the method comprising: Get the IO model data sent by the host; Determining a read data volume and a write data volume within a statistical time period based on the IO model data, and determining a read / write data volume ratio between the read data volume and the write data volume; Matching a corresponding target gear control parameter according to the read / write data volume ratio, wherein different gear control parameters correspond to different read / write scheduling strategies, and one gear control parameter corresponds to one read / write scheduling strategy; A corresponding target read / write scheduling strategy is determined according to the target gear control parameter, and read / write request scheduling is performed according to the target read / write scheduling strategy.
[0006] In an optional embodiment, matching the corresponding target gear control parameter according to the read and write data volume ratio includes: Determining the target gear control parameter according to the read and write data volume ratio and a preset ratio threshold interval; The preset ratio threshold interval includes multiple ratio threshold intervals, and each ratio threshold interval corresponds to a gear control parameter.
[0007] In an optional embodiment, determining the target gear control parameter according to the read / write data volume ratio and a preset ratio threshold interval includes: When the read / write data volume ratio is greater than a first ratio threshold, the target gear control parameter is determined to be the first gear; When the second ratio threshold is less than the read / write data volume ratio and less than the first ratio threshold, the target gear control parameter is determined to be the second gear; When the third ratio threshold is less than the read / write data volume ratio and less than the second ratio threshold, the target gear control parameter is determined to be the third gear; When the fourth ratio threshold is less than the read / write data volume ratio and less than the third ratio threshold, the target gear control parameter is determined to be the fourth gear; When the read-write data volume ratio is less than or equal to the fourth ratio threshold, the target gear control parameter is determined to be the fifth gear.
[0008] In an optional implementation, determining the corresponding target read / write scheduling strategy according to the target gear control parameter includes: When the target gear control parameter is the first gear, the target read-write scheduling strategy is determined to be a large ratio read priority strategy, which prioritizes multiple read requests and then schedules one write request; When the target gear control parameter is the second gear, the target read-write scheduling strategy is determined to be a small ratio read priority strategy, which prioritizes scheduling of some read requests and then scheduling one write request; When the target gear control parameter is the third gear, the target read-write scheduling strategy is determined to be a read-write balancing strategy, and read requests and write requests are scheduled alternately; When the target gear control parameter is the fourth gear, the target read-write scheduling strategy is determined to be a small ratio write priority strategy, which prioritizes scheduling of some write requests and then schedules one read request; When the target gear control parameter is the fifth gear, the target read-write scheduling strategy is determined to be a large-ratio write priority strategy, which prioritizes scheduling multiple write requests and then schedules one read request.
[0009] In an optional embodiment, the method further comprises: Customize the Nand scheduling policy management interface to support the host to dynamically adjust the read and write scheduling policy through custom commands; Determine the scheduling mode at the current moment; When the scheduling mode is a controllable scheduling mode, adjusting the read-write scheduling policy according to a custom command issued by the host through the Nand scheduling policy management interface; When the scheduling mode is the intelligent scheduling mode, the read and write scheduling strategy is adjusted according to the service type.
[0010] In an optional implementation, the scheduling mode further includes a fixed scheduling mode, and the method further includes: When the dispatch mode is the fixed dispatch mode, determining a selected gear control parameter in the fixed mode; Read and write request scheduling is performed according to the selected read and write scheduling policy corresponding to the selected gear control parameter.
[0011] A second aspect of the present application provides an SSD intelligent scheduling device, the device comprising: IO acquisition module, used to obtain IO model data sent by the host; A business statistics analysis module is used to determine the amount of read data and the amount of write data within a statistical time period based on the IO model data, and to determine the ratio of the amount of read data to the amount of write data; Nand read and write scheduling module, used to match the corresponding target gear control parameters according to the read and write data volume ratio, where different gear control parameters correspond to different read and write scheduling strategies, and one gear control parameter corresponds to one read and write scheduling strategy; The Nand read / write scheduling module is further configured to determine a corresponding target read / write scheduling strategy according to the target gear control parameter, and execute read / write request scheduling according to the target read / write scheduling strategy.
[0012] In a third aspect, the present application provides an SSD, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the SSD intelligent scheduling method when executing the computer program.
[0013] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned SSD intelligent scheduling method when executed by a processor.
[0014] In summary, the SSD intelligent scheduling method, device, SSD and computer storage medium provided in the present application obtain the IO model data sent by the host, and then determine the read data volume and write data volume within the statistical time period, and match an optimal gear control parameter according to the ratio of the read and write data volume. The gear control parameter represents the corresponding read and write scheduling strategy. The SSD executes a specific read and write scheduling strategy according to the determined gear control parameter, thereby achieving effective adaptation to different business needs, improving the read and write efficiency and overall performance of the SSD under various workloads, and significantly improving user satisfaction and the intelligence level of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flow chart of an SSD intelligent scheduling method shown in an embodiment of the present application; Figure 2 This is a functional module diagram of an SSD intelligent scheduling device shown in an embodiment of the present application; Figure 3 This is a schematic diagram of the structure of an SSD shown in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The present invention will be further described below with reference to the accompanying drawings and examples.
[0017] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the fact that a better connection structure can be formed by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interactively without conflicting with each other.
[0018] Reference Figure 1 , which is a flow chart of an SSD intelligent scheduling method according to an embodiment of the present application, the SSD intelligent scheduling method includes the following steps.
[0019] S11, obtaining IO model data sent by the host.
[0020] In some embodiments, the IO acquisition module can continuously monitor the IO requests issued by the host at the SSD front-end interface and collect the IO model data issued by the host, wherein the IO model data includes the read and write data block size data of each IO operation, the read and write request type and the request timestamp, etc.
[0021] Unlike existing technologies that lack data collection capabilities, this system collects IO model data from the host and transmits it to the service statistics and analysis module for analysis and processing. This not only enables IO information collection at the SSD front-end interface, but also does not affect the performance of the SSD itself.
[0022] S12: Determine the amount of read data and the amount of write data within a statistical time period based on the IO model data, and determine a ratio of the amount of read data to the amount of write data.
[0023] In some embodiments, the business statistics analysis module can analyze and count the IO model data collected by the IO acquisition module, and can determine the amount of read data and write data in the IO model data received by the SSD within a statistical time period (for example, set to 1 second). For example, the unit can be set to MiB. Alternatively, the statistical time period can be set to 10 seconds, and the amount of read data and write data received by the SSD every 10 seconds can be counted. The unit can be set to GiB. It should be noted that the business statistics analysis module can set the statistical time period according to a configurable time window, and the statistical time period can be adjusted according to actual application requirements.
[0024] By collecting the corresponding read and write parameters and data block size for each I / O command, we can determine the amount of read and write data received by the SSD during the statistical period. This allows us to compare the read and write data volumes during the statistical period, also known as the read-write data ratio. The read-write data ratio = read data volume / write data volume.
[0025] S13, matching corresponding target gear control parameters according to the read and write data volume ratio.
[0026] After determining the ratio of read and write data volumes, the Nand read and write scheduling module can output the gear control parameters corresponding to the gear based on the ratio of read and write data volumes. Different gear control parameters correspond to different read and write scheduling strategies, and one gear control parameter corresponds to one read and write scheduling strategy.
[0027] In an optional embodiment, matching the corresponding target gear control parameter according to the read and write data volume ratio includes: Determining the target gear control parameter according to the read and write data volume ratio and a preset ratio threshold interval; The preset ratio threshold interval includes multiple ratio threshold intervals, and each ratio threshold interval corresponds to a gear control parameter.
[0028] In some embodiments, the Nand read / write scheduling module can pre-set multiple ratio threshold intervals, each ratio threshold interval corresponding to a gear control parameter, and different ratio threshold intervals corresponding to different gear control parameters, and then dynamically select the optimal gear control parameter based on the preset ratio threshold intervals. Specifically, the Nand read / write scheduling module can set a first ratio threshold, a second ratio threshold, a third ratio threshold, a fourth ratio threshold, and a fifth ratio threshold. When the read / write data volume ratio is greater than the first ratio threshold, the target gear control parameter can be determined as the first gear (e.g., gear 1); when the second ratio threshold is less than the read / write data volume ratio ≤ the first ratio threshold, the target gear control parameter can be determined as the second gear (e.g., gear 2); when the third ratio threshold is less than the read / write data volume ratio ≤ the second ratio threshold, the target gear control parameter can be determined as the third gear (e.g., gear 3); when the fourth ratio threshold is less than the read / write data volume ratio ≤ the third ratio threshold, the target gear control parameter can be determined as the fourth gear (e.g., gear 4); and when the read / write data volume ratio is ≤ the fourth ratio threshold, the target gear control parameter can be determined as the fifth gear (e.g., gear 5).
[0029] For example, the first ratio threshold can be set to 7:3, the second ratio threshold can be set to 6:4, the third ratio threshold can be set to 4:6, and the fourth ratio threshold can be set to 3:7. Then, when the read-write data volume ratio is greater than 7:3, the target gear control parameter is determined to be gear 1; when 6:4 is less than the read-write data volume ratio and ≤7:3, the target gear control parameter is determined to be gear 2; when 4:6 is less than the read-write data volume ratio and ≤6:4, the target gear control parameter is determined to be gear 3; when 3:7 is less than the read-write data volume ratio and ≤4:6, the target gear control parameter is determined to be gear 4; when the read-write data volume ratio is ≤3:7, the target gear control parameter is determined to be gear 5.
[0030] S14 , determining a corresponding target read / write scheduling strategy according to the target gear control parameter, and executing read / write request scheduling according to the target read / write scheduling strategy.
[0031] In some embodiments, when a certain business type is met, the corresponding target gear control parameter is output to the Nand read / write scheduling module. A one-to-one mapping relationship table is pre-set in the Nand read / write scheduling module between the read / write data volume ratio, the gear control parameter, and the read / write scheduling strategy. When the read / write data volume ratio is determined, the corresponding target gear control parameter can be queried from the mapping relationship table based on the read / write data volume ratio and multiple ratio threshold intervals. Similarly, when the gear control parameter is determined, the corresponding read / write scheduling strategy can be queried from the mapping relationship table based on the gear control parameter.
[0032] In one optional embodiment, the SSD controller maintains independent read and write queues. When a new I / O request is received, it is placed into the corresponding queue based on its type (read / write). When the target gear control parameter is determined to be the first gear, i.e., gear 1, the corresponding target read / write scheduling policy is determined from the mapping relationship table to be a high-ratio read priority policy, which prioritizes multiple read requests before scheduling one write request. Specifically, the DMA engine can be used to transfer data blocks of read requests in batches to reduce controller overhead, while write requests can use an asynchronous commit mode to lower their priority. For example, 10 read requests are sequentially extracted from the read queue each time (if there are fewer than 10 read requests in the queue, all are extracted). After executing the read requests, one write request is extracted from the write queue for execution. If the read queue is empty, the write request is directly scheduled (to avoid starvation). Furthermore, when the target gear control parameter is determined to be the second gear, i.e., gear 2, the corresponding target read / write scheduling policy is determined from the mapping relationship table to be a low-ratio read priority policy, which prioritizes some read requests before scheduling one write request. For example, five read requests are extracted from the read queue each time for execution, followed by one write request. If the number of remaining requests in the read queue is less than five, the remaining number of requests is dispatched based on the actual number. Furthermore, when the target gear control parameter is determined to be the third gear, i.e., gear 3, the corresponding target read / write scheduling policy is determined from the mapping table to be a read / write balancing policy. This policy alternates read and write requests, strictly following a 1:1 ratio. The read and write queues have the same priority weight. If one queue is empty, requests from the other queue are continuously scheduled. Real-time ratio monitoring is used to monitor the read / write ratio every second, and a gear switch is triggered if it deviates from a threshold. Furthermore, when the target gear control parameter is determined to be the fourth gear, i.e., gear 4, the corresponding target read / write scheduling policy is determined from the mapping table to be a low-ratio write-first policy. This policy prioritizes some write requests before scheduling one read request. For example, five write requests are extracted from the write queue each time for execution, followed by one read request. If the write queue continuously schedules more than five requests, a read request is forcibly inserted (to prevent read starvation). When the target gear control parameter is determined to be the fifth gear, or gear 5, the corresponding target read / write scheduling policy is determined from the mapping table to be a high-ratio write-first policy, which prioritizes multiple write requests before scheduling a single read request. For example, the parallel write characteristics of NAND flash memory can be exploited to batch together 10 write requests from the write queue. After each 10 write requests are completed, a read request is scheduled, allowing for higher latency for read requests (the impact of this is mitigated by host-side caching).
[0033] In some embodiments, at the end of each statistical time period, the business statistics analysis module calculates the latest read and write data volume ratio. If the read and write data volume ratio crosses the threshold range, a gear update instruction is immediately sent to the Nand read and write scheduling module. When the Nand read and write scheduling module receives the gear update instruction, it can update the gear parameters based on the use of atomic operations. After the currently processed request is completed, the new read and write scheduling strategy takes effect immediately to avoid race conditions during the scheduling process. If the read and write data volume ratio fluctuates frequently (such as switching multiple times within 1 second), the Nand read and write scheduling module can enable the hysteresis comparison (Hysteresis) mechanism to avoid jitter.
[0034] In order to facilitate understanding of the inventive concept of this application, the read request priority is automatically increased in the scenario where there are more reads than writes, and the write request priority is automatically increased in the scenario where there are more writes than reads. The design of the read and write scheduling strategy corresponding to the five gears can be represented by the following Table 1.
[0035] Table 1:
[0036] Through the above optional implementation, the data volume ratio of read and write requests to the SSD controller is monitored in real time, and the corresponding gear control parameters are matched according to different ratio intervals. The read and write scheduling strategy is then determined to optimize read and write performance and improve resource utilization, avoiding the performance waste of fixed strategies. After the statistical time period, the read and write data ratio is calculated again and the gear parameters are dynamically updated to ensure that the scheduling strategy always adapts to the current read and write needs, effectively avoiding performance fluctuations and system jitter caused by frequent gear switching, thereby achieving efficient and stable read and write operations.
[0037] In an optional embodiment, the method further comprises: Customize the Nand scheduling policy management interface to support the host to dynamically adjust the read and write scheduling policy through custom commands; Determine the scheduling mode at the current moment; When the scheduling mode is a controllable scheduling mode, adjusting the read-write scheduling policy according to a custom command issued by the host through the Nand scheduling policy management interface; When the scheduling mode is the intelligent scheduling mode, the read and write scheduling strategy is adjusted according to the service type.
[0038] In some embodiments, the SSD can obtain changes in gear control parameters according to a preset time period through polling, and the SSD can pre-define a Nand scheduling policy management interface, wherein the Nand scheduling policy management interface is a custom vendor interface that can be controlled by corresponding custom commands issued by the host to directly adjust the read and write scheduling policy of the Nand read and write inside the SSD. Specifically, the communication protocol of the SSD front-end interface is used to customize the corresponding command parameters and provide relevant interfaces to customers. For example, parameter words are added to the nvme custom vendor command to represent the gears of the above five designs, and different scheduling modes are provided, such as intelligent scheduling mode, controllable scheduling mode, and fixed scheduling mode selection configuration interface to flexibly meet the needs of different customers. For example, the nvme custom vendor command adds parameter words for read and write scheduling policy selection, and 1, 2, and 3 represent intelligent scheduling mode, controllable scheduling mode, and fixed scheduling mode, respectively. That is, in fixed scheduling mode, the read / write scheduling strategy is always fixed at gear 1; in controllable scheduling mode, the initial default is gear 1, but the host's vendor command can be received at any time to adjust the SSD to read / write scheduling strategies of other gears to meet the host's expectations; when the intelligent scheduling strategy is selected, the host's vendor control interface is invalid, and the SSD adaptively selects the appropriate read / write scheduling strategy.
[0039] In intelligent scheduling mode, the SSD independently determines the gear control parameters and the corresponding read-write scheduling strategy, and host commands are invalid. The SSD collects the IO model data sent by the host, including the read and write data block size data, and passes it to the business statistics analysis module. The business statistics analysis module analyzes the collected IO model data, including the read and write data block size data, and counts the amount of read and write data received by the SSD per second, such as how many MiB, or the amount of read and write data received by the SSD every 10 seconds, such as how many GiB. Then, based on the statistical comparison data of the read and write data volume, that is, the read and write data volume ratio, the corresponding gear control parameters are output, where each gear control parameter represents a different NAND read and write scheduling strategy. The NAND read and write scheduling module regularly processes the received gear control parameters and regularly adjusts to the preset multiple read and write scheduling strategies. In schedulable mode, the host completely sends the gear control parameters through the NAND scheduling strategy management interface to achieve control of the read and write scheduling strategy. The host can send corresponding command controls through the SSD's custom vendor interface as needed to directly adjust the SSD's internal Nand read and write scheduling strategy. The Nand read and write scheduling module will periodically process the received gear control parameters and adjust to the preset multiple read and write scheduling strategies. For example, if the SSD receives a level=2 command sent by the host, it will select the read and write scheduling strategy corresponding to gear 2 to execute read and write request scheduling until it receives the next custom command sent by the host. In fixed scheduling mode, the selected gear control parameters and the corresponding selected read and write scheduling strategy are always used, regardless of the host and business model input. For example, if the selected gear control parameter is level=1, the read and write request scheduling is always executed according to the read and write scheduling strategy corresponding to gear 1.
[0040] Through the above optional implementation, customizing the Nand scheduling policy management interface enables the SSD to flexibly adapt to different operating modes and requirements. In controllable scheduling mode, the SSD can dynamically adjust the read / write scheduling policy based on custom host commands. In intelligent scheduling mode, the SSD autonomously analyzes the service model, calculates the read / write data volume, and intelligently adjusts the corresponding gear control parameters accordingly, flexibly selecting a read / write scheduling policy suitable for the current service load. In fixed scheduling mode, the SSD adheres to pre-set gear control parameters, maintaining stable read / write performance without external intervention. Specifically, based on receiving commands from the host via the front-end interface, the SSD collects and analyzes service data, evaluates the impact of different gear control parameters on read / write speed and efficiency, and ultimately selects the optimal read / write scheduling policy to meet current application requirements, thereby providing efficient, flexible, and highly adaptable data read / write services. Specifically, from receiving host commands, through data statistical analysis, to final read / write policy adjustment, a closed-loop dynamic optimization mechanism is formed, ensuring that the SSD can intelligently adjust its internal Nand read / write scheduling policy based on actual application scenarios to achieve optimal operating conditions.
[0041] Reference Figure 2 , which is a functional module diagram of the SSD intelligent scheduling device shown in an embodiment of the present application.
[0042] In some embodiments, the SSD intelligent scheduling device 20 may include multiple functional modules composed of computer program segments. The computer programs of each program segment of the SSD intelligent scheduling device 20 may be stored in the memory of the SSD and executed by at least one processor to perform (see Figure 1 (Description) SSD intelligent scheduling function. It can be divided into multiple functional modules based on the functions it performs. These functional modules may include: an I / O acquisition module 201, a service statistics analysis module 202, and a Nand read / write scheduling module 203. A module, as referred to herein, refers to a series of computer program segments that can be executed by at least one processor and perform fixed functions, and is stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0043] The IO acquisition module 201 is used to obtain IO model data sent by the host.
[0044] The business statistics analysis module 202 is configured to determine the read data volume and the write data volume within a statistical time period based on the IO model data, and determine the read and write data volume ratio between the read data volume and the write data volume.
[0045] The Nand read / write scheduling module 203 is used to match the corresponding target gear control parameter according to the read / write data volume ratio, wherein different gear control parameters correspond to different read / write scheduling strategies, and one gear control parameter corresponds to one read / write scheduling strategy.
[0046] The Nand read / write scheduling module 203 is further configured to determine a corresponding target read / write scheduling strategy according to the target gear control parameter, and execute read / write request scheduling according to the target read / write scheduling strategy.
[0047] The business statistics analysis module 202 is further specifically used to: determine the target gear control parameter based on the ratio of the read and write data volume and the preset ratio threshold interval; wherein the preset ratio threshold interval includes multiple ratio threshold intervals, and each ratio threshold interval corresponds to a gear control parameter.
[0048] The business statistics analysis module 202 is also specifically used to: when the read-write data volume ratio is greater than the first ratio threshold, determine the target gear control parameter as the first gear; when the second ratio threshold is less than the read-write data volume ratio ≤ the first ratio threshold, determine the target gear control parameter as the second gear; when the third ratio threshold is less than the read-write data volume ratio ≤ the second ratio threshold, determine the target gear control parameter as the third gear; when the fourth ratio threshold is less than the read-write data volume ratio ≤ the third ratio threshold, determine the target gear control parameter as the fourth gear; when the read-write data volume ratio ≤ the fourth ratio threshold, determine the target gear control parameter as the fifth gear.
[0049] The Nand read-write scheduling module 203 is further specifically used to: when the target gear control parameter is the first gear, determine the target read-write scheduling strategy as a large-ratio read priority strategy, and schedule one write request after scheduling multiple read requests first; when the target gear control parameter is the second gear, determine the target read-write scheduling strategy as a small-ratio read priority strategy, and schedule one write request after scheduling some read requests first; when the target gear control parameter is the third gear, determine the target read-write scheduling strategy as a read-write balance strategy, and schedule read requests and write requests alternately; when the target gear control parameter is the fourth gear, determine the target read-write scheduling strategy as a small-ratio write priority strategy, and schedule one read request after scheduling some write requests first; when the target gear control parameter is the fifth gear, determine the target read-write scheduling strategy as a large-ratio write priority strategy, and schedule one read request after scheduling multiple write requests first.
[0050] The Nand read and write scheduling module 203 is also used to: customize the Nand scheduling policy management interface to support the host to dynamically adjust the read and write scheduling policy through custom commands; determine the scheduling mode at the current moment; when the scheduling mode is a controllable scheduling mode, adjust the read and write scheduling policy according to the custom command issued by the host through the Nand scheduling policy management interface; when the scheduling mode is an intelligent scheduling mode, adjust the read and write scheduling policy according to the business type.
[0051] The Nand read / write scheduling module 203 is further configured to: when the scheduling mode is the fixed scheduling mode, determine the selected gear control parameters in the fixed mode; and execute read / write request scheduling according to the selected read / write scheduling policy corresponding to the selected gear control parameters.
[0052] It should be understood that the various variations and specific embodiments of the SSD intelligent scheduling method provided in the above embodiments are also applicable to the SSD intelligent scheduling device of this embodiment. Through the above detailed description of the SSD intelligent scheduling method, those skilled in the art can clearly understand the implementation method of the SSD intelligent scheduling device in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.
[0053] See Figure 3 FIG. 1 is a schematic diagram of the structure of an SSD according to an embodiment of the present application. In a preferred embodiment of the present application, the SSD 3 includes a memory 31 , at least one processor 32 and at least one communication bus 33 .
[0054] In the above embodiments provided in the present application, it should be understood that the disclosed methods, devices, computer-readable storage media, and SSDs can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices, components, or modules, which can be electrical, mechanical, or other forms.
[0055] The components described as separate parts may or may not be physically separate, and the components shown as components may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0056] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, or each component may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.
[0057] If the integrated module is implemented as a software functional module 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, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0058] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0059] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0060] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A SSD intelligent scheduling method, characterized in that: The method comprises: Get the IO model data sent by the host; Determining a read data volume and a write data volume within a statistical time period based on the IO model data, and determining a read / write data volume ratio between the read data volume and the write data volume; Matching a corresponding target gear control parameter according to the read / write data volume ratio, wherein different gear control parameters correspond to different read / write scheduling strategies, and one gear control parameter corresponds to one read / write scheduling strategy; A corresponding target read / write scheduling strategy is determined according to the target gear control parameter, and read / write request scheduling is performed according to the target read / write scheduling strategy.
2. The SSD intelligent scheduling method according to claim 1, characterized in that: The target gear control parameter corresponding to the read / write data ratio is matched as follows: Determining the target gear control parameter according to the read and write data volume ratio and a preset ratio threshold interval; The preset ratio threshold interval includes multiple ratio threshold intervals, and each ratio threshold interval corresponds to a gear control parameter.
3. The SSD intelligent scheduling method according to claim 1, characterized in that: The determining of the target gear control parameter according to the read / write data volume ratio and a preset ratio threshold interval includes: When the read / write data volume ratio is greater than a first ratio threshold, the target gear control parameter is determined to be the first gear; When the second ratio threshold is less than the read / write data volume ratio and less than the first ratio threshold, the target gear control parameter is determined to be the second gear; When the third ratio threshold is less than the read / write data volume ratio and less than the second ratio threshold, the target gear control parameter is determined to be the third gear; When the fourth ratio threshold is less than the read / write data volume ratio and less than the third ratio threshold, the target gear control parameter is determined to be the fourth gear; When the read-write data volume ratio is less than or equal to the fourth ratio threshold, the target gear control parameter is determined to be the fifth gear.
4. The SSD intelligent scheduling method according to claim 3, characterized in that: Determining the corresponding target read / write scheduling strategy according to the target gear control parameter includes: When the target gear control parameter is the first gear, the target read-write scheduling strategy is determined to be a large ratio read priority strategy, which prioritizes multiple read requests and then schedules one write request; When the target gear control parameter is the second gear, the target read-write scheduling strategy is determined to be a small ratio read priority strategy, which prioritizes scheduling of some read requests and then scheduling one write request; When the target gear control parameter is the third gear, the target read-write scheduling strategy is determined to be a read-write balancing strategy, and read requests and write requests are scheduled alternately; When the target gear control parameter is the fourth gear, the target read-write scheduling strategy is determined to be a small ratio write priority strategy, which prioritizes scheduling of some write requests and then schedules one read request; When the target gear control parameter is the fifth gear, the target read-write scheduling strategy is determined to be a large-ratio write priority strategy, which prioritizes scheduling multiple write requests and then schedules one read request.
5. The SSD intelligent scheduling method according to claim 1, characterized in that: The method further comprises: Customize the Nand scheduling policy management interface to support the host to dynamically adjust the read and write scheduling policy through custom commands; Determine the scheduling mode at the current moment; When the scheduling mode is a controllable scheduling mode, adjusting the read-write scheduling policy according to a custom command issued by the host through the Nand scheduling policy management interface; When the scheduling mode is the intelligent scheduling mode, the read and write scheduling strategy is adjusted according to the service type.
6. The SSD intelligent scheduling method according to claim 5, characterized in that: The scheduling mode further includes a fixed scheduling mode, and the method further includes: When the dispatch mode is the fixed dispatch mode, determining a selected gear control parameter in the fixed mode; Read and write request scheduling is performed according to the selected read and write scheduling policy corresponding to the selected gear control parameter.
7. An SSD intelligent scheduling device, characterized in that: The device comprises: IO acquisition module, used to obtain IO model data sent by the host; A business statistics analysis module is used to determine the amount of read data and the amount of write data within a statistical time period based on the IO model data, and to determine the ratio of the amount of read data to the amount of write data; Nand read and write scheduling module, used to match the corresponding target gear control parameters according to the read and write data volume ratio, where different gear control parameters correspond to different read and write scheduling strategies, and one gear control parameter corresponds to one read and write scheduling strategy; The Nand read / write scheduling module is further configured to determine a corresponding target read / write scheduling strategy according to the target gear control parameter, and execute read / write request scheduling according to the target read / write scheduling strategy.
8. An SSD, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the SSD intelligent scheduling method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the SSD intelligent scheduling method according to any one of claims 1 to 6 are implemented.