Load balancing method, device and equipment of multi-core structure solid state disk and medium
By monitoring the task duration and idle status of multi-core solid-state drives, the optimal core is selected to allocate IO tasks, thus solving the problem of unbalanced load in existing technologies and improving hard drive performance and utilization.
Patent Information
- Application Number
- CN202310183364.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-02-24
AI Technical Summary
Existing technologies fail to effectively consider the workload of processor cores in multi-core solid-state drives, resulting in unbalanced I/O task allocation and affecting hard drive performance.
By monitoring the maximum task duration, total idle time, and maximum idle interval of each core, the idle value of each core is calculated, and the optimal core is selected to allocate IO tasks, ensuring that IO can be processed at the fastest speed.
It achieves IO load balancing, improving multi-core utilization and SSD performance.
Smart Images

Figure CN116185631B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage technology, and in particular to a load balancing method, apparatus, device, and medium for a multi-core solid-state drive. Background Technology
[0002] As the performance of solid-state drives (SSDs) improves, SSD processors have evolved from single-core (the controller in the SSD, such as the CPU) to multi-core, from single-core single-tasking to single-core multi-tasking, and from multi-tasking polling to task-priority preemption. Under this trend, which processor to send an input / output (I / O) operation to becomes particularly important; sending it to a processor with a heavier workload will directly impact the performance of the SSD.
[0003] Currently, most I / O load balancing is done by evenly distributing the workload across processor cores, without considering whether other tasks are consuming significant computing power on the current core. For example, in Chinese patent application CN104102458A, load balancing uses the Logical Block Address (LBA) issued by the host to distribute the workload across backend CPUs. This can be understood as evenly distributing the I / O operations issued by the host. However, in this scenario, if the CPU receiving the I / O is performing a time-consuming operation, the I / O operations issued by the host cannot be processed promptly, leading to severe delays in one or more I / O commands and ultimately impacting hard drive performance. Therefore, improvements are urgently needed. Summary of the Invention
[0004] In view of this, it is necessary to provide a load balancing method, device, equipment and medium for multi-core solid-state drives to address the above technical problems.
[0005] According to a first aspect of the present invention, a load balancing method for a multi-core solid-state drive is provided, the method comprising:
[0006] The maximum task duration, total idle time, and maximum idle interval duration of each core are calculated in each cycle based on a preset duration.
[0007] The idle value of each core in each cycle is calculated based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle.
[0008] In response to receiving an I / O task to be processed at a certain moment, the complete period closest to the certain moment is taken as the target period, and the target core is selected from multiple cores based on the idle value of each core within the target period;
[0009] The pending I / O task is assigned to the target core for processing.
[0010] In some embodiments, the maximum task duration, total idle duration, and maximum idle interval duration of each core are calculated in each cycle, with a preset duration as the period, including:
[0011] Configure a preset time as the duration of each cycle, and perform the following operations per core:
[0012] The duration of each task is calculated within each cycle duration, and the task with the longest duration is taken as the maximum task duration.
[0013] Create a low-priority idle task, and calculate the duration of each execution of the idle task within each cycle duration;
[0014] The sum of the execution times of each idle task is taken as the total idle time.
[0015] Calculate the interval between two consecutive executions of an idle task, and use the maximum interval as the maximum idle interval.
[0016] In some embodiments, the idle value of each core in each cycle is calculated based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle, including:
[0017] Substitute the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle into the following formula to obtain the idle value of each core in each cycle;
[0018] P x =T idle -A*T s_max -B*T t_max Formula 1;
[0019] Among them, P x T represents the idle value of processing core x corresponding to a certain cycle. idle T represents the total idle time. t_max T represents the maximum task duration. s_max This indicates the maximum idle interval duration, and A and B represent two preset parameters.
[0020] In some embodiments, the target period is the complete period most recent to the given moment, including:
[0021] Obtain the current period in which the given moment occurs, and determine whether the given moment is the last moment of the current period;
[0022] If the given moment is not the last moment of the current period, then the previous period of the current period is taken as the target period.
[0023] If a given moment is the last moment of the current period, then the current period is taken as the target period.
[0024] In some embodiments, selecting a target core from multiple cores based on the idle value of each core within the target period includes:
[0025] Obtain the minimum idle value among multiple idle values corresponding to cores within the target period;
[0026] The kernel corresponding to the minimum free value is taken as the target kernel.
[0027] In some embodiments, selecting a target core from multiple cores based on the idle value of each core within the target period further includes:
[0028] In response to the existence of multiple cores with the same minimum free value;
[0029] Then, the maximum task duration of each core corresponding to the minimum idle value will be compared, and the core with the minimum maximum task duration among multiple cores will be selected as the target core.
[0030] In some embodiments, after the step of assigning the I / O task to be processed to the target core for processing, the method further includes:
[0031] Update the idle value of the target core according to the following formula 2;
[0032]
[0033] Where P represents the updated idle value of the target core, and P0 represents the current idle value of the target core. This indicates the preset impact of each I / O operation on the processing core's computational load.
[0034] According to a second aspect of the present invention, a load balancing device for a multi-core solid-state drive is provided, the device comprising:
[0035] The statistics module is configured to calculate the maximum task duration, total idle time, and maximum idle interval duration for each core in each period, with a preset duration as the period.
[0036] The calculation module is configured to calculate the idle value of each core in each cycle based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle.
[0037] The filtering module is configured to, in response to receiving an I / O task to be processed at a certain time, take the most recent complete cycle as the target cycle, and filter the target core from multiple cores based on the idle value of each core within the target cycle;
[0038] The allocation module is configured to allocate the pending I / O tasks to the target core for processing.
[0039] According to a third aspect of the present invention, a computer device is also provided, the computer device comprising:
[0040] At least one processor; and
[0041] The memory stores computer programs that can run on the processor, which executes the aforementioned load balancing method for multi-core solid-state drives when executing the program.
[0042] According to a fourth aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, performs the aforementioned load balancing method for a multi-core solid-state drive.
[0043] The aforementioned load balancing method for multi-core solid-state drives monitors the running status of all cores, calculates the maximum task duration, total idle time, and maximum idle interval for each core in each cycle, and then uses the statistical data to calculate the idle value of each core in each cycle to measure the business processing pressure. This allows the optimal core to be selected, enabling the IO command to be sent to the optimal core when an IO task arrives, ensuring that IO can be processed at the fastest speed. This achieves the effect of IO load balancing, improves the utilization of multi-cores, and enhances the performance of the solid-state drive.
[0044] In addition, the present invention also provides a load balancing device for a multi-core solid-state drive, a computer device, and a computer-readable storage medium, which can achieve the above-mentioned technical effects, and will not be described in detail here. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart illustrating a load balancing method for a multi-core solid-state drive according to an embodiment of the present invention;
[0047] Figure 2This is a schematic diagram of statistical time within a period provided for another embodiment of the present invention;
[0048] Figure 3 A schematic diagram of a load balancing device for a multi-core solid-state drive provided in another embodiment of the present invention;
[0049] Figure 4 This is an internal structural diagram of a computer device according to another embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.
[0051] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.
[0052] In one embodiment, please refer to Figure 1 As shown, the present invention provides a load balancing method 100 for a multi-core solid-state drive, specifically, the method includes the following steps:
[0053] Step 101: Calculate the maximum task duration, total idle time, and maximum idle interval duration for each core in each cycle, using a preset duration as the period.
[0054] In this embodiment, the preset duration can be set according to the regular processing business of the solid-state drive. For example, based on experience, the preset duration can be set to 10 milliseconds; the core is the controller of the solid-state drive, which can also be called the CPU.
[0055] Step 102: Calculate the idle value of each core in each cycle based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle.
[0056] Step 103: In response to receiving an I / O task to be processed at a certain moment, the complete cycle closest to the certain moment is taken as the target cycle, and the target core is selected from multiple cores based on the idle value of each core within the target cycle.
[0057] Step 104: Assign the I / O task to be processed to the target core for processing.
[0058] The aforementioned load balancing method for multi-core solid-state drives monitors the running status of all cores, calculates the maximum task duration, total idle time, and maximum idle interval for each core in each cycle, and then uses the statistical data to calculate the idle value of each core in each cycle to measure the business processing pressure. This allows the optimal core to be selected, enabling the IO command to be sent to the optimal core when an IO task arrives, ensuring that IO can be processed at the fastest speed. This achieves the effect of IO load balancing, improves the utilization of multi-cores, and enhances the performance of the solid-state drive.
[0059] In some embodiments, step 101, which involves calculating the maximum task duration, total idle duration, and maximum idle interval duration of each core in each period using a preset duration as the cycle, includes:
[0060] Configure a preset time as the duration of each cycle, and perform the following operations per core:
[0061] The duration of each task is calculated within each cycle duration, and the task with the longest duration is taken as the maximum task duration.
[0062] In this embodiment, it should be noted that if the execution time of a task spans different cycles, only the execution time falling within that cycle is counted in each cycle, and the remaining time is counted as a separate task in the next cycle.
[0063] Create a low-priority idle task, and calculate the duration of each execution of the idle task within each cycle duration;
[0064] In this embodiment, it should be noted that if the execution time of an idle task spans different cycles, only the execution time falling within that cycle is counted in each cycle, and the remaining time is counted separately as an idle task in the next cycle.
[0065] The sum of the execution times of each idle task is taken as the total idle time.
[0066] Calculate the interval between two consecutive executions of an idle task, and use the maximum interval as the maximum idle interval.
[0067] In some embodiments, step 102, which involves calculating the idle value of each core in each cycle based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle, includes:
[0068] Substitute the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle into the following formula to obtain the idle value of each core in each cycle;
[0069] P x =T idle -A*T s_max -B*T t_max Formula 1;
[0070] Among them, P x T represents the idle value of processing core x corresponding to a certain cycle. idle T represents the total idle time. t_max T represents the maximum task duration. s_max This indicates the maximum idle interval duration, and A and B represent two preset parameters.
[0071] In some embodiments, step 103 above, taking the complete period closest to the given moment as the target period, includes:
[0072] Obtain the current period in which the given moment occurs, and determine whether the given moment is the last moment of the current period;
[0073] If the given moment is not the last moment of the current period, then the previous period of the current period is taken as the target period.
[0074] If a given moment is the last moment of the current period, then the current period is taken as the target period.
[0075] In some embodiments, step 103 above, which involves selecting the target core from multiple cores based on the idle value of each core within the target period, includes:
[0076] Obtain the minimum idle value among multiple idle values corresponding to cores within the target period;
[0077] The kernel corresponding to the minimum free value is taken as the target kernel.
[0078] In some embodiments, step 103 above, which involves filtering the target core from multiple cores based on the idle value of each core within the target period, further includes:
[0079] In response to the existence of multiple cores with the same minimum free value;
[0080] Then, the maximum task duration of each core corresponding to the minimum idle value will be compared, and the core with the minimum maximum task duration among multiple cores will be selected as the target core.
[0081] In some embodiments, after assigning the I / O task to the target core for processing in step 104, the method further includes:
[0082] Update the idle value of the target core according to the following formula 2;
[0083]
[0084] Where P represents the updated idle value of the target core, and P0 represents the current idle value of the target core. This indicates the preset impact of each I / O operation on the processing core's computational load.
[0085] In another embodiment, for ease of understanding, it is assumed that a solid-state drive (SSD) includes multiple CPUs, the host connects to the SSD via a PCIe interface, and issues I / O operations via PCIe. The SSD's processor remains constantly running, processing logical operations. This embodiment provides a load balancing method for multi-core SSDs, the specific implementation process of which is as follows:
[0086] Step one: Monitor and statistically analyze the processor's operating status using timing mechanisms. See below for details:
[0087] Please combine Figure 2 As shown, a time length T is configured. all Processor pressure is assessed by analyzing the ratio of time occupied by business tasks and idle tasks and the distribution of idle tasks within this time period; the processor time occupied by each task is recorded as T. n Where n is the task ID, in T all Within the specified time, the maximum time a single task can be recorded is T. t_max T t _ max =max(T) n Each processor creates a separate idle task with the lowest priority to ensure continuous and stable operation when the processor is idle. The processor time occupied by each idle task is recorded as T. i Record the idle task in unit time T all The total time occupied by the processor is T idle Record the interval between two idle tasks as T. s Take T all The maximum interval time is T s_max =max(T) s ).
[0088] Step two, based on the data and formula P from step one. x =T idle -A*T s_max -B*T t_max Calculate the idle value P of each processor in one cycle. x This idle value is used to measure the processor's operating pressure, where x is the processor ID, A and B are preset fixed parameters, and P... x A higher value indicates a higher level of processor idle time and lower operating pressure.
[0089] Step 3: Calculate the idle value P based on Step 2. x To determine the optimal processor, specifically, upon receiving an I / O operation from the host, obtain the idle value P of all current processors. x P was found in the middle. x The processor with the highest value is the optimal processor.
[0090] Step four: Hand over the I / O operations issued by the host to the optimal processor found in step three for processing.
[0091] Step 5: Update the idle value of the optimal processor. Although the idle value indicates the current processor's operating pressure, due to time slice division, newly added I / O operations will only be reflected in the next stage. At this point, the estimated I / O pressure should be added to the P-value of the processor that assigned the task in Step 4, according to the formula... Update the idle value, where P represents the updated idle value of the processor that assigned the task, and P0 represents the maximum idle value calculated in step three. This represents the preset impact of each I / O operation on the processor's computational load.
[0092] The load balancing method for a multi-core solid-state drive in this embodiment has at least the following beneficial technical effects: by monitoring the operating status of all processors, I / O commands are sent to the optimal processor to ensure that I / O can be processed at the fastest speed, thereby guaranteeing the performance of the solid-state drive, improving multi-core utilization, and improving the performance of the solid-state drive.
[0093] In some embodiments, please refer to Figure 3 As shown, the present invention also provides a load balancing device 200 for a multi-core solid-state drive, the device comprising:
[0094] The statistics module 201 is configured to calculate the maximum task duration, total idle duration, and maximum idle interval duration of each core in each period, with a preset duration as the period.
[0095] The calculation module 202 is configured to calculate the idle value of each core in each cycle based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle.
[0096] The filtering module 203 is configured to, in response to receiving an I / O task to be processed at a certain time, take the most recent complete period as the target period, and filter the target core from multiple cores according to the idle value of each core within the target period;
[0097] The allocation module 204 is configured to allocate the I / O task to be processed to the target core for processing.
[0098] The aforementioned load balancing device for a multi-core solid-state drive monitors the operating status of all cores, calculates the maximum task duration, total idle time, and maximum idle interval for each core in each cycle, and then uses the statistical data to calculate the idle value of each core in each cycle to measure the business processing pressure. This allows the optimal core to be selected, enabling the IO command to be sent to the optimal core when an IO task arrives, ensuring that IO can be processed at the fastest speed. This achieves the effect of IO load balancing, improves the utilization of multi-cores, and enhances the performance of the solid-state drive.
[0099] In some embodiments, the statistics module 201 is further configured to:
[0100] Configure a preset time as the duration of each cycle, and perform the following operations per core:
[0101] The duration of each task is calculated within each cycle duration, and the task with the longest duration is taken as the maximum task duration.
[0102] Create a low-priority idle task, and calculate the duration of each execution of the idle task within each cycle duration;
[0103] The sum of the execution times of each idle task is taken as the total idle time.
[0104] Calculate the interval between two consecutive executions of an idle task, and use the maximum interval as the maximum idle interval.
[0105] In some embodiments, the computing module 202 is further configured to:
[0106] Substitute the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle into the following formula to obtain the idle value of each core in each cycle;
[0107] P x =T idle -A*T s_max -B*T t_max Formula 1;
[0108] Among them, P x T represents the idle value of processing core x corresponding to a certain cycle. idle T represents the total idle time. t_max T represents the maximum task duration. s_max This indicates the maximum idle interval duration, and A and B represent two preset parameters.
[0109] In some embodiments, the filtering module 203 is further configured to:
[0110] Obtain the current period in which the given moment occurs, and determine whether the given moment is the last moment of the current period;
[0111] If the given moment is not the last moment of the current period, then the previous period of the current period is taken as the target period.
[0112] If a given moment is the last moment of the current period, then the current period is taken as the target period.
[0113] In some embodiments, the filtering module 203 is further configured to:
[0114] Obtain the minimum idle value among multiple idle values corresponding to cores within the target period;
[0115] The kernel corresponding to the minimum free value is taken as the target kernel.
[0116] In some embodiments, the filtering module 203 is further configured to:
[0117] In response to the existence of multiple cores with the same minimum free value;
[0118] Then, the maximum task duration of each core corresponding to the minimum idle value will be compared, and the core with the minimum maximum task duration among multiple cores will be selected as the target core.
[0119] In some embodiments, the apparatus further includes an update module configured to:
[0120] Update the idle value of the target core according to the following formula 2;
[0121]
[0122] Where P represents the updated idle value of the target core, and P0 represents the current idle value of the target core. This indicates the preset impact of each I / O operation on the processing core's computational load.
[0123] It should be noted that the specific limitations regarding the load balancing device for multi-core SSDs can be found in the limitations of the load balancing method for multi-core SSDs mentioned above, and will not be repeated here. The modules in the aforementioned load balancing device for multi-core SSDs can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or they can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0124] According to another aspect of the present invention, a computer device is provided, which may be a server, and its internal structure diagram is shown below. Figure 4 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the load balancing method for the multi-core solid-state drive described above. Specifically, the method includes the following steps:
[0125] The maximum task duration, total idle time, and maximum idle interval duration of each core are calculated in each cycle based on a preset duration.
[0126] The idle value of each core in each cycle is calculated based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle.
[0127] In response to receiving an I / O task to be processed at a certain moment, the complete period closest to the certain moment is taken as the target period, and the target core is selected from multiple cores based on the idle value of each core within the target period;
[0128] The pending I / O task is assigned to the target core for processing.
[0129] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the load balancing method for a multi-core solid-state drive described above, specifically including the following steps:
[0130] The maximum task duration, total idle time, and maximum idle interval duration of each core are calculated in each cycle based on a preset duration.
[0131] The idle value of each core in each cycle is calculated based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle.
[0132] In response to receiving an I / O task to be processed at a certain moment, the complete period closest to the certain moment is taken as the target period, and the target core is selected from multiple cores based on the idle value of each core within the target period;
[0133] The pending I / O task is assigned to the target core for processing.
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0135] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0136] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A load balancing method for a multi-core solid-state drive, characterized in that, The method includes: The maximum task duration, total idle time, and maximum idle interval duration of each core are calculated in each cycle based on a preset duration. The idle value of each core in each cycle is calculated based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle. In response to receiving an I / O task to be processed at a certain moment, the complete period closest to the certain moment is taken as the target period, and the target core is selected from multiple cores based on the idle value of each core within the target period; The pending I / O task is assigned to the target core for processing; The idle value of each core in each cycle is calculated based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle. This includes substituting the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle into the following formula to obtain the idle value of each core in each cycle. Formula 1; in, Indicates the processing cores corresponding to a certain cycle. The idle value, Indicates the total idle time. Indicates the maximum task duration. Indicates the maximum idle interval duration. and This indicates two preset parameters; Selecting a target core from multiple cores based on the idle value of each core within the target period includes: obtaining the minimum idle value among the idle values corresponding to multiple cores within the target period; and selecting the core corresponding to the minimum idle value as the target core.
2. The load balancing method for a multi-core solid-state drive according to claim 1, characterized in that, The maximum task duration, total idle time, and maximum idle interval duration of each core are calculated for each preset duration period, including: Configure a preset time as the duration of each cycle, and perform the following operations per core: The duration of each task is calculated within each cycle duration, and the task with the longest duration is taken as the maximum task duration. Create a low-priority idle task, and calculate the duration of each execution of the idle task within each cycle duration; The sum of the execution times of each idle task is taken as the total idle time. Calculate the interval between two consecutive executions of an idle task, and use the maximum interval as the maximum idle interval.
3. The load balancing method for a multi-core solid-state drive according to claim 1, characterized in that, The target period is defined as the complete period closest to the given moment, including: Obtain the current period in which the given moment occurs, and determine whether the given moment is the last moment of the current period; If the given moment is not the last moment of the current period, then the previous period of the current period is taken as the target period. If a given moment is the last moment of the current period, then the current period is taken as the target period.
4. The load balancing method for a multi-core solid-state drive according to claim 1, characterized in that, The method further includes selecting the target core from multiple cores based on the idle value of each core within the target period, and also includes: If multiple cores have the same minimum idle value, the maximum task duration of each core corresponding to the minimum idle value will be compared, and the core with the minimum maximum task duration among the multiple cores will be selected as the target core.
5. The load balancing method for a multi-core solid-state drive according to claim 1, characterized in that, After the step of assigning the I / O task to be processed to the target core for processing, the method further includes: Update the idle value of the target core according to the following formula 2; Formula 2; in, This represents the free value after the target core is updated. Indicates the current idle value of the target core. This indicates the preset impact of each I / O operation on the processing core's computational load.
6. A load balancing device for a multi-core solid-state drive, characterized in that, The device includes: The statistics module is configured to calculate the maximum task duration, total idle time, and maximum idle interval duration for each core in each period, with a preset duration as the period. The calculation module is configured to calculate the idle value of each core in each cycle based on the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle. The filtering module is configured to, in response to receiving an I / O task to be processed at a certain time, take the most recent complete cycle as the target cycle, and filter the target core from multiple cores based on the idle value of each core within the target cycle; The allocation module is configured to allocate the pending I / O task to the target core for processing; The calculation module is further configured to substitute the maximum task duration, the total idle duration, and the maximum idle interval duration of each core in each cycle into the following formula to obtain the idle value of each core in each cycle. Formula 1; in, Indicates the processing cores corresponding to a certain cycle. The idle value, Indicates the total idle time. Indicates the maximum task duration. Indicates the maximum idle interval duration. and This indicates two preset parameters; The filtering module is also configured to obtain the minimum idle value among multiple idle values corresponding to cores within the target period; and to use the core corresponding to the minimum idle value as the target core.
7. A computer device, characterized in that, include: At least one processor; as well as A memory storing a computer program executable in the processor, wherein the processor, when executing the program, performs the method according to any one of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the method described in any one of claims 1-5.
Citation Information
Patent Citations
Multi-core CPU (Central Processing Unit) load balancing method, multi-core CPU and solid state disk
CN104102458A
Computing system including multi-core processor and load balancing method thereof
CN103713950A
Load balancing scheduling method and computing device
CN115391031A