An I / O scheduling method to ensure access fairness of ZNS-SSD

By calculating the slowdown value of each application and combining it with the ZNS interface characteristics to perform coarse-grained and fine-grained scheduling, the problem of unfair access to ZNS-SSD is solved, achieving fairness and extending device life.

CN115328398BActive Publication Date: 2025-09-09CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210980185.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2025-09-09
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

When multiple applications access the ZNS-SSD device simultaneously, the characteristics of the ZNS interface lead to access unfairness, causing I/O congestion and delay, and affecting user experience.

Method used

The I/O request time is recorded by a timer, the slowdown value of each application is calculated, ZNS-aware coarse-grained scheduling and self-balancing fine-grained scheduling are performed, and the location of unfair I/O requests is adjusted to ensure access fairness.

Benefits of technology

This achieves fairness in ZNS-SSD access, reduces latency variation, improves user experience, and extends device life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115328398B_ABST
    Figure CN115328398B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computer storage technology, and specifically relates to an I / O scheduling method for ensuring access fairness to a ZNS-SSD. The method comprises: identifying unfair I / O requests based on the runtime slowdown value; simultaneously, finding all requests accessing the same partition as the unfair I / O request, bundling them into a group of I / O requests to be scheduled; performing ZNS-aware coarse-grained scheduling based on ZNS interface specifications; recalculating the slowdown value of each application; and executing a self-balancing fine-grained scheduling strategy if slowdown values ​​are swapped. By calculating the slowdown value of each application at runtime and combining it with ZNS sequential write constraints, the present invention prioritizes responses to unfair I / O requests, thereby balancing the access latency of all applications and ensuring access fairness to the ZNS-SSD. The method has the advantages of low overhead and ease of implementation, while also possessing good scalability and practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer storage technology, and in particular relates to an I / O scheduling method for ensuring access fairness of a ZNS-SSD. Background Art

[0002] While the intelligent era delivers unprecedented user experiences, it also generates explosive growth in data volumes. According to International Data Corporation (IDC), the global datasphere will reach 175ZB by 2025. Storing massive amounts of data has become an inevitable trend and inherent requirement for storage system development, necessitating the need for high-performance persistent storage hardware and software to alleviate the immense pressure facing these systems. To address this, the NVMe standard introduces the Zoned Namespace (ZNS) protocol, redefining the solid-state storage interface.

[0003] The ZNS interface divides logical addresses into fixed-size partitions. Within a partition, upper-level applications can only write data sequentially, thus standardizing data distribution and avoiding frequent migration of valid data. Compared to traditional block device interfaces, the ZNS interface breaks down the barriers between upper-level applications and underlying devices, eliminating internal garbage collection, and achieving the goals of reducing SSD costs and improving SSD performance. Therefore, the ZNS interface better matches the media access characteristics of flash memory and is gradually becoming the next-generation SSD access interface. Simultaneously, hardware manufacturers such as Samsung and Western Digital have simultaneously developed ZNS-based flash solid-state drives (ZNS-SSDs) to improve storage system performance and utilization.

[0004] However, the new ZNS-SSD hardware still faces many challenges in its promotion and application. Among them, the unique nature of the ZNS interface leads to severe access unfairness when multiple applications access the ZNS-SSD device simultaneously. Specifically, because ZNS-SSD partitions must write data sequentially, I / O requests issued by multiple applications cannot be arbitrarily scheduled like traditional SSDs, resulting in I / O congestion. If an I / O request issued by an application is blocked by other applications, then the I / O request of this application will not be responded to for a long time, resulting in access unfairness. In high-performance storage systems, access unfairness will affect service levels and reduce user experience. Summary of the Invention

[0005] To solve the above technical problems, the present invention proposes an I / O scheduling method to ensure access fairness to ZNS-SSD, comprising the following steps:

[0006] S1: For each flash chip queue, a timer is used to record the arrival time of all I / O requests, and the average response time is calculated. The slowdown value of each application is calculated based on the average response time. The application with the largest slowdown value is selected as the unfair application, and the I / O request issued by the application is considered the unfair I / O request.

[0007] S2: In the flash memory chip queue, all I / O requests that access the same partition as the unfair I / O request are found. These requests are bundled into I / O request groups to be scheduled based on the order in which they access the same partition. Based on the ZNS interface specification, ZNS-aware coarse-grained scheduling is performed on the I / O request groups.

[0008] S3: After coarse-grained scheduling is completed, the Slowdown value of each application is recalculated. If the application corresponding to the recalculated maximum Slowdown value and the application corresponding to the minimum Slowdown value before scheduling are swapped, the self-balancing fine-grained scheduling strategy is used to adjust the position of the unfair I / O requests.

[0009] Preferably, the slowdown of each application is calculated based on the average response time, and the slowdown of each application is calculated as:

[0010]

[0011] Among them, Slowdown i Indicates the Slowdown value of the i-th application, RT i Shared RT represents the average response time when the i-th application accesses the ZNS-SSD device together with other applications. i Alone It represents the average response time when the i-th application accesses the ZNS-SSD device alone.

[0012] Preferably, the ZNS-aware coarse-grained scheduling of the I / O request group based on the ZNS interface specification specifically includes: writing the request according to the access order of all I / O requests for the same partition and scheduling the request to the head of the chip queue.

[0013] Preferably, the use of a self-balancing fine-grained scheduling strategy to adjust the position of unfair I / O requests specifically includes: moving the unfair I / O requests in the bundled I / O request group one position to the tail of the flash memory chip queue, and recalculating the Slowdown value of each application again until the application corresponding to the maximum Slowdown value no longer changes, and then completing the scheduling.

[0014] Beneficial effects of the present invention: The present invention calculates the Slowdown value of each application at runtime and, in combination with the ZNS sequential write constraint, prioritizes responses to unfair I / O requests, thereby balancing the access delays of all applications and ensuring access fairness of the ZNS-SSD. It has the advantages of low overhead and easy implementation, as well as good scalability and practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic diagram of the implementation principle of the present invention;

[0016] Figure 2 Schematic diagram of ZNS-aware coarse-grained scheduling of the present invention;

[0017] Figure 3 Schematic diagram of the self-balancing fine-grained scheduling of the present invention;

[0018] Figure 4 This is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0020] An I / O scheduling method that ensures access fairness to ZNS-SSD, such as Figure 1 As shown, the method includes:

[0021] S1: For each flash chip queue, a timer is used to record the arrival time of all I / O requests, and the average response time is calculated. The slowdown value of each application is calculated based on the average response time. The application with the largest slowdown value is selected as the unfair application, and the I / O request issued by the application is considered the unfair I / O request.

[0022] S2: In the flash memory chip queue, all I / O requests that access the same partition as the unfair I / O request are found. These requests are bundled into I / O request groups to be scheduled based on the order in which they access the same partition. Based on the ZNS interface specification, ZNS-aware coarse-grained scheduling is performed on the I / O request groups.

[0023] S3: After coarse-grained scheduling is completed, the Slowdown value of each application is recalculated. If the application corresponding to the recalculated maximum Slowdown value and the application corresponding to the minimum Slowdown value before scheduling are swapped, the self-balancing fine-grained scheduling strategy is used to adjust the position of the unfair I / O requests.

[0024] Preferably, the slowdown rate of each application is calculated based on the average response time, and the slowdown rate of each application is calculated as:

[0025]

[0026] Among them, Slowdown i Indicates the Slowdown value of the i-th application, RT i Shared RT represents the average response time when the i-th application accesses the ZNS-SSD device together with other applications. i Alone It represents the average response time when the i-th application accesses the ZNS-SSD device alone.

[0027] Based on the ZNS interface regulations, ZNS-aware coarse-grained scheduling is performed, specifically including: data must be written sequentially to the same partition, the order of all I / O requests within the I / O request group cannot be changed, all I / O requests within the I / O request group are scheduled to the head of the chip queue, and overall I / O scheduling is performed based on the I / O request group to ensure the sequential data writing characteristics of the partition, breaking through the constraints of the ZNS interface characteristics.

[0028] A self-balancing fine-grained scheduling strategy is used to adjust the positions of unfair I / O requests. Specifically, compared with before scheduling, if the application corresponding to the maximum Slowdown value and the application corresponding to the minimum Slowdown value are swapped, the unfair I / O request in the bundled I / O request group is moved one position to the tail of the flash chip queue, and the Slowdown value of each application is recalculated again. The scheduling is completed until the application corresponding to the maximum Slowdown value remains the same as before coarse-grained scheduling, that is, the application corresponding to the maximum Slowdown value no longer changes.

[0029] The present invention is aimed at ZNS-SSD. By reconstructing partitions at runtime, data is differentially written into different types of reconstructed partitions, thereby balancing the wear degree of all flash memory blocks and extending the service life of the ZNS-SSD.

[0030] Figure 1This is the implementation principle diagram of the present invention. In the user space, the upper-layer application uses different access modes (file I / O, block I / O or management I / O) to send I / O requests to the ZNS-SSD device end; the request scheduling unit inside the device schedules these I / O requests to ensure fair access between applications. The scheduling unit mainly includes three modules: (1) Unfair I / O request identification module: For each flash chip queue, this module records the arrival time of all I / O requests and estimates their response time to calculate the slowdown value of each application at runtime; (2) ZNS-aware coarse-grained scheduling module: Based on the maximum slowdown value and combined with the ZNS characteristics, the I / O requests in the chip queue are coarse-grained scheduled; (3) Self-balancing fine-grained scheduling module: Based on the results of coarse-grained scheduling, the position of unfair I / O requests is fine-tuned to reduce the frequent scheduling problem caused by coarse-grained scheduling.

[0031] Figure 2 FIG4 is a schematic diagram of the ZNS-aware coarse-grained scheduling of the present invention. According to the calculation result of the unfair I / O request identification module, the application with the largest slowdown is selected, and the I / O request issued by it is regarded as an unfair I / O request. The ZNS-aware coarse-grained scheduling will perform the following operations: (1) Find the unfair I / O request and all I / O requests that access the same partition as it, and bundle them into an I / O request group. For the Chip0 queue, I / O5 is an unfair I / O request, and I / O3 and I / O2 access the same partition of the ZNS-SSD as I / O5, so I / O5, I / O3 and I / O2 are bundled into one I / O request group. Similarly, for the Chip1 queue, I / O4 is an unfair request, and I / O1 and I / O4 access the same partition of the ZNS-SSD, so I / O1 and I / O4 are bundled into one I / O request group. (2) Based on the sequential write feature of ZNS (within the bundled I / O request group, all requests have been arranged in chronological order, which complies with the sequential write feature of the ZNS interface, so scheduling operations can be performed.), the bundled I / O request group is scheduled to the head of the queue.

[0032] Figure 3The diagram of the self-balancing fine-grained scheduling of the present invention is shown. After the coarse-grained scheduling perceived by ZNS, the order of I / O requests in the chip queue changes, and the Slowdown value of each application also changes. Since the present invention determines unfair I / O requests based on the Slowdown value and then performs I / O request group scheduling, if the application corresponding to the maximum Slowdown value and the application corresponding to the minimum Slowdown value are swapped after the coarse-grained scheduling, then this scheduling will be invalid, resulting in the problem of frequent scheduling. The self-balancing fine-grained scheduling reduces the frequent scheduling problem by adjusting the position of unfair I / O requests. Its main steps are as follows: (1) After the coarse-grained scheduling perceived by ZNS is completed, the Slowdown value of each application is recalculated; (2) Ensure that the application corresponding to the maximum Slowdown value and the application corresponding to the minimum Slowdown value are not swapped; (3) If a swap occurs, the unfair I / O request is moved one position to the end of the queue and the Slowdown value is recalculated until it meets the requirements.

[0033] Figure 4 This is a flow chart of an embodiment of the present invention. When an I / O request arrives at the ZNS-SSD device, the I / O request scheduling policy is executed. The specific steps are as follows:

[0034] Step 101: Start;

[0035] Step 102: according to the physical address accessed by the I / O request, the I / O request is placed in the corresponding flash memory chip queue, and then step 103 is executed;

[0036] In step 103: calculate the Slowdown value of each application. Then execute step 104;

[0037] Step 104: Based on the calculated Slowdown value, determine whether the request is an unfair I / O request. If it is an unfair I / O request, execute step 105; otherwise, execute step 109 and end.

[0038] Step 105: Execute the ZNS-aware coarse-grained scheduling strategy. Then execute 106;

[0039] Step 106: Recalculate the Slowdown value. Then execute step 107;

[0040] Step 107: Determine whether the new Slowdown value is swapped. If so, execute step 108; otherwise, execute step 109 and end.

[0041] Step 108: Perform self-balancing fine-grained scheduling, and then execute;

[0042] Step 109: End.

[0043] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An I / O scheduling method for ensuring access fairness to ZNS-SSD, characterized in that: The following steps are involved: S1: For each flash chip queue, a timer is used to record the arrival time of all I / O requests, and the average response time is calculated. The slowdown value of each application is calculated based on the average response time. The application with the largest slowdown value is selected as the unfair application, and the I / O request issued by the application is considered the unfair I / O request. The slowdown for each application is calculated based on the average response time. The slowdown for each application is calculated as: Among them, Slowdown i Indicates the Slowdown value of the i-th application, RT i Shared RT represents the average response time when the i-th application accesses the ZNS-SSD device together with other applications. i Alone represents the average response time when the i-th application accesses the ZNS-SSD device alone; S2: In the flash memory chip queue, all I / O requests that access the same partition as the unfair I / O request are found. These requests are bundled into I / O request groups to be scheduled based on the order in which they access the same partition. Based on the ZNS interface specification, ZNS-aware coarse-grained scheduling is performed on the I / O request groups. S3: After coarse-grained scheduling is completed, the Slowdown value of each application is recalculated. If the application corresponding to the recalculated maximum Slowdown value and the application corresponding to the minimum Slowdown value before scheduling are swapped, the self-balancing fine-grained scheduling strategy is used to adjust the position of the unfair I / O requests.

2. The I / O scheduling method for ensuring access fairness of ZNS-SSD according to claim 1, characterized in that: The ZNS-aware coarse-grained scheduling of the I / O request group based on the ZNS interface specification specifically includes: writing the request according to the access order of all I / O requests for the same partition and scheduling the request to the head of the chip queue.

3. The I / O scheduling method for ensuring access fairness of ZNS-SSD according to claim 1, characterized in that: The self-balancing fine-grained scheduling strategy is used to adjust the position of unfair I / O requests, specifically including: moving the unfair I / O requests in the bundled I / O request group one position to the tail of the flash chip queue, and recalculating the slowdown value of each application again until the application corresponding to the maximum slowdown value no longer changes, and then the scheduling is completed.

Citation Information

Patent Citations

  • Multi-channel dynamic read-write dispatching method used in solid state drive (SSD)

    CN103135945A

  • Optimizing storage device access based on latency

    US20210173588A1