FTL dynamic load balancing method

By adopting the FTL dynamic load balancing method in SSD to count and warn message loads, the problem of uneven message processing in NAND Flash SSD is solved and I/O performance is improved.

CN119336272APending Publication Date: 2025-01-21SHANDONG SINOCHIP SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411708821.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In SSD based on NAND Flash, due to the different granularity of read, write and erase operations, the message processing is unbalanced, causing message blockage on the lun, seriously affecting the I/O performance of the SSD.

Method used

An FTL dynamic load balancing method is adopted. Through the message management linked list module and the message distribution module, the message load of each lun is counted, early warning and load balancing processing are triggered to ensure the balance of the message load.

Benefits of technology

A balanced processing of the message load on the LUN, improving the SSD's I/O performance, and optimizing the Lun load imbalance problem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336272A_ABST
    Figure CN119336272A_ABST
Patent Text Reader

Abstract

An FTL dynamic load balancing method relates to the technical field of load balancing, and is characterized in that a message processed by an FTL enters a message management linked list module, and the message management linked list module sends a new message to a message distribution module; the message distribution module updates a new message statistical weight of each lumn and carries out load early warning; if in the load early warning state, triggering load balancing; and if the message is not in the load early warning state, load balancing processing is not carried out, so that balancing processing of the message load on the lun is realized, and the I / O performance of the SSD is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load balancing, and in particular to a FTL dynamic load balancing method. Background Art

[0002] With the rapid development of Internet technology, human society has entered an era of big data where the amount of data is exponentially growing. The advent of the big data era requires more support from storage technology, and various big data applications have posed greater challenges to the performance and reliability of storage systems. With the emergence and widespread use of NAND Flash, SSDs based on NAND Flash have become a hot spot in the storage field due to their higher reliability, better performance, and lower energy consumption.

[0003] Due to the characteristics of NAND, the processing granularity of read, write and erase is based on page, wl and block respectively. This determines that the processing time of a read, write and erase message at the back end is different, resulting in imbalance in message processing. To ensure the I / O performance of SSD, FTL usually uses parallel message operation by lun. If there is an imbalance in the message load, it will cause message blocking on lun, seriously affecting the I / O performance of SSD. Summary of the invention

[0004] In order to overcome the deficiencies of the above technologies, the present invention provides a method for realizing balanced processing of message load on LUN and improving the I / O performance of SSD.

[0005] The technical solution adopted by the present invention to overcome the technical problems is: An FTL dynamic load balancing method, comprising: S101. The message processed by FTL enters the message management list module, and the message management list module sends the new message to the message distribution module; S102. The message distribution module updates the statistical weight of new messages for each lun and load warning; S103. If in load warning state, load balancing is triggered; S104: If the system is not in the load warning state, no load balancing processing is performed.

[0006] Furthermore, in step S101, after the front-end NVME protocol layer receives the read and write commands sent by the HOST, it sends the read and write commands to the FTL, and the FTL generates a block erase command during the data writing process.

[0007] Furthermore, in step S101, a message management linked list responsible for managing the read, write and erase messages on the lun is established for each lun, and the FTL hangs the read commands, write commands and erase commands generated during the write operation issued by the front-end NVME protocol layer on the message management linked list for unified sending management.

[0008] Furthermore, the type definition of the new message sent by the message management linked list module in step S101 includes the FTL message type, type definition and type value. When the FTL message type is a write message, its type definition is FTL_WR, and its type value is 1. When the FTL message type is a read message, its type definition is FTL_RD, and its type value is 2. When the FTL message type is an erase message, its type definition is FTL_ERS, and its type value is 3.

[0009] Further, step S102 includes the following steps: S1021. The average time set of different types from the successful sending of FTL to the backend processing to the completion of the backend processing returning to FTL is , ,in The average time from when the FTL message type is a write message and is successfully sent to the backend for processing to when the backend processes the message and returns the completion to FTL. The average time from when the FTL message type is a read message and is successfully sent to the backend for processing to when the backend processes the message and returns the completion to FTL. It is the average time from when the FTL message type is a wipe message and is successfully sent to the backend for processing to when the backend processes and returns the completion to FTL. , , For the The time it takes for a message type to be successfully sent from FTL to the backend for processing and for the backend to return the completion time to FTL. For the The number of times the message type is counted; S1022. When the FTL message type is write message, the message time weight is , the message time weight when the FTL message type is read message is , the message time weight when the FTL message type is a wipe message is , , The time mean set is The minimum value in The time mean set is The maximum value in ; S1023. The message statistics weight on each lun is , count the weights of messages on each lun Update to get the updated message statistical weight ; S1024. Through the formula Calculate the system's message processing capacity per unit time , where Count the weights of the updated messages In time interval The actual change in S1025. Through the formula Calculate the predicted message weight ; S1026. Through the formula Calculate the polling time interval and the backend can process the first Number of message types , where The time for a CPU poll; S1027. Through the formula Calculate the maximum threshold , through the formula Calculate the minimum threshold ,when When the load forecast returns A value of 0 indicates a light load, and new messages can be sent directly to the backend. and When the load forecast returns The value of 1 indicates a load warning and load balancing is required. When the load forecast returns A value of 2 indicates overload, which means no messages of any type are sent.

[0010] Further, in step S1023, when a new message is successfully sent from FTL to the backend, the formula Calculate the updated message statistical weight ; When a new message is returned from the backend to FTL, the formula Calculate the updated message statistical weight .

[0011] Further, step S103 includes the following steps: S1031. Through the formula Calculate the first Comparison value for message types ; S1032. When At the same time, traverse the message management linked list backwards, find the message type that can be sent and put it at the head of the message management linked list.

[0012] Furthermore, in step S104, when the load is predicted to be light load, the new message directly enters the message distribution module to complete the message sending, and when the load is predicted to be overloaded, the message sending of this round is by-passed.

[0013] The beneficial effects of the present invention are: achieving balanced processing of message loads on LUNs and improving the I / O performance of SSDs. Compared with traditional methods, the FTL dynamic load balancing method of the present invention can optimize the LUN load imbalance problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0015] The following is combined with Figure 1 The present invention is further described.

[0016] An FTL dynamic load balancing method, comprising: S101. The message processed by FTL enters the message management linked list module, and the message management linked list module sends the new message to the message distribution module.

[0017] S102. The message distribution module updates the statistical weight of new messages for each lun and issues a load warning.

[0018] S103. If it is in the load warning state, load balancing is triggered.

[0019] S104: If the system is not in the load warning state, no load balancing processing is performed.

[0020] In one embodiment of the present invention, after the front-end NVME protocol layer receives the read and write commands issued by the HOST in step S101, it sends the read and write commands to the FTL. According to the characteristic of NAND that it must "erase before writing", the FTL continuously generates block erase commands during the data writing process.

[0021] In one embodiment of the present invention, in step S101, a message management linked list responsible for managing the read, write and erase messages on each lun is established, and the FTL hangs the read command, write command and erase command generated during the write operation issued by the front-end NVME protocol layer on the message management linked list for unified sending management. The read and write commands issued by the front-end NVME protocol layer to the FTL and the block erase command generated during the data writing process all need to consume bandwidth after being successfully sent to the back-end for processing. The processing granularity of reading, writing and erasing is performed in units of page, wl and block, respectively, which determines that the processing time and bandwidth occupied by the back-end for processing a read, write and erase message are different, so the present invention incorporates all of them into load balancing management.

[0022] In one embodiment of the present invention, the type definition of the new message sent by the message management linked list module in step S101 includes the FTL message type, type definition and type value. When the FTL message type is a write message, its type definition is FTL_WR, and its type value is 1. When the FTL message type is a read message, its type definition is FTL_RD, and its type value is 2. When the FTL message type is an erase message, its type definition is FTL_ERS, and its type value is 3.

[0023] In one embodiment of the present invention, step S102 includes the following steps: S1021. The average time set of different types from the successful sending of FTL to the backend processing to the completion of the backend processing returning to FTL is , ,in The average time from when the FTL message type is a write message and is successfully sent to the backend for processing to when the backend processes the message and returns the completion to FTL. The average time from when the FTL message type is a read message and is successfully sent to the backend for processing to when the backend processes the message and returns the completion to FTL. It is the average time from when the FTL message type is a wipe message and is successfully sent to the backend for processing to when the backend processes and returns the completion to FTL. , , For the The time it takes for a message type to be successfully sent from FTL to the backend for processing and for the backend to return the completion time to FTL. For the The number of times the message type is counted.

[0024] S1022. When the FTL message type is write message, the message time weight is , the message time weight when the FTL message type is read message is , the message time weight when the FTL message type is a wipe message is , , The time mean set is The minimum value in The time mean set is The maximum value in . The message input has a high concurrency feature, and the processing time of the message distribution module must be reduced as much as possible. To this end, the model of the present invention assigns a message time weight to each type of message based on the processing time , use the message statistics weight prediction algorithm to determine the queue status S1023. The message statistics weight on each lun is , count the weights of messages on each lun Update to get the updated message statistical weight .

[0025] S1024. Through the formula Calculate the system's message processing capacity per unit time , where Count the weights of the updated messages In time interval The actual change in .

[0026] S1025. Through the formula Calculate the predicted message weight .

[0027] S1026. Through the formula Calculate the polling time interval and the backend can process the first Number of message types , where The time for one CPU polling.

[0028] S1027. Through the formula Calculate the maximum threshold , through the formula Calculate the minimum threshold ,when When the load forecast returns A value of 0 indicates a light load, and new messages can be sent directly to the backend. and When the load forecast returns The value of 1 indicates a load warning and load balancing is required. When the load forecast returns A value of 2 indicates overload, which means no messages of any type are sent.

[0029] In one embodiment of the present invention, when a new message is successfully sent from the FTL to the backend in step S1023, the formula Calculate the updated message statistical weight ; When a new message is returned from the backend to FTL, the formula Calculate the updated message statistical weight .

[0030] In one embodiment of the present invention, step S103 includes the following steps: S1031. Through the formula Calculate the first Comparison value for message types .

[0031] S1032. When When , it means that the corresponding type of message has been sent. If the next message on the message management linked list does not meet the type, the message management linked list is traversed backwards to find a message of the message type that can be sent and put it at the head of the message management linked list to send the next message.

[0032] In one embodiment of the present invention, in step S104, when the load is predicted to be light load, the new message directly enters the message distribution module to complete the message sending, and when the load is predicted to be overloaded, the current round of message sending is directly by-passed.

[0033] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A FTL dynamic load balancing method, characterized in that: include: S101. The message processed by FTL enters the message management list module, and the message management list module sends the new message to the message distribution module; S102. The message distribution module updates the statistical weight of new messages for each lun and load warning; S103. If in load warning state, load balancing is triggered; S104: If the system is not in the load warning state, no load balancing processing is performed.

2. The FTL dynamic load balancing method according to claim 1, characterized in that: In step S101, after the front-end NVME protocol layer receives the read and write commands sent by the HOST, it sends the read and write commands to the FTL, and the FTL generates a block erase command during the data writing process.

3. The FTL dynamic load balancing method according to claim 2, characterized in that: In step S101, a message management linked list responsible for managing the read, write and erase messages on each lun is established. The FTL hangs the read commands, write commands and erase commands generated during the write operation issued by the front-end NVME protocol layer on the message management linked list for unified sending management.

4. The FTL dynamic load balancing method according to claim 3, characterized in that: The type definition of the new message sent by the message management linked list module in step S101 includes the FTL message type, type definition and type value. When the FTL message type is a write message, its type definition is FTL_WR, and its type value is 1. When the FTL message type is a read message, its type definition is FTL_RD, and its type value is 2. When the FTL message type is an erase message, its type definition is FTL_ERS, and its type value is 3.

5. The FTL dynamic load balancing method according to claim 1, characterized in that: Step S102 includes the following steps: S1021. The average time set of different types from the successful sending of FTL to the backend processing to the completion of the backend processing returning to FTL is , ,in The average time from when the FTL message type is a write message and is successfully sent to the backend for processing to when the backend processes the message and returns the completion to FTL. The average time from when the FTL message type is a read message and is successfully sent to the backend for processing to when the backend processes the message and returns the completion to FTL. It is the average time from when the FTL message type is a wipe message and is successfully sent to the backend for processing to when the backend processes and returns the completion to FTL. , , For the The time it takes for a message type to be successfully sent from FTL to the backend for processing and for the backend to return the completion time to FTL. For the The number of times the message type is counted; S1022. When the FTL message type is write message, the message time weight is , the message time weight when the FTL message type is read message is , the message time weight when the FTL message type is a wipe message is , , The time mean set is The minimum value in The time mean set is The maximum value in ; S1023. The message statistics weight on each lun is , count the weights of messages on each lun Update to get the updated message statistical weight ; S1024. Through the formula Calculate the system's message processing capacity per unit time , where Count the weights of the updated messages In time interval The actual change in S1025. Through the formula Calculate the predicted message weight ; S1026. Through the formula Calculate the polling time interval and the backend can process the Number of message types , where The time for a CPU poll; S1027. Through the formula Calculate the maximum threshold , through the formula Calculate the minimum threshold ,when When the load forecast returns A value of 0 indicates a light load, and new messages can be sent directly to the backend. and When the load forecast returns The value of 1 indicates a load warning and load balancing is required. When the load forecast returns A value of 2 indicates overload, which means no messages of any type are sent.

6. The FTL dynamic load balancing method according to claim 5, characterized in that: In step S1023, when a new message is successfully sent from FTL to the backend, the formula Calculate the updated message statistical weight ; When a new message is returned from the backend to FTL, the formula Calculate the updated message statistical weight .

7. The FTL dynamic load balancing method according to claim 5, characterized in that: Step S103 includes the following steps: S1031. Through the formula Calculate the first Comparison value for message types ; S1032. When At the same time, traverse the message management linked list backwards, find the message type that can be sent and put it at the head of the message management linked list.

8. The FTL dynamic load balancing method according to claim 5, characterized in that: In step S104, when the load is predicted to be light load, the new message directly enters the message distribution module to complete the message sending. When the load is predicted to be overloaded, the message sending of this round is by-passed.