Method, device, computer equipment and storage medium for improving SSD write performance
By allocating a dedicated Meta tablespace to the SSD block and updating management information only on the homepage, the problem of excessively long writing operation time per page in the prior art is solved, and the writing performance is improved.
Patent Information
- Application Number
- CN202111637912.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the prior art, the FTL module of SSD needs to dynamically apply for SRAM space for each page address when processing write operations, resulting in an increase in write operation time and reducing write performance.
During the initialization process, a special meta table space is allocated for each block. The block attributes and data version information are updated only when writing operations are performed on the block's homepage, and the index number is recorded. Other pages only need to read the index number to reduce the time to configure management information for each page.
By reducing the write operation time of each block, the write performance of SSD is improved.
Smart Images

Figure CN114242147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of SSD write performance technology, and in particular to a method, device, computer equipment, and storage medium for improving SSD write performance. Background Art
[0002] The current SSD FTL (Flash Translation Layer) module handles write operations as follows: After receiving a write command from the front-end, the FTL module first allocates a block address and page address for each write point. Then, for each page address in the current block, it dynamically allocates a block of SRAM space to store the data management information required for the write operation. The FTL then updates the data management information with information such as the block attributes, data version information, and the LPA (logical address) of the currently written data. Finally, it issues a control command containing the data management information address to the back-end NFC module. The above FTL processing of the management information metadata required for write operations indicates that each page of each block write operation must be properly configured. In actual testing, configuring the management information for each page took 500 CPU cycles. This increases the time it takes the FTL module to process write commands and reduces the efficiency of sending write commands to the back-end, thus affecting write performance. Summary of the Invention
[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method, apparatus, computer equipment, and storage medium for improving SSD write performance.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] The method for improving SSD write performance includes the following steps:
[0006] Get the cmd write command issued by the front end;
[0007] Generate a write control command based on the cmd write command and record the hw_index information contained in the cmd write command;
[0008] Allocate a write point including a block address and a page address, and record the write point in a write control command;
[0009] Determine whether the write point page address is the first page of the current block;
[0010] If so, update the block attribute information of the current block and update the data version information of the written data;
[0011] Specify the Meta table according to the block attribute information and data version information, and save the index number of the Meta table into SRAM;
[0012] Write block attribute information and data version information into the Meta table;
[0013] Write the index number of the Meta table into the write control command;
[0014] Send the write control command to the back-end NFC module.
[0015] Its further technical solution is: after the step of determining whether the write point page address is the first page of the current block, it also includes: if not, reading the index number of the Meta table stored in the SRAM, and then jumping to execute and writing the index number of the Meta table into the write control command.
[0016] A further technical solution is: the Meta table refers to a space allocated during the initialization process specifically for storing data management information Meta.
[0017] A further technical solution thereof is: after the step of sending the write control command to the back-end NFC module, the method further comprises:
[0018] Receive the write control command and read the LPA information stored in NVME according to the hw_index information in the write control command;
[0019] Find the corresponding Meta table according to the index number of the Meta table and fill the LPA information into the Meta table;
[0020] Configure the hardware descriptor information of the write operation command according to the Meta table;
[0021] Execute the write operation command and fill the execution result back into the hardware descriptor information.
[0022] A device for improving SSD write performance includes: an acquisition unit, a record generation unit, a write allocation unit, a judgment unit, an update unit, a designated storage unit, a first write unit, a second write unit, and a sending unit;
[0023] The acquisition unit is used to acquire the cmd write command issued by the front end;
[0024] The generating and recording unit is used to generate a write control command according to the cmd write command, and record the hw_index information contained in the cmd write command;
[0025] The allocation write unit is used to allocate a write point including a block address and a page address, and record the write point into the write control command;
[0026] The judging unit is used to judge whether the page address of the write point is the first page of the current block;
[0027] The updating unit is used to update the block attribute information of the current block and update the data version information of the written data;
[0028] The designated storage unit is used to designate a Meta table according to the block attribute information and the data version information, and save the index number of the Meta table into the SRAM;
[0029] The first writing unit is used to write block attribute information and data version information into the Meta table;
[0030] The second writing unit is configured to write the index number of the Meta table into the write control command;
[0031] The sending unit is used to send the write control command to the back-end NFC module.
[0032] Its further technical solution is: it also includes: a read jump unit, which is used to read the index number of the Meta table stored in the SRAM, and then jump to execute and write the index number of the Meta table into the write control command.
[0033] A further technical solution is: the Meta table refers to a space allocated during the initialization process specifically for storing data management information Meta.
[0034] Its further technical solution is: further comprising: a receiving and reading unit, a finding and filling unit, a configuration unit and an execution backfilling unit;
[0035] The receiving and reading unit is used to receive a write control command and read the LPA information stored in the NVME according to the hw_index information in the write control command;
[0036] The finding and filling unit is used to find the corresponding Meta table according to the index number of the Meta table and fill the LPA information into the Meta table;
[0037] The configuration unit is used to configure hardware descriptor information of the write operation command according to the Meta table;
[0038] The execution backfill unit is used to execute the write operation command and backfill the execution result into the hardware descriptor information.
[0039] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the method for improving SSD write performance as described above is implemented.
[0040] A storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions can implement the method for improving SSD write performance as described above.
[0041] Compared with the prior art, the present invention has the following advantages: for the write operation of the entire block, the time required for configuring Meta information for each page is saved, thereby effectively improving the write performance of the SSD.
[0042] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 Schematic diagram of the process of improving SSD write performance provided by the embodiment of the present invention Figure 1 ;
[0045] Figure 2 Schematic diagram of the process of improving SSD write performance provided by the embodiment of the present invention Figure 2 ;
[0046] Figure 3 Schematic diagram of a device for improving SSD write performance provided by an embodiment of the present invention Figure 1 ;
[0047] Figure 4 Schematic diagram of a device for improving SSD write performance provided by an embodiment of the present invention Figure 2 ;
[0048] Figure 5 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0050] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0051] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0052] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0053] See also Figures 1 to 5 The specific embodiment shown, wherein see Figures 1 to 2 As shown, the present invention discloses a method for improving SSD write performance, comprising the following steps:
[0054] S1, obtain the cmd write command issued by the front end;
[0055] In this embodiment, the FTL module receives and obtains the cmd write command issued by the front end.
[0056] S2, generates a write control command according to the cmd write command, and records the hw_index information contained in the cmd write command;
[0057] In this embodiment, the FTL module generates a write control command according to the cmd write command, and records the hw_index information included in the cmd write command into the write control command.
[0058] S3, allocating a write point including a block address and a page address, and recording the write point in a write control command;
[0059] In this embodiment, a write point including a block address and a page address is allocated through the FTL module.
[0060] S4, determine whether the write point page address is the first page of the current block; if not, read the index number of the Meta table stored in the SRAM, and then jump to execute step S8.
[0061] S5: If yes, update the block attribute information of the current block and update the data version information of the written data;
[0062] In this embodiment, the block attribute information of the current block and the data version information of the written data are updated through the FTL module.
[0063] S6, specifying a Meta table according to the block attribute information and the data version information, and saving the index number of the Meta table to the SRAM;
[0064] In this embodiment, the FTL module specifies the Meta table according to the block attribute information and the data version information, and saves the index number of the Meta table into the SRAM.
[0065] S7, write the block attribute information and data version information into the Meta table;
[0066] In this embodiment, the FTL module writes the block attribute information and data version information into the Meta table.
[0067] S8, write the index number of the Meta table into the write control command;
[0068] S9, sending the write control command to the back-end NFC module.
[0069] In this embodiment, the Meta table refers to a space allocated during the initialization process and specifically used to store data management information Meta.
[0070] After step S9, the method further includes:
[0071] S10, receive a write control command, and read the LPA information stored in NVME according to the hw_index information in the write control command;
[0072] In this embodiment, the NFC module receives the write control command and reads the LPA information stored in the NVME according to the hw_index information in the write control command.
[0073] S11, find the corresponding Meta table according to the index number of the Meta table, and fill the LPA information into the Meta table;
[0074] In this embodiment, the NFC module finds the corresponding Meta table according to the index number of the Meta table and fills the LPA information into the Meta table.
[0075] S12, configuring hardware descriptor information of the write operation command according to the Meta table;
[0076] S13, execute the write operation command, and fill the execution result back into the hardware descriptor information.
[0077] After the FTL module receives a write control command and assigns the block address and page address of the write point for each write operation, when processing write data management information, it no longer dynamically allocates a section of SRAM space for each page of the current block and configures management information such as block attributes, data version information, and LPA information into this SRAM space. Instead, when writing only to the first page of each block, it specifies a section of space configured during the initialization process to store the data management information Meta table. After configuring the block attributes, data version information, and other information, it records the index number of this section of space into a specific SRAM space. When writing to other pages of the current block, it only needs to read the Meta table index number and pass it as part of the write control command information to the backend NFC module. After the backend NFC module reads the write control command information, the hardware automatically finds the corresponding storage management information space based on the Meta table index number and updates the LPA information stored in the NVME module to the Meta table, thus completing the configuration of the entire management information. When updating the LPA information in the Meta table, the FTL software no longer updates the value, but the NFC hardware automatically updates it based on the control command information. This allows the time to configure the Meta management information for the entire block write operation to be negligible, thus reducing the processing time of the FTL module and effectively improving write performance.
[0078] See also Figures 3 and 4 As shown, the present invention also discloses a device for improving SSD write performance, comprising: an acquisition unit 10, a record generation unit 20, an allocation write unit 30, a judgment unit 40, an update unit 50, a designated storage unit 60, a first write unit 70, a second write unit 80 and a sending unit 90;
[0079] The acquisition unit 10 is used to acquire the cmd write command issued by the front end;
[0080] The generating and recording unit 20 is configured to generate a write control command according to the cmd write command and record the hw_index information contained in the cmd write command;
[0081] The allocation write unit 30 is used to allocate a write point including a block address and a page address, and record the write point into the write control command;
[0082] The judging unit 40 is used to judge whether the page address of the write point is the first page of the current block;
[0083] The updating unit 50 is used to update the block attribute information of the current block and update the data version information of the written data;
[0084] The designated storage unit 60 is used to designate a Meta table according to the block attribute information and the data version information, and save the index number of the Meta table into the SRAM;
[0085] The first writing unit 70 is used to write block attribute information and data version information into the Meta table;
[0086] The second writing unit 80 is configured to write the index number of the Meta table into the write control command;
[0087] The sending unit 90 is used to send the write control command to the back-end NFC module.
[0088] The device further includes: a read jump unit, which is used to read the index number of the Meta table stored in the SRAM, and then jump to execute and write the index number of the Meta table into the write control command.
[0089] The Meta table refers to a space allocated during the initialization process specifically for storing data management information Meta.
[0090] The device further includes: a receiving and reading unit 100, a finding and filling unit 110, a configuration unit 120 and an execution backfilling unit 130;
[0091] The receiving and reading unit 100 is used to receive a write control command and read the LPA information stored in the NVME according to the hw_index information in the write control command;
[0092] The finding and filling unit 110 is used to find the corresponding Meta table according to the index number of the Meta table and fill the LPA information into the Meta table;
[0093] The configuration unit 120 is configured to configure hardware descriptor information of the write operation command according to the Meta table;
[0094] The execution backfill unit 130 is used to execute the write operation command and backfill the execution result into the hardware descriptor information.
[0095] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned device for improving SSD write performance and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of the description, it will not be repeated here.
[0096] The above-mentioned device for improving the write performance of SSD can be implemented in the form of a computer program. The computer program can be used in the following ways: Figure 5 Runs on the computer device shown.
[0097] See also Figure 5 , Figure 5 This is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 can be a terminal or a server. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, personal digital assistant, wearable device, or other electronic device with communication capabilities. The server can be a standalone server or a server cluster consisting of multiple servers.
[0098] See Figure 5 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0099] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can cause the processor 502 to execute a method for improving SSD write performance.
[0100] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0101] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for improving the write performance of the SSD.
[0102] The network interface 505 is used to communicate with other devices through the network. Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0103] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0104] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0105] Therefore, the present invention further provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions, and when executed by a processor, the program instructions can implement the above-mentioned method for improving SSD write performance.
[0106] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0107] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0108] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0109] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0110] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or 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 a number of instructions for causing a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0111] The above embodiments are preferred implementation schemes of the present invention. In addition, the present invention can also be implemented in other ways. Any obvious replacement without departing from the concept of the present technical solution is within the scope of protection of the present invention.
Claims
1. A method for improving SSD write performance, characterized in that: The following steps are involved: Get the cmd write command issued by the front end; Generate a write control command based on the cmd write command and record the hw_index information contained in the cmd write command; Allocate a write point including a block address and a page address, and record the write point in a write control command; Determine whether the write point page address is the first page of the current block; If so, update the block attribute information of the current block and update the data version information of the written data; Specify the Meta table according to the block attribute information and data version information, and save the index number of the Meta table into SRAM; Write block attribute information and data version information into the Meta table; Write the index number of the Meta table into the write control command; Send the write control command to the back-end NFC module; The Meta table refers to a space allocated during the initialization process specifically for storing data management information Meta.
2. The method for improving SSD write performance according to claim 1, wherein: After the step of determining whether the write point page address is the first page of the current block, the method further includes: if not, reading the index number of the Meta table stored in the SRAM, and then jumping to execute writing the index number of the Meta table into the write control command.
3. The method for improving SSD write performance according to claim 1, wherein: After the step of sending the write control command to the back-end NFC module, the method further includes: Receive the write control command and read the LPA information stored in NVME according to the hw_index information in the write control command; Find the corresponding Meta table according to the index number of the Meta table and fill the LPA information into the Meta table; Configure the hardware descriptor information of the write operation command according to the Meta table; Execute the write operation command and fill the execution result back into the hardware descriptor information.
4. A device for improving SSD write performance, characterized in that: include: An acquisition unit, a record generation unit, an allocation and writing unit, a judgment unit, an update unit, a designated storage unit, a first writing unit, a second writing unit, and a sending unit; The acquisition unit is used to acquire the cmd write command issued by the front end; The generating and recording unit is used to generate a write control command according to the cmd write command, and record the hw_index information contained in the cmd write command; The allocation write unit is used to allocate a write point including a block address and a page address, and record the write point into the write control command; The judging unit is used to judge whether the page address of the write point is the first page of the current block; The updating unit is used to update the block attribute information of the current block and update the data version information of the written data; The designated storage unit is used to designate a Meta table according to the block attribute information and the data version information, and save the index number of the Meta table into the SRAM; The first writing unit is used to write block attribute information and data version information into the Meta table; The second writing unit is configured to write the index number of the Meta table into the write control command; The sending unit is used to send the write control command to the back-end NFC module; The Meta table refers to a space allocated during the initialization process specifically for storing data management information Meta.
5. The device for improving SSD write performance according to claim 4, wherein: Also includes: The read jump unit is used to read the index number of the Meta table stored in the SRAM, and then jump to execute and write the index number of the Meta table into the write control command.
6. The device for improving SSD write performance according to claim 4, wherein: Also includes: Receive the read unit, find the fill unit, configure the unit and execute the backfill unit; The receiving and reading unit is used to receive a write control command and read the LPA information stored in the NVME according to the hw_index information in the write control command; The finding and filling unit is used to find the corresponding Meta table according to the index number of the Meta table and fill the LPA information into the Meta table; The configuration unit is used to configure hardware descriptor information of the write operation command according to the Meta table; The execution backfill unit is used to execute the write operation command and backfill the execution result into the hardware descriptor information.
7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method for improving SSD write performance according to any one of claims 1 to 3 when executing the computer program.
8. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the method for improving SSD write performance according to any one of claims 1 to 3 can be implemented.
Citation Information
Patent Citations
Metadata storage management method and device for solid state disk, equipment and storage medium
CN110673789A
Solid state disk and read-write method thereof
CN112230855A