Container affinity perception plastic scheduling method and device oriented to heterogeneous cluster, and storage medium
By optimizing task allocation through a container affinity-aware plastic scheduling method and a dual-frame scheduling approach, the load balancing paradox and resource fragmentation problems in heterogeneous clusters are resolved, achieving minimization of task runtime and improvement of resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-07
AI Technical Summary
In heterogeneous clusters, traditional container scheduling methods suffer from load balancing paradoxes and resource fragmentation, failing to effectively utilize heterogeneous resources, leading to decreased execution efficiency and resource waste.
We employ a container affinity-aware plasticity scheduling method, which optimizes task allocation through a pre-trained affinity-aware plasticity scheduling model and double-shelves scheduling. By combining affinity matrix and knapsack algorithm, we achieve efficient scheduling between containers and virtual machines.
It minimizes task execution time in heterogeneous clusters, improves resource utilization, solves the load balancing paradox and resource fragmentation problems, and enhances overall execution efficiency.
Smart Images

Figure CN121807441A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud computing resource scheduling, and particularly relates to a container affinity-aware plastic scheduling method and device for a heterogeneous cluster and a storage medium. BACKGROUND
[0002] With the development of cloud computing technology, container technology has become a core component of modern cloud computing infrastructure. Container technology provides a more lightweight and flexible resource isolation and allocation mechanism than traditional virtual machines through operating system-level virtualization, enabling applications to be quickly deployed, scaled and efficiently run in different cloud computing systems. However, with the continuous expansion of cloud computing cluster size and the increasing popularity of heterogeneous computing resources, container scheduling faces unprecedented challenges. In actual cloud data centers, due to different server procurement times, hardware update cycle differences, and business demand diversification, clusters often exhibit obvious heterogeneity characteristics. This heterogeneity not only manifests in the configuration differences of server CPU, memory, storage, communication equipment and other hardware resources, but also in the differences in network bandwidth, I / O performance, accelerators (such as GPU, FPGA) and other special capabilities.
[0003] In this complex heterogeneous environment, traditional container scheduling methods gradually reveal many problems and limitations. First, existing container scheduling methods are mostly based on simple resource matching and load balancing strategies, mainly focusing on how to maximize the overall resource utilization of the cluster while meeting the resource requirements of containers. The task scheduling and allocation method in the prior art usually adopts a static resource allocation strategy, ignoring the dynamic characteristics of container workloads and the performance differences between heterogeneous resources. For example, some research proposes a scheduling model based on multi-dimensional resource constraints, which considers CPU, memory, network and other resource factors, but in actual application, it often falls into the dilemma of "load balancing paradox". Specifically, in order to pursue load balancing between physical nodes, the scheduler may allocate intensive large containers to nodes with weak computing power, and I / O intensive small containers to high-performance nodes. This seemingly balanced allocation actually leads to a significant decline in overall execution efficiency.
[0004] Secondly, the resource fragmentation problem has become another bottleneck restricting the performance of container scheduling. In the actual container scheduling process, the resource demand of the task usually presents rigid characteristics, that is, a fixed number of processor cores are required for each task before execution. This rigid demand often leaves a large amount of "resource fragments" that cannot be effectively utilized in the system after the task scheduling is completed. However, in the container scheduling of the heterogeneous cluster between the communication network devices, the existing plastic task scheduling method usually adopts the strategy of falling into the "over-compression" dilemma when facing a complex heterogeneous environment, that is, in order to fill small resource gaps, the task has to be compressed to execute on too few processors, which significantly prolongs the execution time of the task. SUMMARY
[0005] The present application overcomes the shortcomings of the prior art and provides a container affinity-aware plastic scheduling method for a heterogeneous cluster, equipment and storage medium, which realizes the minimization target of total task running time through the affinity between containers and heterogeneous VMs and flexible scheduling, and is used for solving the load balancing paradox and resource fragmentation problem in the container scheduling of the heterogeneous cluster in the communication network.
[0006] To achieve the above object, the technical scheme adopted by the present application is as follows: a container affinity-aware plastic scheduling method for a heterogeneous cluster, comprising: obtaining a scheduling task; According to the scheduling task, a pre-trained affinity-aware plastic scheduling model is used to realize task scheduling; The establishment of the affinity-aware plastic scheduling model comprises: The obtained container resource demand and VM resource distribution are used to obtain the affinity index between the container and the VM through the affinity function based on the affinity allocation method Affallo, the container is allocated according to the obtained affinity index, and the task scheduler schedules the VM one by one to obtain the minimization target of the maximum completion time of the overall task.
[0007] In a preferred embodiment of the present application, the scheduler schedules the plasticity task through DoubleShelves and obtains the optimal scheduling result.
[0008] In a preferred embodiment of the present application, the container set to be scheduled is , the virtual machine set is represented as , each container has resource demand characteristics and m i Each virtual machine vm j has resource configuration and , wherein, execution time for single processor, m i memory requirement, number of processor cores, memory capacity; the running time of the task on k core p i ( k ) is: ; wherein, is the parallel coefficient in Amdahl's law.
[0009] In one preferred embodiment of the present application, the affinity between the container and the VM is constructed according to the running time of the task in the whole container and the resource distribution of the heterogeneous VM, and the formula includes: ; ; is the control coefficient, is the system reference value.
[0010] In one preferred embodiment of the present application, the affinity matrix is constructed by the affinity, which is used as the profit matrix of the multiple knapsack problem, and the scheduler solves the combinatorial optimization problem by the affinity matrix.
[0011] In one preferred embodiment of the present application, the double-shelf scheduling (Double Shelves) is established based on the plastic task scheduling problem, including the following methods: defining the target completion time as , assigning a full-height storage shelf and a half-height storage shelf ; the full-height storage shelf serves as the first storage shelf, and the size is ; the half-height storage shelf serves as the first storage shelf, and the size is ; the full-height storage shelf limits the upper limit of the number of processors for each task, so that the execution time does not exceed the target completion time ; scheduling the main task to the full-height storage shelf , and the remaining tasks to the half-height storage shelf ; the scheduler regards the workload as the profit of the knapsack problem, and the number of processors as the capacity limit; it ensures that the main task is preferentially assigned to the full-height storage shelf, while the low-affinity task is guided to the half-height storage shelf; the value formula of the task is: ; wherein, is the value of the task Assigned to k When there are multiple processors, their workload Set height to The third storage rack Used to handle additional tasks; Using an approximate compression factor By controlling the allocation of resources for tasks, the state space of dynamic programming can be compressed to a smaller size. Dimensions; for those using more than Large-scale tasks on a single processor This will trigger a secondary compression mechanism, releasing at least One processor, and through The reduction factor maintains the allowable processing time; m is the problem size.
[0012] In a preferred embodiment of the present invention, when the task Full-height storage rack The execution time in the middle does not exceed And assigned to If there are 1 processor, then allocate it to In One processor; When the task With full-height storage rack Another task Execution time is less than And each is assigned to one processor, then and Assigned to The same processor in; set up Indicates full-height storage rack The number of idle processors; when there are tasks Half-height storage rack In the middle, it is in The execution time on each processor does not exceed Then Assigned to One processor.
[0013] In a preferred embodiment of the present invention, under given resource constraints, selecting a resource allocation scheme that maximizes total profit includes: For each VM, select the container combination with the highest affinity within the memory limit, due to the existence of The scheduler will process each virtual machine in turn. An example of the knapsack problem; if a subsequent virtual machine shows a stronger affinity for an already assigned container, then the container is reassigned to the best-matching virtual machine; The scheduler maintains the affinity increment matrix. The process includes the following steps: for each combination of container and VM, the increment is equal to the difference between the current VM's affinity value and the container's highest historical affinity value; for each VM, solve an affinity-based knapsack algorithm and adjust the container allocation based on subsequent affinity.
[0014] In a preferred embodiment of the present invention, a container affinity-aware flexible scheduling device for heterogeneous clusters includes a memory for storing computer programs / instructions. A processor is used to execute the computer program / instructions to implement the steps of a container affinity-aware plastic scheduling method for heterogeneous clusters.
[0015] In a preferred embodiment of the present invention, a container affinity-aware flexible scheduling storage medium for heterogeneous clusters is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of implementing a container affinity-aware flexible scheduling method for heterogeneous clusters are realized.
[0016] This invention addresses the deficiencies in the technical background, and the beneficial technical effects of this invention are: A container affinity-aware flexible scheduling method, device, and storage medium for heterogeneous clusters are proposed to solve the load balancing paradox and resource fragmentation problem in container scheduling.
[0017] This invention uses MOCAS container scheduling to implement a container affinity-aware flexible scheduling for heterogeneous clusters, which minimizes the total task runtime by leveraging the affinity between containers and heterogeneous VMs and flexible scheduling. Attached Figure Description
[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0019] Figure 1 This is a flowchart illustrating the affinity calculation process according to a preferred embodiment of the present invention. Figure 2 This is a flowchart of the affinity scheduling method according to a preferred embodiment of the present invention; Figure 3 This is a flowchart of a preferred embodiment of the dual-frame task scheduling method of the present invention; Figure 4 A graph showing the total time taken to complete all tasks under different scheduling schemes; Figure 5 A comparison chart of CPU utilization under different scheduling schemes; Figure 6 A comparison chart of total task execution time for different scheduling schemes; Figure 7 A graph showing CPU utilization results for different scheduling schemes; Figure 8 A graph showing the total task execution time for different scheduling schemes; Figure 9 The graph shows the total task time for the optimal solution. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. These drawings are simplified schematic diagrams, which are only used to illustrate the basic structure of the present invention and therefore only show the components relevant to the present invention.
[0021] It should be noted that if directional indicators (such as up, down, bottom, top, etc.) are involved in the embodiments of the present invention, these directional indicators are only used to explain the relative positional relationship and movement of the components in a specific posture. If the specific posture changes, the directional indicators will also change accordingly. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of that feature. Unless otherwise explicitly specified and limited, the terms "set," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two components. For those skilled in the art, the specific meaning of the above terms in the present invention can be understood according to the specific circumstances.
[0022] Example 1, as Figures 1-3 As shown, a container affinity-aware plasticity scheduling method for heterogeneous clusters includes: acquiring scheduling tasks; and scheduling tasks according to the scheduling tasks using a pre-trained affinity-aware plasticity scheduling model.
[0023] Specifically, the establishment of the affinity-aware plastic scheduling model includes: obtaining the affinity index between the container and the VM through the affinity function based on the affinity allocation method Affallo; allocating attention to the container according to the obtained affinity index; and scheduling tasks for the VM one by one by the scheduler to obtain the minimum target when the overall task is maximized.
[0024] Example 2 builds upon Example 1, where the scheduler uses DoubleShelves to schedule flexible tasks and achieves optimal scheduling results. These scheduling tasks include resource scheduling tasks within the processor cluster.
[0025] Furthermore, the set of containers to be scheduled is The virtual machine set is represented as Each container Characterized by resource demand and m i Each virtual machine vm j With resource allocation and ,in, For single-processor execution time, m i For memory requirements, Number of processor cores For memory capacity; the task is in k Runtime per core p i ( k )for: ;in, It is the parallelism coefficient in Amdahl's Law. Specifically, during container allocation, it is necessary to ensure that the memory constraints of each VM are not violated, and that the number of processor cores allocated at any given time does not exceed the number of currently idle processors.
[0026] Furthermore, based on the runtime of tasks within the overall container and the resource distribution of heterogeneous VMs, the affinity between the container and the VM is constructed, with the following formula: ; ; For control coefficients, This serves as a system reference value. Specifically, based on affinity values, the container allocation problem is modeled as a multiple knapsack problem, with the objective of maximizing the total affinity and the constraint being a memory capacity limit.
[0027] Furthermore, an affinity matrix is constructed using affinity values, serving as the profit matrix for the multiple knapsack problem. The scheduler uses this affinity matrix to solve the combinatorial optimization problem. Specifically, given resource constraints, the resource allocation scheme that maximizes the total profit is selected: for each VM, within the memory limit, the container combination with the highest affinity value is selected. This is because... The scheduler will process each virtual machine in turn. This is an example of the knapsack problem; if a subsequent virtual machine shows a stronger affinity for an already assigned container, that container must be reassigned to the best-matching virtual machine. More specifically, to support this decision, the scheduler maintains an affinity increment matrix. The process includes the following steps: For each container-VM combination, the increment is equal to the difference between the current VM's affinity value and the container's highest historical affinity value; a positive increment indicates that reassigning the container to the VM would improve overall profitability; a negative increment indicates that the existing allocation is better and should remain unchanged. Specifically, an affinity-based knapsack algorithm is solved for each VM, and then the container allocation is adjusted based on the subsequent affinity.
[0028] Furthermore, based on the plasticity task scheduling problem, a double-shelves scheduling mechanism is established, including the following methods: First, the target completion time is defined as... Allocate a full-height storage rack and a half-height storage rack Full-height storage rack As the first storage rack, and its size is Half-height storage rack As the first storage rack, and its size is Full-height storage rack Limit the maximum number of processors for each task to ensure that the execution time does not exceed the target completion time. In practice, when assigning tasks to each task... One processor may exceed the total number of available processors. In order to be within time constraints Next, the task (Minimum number of processors required), therefore a height of half-height storage rack Half-height storage rack By sacrificing some completion time margin to accommodate what cannot be done The task completed above.
[0029] Secondly, the main scheduling tasks are allocated to full-height storage racks. The remaining tasks were assigned to half-height storage racks. The scheduler treats workload as a reward from the knapsack problem, and the number of processors as a capacity constraint; it introduces affinity adjustment in value calculation: by increasing the knapsack value of tasks with high affinity between containers and VMs, it ensures that primary tasks are preferentially allocated to full-height storage racks. Low-affinity tasks are directed to half-height storage racks. The formula for the value of a task is: ; in, Is it a task Assigned to k When there are multiple processors, their workload .
[0030] Third, set the height to The third storage rack This is used to handle additional tasks; after task allocation, the number of processors required by the second storage rack may exceed the total number of processors. Therefore, three methods are needed for adjustment: merging or migrating incorrectly placed tasks; Fourth, an approximate compression factor is adopted. By controlling the allocation of resources for tasks, the state space of dynamic programming can be compressed to a smaller size. Dimension; by setting This limits the increase in processing time caused by reducing the number of processors to within a certain range. Within a factor of 1, ensuring that the cumulative error never exceeds 1 / 2. For large-scale tasks (using more than 100,000 characters) (one processor) This will trigger a secondary compression mechanism, releasing at least One processor, and through The reduction factor maintains the allowable processing time.
[0031] Furthermore, when the task Full-height storage rack The execution time in the middle does not exceed And assigned to If there are 1 processor, then allocate it to In One processor. When the task... With full-height storage rack Another task Execution time is less than And each is assigned to one processor, then and Assigned to The same processor in; assume Indicates full-height storage rack The number of idle processors; when there are tasks Half-height storage rack In the middle, it is in The execution time on each processor does not exceed Then Assigned to One processor.
[0032] Example 3, based on Example 2, such as Figures 1-3 As shown, a container affinity-aware plastic scheduling method for heterogeneous clusters, such as... Figure 1 As shown, the specific implementation of the affinity calculation module includes the following steps: S11: When a container is submitted, obtain the amount of resources required by the container and calculate the resource distribution of the VM. ; S12: Calculate the affinity index between the container and the VM; S13: [The following appears to be a separate, unrelated sentence: "Convert the affinity matrix..."] Send to the scheduler.
[0033] like Figure 2 As shown, the specific implementation of the affinity-based container allocation module includes the following steps: S21: Enter the current VM and obtain resource information and affinity matrix; S22: Solve the knapsack problem in the current VM to maximize the total affinity; S23: Determine if the current container has been allocated; if yes, proceed to S25; otherwise, proceed to S24. S24: Assign the container to the VM; S25: Compare the affinity increment of the container on other VMs to determine if it is positive; if yes, proceed to S24; if no, proceed to S26. S26: Determine if the affinity of all containers has been traversed; if yes, proceed to S27; otherwise, proceed to S23. S27: Determine if all VMs have been traversed; if yes, proceed to S28; otherwise, proceed to S21. S28: End container allocation.
[0034] like Figure 3 As shown, the specific implementation of the dual-framework task scheduling module includes the following steps: S31: Enter the current VM and invoke the task scheduler; S32: Guessing the maximum completion time And divide into full-height storage racks and half-height storage rack ; S33: Use compression factor The solution size is compressed, and dynamic programming for the knapsack problem is called for solution. S34: Determine half-height storage rack Check if the task exceeds the resource limit; if yes, proceed to S36; if no, proceed to S35. S35: Adjusting the frame using three adjustment methods and half-height storage rack Task to Framework ; S36: Determine whether the final scheduling result is valid or less than the approximate target; if yes, proceed to S38; if no, proceed to S37. S37: Adjust using the bisection method based on the results. ; S38: Determine whether all VMs have completed task scheduling; if yes, proceed to S39; if no, proceed to S31. S39: End dual-frame task scheduling.
[0035] Example 4: A container affinity-aware flexible scheduling device for heterogeneous clusters, comprising a memory for storing computer programs / instructions; and a processor for executing the computer programs / instructions to implement the steps of the container affinity-aware flexible scheduling method for heterogeneous clusters according to Example 1 or Example 2.
[0036] Example 5: A container affinity-aware flexible scheduling storage medium for heterogeneous clusters, which stores a computer program / instruction. When executed by a processor, the computer program / instruction is used to implement the steps of a container affinity-aware flexible scheduling method for heterogeneous clusters according to Example 1 or Example 2.
[0037] Example 6: A heterogeneous multi-core coexistence management system for cloud computing, implemented using a container affinity-aware flexible scheduling device or method for heterogeneous clusters as described in any of Examples 1 to 5, comprising: The cluster information data acquisition module is used to acquire device information and performance information of the server cluster within the system, and to summarize multi-core heterogeneous cluster data.
[0038] The container creation module is used to create multiple containers based on multi-core heterogeneous cluster data and build a mapping network between each container and each server cluster.
[0039] The interoperability establishment module is used to establish a unified application programming interface and middleware based on multi-core heterogeneous cluster data and mapping network, and output cluster interoperability information. The middleware is used to deploy the underlying software layer between nodes of the multi-core heterogeneous cluster.
[0040] The multi-core resource scheduling module is used to obtain the application requirements information of the system and the resource information of each server cluster, output a real-time demand resource view, and obtain the resource scheduling strategy and resource scheduling method that match the real-time demand resource view from the strategy and method database. Based on the resource scheduling strategy and resource scheduling method, and combined with the cluster communication information, the module allocates the tasks in the application to the nodes under the corresponding server cluster.
[0041] Furthermore, the multi-core resource scheduling module is implemented using an affinity-aware flexible scheduling model, including: The indicator acquisition submodule selects the corresponding performance evaluation indicators from the indicator database based on the acquired indicator selection instructions.
[0042] The effect analysis submodule performs effect analysis on resource scheduling process data based on performance evaluation indicators and outputs the first result. Further, the effect analysis submodule includes: an indicator partitioning unit, used to partition performance evaluation indicators to obtain a main indicator set and a sub-indicator set; a weight acquisition unit, used to obtain the first weight of each performance evaluation indicator in the main indicator set and the second weight of each performance evaluation indicator in the sub-indicator set, outputting an indicator weight comparison table; an indicator relationship acquisition unit, used to obtain the first relationship between each performance evaluation indicator in the main indicator set, the second relationship between each performance evaluation indicator in the sub-indicator set, and the third relationship between each performance evaluation indicator in the main indicator set and the sub-indicator set, constructing an indicator relationship graph; a data parsing unit, used to parse the resource scheduling process data to obtain the data to be evaluated; and an effect analysis unit, used to perform effect analysis on the data to be evaluated based on the main indicator set, sub-indicator set, indicator weight comparison table, and indicator relationship graph, obtaining the effect analysis results.
[0043] Working principle: This invention provides a container affinity-aware flexible scheduling method, device, and storage medium for heterogeneous clusters, addressing the load balancing paradox and resource fragmentation problems in container scheduling. Combined with... Figure 4 The graph shows the total time taken to complete all tasks under different scheduling schemes. Figure 5 The chart shows a comparison of CPU utilization for different scheduling schemes. Figure 6 A comparison chart showing the total task execution time of different scheduling schemes; Figure 7 The CPU utilization results for different scheduling schemes are shown in the graph; Figure 8 The graph shows the total task time results for different scheduling schemes. Figure 9 The diagram shows the total task execution time of the optimal solution. Based on the above data, this invention uses MOCAS container scheduling to implement a container affinity-aware flexible scheduling method for heterogeneous clusters. It achieves the goal of minimizing the total task execution time through the affinity between containers and heterogeneous VMs and flexible scheduling.
[0044] The above specific embodiments are specific support for the concept proposed in this invention, and should not be used to limit the scope of protection of this invention. Any equivalent changes or modifications made on the basis of this technical solution in accordance with the technical concept proposed in this invention shall still fall within the scope of protection of this invention.
Claims
1. A container affinity-aware flexible scheduling method for heterogeneous clusters, characterized in that, include: Obtain the scheduled task; Based on the scheduling task, task scheduling is achieved through a pre-trained affinity-aware plasticity scheduling model; The establishment of the affinity-aware plasticity scheduling model includes: The system obtains the container resource requirements and VM resource distribution. Based on the affinity allocation method Affallo, it obtains the affinity index between the container and the VM through the affinity function. The system then allocates containers according to the obtained affinity index. The scheduler schedules tasks for VMs one by one to achieve the minimum target when the overall task is maximized.
2. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 1, characterized in that: The scheduler schedules plastic tasks using DoubleShelves and obtains the optimal scheduling result.
3. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 2, characterized in that: The set of containers to be scheduled is The virtual machine set is represented as Each container Characterized by resource demand and m i Each virtual machine vm j With resource allocation and ,in, For single-processor execution time, m i For memory requirements, Number of processor cores This refers to memory capacity. The mission is k Runtime per core p i ( k )for: ; in, It is the parallel coefficient in Amdahl's law.
4. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 3, characterized in that: Based on the runtime of tasks within the overall container and the resource distribution of heterogeneous VMs, the affinity between the container and the VM is constructed, using the following formula: ; ; For control coefficients, This is a system reference value.
5. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 4, characterized in that: An affinity matrix is constructed using affinity, which serves as the profit matrix for the multiple knapsack problem. The scheduler uses the affinity matrix to solve the combinatorial optimization problem.
6. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 5, characterized in that: Based on the plasticity task scheduling problem, a double-shelves scheduling framework is established, including the following methods: Define the target completion time as Allocate a full-height storage rack and a half-height storage rack Full-height storage rack As the first storage rack, and its size is Half-height storage rack As the first storage rack, and its size is Full-height storage rack Limit the maximum number of processors for each task to ensure that the execution time does not exceed the target completion time. ; The main scheduling tasks are allocated to full-height storage racks. The remaining tasks were assigned to half-height storage racks. The scheduler treats workload as a reward of the knapsack problem, and the number of processors as a capacity constraint; it ensures that primary tasks are prioritized for allocation to full-height storage racks, while low-affinity tasks are routed to half-height storage racks; the value formula for a task is: ; in, Is it a task Assigned to k When there are multiple processors, the workload is... Set the height to The third storage rack Used to handle additional tasks; Using an approximate compression factor By controlling the allocation of resources for tasks, the state space of dynamic programming can be compressed to a smaller size. Dimensions; for those using more than Large-scale tasks on a single processor This will trigger a secondary compression mechanism, releasing at least One processor, and through The reduction factor maintains the allowable processing time.
7. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 5, characterized in that: When the task Full-height storage rack The execution time in the middle does not exceed And assigned to If there are 1 processor, then allocate it to In One processor; When the task With full-height storage rack Another task Execution time is less than And each is assigned to one processor, then and Assigned to The same processor in; set up Indicates full-height storage rack The number of idle processors; when there are tasks Half-height storage rack In the middle, it is in The execution time on each processor does not exceed Then Assigned to One processor.
8. The container affinity-aware flexible scheduling method for heterogeneous clusters according to claim 5, characterized in that, Given resource constraints, select the resource allocation scheme that maximizes total profit, including: For each VM, select the container combination with the highest affinity within the memory limit, due to the existence of The scheduler will process each virtual machine in turn. An example of the knapsack problem; if a subsequent virtual machine shows a stronger affinity for an already assigned container, then the container is reassigned to the best-matching virtual machine; The scheduler maintains the affinity increment matrix. The process includes the following steps: for each combination of container and VM, the increment is equal to the difference between the current VM's affinity value and the container's highest historical affinity value; for each VM, solve an affinity-based knapsack algorithm and adjust the container allocation based on subsequent affinity.
9. A container affinity-aware flexible scheduling device for heterogeneous clusters, characterized in that: Memory, used to store computer programs / instructions; A processor for executing the computer program / instructions to implement the steps of the container affinity-aware flexible scheduling method for heterogeneous clusters as described in any one of claims 1-7.
10. A container affinity-aware, plastically schedulable storage medium for heterogeneous clusters, wherein computer programs / instructions are stored thereon, characterized in that, When the computer program / instruction is executed by the processor, it performs the steps of implementing a container affinity-aware flexible scheduling method for heterogeneous clusters as described in any one of claims 1-7.