Solid State Drive (SSD) Management Methods, Devices, and SSDs

By allocating a reasonable bandwidth ratio to each application on the ZNS SSD, parallel writing by multiple applications is achieved, solving the problem of insufficient write bandwidth on the ZNS SSD and improving write efficiency and flash memory utilization.

CN119415016BActive Publication Date: 2025-11-14SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411315555.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-11-14
Estimated Expiration
2044-09-20

AI Technical Summary

Technical Problem

The ZNS SSD has insufficient write bandwidth utilization, resulting in low write efficiency and an inability to fully and efficiently utilize the write bandwidth of each partition.

Method used

By determining the expected bandwidth ratio for each application and allocating the partition namespace of the flash superblock according to that ratio, multiple applications can write data in parallel, dynamically adjust storage resource allocation, and avoid write pointer contention and write amplification.

Benefits of technology

The write bandwidth and efficiency of ZNS SSDs have been improved. By rationally allocating storage resources, the impact of write amplification on hard drive lifespan has been reduced, and the parallel write efficiency of flash memory has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415016B_ABST
    Figure CN119415016B_ABST
Patent Text Reader

Abstract

This invention provides a solid-state drive (SSD) management method, apparatus, and SSD, relating to the field of solid-state drive technology. The SSD management method includes: in response to meeting the activation conditions of a to-be-allocated flash superblock, determining the expected bandwidth ratio of each application accessing the SSD; and allocating partitions in the partition namespace of the SSD corresponding to the to-be-allocated flash superblock to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application writes data to storage units in the to-be-allocated flash superblock based on the partitions of the allocated SSD partition namespace. This invention can effectively increase the write bandwidth of ZNS SSDs and improve their write efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of solid-state drive (SSD) technology, and more particularly to a SSD management method, apparatus, and SSD. Background Technology

[0002] With the rapid development of the information age, the demand for data storage has exploded, posing unprecedented challenges to the performance, reliability, and efficiency of storage devices. Solid State Drives (SSDs) based on NAND flash memory have stood out among numerous storage solutions due to their high reliability, superior performance, lightweight design, and low power consumption, becoming a key technology to meet this demand. However, traditional non-sequential write methods based on logical block addresses suffer from significant write amplification effects due to frequent garbage collection operations when dealing with large data volumes. This not only shortens the lifespan of the hard drive but also affects the overall system performance.

[0003] To address these issues, ZNS (Zoned Namespace) SSDs were developed. They innovatively divide flash memory into equally sized zones and require sequential data writes within each zone, effectively reducing write amplification, virtually eliminating the need for additional operating space, and significantly reducing the space and memory footprint from logical to physical tables. Nevertheless, ZNS SSDs still face challenges in practical applications. Due to limitations such as write pointer contention and single-queue depth writes, the write bandwidth of each zone is not fully and efficiently utilized.

[0004] Therefore, how to increase the write bandwidth and improve the write efficiency of ZNS SSDs is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] In view of the above-mentioned problems in the prior art, the present invention provides a solid-state drive (SSD) management method, device, and SSD, which can effectively increase the write bandwidth of ZNS SSD and improve the write efficiency of ZNS SSD.

[0006] This invention provides a solid-state drive (SSD) management method, comprising the following steps.

[0007] In response to meeting the activation conditions of the superblock to be allocated, the expected bandwidth ratio of each application accessing the SSD is determined; wherein, the expected bandwidth ratio is a preset proportion of the application's write bandwidth to the superblock to be allocated to the total write bandwidth of the superblock to be allocated, and the superblock to be allocated is a collection of multiple contiguous flash blocks; according to the expected bandwidth ratio of each application accessing the SSD, the partitions in the partition namespace of the SSD corresponding to the superblock to be allocated are allocated to each application, so that each application writes data to the storage units in the superblock to be allocated based on the partitions in the partition namespace of the allocated SSD.

[0008] According to a solid-state drive (SSD) management method provided by the present invention, the activation condition for the unallocated flash superblock is: the amount of writable data in the currently allocated flash superblock in the SSD has been exhausted; determining the expected bandwidth ratio of each application accessing the SSD includes: for each application, performing the following operations: calculating the sum of the write bandwidth ratios of the application on multiple flash superblocks of the SSD with written data, to obtain a first value; calculating the sum of the write bandwidth ratios of all applications accessing the SSD on multiple flash superblocks of the SSD with written data, to obtain a second value; and obtaining the expected bandwidth ratio of the application based on the ratio between the first value and the second value.

[0009] According to a solid-state drive (SSD) management method provided by the present invention, the activation condition of the unallocated flash superblock is: the SSD is powered on for the first time; the step of determining the expected bandwidth ratio of each application accessing the SSD includes: distributing the write bandwidth of the unallocated flash superblock equally according to the number of all applications accessing the SSD, thereby obtaining the expected bandwidth ratio of each application accessing the SSD.

[0010] According to a solid-state drive (SSD) management method provided by the present invention, the method further includes: determining and recording the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash superblock; in response to any application consuming the amount of writable data in the partition namespace of the SSD allocated to it, determining a target partition from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash superblock based on the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash superblock; and allocating the target partition to the application so that the application shares the amount of writable data in the target partition with the application that has already used the target partition.

[0011] According to a solid-state drive (SSD) management method provided by the present invention, the storage unit is a flash memory block; the partition namespace of the SSD is obtained by means of the following method: during the SSD initialization process, each flash memory block in the SSD is sequentially associated with a partition in the partition namespace to obtain the partition namespace of the SSD.

[0012] The present invention also provides a solid-state drive (SSD) management device, comprising the following modules:

[0013] A determining module is configured to determine the expected bandwidth ratio for each application accessing the SSD in response to meeting the activation conditions of the flash superblock to be allocated; wherein the expected bandwidth ratio is a preset proportion of the application's write bandwidth to the flash superblock to be allocated to the total write bandwidth of the flash superblock to be allocated, and the flash superblock is a collection of multiple contiguous flash blocks; an allocating module is configured to allocate partitions in the partition namespace of the SSD corresponding to the flash superblock to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application writes data to the storage units in the flash superblock to be allocated based on the partitions in the partition namespace of the allocated SSD.

[0014] The present invention also provides a solid-state drive (SSD), the SSD comprising an SSD controller and a storage medium; wherein the SSD controller is used to execute a computer program to implement the SSD management method described above.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the solid-state drive (SSD) management method described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the solid-state drive (SSD) management method as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the solid-state drive (SSD) management method described above.

[0018] The solid-state drive (SSD) management method, apparatus, and SSD provided by this invention determine the expected bandwidth ratio of each application accessing the SSD when the activation conditions of the flash superblock to be allocated are met. Based on the expected bandwidth ratio of each application accessing the SSD, partitions in the partition namespace of the SSD corresponding to the flash superblock to be allocated are allocated to each application. This allows for the allocation of a reasonable amount of storage resources to each application using the expected bandwidth ratio. Multiple applications sharing the same flash superblock can write data in parallel, thereby improving the parallel write efficiency of the flash memory. Since data from multiple applications can be written in parallel, compared to a single application exclusively occupying the flash superblock, the overall write bandwidth of the flash superblock can be significantly improved. This effectively increases the write bandwidth of the ZNS SSD and improves its write efficiency. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the SSD management method provided by the present invention.

[0021] Figure 2 This is a flowchart illustrating the method for determining the expected bandwidth ratio of applications accessing an SSD, as provided by the present invention.

[0022] Figure 3 This is a flowchart illustrating the method for dynamically adjusting the write bandwidth ratio of an application provided by the present invention.

[0023] Figure 4 This is a schematic diagram of the partition namespace of the solid-state drive (SSD) provided by the present invention.

[0024] Figure 5 This is a schematic diagram of the SSD management process provided by the present invention.

[0025] Figure 6 This is a schematic diagram of the structure of the solid-state drive (SSD) management device provided by the present invention.

[0026] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0028] The following is combined with Figures 1-5 This invention describes a solid-state drive (SSD) management method.

[0029] Figure 1 This is a flowchart illustrating the SSD management method provided by the present invention. This method is executed by the firmware stored in the SSD, such as... Figure 1 As shown, the method includes the following:

[0030] Step 101: In response to the activation conditions of the flash superblock to be allocated being met, determine the expected bandwidth ratio for each application accessing the SSD.

[0031] A flash superblock is a collection of multiple contiguous flash blocks. In the embodiments provided by the invention, flash resources are allocated based on flash superblocks. In specific implementation, a flash block from a flash superblock is allocated to all applications each time, until the writable data of the currently allocated flash superblock is exhausted. Then, the next adjacent flash superblock is used as the flash superblock to be allocated, and storage resources are allocated accordingly.

[0032] The expected bandwidth ratio is a preset proportion of the application's write bandwidth for the allocated flash superblock to the total write bandwidth of the allocated flash superblock. The write bandwidth of the allocated flash superblock refers to the amount of data that the allocated flash superblock can write per unit of time.

[0033] The activation conditions for the unallocated flash superblock include: the SSD being powered on for the first time, or the amount of writable data in the currently allocated flash superblock in the SSD being exhausted.

[0034] In practice, the expected bandwidth ratio of each application accessing the SSD can be determined in various ways so that each application can perform parallel write operations on the SSD according to its own expected bandwidth ratio.

[0035] In some embodiments, the activation condition for the flash superblock to be allocated is: the SSD is powered on for the first time; the expected bandwidth ratio of each application accessing the SSD can be determined by: distributing the write bandwidth of the flash superblock to be allocated evenly according to the number of all applications accessing the SSD, thereby obtaining the expected bandwidth ratio of each application accessing the SSD.

[0036] In practice, the firmware running on the SSD can learn the number of applications accessing it through communication with the upper layer.

[0037] As an example, there are 4 applications accessing the SSD. When the SSD is first powered on, the expected bandwidth ratio for each application is:

[0038] (1)

[0039] in, Let be the expected bandwidth ratio for the i-th application.

[0040] In some embodiments, the activation condition for the flash superblock to be allocated is that the amount of writable data in the currently allocated flash superblock in the SSD has been exhausted. For an embodiment of determining the expected bandwidth ratio for each application accessing the SSD in this case, see [link to embodiment]. Figure 2 The relevant content will not be repeated here.

[0041] Step 102: Based on the expected bandwidth ratio of each application accessing the SSD, allocate the partitions in the partition namespace of the SSD corresponding to the superblock to be allocated to each application, so that each application writes data to the storage unit in the superblock to be allocated based on the partitions in the partition namespace of the allocated SSD.

[0042] The storage cells in the flash superblock to be allocated may consist of one or more flash blocks, and are not limited to the description in this specification.

[0043] In the specific implementation process, in order to realize the basic functions of ZNS SSD, the SSD needs to map the flash memory block structure to a logical Zone structure according to the flash memory structure.

[0044] In some embodiments, the storage unit is a flash memory block; the SSD's partition namespace can be obtained by associating each flash memory block in the SSD with a partition in the partition namespace during SSD initialization. This is merely an example. Figure 4 As shown, a flash superblock (any one of SBLK0 to SBLK M-1) corresponds to n consecutively distributed partitions (Zones) in the partition namespace, and each partition is associated with a flash block in the flash superblock.

[0045] Unlike ZNS SSDs, which divide zones at a coarser granularity (such as by flash superblock), this invention divides zones by flash block, with each flash block mapped to a zone, achieving fine-grained zone management. This allows for more flexible allocation and dynamic adjustment of zones in the partition namespace based on the amount of data written by the application.

[0046] In practice, the firmware can record the SSD's partition namespace structure information so that zones can be allocated and dynamically adjusted based on this information. The SSD partition namespace structure information that the firmware needs to record includes: the starting address (PBA) of valid data on the zone, the amount of valid data, the zone opening time, the application ID corresponding to the zone, and other relevant information.

[0047] In practice, the following formula can be used to allocate flash blocks in the flash superblock to various applications.

[0048] (2)

[0049] in, To be assigned to the i The number of flash blocks for each application. For the first i The expected bandwidth ratio for each application; This refers to the number of storage units that can be executed in parallel within a flash superblock, i.e., the number of flash blocks contained in a flash superblock.

[0050] In the specific implementation process, if the number of applications Then the result calculated using formula (2) will appear. This addresses situations where an application spans multiple zones. The embodiments provided by this invention, in the case of fine-grained zone allocation, compared to coarse-grained zone allocation, [are effective in certain scenarios]. The probability of this will decrease, and the parallelization efficiency of the flash superblock can be effectively improved.

[0051] In the specific implementation process, after allocating the partitions in the partition namespace of the SSD corresponding to the superblock of flash memory to each application according to the expected bandwidth ratio of each application accessing the SSD, each application writes data to the storage unit in the superblock of flash memory based on the partition of the allocated SSD partition namespace.

[0052] As an example, when application A needs to write data, it sends the data to its corresponding partition through the SSD's interface. The SSD's firmware then writes the data to the storage cells in the flash superblock allocated to application A. Because write operations within the flash superblock are sequential, this helps application A write data efficiently and reduces the impact of write amplification on the SSD's lifespan. Similarly, applications B and C also write data according to their respective partitions and bandwidth ratios. Applications A, B, and C can all write data to the SSD through their own data queues without waiting for the write pointer to become idle, effectively avoiding write pointer contention.

[0053] Figure 2 This is a flowchart illustrating the method for determining the expected bandwidth ratio of applications accessing an SSD, as provided by the present invention. Figure 2 As shown, the method includes the following:

[0054] Step 201: Calculate the sum of the write bandwidth ratios of the application on multiple flash superblocks of the SSD that have already been written to obtain the first value.

[0055] In practice, the firmware records the write bandwidth of each application in each flash superblock. When activating a new flash superblock, the first value for each application is obtained based on the sum of the recorded write bandwidth ratios of each application in the first n flash superblocks with written data. If the number of flash superblocks with written data, m, is less than n, the first value for each application is obtained based on the sum of the recorded write bandwidth ratios of each application in the first m flash superblocks with written data.

[0056] Step 202: Calculate the sum of the write bandwidth ratios of all applications accessing the SSD on multiple flash superblocks of the SSD that have already been written to, and obtain the second value.

[0057] When activating a new flash superblock, the second value can be obtained based on the sum of the write bandwidth ratios of all recorded applications in the first n flash superblocks with written data. If the number of flash superblocks with written data, m, is less than n, the second value is obtained based on the sum of the write bandwidth ratios of all recorded applications in the first m flash superblocks with written data.

[0058] Step 203: Obtain the expected bandwidth ratio of the application based on the ratio between the first value and the second value.

[0059] Steps 201 to 203 can be expressed by the following formula.

[0060] (3)

[0061] in, For the j-th application in the th... i Write bandwidth on a flash superblock; The number of applications accessing the SSD; This represents the number of flash memory superblocks in the SSD. For the first j The expected bandwidth ratio for each application; It is the first value; It is the second value.

[0062] In the embodiments provided by this invention, a first value is obtained by summing the write bandwidth ratios of the application on multiple flash superblocks with written data on the SSD; a second value is obtained by summing the write bandwidth ratios of all applications accessing the SSD on these flash superblocks with written data; and the expected bandwidth ratio of the application is calculated based on the ratio between the first and second values. This expected bandwidth ratio accurately reflects the proportion of the application's write demand on the SSD relative to the total write demand of all applications. Using this expected bandwidth ratio, the firmware can dynamically allocate different numbers of Zones to applications, ensuring that applications with higher write demands can obtain more Zone resources to meet their high write bandwidth requirements. This allows for a more balanced utilization of the storage units in the flash superblock, avoiding situations where some storage units are overused while others are idle.

[0063] In practice, a new flash superblock will only be activated and allocated after all the writable data in the currently allocated flash superblock has been consumed. The actual data write volume of each application may not match the expected bandwidth ratio. When an application has consumed all the writable data allocated to it, but the writable data in the currently allocated flash superblock has not been consumed, the following can be utilized... Figure 3 The method shown dynamically allocates free storage units in the currently allocated flash superblock to the application.

[0064] Figure 3 This is a flowchart illustrating the method for dynamically adjusting the write bandwidth ratio of an application provided by the present invention, as shown below. Figure 3 As shown, the method includes the following:

[0065] Step 301: Determine and record the data consumption ratio of each partition in the SSD partition namespace corresponding to the currently allocated flash superblock.

[0066] Each Zone initially has a preset writable data capacity, known as DFC (Data Flash Capacity). As applications continuously perform write operations, this writable data capacity is gradually consumed. For each Zone corresponding to the currently allocated flash superblock that is in an open state, the firmware can record the detailed amount of data already written (VDFC, Variable Data Flash Capacity). The data consumption ratio of the i-th Zone... It can be calculated using the following formula.

[0067] (4)

[0068] in, For the first i The amount of data currently written to each Zone; For the first i The amount of data that can be written to a Zone.

[0069] Step 302: In response to any application consuming all the writable data in the partition namespace of the SSD allocated to it, determine the target partition from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash superblock, based on the data consumption ratio of each partition in the partition namespace of the SSD corresponding to the currently allocated flash superblock.

[0070] In the specific implementation process, when an application exhausts its allocated Zone resources, the firmware sorts the idle level of each Zone according to the data consumption ratio of each partition in the partition namespace of the SSD corresponding to the currently allocated flash superblock, and selects the Zone with the highest idle level (i.e. the Zone with the lowest data consumption ratio) as the target partition from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash superblock.

[0071] Step 303: Assign the target partition to the application so that the application shares the amount of writable data on the target partition with the application that is already using the target partition.

[0072] In practice, after the target partition is allocated to an application, the application shares the amount of writable data on the target partition with the applications that have already used the target partition.

[0073] In the embodiments provided by the present invention, such as Figure 5As shown, the method determines and records the data consumption ratio of each partition in the SSD's partition namespace corresponding to the currently allocated flash superblock, providing real-time monitoring of the flash superblock's storage resource usage for subsequent optimization of its allocation. When any application exhausts the writable data in its allocated SSD partition namespace, a target partition is determined from the partitions of the SSD's partition namespace corresponding to the currently allocated flash superblock, based on the data consumption ratio of each partition. This target partition is then allocated to the application, allowing it to share the writable data in the target partition with other applications already using it. This effectively improves the write efficiency of the ZNS SSD.

[0074] The solid-state drive (SSD) management device provided by the present invention is described below. The SSD management device described below and the SSD management method described above can be referred to in correspondence.

[0075] Figure 6 This is a schematic diagram of the SSD management device provided by the present invention. Figure 6 As shown, the device 600 includes the following modules.

[0076] The determining module 610 is configured to determine the expected bandwidth ratio of each application accessing the SSD in response to the activation condition of the flash superblock to be allocated; wherein the expected bandwidth ratio is a preset proportion of the write bandwidth of the application to the flash superblock to be allocated to the total write bandwidth of the flash superblock to be allocated, and the flash superblock is a collection of multiple consecutive flash blocks.

[0077] The allocation module 620 is configured to allocate partitions in the partition namespace of the SSD corresponding to the flash superblock to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application writes data to the storage unit in the flash superblock to be allocated based on the partitions in the partition namespace of the allocated SSD.

[0078] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may invoke logical instructions in the memory 730 to execute a solid-state drive (SSD) management method, which includes: in response to satisfying the activation condition of a flash superblock to be allocated, determining the expected bandwidth ratio of each application accessing the SSD; wherein the expected bandwidth ratio is a preset proportion of the write bandwidth of the application to the flash superblock to be allocated to the total write bandwidth of the flash superblock to be allocated, and the flash superblock is a collection of multiple consecutive flash blocks; according to the expected bandwidth ratio of each application accessing the SSD, allocating a partition in the partition namespace of the SSD corresponding to the flash superblock to each application, so that each application writes data to the storage unit in the flash superblock to be allocated based on the partition of the allocated SSD partition namespace.

[0079] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0080] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the solid-state drive (SSD) management method provided by the above methods, the method including: in response to satisfying the activation condition of a flash superblock to be allocated, determining the expected bandwidth ratio of each application accessing the SSD; wherein, the expected bandwidth ratio is a preset proportion of the write bandwidth of the application to the flash superblock to be allocated to the total write bandwidth of the flash superblock to be allocated, the flash superblock being a collection of multiple consecutive flash blocks; according to the expected bandwidth ratio of each application accessing the SSD, allocating a partition in the partition namespace of the SSD corresponding to the flash superblock to each application, so that each application writes data to the storage unit in the flash superblock to be allocated based on the partition of the allocated SSD partition namespace.

[0081] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the SSD management method provided by the above methods. The method includes: in response to satisfying the activation condition of a to-be-allocated flash superblock, determining the expected bandwidth ratio for each application accessing the SSD; wherein the expected bandwidth ratio is a preset proportion of the write bandwidth of the application to the to-be-allocated flash superblock to the total write bandwidth of the to-be-allocated flash superblock, and the flash superblock is a collection of multiple contiguous flash blocks; and according to the expected bandwidth ratio of each application accessing the SSD, allocating a partition in the partition namespace of the SSD corresponding to the to-be-allocated flash superblock to each application, so that each application writes data to storage units in the to-be-allocated flash superblock based on the allocated partition in the partition namespace of the SSD.

[0082] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0083] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A solid-state drive (SSD) management method, characterized in that, include: In response to meeting the activation conditions of the flash superblock to be allocated, the expected bandwidth ratio of each application accessing the SSD is determined; wherein, the expected bandwidth ratio is a preset proportion of the application's write bandwidth to the flash superblock to be allocated to the total write bandwidth of the flash superblock to be allocated, and the flash superblock is a collection of multiple consecutive flash blocks; Based on the expected bandwidth ratio of each application accessing the SSD, the partitions in the partition namespace of the SSD corresponding to the superblock to be allocated are allocated to each application, so that each application writes data to the storage unit in the superblock to be allocated based on the partitions in the partition namespace of the allocated SSD. Determine and record the data consumption ratio of each partition in the partition namespace of the SSD corresponding to the currently allocated flash superblock; In response to any application consuming the amount of writable data in the partition namespace of the SSD allocated to it, a target partition is determined from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash superblock, based on the data consumption ratio of each partition in the partition namespace of the SSD corresponding to the currently allocated flash superblock. The target partition is allocated to the application so that the application shares the writable data volume of the target partition with applications that are already using the target partition.

2. The SSD management method according to claim 1, characterized in that, The activation condition for the unallocated flash superblock is: the amount of writable data in the currently allocated flash superblock in the SSD has been exhausted; Determining the expected bandwidth ratio for each application accessing the SSD includes: For each of the applications, perform the following operations: The first value is obtained by summing the write bandwidth ratios of the application on multiple flash superblocks of the SSD that have already been written to. The second value is obtained by summing the write bandwidth ratios of all applications accessing the SSD on multiple flash superblocks of the SSD that have already been written to it; The expected bandwidth ratio of the application is obtained based on the ratio between the first value and the second value.

3. The SSD management method according to claim 1, characterized in that, The activation condition for the unallocated flash superblock is: the SSD is powered on for the first time; Determining the expected bandwidth ratio for each application accessing the SSD includes: Based on the number of all applications accessing the SSD, the write bandwidth of the unallocated flash superblock is evenly distributed to obtain the expected bandwidth ratio for each application accessing the SSD.

4. The SSD management method according to claim 1, characterized in that, The storage unit is a flash memory block; The partition namespace of the SSD is obtained using the following method: During the SSD initialization process, each flash memory block in the SSD is sequentially associated with a partition in the partition namespace to obtain the partition namespace of the SSD.

5. A solid-state drive (SSD) management device, characterized in that, include: A determination module is used to determine the expected bandwidth ratio of each application accessing the SSD in response to the activation condition of the flash superblock to be allocated; wherein the expected bandwidth ratio is a preset proportion of the application's write bandwidth to the flash superblock to be allocated to the total write bandwidth of the flash superblock to be allocated, and the flash superblock is a collection of multiple consecutive flash blocks. The allocation module is configured to allocate partitions in the partition namespace of the SSD corresponding to the flash superblock to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application writes data to the storage unit in the flash superblock to be allocated based on the partitions in the partition namespace of the allocated SSD. Also includes: Determine and record the data consumption ratio of each partition in the partition namespace of the SSD corresponding to the currently allocated flash superblock; In response to any application consuming the amount of writable data in the partition namespace of the SSD allocated to it, a target partition is determined from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash superblock, based on the data consumption ratio of each partition in the partition namespace of the SSD corresponding to the currently allocated flash superblock. The target partition is allocated to the application so that the application shares the writable data volume of the target partition with applications that are already using the target partition.

6. A solid-state drive (SSD), characterized in that, The SSD includes an SSD controller and a storage medium; wherein the SSD controller is used to execute a computer program to implement the solid-state drive (SSD) management method as described in any one of claims 1 to 4.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the solid-state drive (SSD) management method as described in any one of claims 1 to 4.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the solid-state drive (SSD) management method as described in any one of claims 1 to 4.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the solid-state drive (SSD) management method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data processing method and electronic device based on solid state disk (SSD)

    CN103677653A

  • Configuration method of solid state disk, solid state disk and partition storage method

    CN117130553A