Solid state disk (SSD) management method and device and SSD
By allocating reasonable flash memory resources to each application and dynamic partition management using the expected bandwidth ratio, the problem of low write bandwidth utilization efficiency of ZNS SSD is solved, and more efficient write bandwidth and efficiency is achieved.
Patent Information
- Application Number
- CN202411315555.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-09-20
AI Technical Summary
In practical applications, ZNS SSD has been subject to write pointer competition and single queue deep writes, resulting in the write bandwidth of each partition being unable to be fully and efficiently utilized, which in turn affects the write efficiency.
By determining the desired 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, so that each application can be based on the allocated partition namespace The partition of the data is written to the memory unit in the flash superblock to be allocated.
By dynamically allocating and adjusting partition resources, the parallel write efficiency when multiple applications share the same flash super block is improved, and the overall write bandwidth of the flash super block is significantly improved, thereby effectively increasing the write bandwidth of the ZNS SSD and efficiency.
Smart Images

Figure CN119415016A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state drives, and in particular to a solid state drive (SSD) management method and device, and a solid state drive (SSD). Background Art
[0002] With the rapid development of the information age, the demand for data storage has expanded dramatically, posing unprecedented challenges to the performance, reliability and efficiency of storage devices. NAND flash-based solid-state drives (SSDs) have stood out among many storage solutions with their high reliability, excellent performance, lightweight design and low energy consumption, becoming a key technology to meet this demand. However, the traditional non-sequential write method based on logical block addresses has a significant write amplification effect due to frequent garbage collection operations when dealing with large amounts of data writing, which not only shortens the life of the hard drive, but also affects the overall performance of the system.
[0003] To solve the above problems, ZNS (Zoned Namespace) SSD came into being. It innovatively divides the flash memory into equally sized zones and requires that data writes in each zone must be sequential, thereby effectively reducing write amplification, almost eliminating the need for additional operating space, and significantly reducing the space and memory usage of logical to physical tables. Despite this, ZNS SSD still faces challenges in practical applications. Due to limitations such as write pointer contention and single queue depth write, the write bandwidth of each partition is not fully and efficiently utilized.
[0004] Therefore, how to increase the write bandwidth of ZNS SSD and improve the write efficiency of ZNS SSD is a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above problems existing in the prior art, the present invention provides a solid state drive (SSD) management method, device, and solid state drive (SSD) to effectively increase the write bandwidth of the ZNS SSD and improve the write efficiency of the ZNS SSD.
[0006] The present invention provides a solid state drive (SSD) management method, comprising the following steps.
[0007] In response to satisfying the activation condition of the to-be-allocated flash memory super block, determining the expected bandwidth ratio of each application accessing the SSD; wherein the expected bandwidth ratio is a preset ratio of the write bandwidth of the application to the to-be-allocated flash memory super block to the total write bandwidth of the to-be-allocated flash memory super block, and the flash memory super block is a collection of multiple continuous flash memory blocks; according to the expected bandwidth ratio of each application accessing the SSD, the partition in the partition namespace of the SSD corresponding to the to-be-allocated flash memory super block is allocated to each application, so that each application, based on the allocated partition of the partition namespace of the SSD, writes data to the storage unit in the to-be-allocated flash memory super block.
[0008] According to a solid state drive (SSD) management method provided by the present invention, the activation condition of the flash memory super block to be allocated is: the amount of writable data in the flash memory super block currently allocated in the SSD has been exhausted; the determination of 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 memory super blocks with written data on the SSD to obtain a first value; calculating the sum of the write bandwidth ratios of all applications accessing the SSD on multiple flash memory super blocks with written data on the SSD to obtain a second value; and obtaining the expected bandwidth ratio of the application according to 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 flash memory super block to be allocated is: the SSD is powered on for the first time; the determination of the expected bandwidth ratio of each application accessing the SSD includes: according to the number of all applications accessing the SSD, the write bandwidth of the flash memory super block to be allocated is evenly distributed to obtain 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 also includes: determining and recording the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash memory super block; in response to any application consuming the writable data volume of the partition namespace of the SSD allocated to it, determining the target partition from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash memory super block according to the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash memory super block; and allocating the target partition to the application so that the application shares the writable data volume of the target partition with the application that has 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 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.
[0012] The present invention also provides a solid state drive (SSD) management device, comprising the following modules: A determination module is used to determine the expected bandwidth ratio of each application accessing the SSD in response to satisfying the activation condition of the to-be-allocated flash memory super block; wherein the expected bandwidth ratio is a preset ratio of the write bandwidth of the application to the to-be-allocated flash memory super block to the total write bandwidth of the to-be-allocated flash memory super block, and the flash memory super block is a collection of multiple continuous flash memory blocks; an allocation module is used to allocate the partition in the partition namespace of the SSD corresponding to the to-be-allocated flash memory super block to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application can write data into the storage unit in the to-be-allocated flash memory super block based on the allocated partition of the partition namespace of the SSD.
[0013] The present invention also provides a solid state drive (SSD), wherein the SSD comprises an SSD controller and a storage medium; wherein the SSD controller is used to execute a computer program to implement any of the solid state drive (SSD) management methods described above.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any of the above-mentioned solid state drive (SSD) management methods is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the solid-state hard disk (SSD) management method described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the solid state drive (SSD) management method described above is implemented.
[0017] The solid state drive (SSD) management method, device, and solid state drive (SSD) provided by the present invention determine the expected bandwidth ratio of each application accessing the SSD when the activation conditions of the flash memory super block to be allocated are met; according to the expected bandwidth ratio of each application accessing the SSD, the partition in the partition namespace of the SSD corresponding to the flash memory super block to be allocated is allocated to each application. Thus, a reasonable amount of storage resources can be allocated to each application using the expected bandwidth ratio. Multiple applications share the same flash memory super block and can write data in parallel, thereby improving the parallel write efficiency of the flash memory. Since the data of multiple applications can be written in parallel, the overall write bandwidth of the flash memory super block can be significantly improved compared to a single application monopolizing the flash memory super block. Thus, the write bandwidth of the ZNS SSD can be effectively increased, and the write efficiency of the ZNS SSD can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flow chart of the solid state drive (SSD) management method provided by the present invention.
[0020] Figure 2 It is a flowchart of a method for determining an expected bandwidth ratio of an application program accessing an SSD provided by the present invention.
[0021] Figure 3 It is a flow chart of the method for dynamically adjusting the write bandwidth ratio of an application program provided by the present invention.
[0022] Figure 4 It is a schematic diagram of the partition namespace of the solid state drive SSD provided by the present invention.
[0023] Figure 5 It is a schematic diagram of the process of solid state drive (SSD) management provided by the present invention.
[0024] Figure 6 It is a structural schematic diagram of the solid state drive (SSD) management device provided by the present invention.
[0025] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0027] Combine the following Figure 1-Figure 5 The solid state drive (SSD) management method of the present invention is described.
[0028] Figure 1 is a flow chart of a solid state drive (SSD) management method provided by the present invention, which is executed by firmware stored in the SSD. Figure 1 As shown, the method includes the following: Step 101: In response to satisfying an activation condition of a flash super block to be allocated, determining an expected bandwidth ratio of each application program accessing an SSD.
[0029] A flash memory super block is a collection of multiple continuous flash memory blocks. In the embodiment provided by the invention, flash memory resources are allocated based on the flash memory super block. In the specific implementation process, a flash memory block in a flash memory super block is allocated to all applications at a time until the writable data amount of the currently allocated flash memory super block is consumed, and the next adjacent flash memory super block is used as the flash memory super block to be allocated to allocate storage resources.
[0030] The expected bandwidth ratio is a preset ratio of the application's write bandwidth for the flash super block to be allocated to the total write bandwidth of the flash super block to be allocated. The write bandwidth of the flash super block to be allocated refers to the amount of data that can be written to the flash super block to be allocated per unit time.
[0031] The activation conditions of the flash memory super block to be allocated include: the SSD is powered on for the first time, or the writable data amount of the flash memory super block currently allocated in the SSD is exhausted.
[0032] In a specific implementation process, the expected bandwidth ratio of each application program accessing the SSD may be determined in a variety of ways, so that each application program can perform a parallel write operation on the SSD according to its own expected bandwidth ratio.
[0033] In some embodiments, the activation condition of the flash memory super block 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 in the following way: according to the number of all applications accessing the SSD, the write bandwidth of the flash memory super block to be allocated is evenly distributed to obtain the expected bandwidth ratio of each application accessing the SSD.
[0034] In a specific implementation process, the firmware running in the SSD can obtain the number of application programs accessing itself through communication with the upper layer.
[0035] As an example, there are four applications accessing the SSD. When the SSD is powered on for the first time, the expected bandwidth ratio of each application is: (1)
[0036] in, is the expected bandwidth ratio of the ith application.
[0037] In some embodiments, the activation condition of the flash super block to be allocated is that the amount of writable data in the currently allocated flash super block in the SSD has been exhausted. For an embodiment of determining the expected bandwidth ratio of each application accessing the SSD in this case, see Figure 2 The relevant content in will not be repeated here.
[0038] Step 102: According to the expected bandwidth ratio of each application accessing the SSD, a partition in the partition namespace of the SSD corresponding to the flash super block to be allocated is allocated to each application, so that each application can write data to the storage unit in the flash super block to be allocated based on the partition of the partition namespace of the allocated SSD.
[0039] The storage unit in the to-be-allocated flash memory super block may be composed of one or more flash memory blocks, and is not limited by the description in this specification.
[0040] In the specific implementation process, in order to realize the basic functions of ZNS SSD, SSD needs to map the flash block structure into a logical Zone structure according to the flash structure.
[0041] In some embodiments, the storage unit is a flash memory block; the partition namespace of the SSD can be obtained by 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. Figure 4 As shown, a flash super block (any one of SBLK0~SBLK M-1) corresponds to n partitions (Zones) distributed continuously in the partition namespace, and each partition is associated with a flash block in the flash super block.
[0042] Different from the ZNS SSD that divides zones at a coarse granularity (such as by flash super block), the present invention divides zones by flash blocks. Each flash block is mapped to a zone, realizing fine-grained zone management, so that the zones in the partition namespace can be more flexibly allocated and dynamically adjusted according to the amount of data written by the application.
[0043] In the specific implementation process, the firmware can record the partition namespace structure information of the SSD so that the Zone in the partition namespace can be allocated and dynamically adjusted according to the recorded information. The partition namespace structure information of the SSD that the firmware needs to record includes: the valid data starting address PBA on the Zone, the number of valid data, the Zone opening time, the application number corresponding to the Zone, and other related information.
[0044] In a specific implementation process, the flash blocks in the flash super block may be allocated to each application program through the following formula.
[0045] (2)
[0046] in, To allocate to i The number of flash blocks per application, For the i The expected bandwidth ratio of each application; It is the number of storage units that can be executed in parallel in the flash super block, that is, the number of flash blocks contained in the flash super block.
[0047] In the specific implementation process, if the number of applications , then the value calculated by formula (2) will appear In the case of fine-grained zone allocation, compared with the coarse-grained zone allocation method, the embodiment provided by the present invention is The probability of this will be reduced, and the parallelization efficiency of the flash super block can be effectively improved.
[0048] In the specific implementation process, after the partition in the partition namespace of the SSD corresponding to the flash super block to be allocated is allocated 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 flash super block to be allocated based on the partition of the partition namespace of the allocated SSD.
[0049] As an example only, when application A needs to write data, the data will be sent to its corresponding partition through the SSD interface. The SSD firmware will write the data to the storage unit in the flash super block assigned to application A. Since the write operation within the flash super block is sequential, it helps application A write data efficiently and reduces the impact of write amplification on the life of the SSD. Similarly, applications B and C will 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 be idle, effectively avoiding the occurrence of write pointer contention.
[0050] Figure 2 is a flow chart of a method for determining an expected bandwidth ratio of an application program accessing an SSD provided by the present invention, such as Figure 2 As shown, the method includes the following: Step 201: Calculate the sum of the write bandwidth ratios of the application program on a plurality of flash memory super blocks of the SSD to which data has been written, and obtain a first value.
[0051] In the specific implementation process, the firmware records the write bandwidth of each application in each flash super block. When a new flash super block is activated, the first value of each application can be obtained according to the sum of the write bandwidth ratios of each application in the first n flash super blocks to which data has been written. If the number m of flash super blocks to which data has been written is less than n, the first value of each application is obtained according to the sum of the write bandwidth ratios of each application in the first m flash super blocks to which data has been written.
[0052] Step 202: Calculate the sum of the write bandwidth ratios of all applications accessing the SSD on multiple flash memory super blocks of the SSD to which data has been written, to obtain a second value.
[0053] When a new flash super block is activated, the second value can be obtained according to the sum of the write bandwidth ratios of all recorded applications in the first n flash super blocks to which data has been written. If the number m of flash super blocks to which data has been written is less than n, the second value is obtained according to the sum of the write bandwidth ratios of all recorded applications in the first m flash super blocks to which data has been written.
[0054] Step 203: Obtain an expected bandwidth ratio of the application program according to the ratio between the first value and the second value.
[0055] Steps 201 to 203 can be expressed using the following formula.
[0056] (3)
[0057] in, For the jth application in i Write bandwidth on each Flash Super Block; The number of applications accessing the SSD; is the number of flash super blocks in the SSD; For the j The expected bandwidth ratio of each application; is the first value; is the second value.
[0058] In the embodiment provided by the present invention, the sum of the write bandwidth ratios of the application on multiple flash super blocks with written data of the SSD is calculated to obtain a first value; the sum of the write bandwidth ratios of all applications accessing the SSD on these flash super blocks with written data is calculated to obtain a second value; and the expected bandwidth ratio of the application is calculated based on the ratio between the first value and the second value. The expected bandwidth ratio can truly reflect the proportion of the application's write demand on the SSD relative to the total write demand of all applications. Using the expected bandwidth ratio, the firmware can dynamically allocate different numbers of zones to the application, ensuring that applications with larger write demands can obtain more zone resources to meet their high write bandwidth requirements. As a result, the various storage units in the flash super block can be used more evenly, avoiding the situation where some storage units are overused while other storage units are idle.
[0059] In the specific implementation process, a new flash super block will be activated and allocated only after the writable data volume of the currently allocated flash super block is consumed. The actual data write volume of each application may not be consistent with the expected bandwidth ratio. When an application has consumed the writable data volume allocated to it, but the writable data volume of the currently allocated flash super block has not been consumed, the following can be used: Figure 3 The method shown dynamically allocates free storage units in the currently allocated flash super block to the application.
[0060] Figure 3 FIG. 1 is a flow chart of a method for dynamically adjusting the write bandwidth ratio of an application program provided by the present invention. Figure 3 As shown, the method includes the following: Step 301: Determine and record the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash super block.
[0061] Each zone has a preset writable data volume in the initial state, namely DFC (Data Flash Capacity). As the application continues to perform write operations, the writable data volume will gradually be consumed. For each zone corresponding to the currently allocated flash super block in the open state, the firmware can record in detail the current written data volume (VDFC, Variable Data Flash Capacity). Data consumption ratio of the i-th zone , can be calculated using the following formula.
[0062] (4)
[0063] in, For the i The amount of data currently written to a Zone; For the i The amount of data that can be written to a Zone.
[0064] Step 302, in response to any application consuming the amount of 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 memory super block based on the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash memory super block.
[0065] In the specific implementation process, when an application consumes its allocated Zone resources, the firmware sorts the idleness 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 super block, and selects the Zone with the highest idleness (i.e., the Zone with the lowest data consumption ratio) as the target partition from the partitions in the partition namespace of the SSD corresponding to the currently allocated flash super block.
[0066] Step 303: Allocate the target partition to the application so that the application shares the writable data volume of the target partition with the application that has used the target partition.
[0067] In a specific implementation process, after the target partition is allocated to an application, the application shares the writable data volume of the target partition with the application that has used the target partition.
[0068] In the embodiments provided by the present invention, Figure 5As shown, the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash super block is determined and recorded, providing real-time monitoring of the storage resource usage of the flash super block, so as to optimize the allocation of the storage resources of the flash super block in the future; when any application consumes the writable data volume of the partition namespace of the SSD allocated to it, according to the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash super block, the target partition is determined from the partitions of the partition namespace of the SSD corresponding to the currently allocated flash super block; the target partition is allocated to the application, so that the application and the application that has used the target partition share the writable data volume of the target partition. Thus, the writing efficiency of the ZNS SSD can be effectively improved.
[0069] The solid state drive SSD management device provided by the present invention is described below. The solid state drive SSD management device described below and the solid state drive SSD management method described above can be referenced to each other.
[0070] Figure 6 Schematic diagram of the structure of the solid state drive SSD management device provided by the present invention. Figure 6 As shown, the device 600 includes the following modules.
[0071] A determination module 610 is used to determine the expected bandwidth ratio of each application accessing the SSD in response to satisfying the activation condition of the flash memory super block to be allocated; wherein the expected bandwidth ratio is a preset ratio of the write bandwidth of the application to the flash memory super block to the total write bandwidth of the flash memory super block to be allocated, and the flash memory super block is a collection of multiple consecutive flash memory blocks.
[0072] The allocation module 620 is used to allocate the partition in the partition namespace of the SSD corresponding to the to-be-allocated flash memory super block to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application can write data into the storage unit in the to-be-allocated flash memory super block based on the allocated partition of the partition namespace of the SSD.
[0073] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the solid state drive SSD management method, the method comprising: in response to satisfying the activation condition of the flash memory super block to be allocated, determining the expected bandwidth ratio of each application accessing the SSD; wherein the expected bandwidth ratio is a preset ratio of the write bandwidth of the application for the flash memory super block to be allocated to the total write bandwidth of the flash memory super block to be allocated, and the flash memory super block is a collection of multiple continuous flash memory blocks; according to the expected bandwidth ratio of each application accessing the SSD, the partition in the partition namespace of the SSD corresponding to the flash memory super block to be allocated is allocated to each application, so that each application, based on the allocated partition of the partition namespace of the SSD, writes data to the storage unit in the flash memory super block to be allocated.
[0074] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0075] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the solid-state drive (SSD) management method provided by the above-mentioned methods, the method including: in response to satisfying the activation condition of the flash memory super block to be allocated, determining the expected bandwidth ratio of each application accessing the SSD; wherein the expected bandwidth ratio is a preset ratio of the write bandwidth of the application for the flash memory super block to be allocated to the total write bandwidth of the flash memory super block to be allocated, and the flash memory super block is a collection of multiple continuous flash memory blocks; according to the expected bandwidth ratio of each application accessing the SSD, the partition in the partition namespace of the SSD corresponding to the flash memory super block to be allocated is allocated to each application, so that each application, based on the partition of the partition namespace of the SSD to which it is allocated, writes data to the storage unit in the flash memory super block to be allocated.
[0076] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the solid-state drive (SSD) management method provided by the above-mentioned methods, the method comprising: in response to satisfying the activation condition of the flash memory super block to be allocated, determining the expected bandwidth ratio of each application accessing the SSD; wherein the expected bandwidth ratio is a preset ratio of the write bandwidth of the application for the flash memory super block to be allocated to the total write bandwidth of the flash memory super block to be allocated, and the flash memory super block is a collection of multiple continuous flash memory blocks; according to the expected bandwidth ratio of each application accessing the SSD, the partition in the partition namespace of the SSD corresponding to the flash memory super block to be allocated is allocated to each application, so that each application, based on the partition of the partition namespace of the SSD to which it is allocated, writes data to the storage unit in the flash memory super block to be allocated.
[0077] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 satisfying an activation condition of a flash memory super block to be allocated, determining an expected bandwidth ratio of each application program accessing the SSD; wherein the expected bandwidth ratio is a preset ratio of a write bandwidth of the application program to the flash memory super block to a total write bandwidth of the flash memory super block to be allocated, and the flash memory super block is a collection of multiple continuous flash memory blocks; According to the expected bandwidth ratio of each application accessing the SSD, the partition in the partition namespace of the SSD corresponding to the to-be-allocated flash super block is allocated to each application, so that each application writes data to the storage unit in the to-be-allocated flash super block based on the allocated partition of the partition namespace of the SSD.
2. The solid state drive (SSD) management method according to claim 1, characterized in that: The activation condition of the to-be-allocated flash memory super block is: the amount of writable data of the currently allocated flash memory super block in the SSD has been exhausted; The determining of the expected bandwidth ratio of each application program accessing the SSD includes: For each application, perform the following operations: Calculating a sum of write bandwidth ratios of the application on a plurality of flash super blocks of the SSD to which data has been written, to obtain a first value; Calculating the sum of write bandwidth ratios of all applications accessing the SSD on multiple flash memory super blocks of the SSD to which data has been written, to obtain a second value; An expected bandwidth ratio of the application is obtained according to the ratio between the first value and the second value.
3. The solid state drive (SSD) management method according to claim 1, characterized in that: The activation condition of the flash memory super block to be allocated is: the SSD is powered on for the first time; The determining of the expected bandwidth ratio of each application program accessing the SSD includes: The write bandwidth of the to-be-allocated flash memory super block is evenly distributed according to the number of all applications accessing the SSD, so as to obtain an expected bandwidth ratio of each application accessing the SSD.
4. The solid state drive (SSD) management method according to claim 2 or 3, characterized in that: The method further comprises: Determine and record the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash super block; In response to any application consuming the writable data amount of 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 super block according to the data consumption ratio of each partition of the partition namespace of the SSD corresponding to the currently allocated flash super block; The target partition is allocated to the application so that the application shares the writable data volume of the target partition with an application that has used the target partition.
5. The solid state drive (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 by: 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.
6. A solid state drive (SSD) management device, characterized in that: include: A determination module, configured to determine an expected bandwidth ratio of each application program accessing the SSD in response to satisfying an activation condition of a flash memory super block to be allocated; wherein the expected bandwidth ratio is a preset ratio of a write bandwidth of the application program to the flash memory super block to a total write bandwidth of the flash memory super block to be allocated, and the flash memory super block is a collection of multiple continuous flash memory blocks; An allocation module is used to allocate a partition in the partition namespace of the SSD corresponding to the to-be-allocated flash memory super block to each application according to the expected bandwidth ratio of each application accessing the SSD, so that each application can write data into a storage unit in the to-be-allocated flash memory super block based on the allocated partition of the partition namespace of the SSD.
7. 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 claimed in any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the solid state drive (SSD) management method according to any one of claims 1 to 5 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the solid state drive (SSD) management method according to any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the solid state drive (SSD) management method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Data processing method and electronic device based on solid state disk (SSD)
CN103677653A
Data processing method, solid state disk and computer equipment
CN109992536A
Total bandwidth test method and device based on solid state disk and computer device
CN110347540A
Bandwidth control method and storage device
CN116755877A
Configuration method of solid state disk, solid state disk and partition storage method
CN117130553A