Interrupt aggregation method for storage device and storage device
By dynamically adjusting interrupt aggregation parameters within the storage device, the problem that manual interrupt aggregation schemes in existing technologies cannot adapt to fluctuations in business load is solved, achieving efficient interrupt aggregation and improving IO processing efficiency and system stability.
Patent Information
- Application Number
- CN202611501711.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-10
AI Technical Summary
In existing technologies, manual interruption aggregation solutions are difficult to adapt to fluctuations in business load and switching between read and write scenarios, resulting in high maintenance costs, limited parameter matching accuracy, and an inability to fully unleash the hardware performance of the server platform.
By dynamically adjusting interrupt aggregation parameters based on host-allocated requests within the storage device, and using business metrics to update and verify the aggregation parameters, a closed-loop control logic is formed, enabling plug-and-play functionality and adapting to the needs of different business scenarios.
It improves the matching degree between interrupt aggregation parameters and real-time business conditions, reduces latency jitter and load anomalies, ensures the stability and accuracy of interrupt aggregation optimization, and improves IO processing efficiency and system operation stability.
Smart Images

Figure CN123068331A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to an interrupt aggregation method for a storage device and a storage device. Background Technology
[0002] With the iterative upgrades of the PCIe (Peripheral Component Interconnect Express) bus, high-speed I / O (Input / Output) devices such as NVMe (Non-Volatile Memory Express) solid-state drives, high-speed network cards, and computing accelerator cards have been widely used, significantly improving the overall I / O concurrency and throughput capabilities of servers.
[0003] To address the issue of interruption storms caused by massive I / O concurrency, existing solutions generally employ manual interrupt aggregation. These solutions rely on manually fixed static parameters, making it difficult to adapt to complex and ever-changing real-world operating conditions such as fluctuating business loads and switching between read / write scenarios. Furthermore, they incur high maintenance costs, have limited parameter matching accuracy, and fail to fully utilize the hardware performance of the server platform. Summary of the Invention
[0004] Embodiments of this disclosure provide a method for interrupt aggregation for storage devices and storage devices that can at least partially solve the problems described above or other problems in the art.
[0005] According to a first aspect of this disclosure, an interrupt aggregation method for a storage device is provided. The method includes: determining business metrics based on a request allocated by the host; updating aggregation parameters based on the business metrics; and sending an interrupt notification to the host in response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters. This method achieves dynamic control of interrupt aggregation parameters, and the entire control logic is completed in a closed loop within the storage device. It can be automatically executed upon connection to the host, without requiring host-side parameter tuning calculations or system adaptation, achieving plug-and-play functionality and high deployment flexibility.
[0006] In some embodiments of this disclosure, the method further includes: collecting verification metrics after the aggregation parameters are updated, the verification metrics including at least one of the following: service input / output latency, host load, and interrupt frequency; and continuing to update the aggregation parameters based on the changes in the verification metrics after the aggregation parameters are updated compared to the verification metrics collected before the update. This implementation avoids over-adjustment or under-adjustment problems caused by a single parameter update, improves the matching degree between the aggregation parameters and real-time service conditions, reduces latency jitter and load anomalies caused by blind parameter tuning, and ensures the stability and accuracy of interruption aggregation optimization.
[0007] In some embodiments of this disclosure, updating the aggregation parameters based on business metrics includes: updating the aggregation parameters along a first direction based on business metrics, where the first direction is either increasing or decreasing the aggregation parameters; and continuing to update the aggregation parameters based on the changes in the updated verification metrics compared to the previously collected verification metrics, including: updating the aggregation parameters along a second direction in response to determining that the updated verification metrics are worse than the previously collected verification metrics, and the change in the verification metrics is greater than a first preset threshold; the second direction is opposite to the first direction; and updating the aggregation parameters along the first direction in response to determining that the updated verification metrics are better than the previously collected verification metrics, and the change in the verification metrics is greater than a first preset threshold. This embodiment forms a negative feedback adjustment mechanism, promptly reversing unfavorable parameter adjustments, retaining parameter changes that bring performance gains, suppressing performance oscillations during parameter tuning, and helping to quickly converge to obtain aggregation parameters suitable for the current business.
[0008] In some embodiments of this disclosure, the method further includes: stopping the updating of the aggregation parameters in response to determining that, after determining that the change in the verification index corresponding to each round of updates is less than or equal to a second preset threshold, the method helps to avoid premature abnormal termination of the optimization process due to instantaneous index disturbances, thereby improving the accuracy of the optimization convergence judgment.
[0009] In some embodiments of this disclosure, the business metrics include at least one of the following: the number of requests processed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate. This implementation helps to promptly identify anomalies such as congestion, queue backlog, and interrupt storms, thereby improving request processing efficiency and system operational stability.
[0010] In some embodiments of this disclosure, the aggregation parameters are updated based on business metrics, including updating the aggregation parameters in response to determining that the interruption growth rate is greater than a first preset value within a first sliding statistical window. This embodiment achieves trend determination of medium- to long-term steady-state metrics, only applies to sustained high-concurrency loads, and does not respond to instantaneous metric fluctuations, which helps in the adaptive and precise tuning of interruption aggregation parameters.
[0011] In some embodiments of this disclosure, updating the aggregation parameters based on business metrics includes: updating the aggregation parameters in response to determining that the change in the proportion of read requests within a second sliding statistical window is greater than a second preset value, wherein the change in proportion is the absolute value of the difference between the end time and the start time of the second sliding statistical window in terms of the proportion of read requests among all requests. This embodiment, by triggering the aggregation parameter update when the business read / write ratio changes drastically, matches the new read / write business model, which helps to interrupt the adaptive and precise tuning of the aggregation parameters.
[0012] In some embodiments of this disclosure, the aggregation parameters are updated based on business metrics, including: in response to determining that within a third sliding statistical window, the fluctuation amplitudes of the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate are all less than corresponding preset fluctuation thresholds, the aggregation parameters are updated, wherein the minimum amplitudes of the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate are all greater than corresponding settings. This embodiment achieves performance and host overhead optimization under steady-state conditions.
[0013] In some embodiments of this disclosure, the method further includes: in response to determining that, within a third sliding statistical window, at least one of the following occurs: the number of fluctuation events is greater than a third preset value, and the fluctuation amplitude of each fluctuation event exceeds a corresponding preset fluctuation threshold, the current aggregation parameters are kept unchanged. This embodiment achieves freeze protection of the aggregation parameters, which helps to avoid invalid calls and performance degradation under turbulent operating conditions.
[0014] In some embodiments of this disclosure, in response to determining that a processed request meets the triggering condition corresponding to the updated aggregation parameters, an interruption notification is sent to the host, including: in response to the number of processed requests reaching the updated quantity threshold, or the timeout threshold being reached since the generation of the first processed request, an interruption notification is sent to the host. This embodiment achieves synchronous dynamic optimization of the quantity threshold and the timeout threshold.
[0015] According to a second aspect of this disclosure, a storage device is provided for performing the method described in any implementation of the first aspect above.
[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0017] Figure 1 This is a flowchart of one embodiment of the interrupt aggregation method for storage devices disclosed herein; Figure 2 This is a flowchart of yet another embodiment of the interrupt aggregation method for storage devices disclosed herein; Figure 3 This is a flowchart of another embodiment of the interrupt aggregation method for storage devices disclosed herein; Figure 4This is a flowchart of an application scenario of the interrupt aggregation method for storage devices disclosed herein; Figure 5 This is an architecture diagram of the publicly disclosed storage device. Detailed Implementation
[0018] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] Figure 1 A flow 100 is shown that can be applied to an embodiment of the interrupt aggregation method for a storage device disclosed herein. In this embodiment, the interrupt aggregation method for a storage device may include the following steps: Step 101: Determine business metrics based on the host allocation request.
[0021] In this embodiment, the storage device may have an independent main control chip and a local non-volatile storage medium. The main control chip can run firmware, receive requests from the host, complete request processing, generate a request completion event, and initiate an interrupt to the host, i.e., send an interrupt notification to the host; for example, SSD (Solid-State Drive), UFS (Universal Flash Storage), etc.
[0022] The executing entity can receive requests allocated / issued by the host, such as IO requests, and determine business metrics based on the allocated / issued IO requests.
[0023] Among them, business metrics can be any metrics that can characterize the request status, such as transmission bandwidth, IOPS (Input / Output Operations Per Second, i.e., the number of IO requests processed per unit of time), etc.
[0024] Step 102: Update the aggregation parameters based on business metrics.
[0025] In this embodiment, the executing entity can adjust and update the aggregation parameters according to the business metrics, in the direction of improving or optimizing the business metrics.
[0026] Among them, the aggregation parameters, namely the interruption aggregation parameters, may include one or more of the following: quantity threshold, timeout threshold, etc.
[0027] For example, if IOPS is greater than the first threshold, that is, the frequency of IO request processing is high, the number of interruptions will also be high. To reduce the number of interruptions, the quantity threshold and / or the timeout threshold can be increased. If the single IO response latency is greater than the second threshold, that is, the time taken for a single IO request is high, to avoid further deterioration of the overall IO latency, the quantity threshold and / or the timeout threshold can be reduced to accurately meet the operational needs of different business scenarios (such as financial transactions, real-time databases, high-performance storage, edge real-time computing power, etc.).
[0028] Step 103: In response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters, an interruption notification is sent to the host.
[0029] In this embodiment, the executing entity can determine whether the processed request meets the triggering conditions corresponding to the updated aggregation parameters. If it does, it can send an interrupt notification to the host.
[0030] For example, the aggregation parameter may include a quantity threshold. If the number of processed requests (i.e., requests that have completed IO processing and generated IO completion events) reaches the updated quantity threshold after processing the allocated requests, an interruption notification is sent to the host.
[0031] For example, the aggregation parameter may include a timeout threshold. If the updated timeout threshold is reached after the first processed request has been generated, an interruption notification may be sent to the host.
[0032] For example, the aggregation parameters may include a quantity threshold and a timeout threshold. If the number of processed requests reaches the updated quantity threshold after processing the allocated requests, and the updated timeout threshold is reached from the generation of the first processed request, an interruption notification may be sent to the host.
[0033] The embodiments of this disclosure determine business metrics by utilizing the storage device based on requests allocated by the host; update the aggregation parameters based on the business metrics; and send an interrupt notification to the host in response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters. This achieves dynamic control of the interrupted aggregation parameters. At the same time, the entire control logic is completed in a closed loop within the storage device. The storage device can be automatically executed as soon as it is connected to the host, without the need for the host to participate in parameter tuning calculations and system adaptation. This achieves plug-and-play functionality and high deployment flexibility.
[0034] In some alternative approaches, an interruption notification is sent to the host in response to determining that the processed request meets the triggering condition corresponding to the updated aggregation parameters, including: in response to the number of processed requests reaching the updated number threshold, or the timeout threshold being reached since the first processed request was generated.
[0035] In this implementation, the aggregation parameters may include: quantity threshold and timeout threshold.
[0036] The executing entity can determine whether the number of processed requests has reached the updated threshold. If so, it can send an interruption notification to the host. Alternatively, it can determine whether the timeout since the first processed request was generated has reached the updated timeout threshold. If so, it can send an interruption notification to the host.
[0037] This implementation achieves synchronous dynamic optimization of the quantity threshold and the timeout threshold by sending an interrupt notification to the host when the number of processed requests reaches the updated quantity threshold, or when the timeout threshold is reached from the generation of the first processed request.
[0038] In some alternative approaches, business metrics may include at least one of the following: the number of requests completed per unit time, i.e., IOPS, transmission bandwidth, single request response latency, i.e., single IO response latency, hardware queue load, and interrupt growth rate.
[0039] In this implementation, IOPS reflects the number of IO requests actually processed by the storage device per second; a higher IOPS indicates a higher frequency of IO request processing by the storage device.
[0040] Transmission bandwidth, or the total number of data bytes processed by a storage device per unit time, reflects the size of the data traffic of a business; higher bandwidth means a larger amount of business data is transferred.
[0041] Single IO response latency is the time elapsed from when the storage device receives an IO request to when it completes the IO request processing and generates an IO completion event. It reflects the time it takes for the storage device to process a single IO request. The higher the single IO response latency, the greater the overhead of processing a single IO request by the storage device.
[0042] Hardware queue load, which is the number of unprocessed IO requests and pending IO completion events in the submission queue and completion queue, as well as the corresponding queue occupancy, reflects the degree of IO backlog in the internal hardware queues of the storage device. A higher hardware queue load indicates a more severe backlog of IO requests sent to the storage device, and a greater pressure on the storage device's business processing.
[0043] Interrupt growth rate reflects how quickly a storage device generates I / O completion events per unit of time; a higher interrupt growth rate indicates that I / O completion events are generated more frequently.
[0044] The executing entity can determine the current scenario based on one or more of the following: IOPS, transmission bandwidth, single IO response latency, hardware queue load, and interrupt growth rate; based on the current scenario, the target parameters are determined from the aggregated parameters, and the target parameters are adjusted and updated.
[0045] The target parameter can be at least one of the quantity threshold and the timeout threshold.
[0046] For example, it can be determined whether the current scenario is a high-load scenario based on IOPS. If IOPS is greater than a first threshold, the current scenario is determined to be a high-load scenario. In a high-load scenario, the target parameter is a quantity threshold, which can be updated, such as by increasing the quantity threshold. If IOPS is less than or equal to a second threshold, the current scenario is determined to be a non-high-load scenario, i.e., a low-load scenario. In a low-load scenario, the target parameter is a timeout threshold, which can be updated, such as by decreasing the timeout threshold.
[0047] Here, the second threshold is usually smaller than the first threshold.
[0048] This implementation method, by setting business metrics, can include at least one of the following: IOPS, transmission bandwidth, single IO response latency, hardware queue load, and interrupt growth rate. This helps to identify anomalies such as IO congestion, queue backlog, and interrupt storms in a timely manner, thereby improving IO processing efficiency and system stability.
[0049] Figure 2 A flow 200 is shown that can be applied to another embodiment of the interrupt aggregation method for storage devices disclosed herein. In this embodiment, the interrupt aggregation method for storage devices may include the following steps: Step 201: Determine business metrics based on the requests allocated by the host.
[0050] In this embodiment, the implementation details and technical effects of step 201 can be found in the description of step 101, and will not be repeated here.
[0051] Step 202: In response to determining that the interrupted growth rate is greater than a first preset value within the first sliding statistics window, the aggregation parameters are updated.
[0052] In this embodiment, the business metrics include the interruption growth rate. The execution entity can determine whether the interruption growth rate is always greater than the first preset value within the first sliding statistics window, that is, whether the storage device is in a continuous high-concurrency IO business scenario (in this scenario, the historical aggregation parameters can no longer adapt to the high traffic and high concurrency load). If so, the aggregation parameters can be adaptively updated to optimize the interruption aggregation strength, suppress the interruption storm on the host side, and at the same time take into account the business IO processing performance.
[0053] Here, in high-concurrency scenarios, the main problem is excessive interrupts and overload of the host CPU (Central Processing Unit), with less impact on latency. Therefore, the main focus can be on updating the quantity threshold (i.e., setting the quantity threshold as the target parameter) without adjusting the timeout threshold. For example, increasing the quantity threshold can aggregate more processed IO requests at once before reporting them, significantly reducing the interrupt frequency and lowering the host CPU interrupt overhead.
[0054] For example, if the interruption growth rate is always greater than a first preset value within the first sliding statistics window, the quantity threshold can be increased, and in response to determining that the number of processed requests has reached the increased quantity threshold, an interruption notification is sent to the host.
[0055] Step 203: In response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters, an interruption notification is sent to the host.
[0056] In this embodiment, the implementation details and technical effects of step 203 can be found in the description of step 103, and will not be repeated here.
[0057] The embodiments of this disclosure determine business metrics based on requests allocated by the host; in response to determining that the interruption growth rate is greater than a first preset value within a first sliding statistical window, the aggregation parameters are updated; in response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters, an interruption notification is sent to the host; this achieves trend determination of medium- and long-term steady-state metrics, only takes effect for sustained high-concurrency loads, does not respond to instantaneous metric fluctuations, and helps to adaptively and accurately optimize interruption aggregation parameters.
[0058] In some alternative approaches, the aggregation parameters are updated based on business metrics, including updating the aggregation parameters in response to determining that the percentage change in read requests within the second sliding statistics window is greater than a second preset value.
[0059] In this implementation, the request can include read requests and write requests, i.e. read IO requests and write IO requests. Taking read requests as an example, the executing entity can determine whether the change in the proportion of read IO requests within the second sliding statistics window is greater than the second preset value, i.e., whether the business read and write model has undergone an instantaneous switch, i.e. whether it belongs to the IO load change scenario; if so, the aggregation parameters can be adaptively updated to optimize the interruption aggregation strength.
[0060] The percentage change is the absolute value of the difference between the percentage of read IO requests and the percentage of read IO requests in all IO requests at the end time of the second sliding statistical window and at the start time.
[0061] Here, due to frequent switching between read and write models, IO completion events are generated intermittently. The quantity threshold requires accumulating N processed IO requests before reporting an interruption. At this time, the generation of processed IO requests or IO completion events is very slow, and the quantity threshold is not reached for a long time. IO completion events accumulate in the aggregation queue, and the IO aggregation waiting latency is continuously extended, worsening the business IO latency. That is, in this scenario, the main problem is no longer the host CPU interrupt pressure, but the excessively high IO latency caused by aggregation waiting. The quantity threshold does not have an aggregation effect, so the timeout threshold can be adjusted first (that is, the timeout threshold is determined as the target parameter), such as reducing the timeout threshold.
[0062] For example, if the change in the proportion of read IO requests is greater than the second preset value within the second sliding statistics window, the timeout threshold can be reduced. In response to the parameter adjustment in this round, when the timeout threshold is reached after the first processed request is generated, an interruption notification is sent to the host.
[0063] This implementation updates the aggregation parameters in response to a determination that the change in the proportion of read IO requests within the second sliding statistics window is greater than a second preset value. In other words, when the proportion of read and write operations changes drastically, the aggregation parameters are updated to match the new read and write business model, which helps to interrupt the adaptive and precise tuning of the aggregation parameters.
[0064] In some alternative approaches, the method further includes: in response to determining that within a third sliding statistics window, at least one of IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate has a greater number of fluctuation events than a third preset value and the fluctuation amplitude of each fluctuation event exceeds a corresponding preset fluctuation threshold, keeping the current aggregation parameters unchanged.
[0065] In this implementation, business metrics may include IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate.
[0066] The executing entity can determine whether, within the third sliding statistics window, at least one of the following indicators—IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate—has a greater number of fluctuation events than the third preset value, and the fluctuation amplitude of each fluctuation event exceeds its own preset fluctuation threshold. If so, it can be determined that the current service is in a high-frequency oscillation performance jitter scenario, with unstable service load and no fixed steady-state load characteristics.
[0067] If the aggregation parameters are updated at this time, the parameters are likely to fluctuate repeatedly due to frequent business fluctuations, and the IO performance will deteriorate. Therefore, it is advisable to keep the current aggregation parameters unchanged.
[0068] This implementation method achieves frozen protection of aggregation parameters by responding to the determination that within the third sliding statistical window, at least one of IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate has a greater number of fluctuation events than a third preset value, and the fluctuation amplitude of each fluctuation event exceeds the corresponding preset fluctuation threshold. This helps to avoid invalid calls and performance degradation under turbulent operating conditions.
[0069] In some optional methods, updating the aggregate parameters based on business metrics also includes updating the aggregate parameters in response to determining that the fluctuations in IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate are all less than the corresponding preset fluctuation thresholds within the third sliding statistical window.
[0070] In this implementation, the executing entity can determine whether the fluctuation amplitude of each fluctuation event of IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate within the third sliding statistics window is less than the corresponding preset fluctuation threshold, and whether the minimum amplitude of each indicator is greater than the corresponding set value (to exclude idle conditions with extremely low load and no optimization significance, and to ensure the effectiveness of parameter updates); if so, it can be determined that the business indicators are stable in the long term and without high-frequency oscillations, the business is in a stable steady-state condition, and the basic conditions for parameter optimization are met, and the aggregated parameters are updated.
[0071] It should be noted that the three types of sliding statistical windows have a fixed preset duration and the following relationship: duration of the second sliding statistical window < duration of the first sliding statistical window < duration of the third sliding statistical window.
[0072] The specific functions are as follows: the second sliding statistical window is a short-term sudden change detection window, used to capture instantaneous business model jumps; the first sliding statistical window is a steady-state load statistical window, used to identify continuous high-concurrency business pressure; the third sliding statistical window is a long-term steady-state convergence detection window, used to statistically analyze the long-term fluctuation characteristics of business indicators and determine whether the business is in a volatile or stable operating condition.
[0073] Furthermore, transient mutations (second window) typically have the highest priority, responding first to changes in the business model; continuous high concurrency (first window) is next, adapting to steady-state high-volume loads; long-term steady-state / jitter judgment (third window) serves as a fallback convergence logic, responsible for long-term parameter stability control, with multi-layered logic adapting step by step. Through these priority settings, the aggregated parameter update logic can be executed differently based on the metric characteristics under different windows.
[0074] This implementation achieves steady-state performance optimization by updating the aggregate parameters in response to the determination that the fluctuations in IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate are all less than the corresponding preset fluctuation thresholds within the third sliding statistical window.
[0075] Figure 3 A flow 300 is shown that can be applied to another embodiment of the interrupt aggregation method for storage devices disclosed herein. In this embodiment, the interrupt aggregation method for storage devices may include the following steps: Step 301: Determine business metrics based on the host allocation request.
[0076] In this embodiment, the implementation details and technical effects of step 301 can be found in the description of step 101, and will not be repeated here.
[0077] Step 302: Update the aggregation parameters based on business metrics.
[0078] In this embodiment, the implementation details and technical effects of step 302 can be found in the description of step 102, and will not be repeated here.
[0079] Step 303: In response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters, an interruption notification is sent to the host.
[0080] In this embodiment, the implementation details and technical effects of step 303 can be found in the description of step 103, and will not be repeated here.
[0081] Step 304: Collect the verification metrics after the aggregation parameters are updated.
[0082] In this embodiment, after determining the aggregation parameters and processing them, requesting that the triggering conditions corresponding to the updated aggregation parameters be met, and sending an interrupt notification to the host, the verification index, i.e., the verification index after the aggregation parameters are updated, can be collected.
[0083] The verification metrics may include one or more of the following: business I / O latency, host load, and interrupt frequency.
[0084] Here, business I / O latency is used to indicate the complete end-to-end latency from when the host issues an I / O request to when the host receives the I / O completion interruption notification; specifically, it may include storage device internal processing latency, aggregated queuing waiting latency, and host interruption processing latency.
[0085] Generally, the larger the aggregation parameter, the longer the aggregation wait time, and the higher the business I / O latency.
[0086] Host load indicates the resource utilization of a host for handling interrupts and I / O-related tasks related to storage devices. Generally, increasing the aggregate parameter reduces the number of interrupt reports and decreases the host interrupt load; conversely, decreasing the aggregate parameter increases the number of interrupt reports and increases the host interrupt load.
[0087] Interrupt frequency is used to indicate the interrupt frequency counted on the host side, that is, the number of interrupts (notifications) sent by the storage device to the host per unit time.
[0088] In addition, verification metrics can also include metrics that reflect the overall I / O performance of the storage device, such as overall IOPS and overall transmission bandwidth.
[0089] Step 305: Based on the changes in the verification indicators after the aggregation parameters are updated compared to the verification indicators collected before the update, continue to update the aggregation parameters.
[0090] In this embodiment, the executing entity can determine the changes in the verification indicators after the aggregation parameters are updated compared to the verification indicators collected before the update, and continue to update the aggregation parameters based on the changes.
[0091] Here, changes can include improvements or deteriorations.
[0092] For example, if the updated verification index of the aggregated parameters is better than the verification index collected before the update, the aggregated parameters can continue to be updated along the update direction of the previous round of aggregated parameters.
[0093] The magnitude or step size of updating the aggregation parameters can be the same as or different from the previous round; this application does not impose any restrictions on this.
[0094] The embodiments of this disclosure determine business metrics based on requests allocated by the host; update aggregation parameters based on business metrics; in response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters, send an interrupt notification to the host; collect verification metrics of the updated aggregation parameters; and continue to update the aggregation parameters based on the changes in the verification metrics of the updated aggregation parameters compared to the verification metrics collected before the update. This avoids over-adjustment or under-adjustment problems caused by a single parameter update, improves the matching degree between the aggregation parameters and real-time business conditions, reduces IO latency jitter and abnormal CPU load caused by blind parameter tuning, and ensures the stability and accuracy of interrupted aggregation optimization.
[0095] In some optional methods, updating the aggregation parameters based on business metrics includes: updating the aggregation parameters along a first direction based on business metrics; and continuing to update the aggregation parameters based on the changes in the updated verification metrics compared to the previously collected verification metrics, including: updating the aggregation parameters along a second direction in response to determining that the updated verification metrics are worse than the previously collected verification metrics, and the change in the verification metrics is greater than a first preset threshold; and updating the aggregation parameters along the first direction in response to determining that the updated verification metrics are better than the previously collected verification metrics, and the change in the verification metrics is greater than a first preset threshold.
[0096] In this implementation, the executing entity can update the aggregation parameter along the first direction according to business indicators, wherein the first direction is to increase or decrease the aggregation parameter.
[0097] Furthermore, the executing entity can determine whether the verification index after the aggregation parameter update is worse than the verification index collected before the update, and whether the change in the verification index is greater than the first preset threshold; or whether the verification index after the aggregation parameter update in each round of multiple consecutive rounds (e.g., 3 rounds, 5 rounds, etc.) is worse than the verification index collected before the update in that round, and whether the change in the verification index is greater than the first preset threshold; if so, the aggregation parameter can be updated along the second direction.
[0098] The second direction is opposite to the first direction. For example, if the first direction is to increase the polymerization parameter, then the second direction is to decrease the polymerization parameter.
[0099] The executing entity can determine whether the updated verification index of the aggregated parameters is better than the verification index collected before the update, and whether the change in the verification index is greater than the first preset threshold; if so, the aggregated parameters can continue to be updated along the first direction.
[0100] For example, if the verification metric includes overall machine performance, if the overall machine performance decreases after the aggregation parameter is updated in the first direction, it indicates that the aggregation parameter has been changed too much, dragging down the business throughput, and the aggregation parameter needs to be corrected in reverse, that is, the aggregation parameter is updated in the second direction; if the overall machine performance improves after the aggregation parameter is updated, the aggregation parameter can continue to be updated in the first direction.
[0101] Furthermore, for example, if the updated verification index of the aggregated parameters is better than the previously collected verification index, and the change in the verification index is greater than a first preset threshold, then the aggregated parameters can continue to be updated along the first direction, i.e., a second round of updates. Further, the updated verification index is collected. If the updated verification index is worse than the previously collected verification index, and the change in the verification index is greater than the first preset threshold, then the aggregated parameters can be updated along the second direction. Here, the step size or magnitude of updating the aggregated parameters along the second direction is usually smaller than the update step size or magnitude of the previous round of aggregated parameters.
[0102] This implementation method updates the aggregate parameters along the second direction in response to the determination that the updated verification index is worse than the previously collected verification index, and the change in the verification index is greater than a first preset threshold; and updates the aggregate parameters along the first direction in response to the determination that the updated verification index is better than the previously collected verification index, and the change in the verification index is greater than a first preset threshold. This forms a negative feedback adjustment mechanism, promptly rolls back unfavorable parameter adjustments, retains parameter changes that bring performance gains, suppresses performance oscillations during parameter tuning, and helps to quickly converge to obtain aggregate parameters that are suitable for the current business.
[0103] In some alternative approaches, the method further includes: stopping the updating of the aggregation parameters in response to determining that, after determining that the change in the verification index corresponding to each round of updates is less than or equal to a second preset threshold after multiple consecutive rounds of updates to the aggregation parameters.
[0104] In this implementation, the executing entity can determine whether the change in the verification index corresponding to each round of updates is less than or equal to the second preset threshold after multiple consecutive rounds (e.g., 3 rounds, 5 rounds, etc.) of updating the aggregation parameters. If so, the optimization convergence can be determined and the aggregation parameter update can be stopped.
[0105] The first preset threshold is used to identify significant deterioration of the verification index, and the second preset threshold is a convergence determination threshold. The first and second preset thresholds can be configured to be equal, and preferably, the first preset threshold can be set to be greater than the second preset threshold. For example, the first preset threshold is 10%, and the second preset threshold is 5%.
[0106] It should be noted that if the change in the verification index satisfies the condition that the second preset threshold < change ≤ first preset threshold, the previous round of iterative optimization process can be maintained, and the aggregation parameters can continue to be updated; that is, neither the reverse update along the second direction is triggered, nor the update of the aggregation parameters is stopped; if the change in the verification index further increases and exceeds the first preset threshold in subsequent iterations, then the reverse update is performed; if the change in the verification index falls back to within the second preset threshold after several consecutive iterations, and continues for several rounds, then the update of the aggregation parameters is stopped.
[0107] This implementation stops updating the aggregation parameters in response to the determination that the change in the verification index corresponding to each round of updates is less than or equal to the second preset threshold after determining that the aggregation parameters have been updated for multiple consecutive rounds. This helps to avoid premature abnormal termination of optimization due to instantaneous index disturbances and improves the accuracy of optimization convergence judgment.
[0108] Figure 4 This is a flowchart illustrating an application scenario of an interrupt aggregation method for a storage device provided according to an exemplary embodiment of this disclosure. For example... Figure 4 As shown, taking a solid-state drive (SSD) as an example, the execution entity (e.g., the SSD's controller chip) can enable dynamic time slicing 401 and configure different aggregation parameters 402 (i.e., interrupt merging parameters) for two sets of time slices (e.g., sequential preceding time slices and sequential following time slices).
[0109] Here, the direction of change of the aggregation parameters configured for subsequent time slices relative to the aggregation parameters configured for preceding time slices can be set as the first direction.
[0110] Furthermore, the verification metrics 403 of the preceding and following time slices are collected, such as the verification metrics R1 under the aggregation parameters of the preceding time slice and the verification metrics R2 under the aggregation parameters of the following time slice; and the verification metrics 404 are compared, that is, R1 and R2 are compared.
[0111] If the verification index R2 collected by the subsequent time slice is better than the verification index R1 of the preceding time slice, that is, R2 is better than R1, and the change in the verification index is greater than the first preset threshold, then it can be determined that the current aggregation parameter iteration direction (such as the first direction) is valid, and the aggregation parameter 405 is continuously updated iteratively along the first direction to gradually optimize the interruption aggregation strength and further amplify the system IO request throughput performance.
[0112] If the verification index R2 collected by the subsequent time slice is worse than the verification index R1 of the preceding time slice (i.e., R2 is worse than R1), and the change in the verification index is greater than the first preset threshold, then a performance degradation count of 406 can be performed, such as +1, and the aggregation parameters can continue to be updated and iterated along the first direction.
[0113] The system checks if the deterioration count is greater than or equal to the preset value 407. If the deterioration count is ≥3, and if so, it means that the verification index of the subsequent two consecutive parameter iterations is worse than the verification index before the iteration, and the change in the verification index of each iteration is greater than the first preset threshold, then it can be determined that the current parameter iteration direction (e.g., the first direction) is incorrect, and there is a risk of performance degradation caused by excessive parameter tuning. The system automatically reverses (e.g., the second direction) to correct the aggregate parameter 408, gradually withdrawing and adjusting the aggregate parameter until the business performance returns to the optimal range. If not, the performance deterioration count is incremented by 1, and the aggregate parameter is updated and iterated along the first direction.
[0114] If the change in the verification index R2 and the verification index R1 is less than or equal to the second preset threshold, then a balance state count of 409 can be performed, such as +1, and the aggregation parameters can continue to be updated and iterated along the first direction.
[0115] Determine if the balance state count is greater than or equal to the preset value 410. If the balance state count is ≥3, and if so, meaning the change in the verification index corresponding to the next two consecutive parameter iterations is less than or equal to the second preset threshold, then it can be determined that the current aggregated parameter has adapted to the current stable business scenario and reached a local optimum. Parameter search iteration can then be stopped 411, and the system can switch to steady-state operation mode to maintain the stable operation of the optimal aggregated parameter, i.e., optimization ends, and the optimal parameter configuration is locked 412. If not, the balance state count can be incremented by 1, and the aggregated parameter can continue to be updated and iterated along the first direction.
[0116] Here, the overall process can include three core states: waiting for performance to stabilize, searching for optimal parameters, and steady-state monitoring, supporting closed-loop switching. Initially, the system defaults to the waiting-to-stabilize state. Once the load is stable and the fluctuations meet the thresholds (e.g., within the third sliding statistics window, the fluctuation amplitudes of IOPS, transmission bandwidth, hardware queue load, and interrupt growth rate are all less than the corresponding preset fluctuation thresholds, and the minimum amplitude of each indicator is greater than the corresponding set value), it switches to the parameter search state. After the parameter optimization convergence is completed, it switches to the steady-state monitoring state. During steady-state operation, if a triggering event / scenario such as a sudden change in IO load, performance jitter, or a sudden drop in IOPS is detected, it will automatically return to the waiting-to-stabilize state and restart a new round of optimization process, achieving dynamic adaptive control under all operating conditions.
[0117] This disclosed interrupt aggregation method for storage devices can leverage the computing power and memory scheduling capabilities of a specified platform to enhance NVMe storage performance in practical applications. It is adaptable to various CPU platforms, disk configurations, and concurrent load scenarios. This method can improve IOPS and throughput while controlling latency increases. The average latency for various read / write scenarios meets the SPEC (Standard Performance Evaluation Corporation) specifications, and its latency stability is superior to traditional manual interrupt aggregation. In long-term testing of a 24-disk all-flash architecture, IOPS fluctuations were less than 5%, demonstrating stable and reliable load performance.
[0118] Furthermore, this method can be adapted to various services such as low latency of core databases, artificial intelligence computing power, cloud computing scheduling, and big data mixed loads. It does not require hardware upgrades and features low loss, strong adaptability, and full-scenario optimization, solving the pain points of high-concurrency storage performance and providing underlying storage support for industry digitalization and computing power transformation.
[0119] This disclosure also provides a storage device that can be used to perform, for example, Figure 1, Figure 2 , Figure 3 , Figure 4 The corresponding embodiment describes an interrupt aggregation method for storage devices.
[0120] In a specific example, the structure of the storage device is as follows: Figure 5 As shown, the storage device may include a request processing unit 501, a performance monitoring unit 502, a parameter adjustment unit 503, a negative feedback control unit 504, and an interrupt aggregation unit 505.
[0121] The request processing unit can be configured to receive requests allocated by the host, such as I / O requests.
[0122] The performance monitoring unit can be configured to determine business metrics based on requests allocated by the host.
[0123] The parameter adjustment unit can be configured to update aggregate parameters based on business metrics.
[0124] The negative feedback control unit can be configured to collect the verification index after the aggregation parameter is updated; based on the change of the verification index after the aggregation parameter is updated compared with the verification index collected before the update, the aggregation parameter is updated again.
[0125] The interrupt aggregation unit can be configured to send an interrupt notification to the host in response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters.
[0126] Optionally, the performance monitoring unit can be configured to update the aggregate parameters along a second direction in response to determining that the updated verification index of the aggregate parameters is worse than the previously collected verification index, and the change in the verification index is greater than a first preset threshold; the second direction is opposite to the first direction; and to update the aggregate parameters along a first direction in response to determining that the updated verification index of the aggregate parameters is better than the previously collected verification index, and the change in the verification index is greater than a first preset threshold.
[0127] Optionally, the performance monitoring unit can also be configured to stop updating the aggregation parameters in response to determining that after multiple consecutive rounds of updating the aggregation parameters, the change in the verification index corresponding to each round of updates is less than or equal to a second preset threshold.
[0128] Optionally, the parameter adjustment unit can be configured to update the aggregation parameters in response to determining that the interrupted growth rate is greater than a first preset value within the first sliding statistical window.
[0129] Optionally, the parameter adjustment unit can be configured to update the aggregation parameter in response to determining that the change in the proportion of read requests within the second sliding statistics window is greater than a second preset value. The change in proportion is the absolute value of the difference between the end time and the start time of the second sliding statistics window and the proportion of read requests among all requests.
[0130] Optionally, the parameter adjustment unit can be configured to update the aggregate parameters in response to determining that within the third sliding statistics window, the fluctuation amplitudes of the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate are all less than the corresponding preset fluctuation thresholds. The minimum values of the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate are all greater than the corresponding settings.
[0131] Optionally, the parameter adjustment unit can be configured to maintain the current aggregation parameters unchanged in response to determining that, within the third sliding statistics window, at least one of the following occurs within a unit time: the number of requests completed, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate; the number of fluctuation events is greater than a third preset value; and the fluctuation amplitude of each fluctuation event exceeds the corresponding preset fluctuation threshold.
[0132] Optionally, the interrupt aggregation unit can be configured to send an interrupt notification to the host in response to the number of processed requests reaching an updated number threshold, or the timeout threshold being reached from the generation of the first processed request.
[0133] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0134] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for interrupt aggregation in a storage device, characterized in that, The method includes: Determine business metrics based on requests allocated by the host; The aggregation parameters are updated based on the aforementioned business metrics; In response to determining that the processed request meets the triggering conditions corresponding to the updated aggregation parameters, an interruption notification is sent to the host.
2. The method according to claim 1, characterized in that, The method further includes: Collect and update the verification metrics after the aggregation parameters are collected. The verification metrics include at least one of the following: business input / output latency, host load, and interruption frequency. Based on the changes in the verification metrics after the aggregation parameter update compared to the verification metrics collected before the update, the aggregation parameters are updated again.
3. The method according to claim 2, characterized in that, The step of updating the aggregation parameters based on the business metrics includes: Based on the aforementioned business metrics, the aggregation parameters are updated along a first direction, where the first direction is either increasing or decreasing the aggregation parameters; and The process involves updating the aggregate parameters based on the changes in the updated verification metrics compared to the metrics collected before the update, including: In response to determining that the verification index after the aggregation parameter update is worse than the verification index collected before the update, and the change in the verification index is greater than a first preset threshold, the aggregation parameter is updated along a second direction; the second direction is opposite to the first direction. In response to determining that the updated verification index of the aggregated parameters is better than the verification index collected before the update, and that the change in the verification index is greater than a first preset threshold, the aggregated parameters are updated along the first direction.
4. The method according to claim 3, characterized in that, The method further includes: In response to the determination that after multiple consecutive rounds of updating the aggregation parameters, the change in the verification index corresponding to each round of updates is less than or equal to the second preset threshold, the updating of the aggregation parameters is stopped, where the second preset threshold is less than the first preset threshold.
5. The method according to claim 1, characterized in that, The business metrics include at least one of the following: the number of requests processed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate.
6. The method according to claim 5, characterized in that, The business metrics include the interruption growth rate, and the updating of the aggregation parameters based on the business metrics includes: In response to determining that the interrupted growth rate is greater than a first preset value within the first sliding statistics window, the aggregation parameters are updated.
7. The method according to claim 5, characterized in that, The request includes a read request, and the update of the aggregation parameters based on the business metrics includes: In response to determining that the change in the proportion of read requests within the second sliding statistics window is greater than a second preset value, the aggregation parameters are updated. The change in proportion is the absolute value of the difference between the end time and the start time of the second sliding statistics window and the proportion of read requests among all requests.
8. The method according to claim 5, characterized in that, The step of updating the aggregation parameters based on the business metrics includes: In response to the determination that within the third sliding statistics window, the fluctuation amplitudes of the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate are all less than the corresponding preset fluctuation thresholds, the aggregation parameters are updated, wherein the minimum amplitudes of the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate are all greater than the corresponding set values.
9. The method according to claim 8, characterized in that, The method further includes: In response to determining that within the third sliding statistics window, at least one of the following occurs within a unit time: the number of requests completed per unit time, transmission bandwidth, single request response latency, hardware queue load, and interrupt growth rate; the number of fluctuation events exceeds a third preset value; and the fluctuation amplitude of each fluctuation event exceeds the corresponding preset fluctuation threshold, the current aggregation parameters remain unchanged.
10. The method according to any one of claims 1-9, characterized in that, The aggregation parameters include: a quantity threshold and a timeout threshold, and the response to determining that the processed request meets the trigger condition corresponding to the updated aggregation parameters, sending an interruption notification to the host includes: In response to the number of processed requests reaching the updated threshold, or the timeout period since the first processed request was generated reaching the updated threshold, an interruption notification is sent to the host.
11. A storage device, characterized in that, The storage device is used to perform the method according to any one of claims 1-10.
