CN-122018806-A - Load balancing method, device, equipment and storage medium
Abstract
The invention discloses a load balancing method, a device, equipment and a storage medium, which relate to the technical field of data processing and are applied to a solid state disk of an enterprise data center, and the method comprises the steps of counting the processing time required by each processing unit for processing a current input and output command based on a nonlinear relation, and determining the current computing power resource based on the counted processing time; the nonlinear relation characterizes the relation between the size of the logical block address corresponding to the input and output command and the corresponding command processing time, a target unit is determined from the processing units according to the current computing power resources, the current cache resources and the current logical address resources corresponding to the corresponding processing units in the solid state disk, and the current input and output command is distributed to the target unit for processing. Therefore, the load pressure of the cache resource and the load pressure of the logic address resource can be considered at the same time, the load balancing can be actively carried out by combining the computational load pressure of the processing unit, the performance of the solid state disk is improved, and the method can be suitable for complex application scenes.
Inventors
- WANG KUN
- ZENG ZHAOGUI
- GUO XIAOLIN
- WANG RUI
- YANG YONGJUN
Assignees
- 山东云海国创云计算装备产业创新中心有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260130
Claims (10)
- 1. The load balancing method is characterized by being applied to a solid state disk of an enterprise-level data center and comprising the following steps of: Counting the processing time required by each processing unit for processing the current input and output command based on a nonlinear relation, and determining the current computing power resource based on the counted processing time; Determining a target unit from each processing unit according to each current computing power resource, and a current cache resource and a current logic address resource corresponding to a corresponding processing unit in the solid state disk; And distributing the current input and output command to the target unit for processing.
- 2. The load balancing method according to claim 1, wherein the generating process of the nonlinear relation includes: Fitting by utilizing the size of the logical block address corresponding to the historical input and output command and the corresponding command processing time to obtain a corresponding fitting curve containing the nonlinear relation; correspondingly, the statistics of the processing time required by each processing unit to process the current input and output command based on the nonlinear relation includes: And determining and counting the processing time required by each processing unit for processing the current input and output command based on the fitted curve.
- 3. The load balancing method according to claim 1, wherein the generating process of the nonlinear relation includes: generating a mapping table containing the nonlinear relation according to the size of the logical block address corresponding to the historical input/output command and the corresponding command processing time; correspondingly, the statistics of the processing time required by each processing unit to process the current input and output command based on the nonlinear relation includes: And searching and counting the processing time required by each processing unit for processing the current input and output command from the mapping table.
- 4. The load balancing method of claim 1, wherein determining the current computing power resource based on the statistically derived processing time comprises: Determining the current working state of each processing unit in the solid state disk; determining the waiting time required by the corresponding processing units for processing the current input and output commands according to the current working states; Calculating the counted processing time and the waiting time corresponding to the relevant processing unit to obtain the total time corresponding to the corresponding processing unit and required for processing the current input and output command; And calculating the total time corresponding to each processing unit by using a pre-imputation force resource calculation formula to obtain the current force resource corresponding to each processing unit.
- 5. The load balancing method according to claim 1, wherein the calculating process of the current cache resource includes: determining a first consumption of cache resources corresponding to any processing unit in the solid state disk; and calculating the ratio of the first consumption to the total resource of the cache resource by using a preset cache resource calculation formula to obtain the current cache resource.
- 6. The load balancing method according to claim 1, wherein the calculation process of the current logical address resource includes: Determining a second consumption of logical address resources corresponding to any processing unit in the solid state disk; and calculating the ratio of the second consumption to the total resource amount of the logic address resource by using a preset logic address resource calculation formula to obtain the current logic address resource.
- 7. The load balancing method according to any one of claims 1 to 6, wherein the determining, from each of the processing units, the target unit according to each of the current computing power resources and the current cache resource and the current logical address resource corresponding to the corresponding processing unit in the solid state disk includes: Calculating the current computing power resource, the current cache resource and the current logic address resource corresponding to any processing unit in the solid state disk based on a preset load pressure calculation formula to obtain each current load pressure corresponding to each processing unit; arbitrating each current load pressure to determine a target unit with the minimum load pressure from each processing unit; The preset load pressure calculation formula comprises a first weight corresponding to the current computing power resource, a second weight corresponding to the current cache resource and a third weight corresponding to the current logic address resource.
- 8. The utility model provides a load balancing device which characterized in that is applied to enterprise data center's solid state disk, includes: The power computing resource determining module is used for counting the processing time required by each processing unit for processing the current input and output command based on a nonlinear relation, and determining the current power computing resource based on the counted processing time; The target unit determining module is used for determining a target unit from the processing units according to the current computing power resources, and the current cache resources and the current logic address resources corresponding to the corresponding processing units in the solid state disk; and the command distribution module is used for distributing the current input and output commands to the target unit for processing.
- 9. An electronic device, comprising: A memory for storing a computer program; processor for executing the computer program to implement the steps of the load balancing method according to any one of claims 1 to 7.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the load balancing method according to any of claims 1 to 7.
Description
Load balancing method, device, equipment and storage medium Technical Field The present invention relates to the field of data processing technologies, and in particular, to a load balancing method, apparatus, device, and storage medium. Background Applications such as AI (ARTIFICIAL INTELLIGENCE) training, data centers, etc. require performance of SSD (Solid state disk) in different IO (Input/Output) scenarios. The function of SSD is the reading and writing of data. When the SSD performs multi-core cooperative processing in a complex application scenario, if load distribution among different cores is unbalanced, the load distribution may cause the consequences of low utilization rate of computing resources of a CPU (Central Processing Unit ), reduced performance, unbalanced wear of NAND (hard disk storage unit), and the like. In the SSD architecture of the current enterprise-level data center, a firmware scheduler generally adopts a static slicing or polling scheduling strategy to carry out multi-core task allocation, and the method has two technical bottlenecks, namely, one lacks perception of the computing resource load of each core of the multi-core CPU, and the other lacks perception of the associated specific resource load of the CPU core. When the rigid scheduling mechanism is used for coping with a mixed read-write storm in AI training or a high-frequency small data packet scene of a financial transaction system, the problems of low utilization rate of a link bandwidth, unbalanced NAND abrasion and the like caused by the fact that peak collision of computation among processor cores is easy to occur. Therefore, how to balance the load pressure of the microprocessor core in the solid state disk to cope with complex application scenarios is a problem that needs to be solved by those skilled in the art. Disclosure of Invention The embodiment of the invention aims to provide a load balancing method, a device, equipment and a storage medium, which can solve the problem that the load pressure of a microprocessor core in a solid state disk is difficult to cope with a complex application scene. In order to solve the above technical problems, in a first aspect, an embodiment of the present invention provides a load balancing method, which is applied to a solid state disk of an enterprise data center, including: Counting the processing time required by each processing unit for processing the current input and output command based on a nonlinear relation, and determining the current computing power resource based on the counted processing time; Determining a target unit from each processing unit according to each current computing power resource, and a current cache resource and a current logic address resource corresponding to a corresponding processing unit in the solid state disk; And distributing the current input and output command to the target unit for processing. Optionally, the generating process of the nonlinear relation includes: Fitting by utilizing the size of the logical block address corresponding to the historical input and output command and the corresponding command processing time to obtain a corresponding fitting curve containing the nonlinear relation; correspondingly, the statistics of the processing time required by each processing unit to process the current input and output command based on the nonlinear relation includes: And determining and counting the processing time required by each processing unit for processing the current input and output command based on the fitted curve. Optionally, the generating process of the nonlinear relation includes: generating a mapping table containing the nonlinear relation according to the size of the logical block address corresponding to the historical input/output command and the corresponding command processing time; correspondingly, the statistics of the processing time required by each processing unit to process the current input and output command based on the nonlinear relation includes: And searching and counting the processing time required by each processing unit for processing the current input and output command from the mapping table. Optionally, the determining the current computing power resource based on the statistically derived processing time includes: Determining the current working state of each processing unit in the solid state disk; determining the waiting time required by the corresponding processing units for processing the current input and output commands according to the current working states; Calculating the counted processing time and the waiting time corresponding to the relevant processing unit to obtain the total time corresponding to the corresponding processing unit and required for processing the current input and output command; And calculating the total time corresponding to each processing unit by using a pre-imputation force resource calculation formula to obtain the current force resource corresponding to