Conflict avoidance strategy for improving ZNS SSD writing performance
By dividing resources within the partition of ZNS SSD, building idle queues and work queues, and prioritizing write requests in idle queues, the waiting delay and throughput problems caused by ZNS SSD write request conflicts are solved, and higher chip utilization and throughput are achieved.
Patent Information
- Application Number
- CN202411775886.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When processing write requests, ZNS SSD causes a large number of conflicts due to the fully parallel mapping method, which increases the waiting delay and reduces the device throughput.
By dividing resources within the partition, the write requests are scheduled to the flash block with the shortest delay in idle or waiting, the idle queue and work queue are built, and the requests in the idle queue are processed first.
It effectively reduces the conflicts and waiting delays of write requests, and improves the utilization rate of SSD chips and the throughput of equipment.
Smart Images

Figure CN119847422A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer storage, and in particular to a conflict avoidance strategy for improving ZNS solid state hard disk write requests. Background Art
[0002] With the rapid development of information technology, the integration of data and various industries, the amount of data generated has exploded, and contemporary storage systems are facing tremendous pressure and challenges. Therefore, in order to obtain greater SSD performance, the NVMe ZNS (Zoned Namespace) interface was launched, redefining the solid-state storage interface.
[0003] Throughput is an important parameter of storage device performance, and low latency and high throughput write speed can improve user experience. However, due to the characteristics of the ZNS interface, when ZNS SSD processes write requests, the fully parallel mapping method will generate a large number of conflicts, resulting in an increase in waiting delay, thereby reducing device throughput. The ZNS interface divides the logical address space into fixed-size partitions (Zones), and each partition establishes a mapping relationship with multiple flash erase blocks of each flash chip to utilize the parallelism of the flash chip level. Although this can improve the utilization of the chip, it will also intensify conflicts between requests. When a write request operates on the ZNS SSD, a request will occupy all chip resources of the ZNS SSD, but because the idle time of the chip is not completely synchronized, when the request is operating on the working chip, a conflict will occur, causing the request to lag. This seriously reduces the utilization and throughput of the chip inside the SSD. In order to solve the above problems, the present invention designs a conflict avoidance strategy to improve the write performance of the ZNS SSD, by reducing the conflict and waiting delay of the write request to improve the throughput of the ZNS SSD. Summary of the invention
[0004] In view of the difficulty of solving the above problems in the prior art, the present invention provides a conflict avoidance strategy for improving the write performance of ZNS SSD. By dividing the resources according to the status of the flash blocks in the partition, the write request is scheduled to the flash block that is idle or has the shortest waiting delay as much as possible, thereby improving the utilization rate of the SSD chip, reducing the waiting delay of the request, and improving the throughput of the device.
[0005] The technology adopted by the present invention comprises the following steps:
[0006] Step 1, Initialization: Build an idle queue (Idle Queue) and a busy queue (Busy Queue) in the partition. Record the occupancy and request waiting time of all chips in the SSD, put the flash blocks of the idle state chips in the partition map into the idle queue in the mapping order, and then put the flash blocks of the working state chips in the partition map into the busy queue according to the request waiting time from small to large, so as to divide the idle resources of the partition into occupied resources;
[0007] Step 2, process write requests: process write requests according to priority to avoid conflicts. Set the idle queue to high priority and the working queue to low priority. Write requests will hit the idle queue first, that is, select the idle flash block; when the idle queue is empty, the request will hit the working queue, that is, select the flash block with the lowest waiting delay to process the write operation. After completing the write request, record the scheduling information to build the partition mapping table and update the queue information at the same time.
[0008] Step 3: When recycling: clear the partition mapping table and queue. When all the data in the partition is invalid, erase the flash blocks mapped by the partition, clear the partition mapping table and queue to free up space.
[0009] The beneficial effect of the present invention is to allocate write request scheduling to the flash memory block in the partition that is in an idle state or has the lowest waiting delay as much as possible, thereby improving the utilization rate of the device chip. The invention divides the resources according to the chip occupancy of the ZNS SSD, and prioritizes the idle resources; when there are no idle resources, the resources with the lowest waiting delay are obtained. The utilization rate of the ZNS SSD chip is improved. The present invention has the advantages of low cost and easy implementation, and has good scalability and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings of the present invention are described as follows;
[0011] Figure 1 It is the overall architecture diagram and implementation principle diagram of the present invention;
[0012] Figure 2 Schematic diagram of the scheduling process of the request scheduler in the present invention;
[0013] Figure 3 A request conflict avoidance strategy flow chart of the present invention; DETAILED DESCRIPTION
[0014] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0015] The present invention is aimed at ZNS-SSD, divides the idle resources in the partition, schedules the write request to the idle resources as much as possible, improves the chip utilization, reduces the request waiting delay, and improves the throughput of ZNS SSD.
[0016] Figure 1 This is the overall architecture diagram and implementation principle diagram of the present invention. As can be seen from the figure, the host application performs a write operation on a partition (Selected Zone), the device obtains the mapping relationship of the partition through the partition mapping, and then schedules the write request through the request scheduler. The request scheduler prioritizes the flash memory blocks, divides the flash memory blocks under the partition mapping into idle resources (Idle Block) and non-idle resources (Busy Block), and the idle flash memory blocks are queued in the idle queue (Idle Queue), and the occupied flash memory blocks are queued in the working queue (Busy Queue).
[0017] Figure 2 The schematic diagram of the scheduling process of the request scheduler in the present invention shows that the request scheduler follows the priority allocation, that is, the flash memory blocks in the idle state are preferentially scheduled for write requests. First, the request scheduler divides the resource priorities of the flash memory blocks under the partition mapping, mainly into a high-priority idle queue and a secondary-priority work queue. The division method is as follows: ① Idle queue: the flash memory blocks in the idle state in the partition are queued in the mapping order; ② Work queue: the flash memory blocks in the occupied state are queued in ascending order of request waiting time. When the request scheduler processes a write request, the flash memory blocks in the idle queue are preferentially scheduled. When the idle queue is empty, the flash memory blocks in the work queue are scheduled to process the write request.
[0018] Figure 3 This is a flow chart of the request conflict avoidance strategy of the present invention. In step 101, the host application sends a write request to the partition. In step 102, after initializing the corresponding queue of the partition, the write request is scheduled and processed. The specific steps are as follows:
[0019] In step 103, the write requests of the partition are continuously processed, and the requests are divided into page-level small write requests.
[0020] In step 104, it is determined whether the idle queue in the current partition is not empty. Then, step 105 is executed, otherwise, step 106 is executed. In step 105, the page-level request hits the head of the idle queue, the page-level request is processed, the idle queue is dequeued, the idle queue and the work queue are updated, and step 107 is executed.
[0021] In step 106 , the idle queue is empty, the page-level request hits the head of the work queue, the page-level request is processed, the head of the work queue is dequeued, the work queue and the idle queue are updated, and step 107 is executed.
[0022] In step 107, the current page-level write request is processed, the partition mapping table is updated according to the scheduling situation, and step 108 is executed to end.
[0023] In step 108, it is determined whether the current write request is completely completed, and then the process is ended by executing step 109, otherwise, the process is ended by executing step 104. In step 109, the process is ended.
Claims
1.S1: A conflict avoidance strategy to improve ZNS SSD write performance, Its characteristics include the following steps: Step 1, Initialization: Build an idle queue (Idle Queue) and a busy queue (Busy Queue) in the partition. According to the occupancy status of the chip in the SSD, divide the flash blocks in different working states under the partition mapping into resources and organize them using the queue data structure; Step 2, process write requests: process write requests according to priority to avoid conflicts. Add the free flash blocks under the partition mapping to the idle queue, and the flash blocks in the occupied state to the working queue. Write requests prioritize hitting the idle queue for write operations. If the idle queue is empty, dequeue the working queue in turn, and dynamically update the queue and partition mapping table. Step 3: When recycling: clear the partition mapping table and queue. When all the data in the partition is invalid, erase the flash blocks mapped by the partition, clear the mapping table and queue to free up space. S2: The conflict avoidance strategy for improving ZNS SSD write performance according to claim 1 is characterized in that: in step 1, the flash memory blocks under the partition mapping are divided into states, the flash memory blocks in the idle state are queued into the idle queue according to the mapping order, and the flash memory blocks in the working state are queued into the working queue according to the request waiting time, thereby realizing the division of resources. Specifically, the following steps are included: S21: Resource division: According to the occupancy of the internal chip of the SSD, the idle flash memory blocks and the waiting flash memory blocks under the partition mapping are divided. Specifically, the following steps are included: S22: Idle queue construction: The idle flash memory blocks are sequentially queued into the idle queue according to the mapping order of the partitions. S23: Work queue construction: The flash memory blocks in working state are queued in ascending order according to the request waiting time. S3: The method for extending the service life of a ZNS-SSD according to claim 1 is characterized in that: in step 2, when a write request hits a partition and the idle queue is not empty, the write operation is performed on the idle queue first to avoid request conflicts. S4: The method for extending the service life of a ZNS-SSD according to claim 1 is characterized in that: in step 2, when a write request hits a partition and the idle queue is empty, a request is made to select a flash memory block in the working queue, thereby reducing the request conflict waiting delay. S5: The method for extending the service life of a ZNS-SSD according to claim 1, characterized in that: In step 2, when the write request processing is completed, the partition mapping table and the two queues are dynamically updated. S6: The method for extending the service life of a ZNS-SSD according to claim 1, characterized in that: In step 3, when all the data in the partition is invalid, the partition mapping table and two queues are cleared to reduce storage costs.
Citation Information
Patent Citations
I / O scheduling method based on internal parallelism of solid state disk and scheduler
CN103336669A
Garbage recycling optimizing method based on parallel features of flash memory storage equipment
CN107391392A
Internal concurrent I / O scheduling method and system for partitions of data server side
CN110837411A
Cache removal method for improving ZNS-SSD writing performance
CN115658558A
Resource exchange strategy for relieving internal access conflict of ZNS solid state disk
CN117742617A