Scheduling device and method for distributed real-time processing system of heterogeneous CPU cluster

By working together with the cluster scheduler and node manager, a balanced distribution of task load is achieved in the heterogeneous CPU cluster, improving resource utilization and computing efficiency, and solving the problem of low resource utilization in the heterogeneous CPU cluster.

CN114860442BActive Publication Date: 2024-11-15WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210482371.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2024-11-15
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

In heterogeneous CPU clusters, existing technologies struggle to effectively schedule tasks to improve resource utilization, resulting in computing power being limited to the weakest node.

Method used

A scheduling device and method are adopted, including a cluster scheduler and a node manager, which acquires the computing power of nodes, allocates data generation and processing units, calculates weight scores, and randomly selects the destination data processing unit with a smaller load to achieve task load balancing.

Benefits of technology

It achieves balanced distribution of task load in heterogeneous CPU clusters, improves resource utilization and computing efficiency, and solves the problem of low resource utilization in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860442B_ABST
    Figure CN114860442B_ABST
Patent Text Reader

Abstract

The present invention discloses a scheduling device and method for a heterogeneous CPU cluster distributed real-time processing system. First, the computing power of each working node in the cluster is obtained; then the cluster scheduler allocates a data generation unit and a data processing unit to the working node according to the task topology information and the computing power of the working node, calculates the weight score of the data processing unit according to the actual running time obtained by the working node running the data processing unit test instance, and adds the destination data processing unit information of the data generation unit and the data processing unit; the flow data processed by the working node is randomly selected by the node manager according to the weight score of the destination data processing unit for sampling, the load size is calculated according to the sampling information, and the flow data is sent to the destination data processing unit with a smaller load. The present invention can more efficiently distribute the task load to each heterogeneous working node with different computing power in a balanced manner, and efficiently utilize the heterogeneous CPU cluster resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cloud computing, and in particular relates to a scheduling device and method for a distributed real-time processing system in a heterogeneous CPU cluster. Background Art

[0002] A cluster is a collection of computing nodes consisting of two or more servers. The servers in a cluster (also called nodes or node servers) are interconnected and can communicate with each other. The servers in a cluster work together to provide network application services to users. For users, the cluster is like a single system. The server resources in a cluster are similar to the resources in the resource pool in an application. Users do not need to worry about the allocation of resources, which maximizes the use value of hardware resources. The advantage of a cluster is that it can use servers of various grades as nodes to achieve high computing speeds and complete large-volume calculations. It can not only meet the growing demand for information services today, but also the cluster cost is not high.

[0003] Distributed real-time processing systems generally consist of two parts: a cluster scheduler and a node manager. The cluster scheduler is used to assign scheduling tasks to the node manager. Each working node in the cluster has a node manager that manages the resources on the node and runs the tasks assigned by the cluster scheduler. Distributed real-time processing systems generally use stream data processing and work on homogeneous clusters.

[0004] A heterogeneous CPU cluster refers to a cluster in which two or more node servers have different CPU computing capabilities. Since the computing capabilities of the node servers are different, the specific conditions of each server node must be considered when scheduling tasks so that the utilization of each node server can be kept consistent to prevent the computing power of the entire cluster from being restricted by the node server with the weakest computing power. Therefore, it is necessary to provide a scheduling method suitable for a distributed real-time processing system in a heterogeneous CPU cluster to improve resource utilization in a heterogeneous CPU cluster. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a scheduling method and device for a distributed real-time processing system in a heterogeneous CPU cluster.

[0006] The technical solution adopted by the device of the present invention is: a scheduling device for a heterogeneous CPU cluster distributed real-time processing system, including a cluster scheduler and a node manager;

[0007] The cluster scheduler is used to schedule and allocate all data generation units and data processing units in the task topology, record and save the status and computing power of all working nodes and the scheduling records of data generation units and data processing units; specifically includes the following modules:

[0008] The first module is used to communicate with all working nodes in the cluster through the network;

[0009] The second module is used to save the status of the working nodes and the allocation records of the data generation unit and the data processing unit;

[0010] The third module is used to calculate the allocation results of all data generating units and data processing units;

[0011] The node manager is used to manage the operation of all data generation units and data processing units in the working node, and send the stream data generated by the data generation unit and the stream data processed by the data processing unit to the next destination data processing unit; specifically includes the following modules:

[0012] The fourth module is used for network communication with the cluster scheduler and other node managers;

[0013] The fifth module is used to process and run the data generation unit and the data processing unit assigned to the working node;

[0014] The sixth module is used to collect the flow data generated by this node and send it to the appropriate next destination data processing unit.

[0015] The technical solution adopted by the method of the present invention is: a scheduling method for a heterogeneous CPU cluster distributed real-time processing system, comprising the following steps:

[0016] Step 1: Get the computing power of each working node in the cluster;

[0017] Step 2: The cluster scheduler allocates data generation units and data processing units to the working nodes based on the task topology information and the computing power of the working nodes;

[0018] Step 3: The working node runs the data processing unit test instance assigned by the cluster scheduler to obtain its actual running time;

[0019] Step 4: The cluster scheduler calculates the weight score of the data processing unit according to the actual running time of the data processing unit in the working node, and adds the destination data processing unit information of the data generating unit and the data processing unit;

[0020] Step 5: The flow data generated by the data generation unit in the working node or the flow data processed by the data processing unit is randomly selected by the node manager according to the weight score of the target data processing unit for sampling, and the waiting queue length of the flow data of the target data processing unit is obtained;

[0021] Step 6: The node manager calculates the load size of the destination data processing unit according to the waiting queue length, and sends the stream data to the destination data processing unit with a smaller load.

[0022] Through the distributed real-time processing system scheduling device and method in a heterogeneous CPU cluster provided by the present invention, the task load can be more efficiently and evenly distributed to heterogeneous work nodes with different computing power, and the heterogeneous CPU cluster resources can be efficiently utilized. The solution of the present invention is simple and convenient to implement, has strong real-time performance, solves the problem of low practicality in related technologies, and has important market value. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A diagram of the architecture of a scheduling device for a heterogeneous CPU cluster distributed real-time processing system provided in an embodiment of the present invention.

[0024] Figure 2 A flowchart of a scheduling method for scheduling a heterogeneous CPU cluster distributed real-time processing system provided by an embodiment of the present invention.

[0025] Figure 3 A cluster scheduler and node manager command calling and data transmission flow chart provided in an embodiment of the present invention.

[0026] Figure 4 A flow chart of stream data scheduling provided by an embodiment of the present invention.

[0027] Figure 5 A task topology diagram is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0029] Please see Figure 1 , a scheduling device for a heterogeneous CPU cluster distributed real-time processing system provided by the present invention includes a cluster scheduler and a node manager;

[0030] The cluster scheduler of this embodiment is used to schedule and allocate all data generation units and data processing units described in the task topology, record and save the status and computing capabilities of all working nodes and the scheduling records of the data generation units and data processing units; specifically, it includes the following modules:

[0031] The first module is used to communicate with all working nodes in the cluster through the network;

[0032] The second module is used to save the status of the working nodes and the allocation records of the data generation unit and the data processing unit;

[0033] The third module is used to calculate the allocation results of all data generating units and data processing units;

[0034] The node manager of this embodiment is used to manage the operation of all data generating units and data processing units in the working node, and send the stream data generated by the data generating unit and the stream data processed by the data processing unit to the next destination data processing unit; specifically, it includes the following modules:

[0035] The fourth module is used for network communication with the cluster scheduler and other node managers;

[0036] The fifth module is used to process and run the data generation unit and the data processing unit assigned to the working node;

[0037] The sixth module is used to collect the flow data generated by this node and send it to the appropriate next destination data processing unit.

[0038] Please see Figure 2 , Figure 3 and Figure 4 The present invention provides a scheduling method for a heterogeneous CPU cluster distributed real-time processing system, comprising the following steps:

[0039] Step 1: Get the computing power of each working node in the cluster;

[0040] In this embodiment, first, the working node resources are initialized, the IP address and port number of the node manager are configured, the number of data generation units and data processing unit slots of the node are configured according to the configuration file and the number of CPU cores of the node, a stream data receiving queue is initialized for each data processing unit according to the number of data processing unit slots, and the computing power score of the CPU of the node is calculated.

[0041] In this embodiment, the CPU computing power score is the score obtained by the working node running the benchmark job on a single core.

[0042] In this embodiment, the node resources include the IP address and port number of the node manager, the CPU computing power score, the number of data generation units and data processing unit slots.

[0043] In this embodiment, the working node sends the resource information of the node to the cluster scheduler through the network. The cluster scheduler maintains a working node information linked list and inserts the received working node resource information into the linked list in ascending order of CPU computing power scores.

[0044] In this embodiment, the working node information maintained in the cluster scheduler includes the IP address and port number of the working node manager, the CPU computing power score, the total number of data generation unit slots, the number of unused data generation unit slots, the number of used data generation unit slots, the total number of data processing unit slots, the number of unused data processing unit slots, and the number of used data processing unit slots. The working node information linked list is the basis for the cluster scheduler to allocate scheduling.

[0045] Step 2: The cluster scheduler allocates data generation units and data processing units to the working nodes based on the task topology information and the computing power of the working nodes;

[0046] Please see Figure 5 The task topology information of this embodiment includes several types of data generating units and data processing units; the parallelism of each data generating unit and data processing unit, that is, the number of such data generating units or data processing units in the entire cluster; the parent path information of each data processing unit; and the computing power constraint of each data processing unit.

[0047] In this embodiment, the cluster scheduler obtains the task topology task, obtains the description information of the data generating unit and the data processing unit required for scheduling, and puts the data generating unit and the data processing unit information into the array to be allocated.

[0048] In this embodiment, the data generation unit and data processing unit described in the task topology also need to set the degree of parallelism, and the data processing unit also needs to set the upper unit. The upper unit can be either a data generation unit or a data processing unit. The data processing unit can also set a computing power constraint condition, that is, the minimum computing power score requirement required for the data processing unit to run.

[0049] In this embodiment, the cluster scheduler needs to expand the data generation unit and the data processing unit into multiple identical units according to the degree of parallelism, and then put them into the array to be allocated in sequence.

[0050] In this embodiment, the cluster scheduler traverses all data generation units and data processing units in the array to be allocated, and selects working nodes that meet the constraints and have unallocated task slots from the working node information linked list for allocation, that is, the information of the data generation unit or data processing unit is stored in the Taskinfo array of the corresponding working node information.

[0051] In this embodiment, the cluster scheduler traverses the linked list of working node information, and each time a working node information is traversed, the working node information to which the task has been assigned is sent to the working node through the network.

[0052] Step 3: The working node runs the data processing unit test instance assigned by the cluster scheduler to obtain its actual running time;

[0053] In this embodiment, the work node manager receives the work node information sent by the cluster scheduler, including the allocation results of the data generation unit and the data processing unit. The work node manager traverses the array containing the allocation results, puts them into unused unit slots, runs their test instances and calculates their running time.

[0054] In this embodiment, after all data processing units in the working node have finished running the test instance, the working node manager sends the recorded running time of each data processing unit to the cluster scheduler through the network.

[0055] Step 4: The cluster scheduler calculates the weight score of the data processing unit according to the actual running time of the data processing unit in the working node, and adds the destination data processing unit information of the data generating unit and the data processing unit;

[0056] In this embodiment, after the cluster scheduler receives the data processing unit running time sent by the working node scheduler, it adds it to the relevant fields of the corresponding data processing unit information in the Taskinfo array in the working node information linked list for storage.

[0057] In this embodiment, the cluster scheduler traverses the data processing unit information of Taskinfo in the work node information linked list, searches for all data processing units at this layer according to the information of the data processing unit, and searches for all upper-level unit information according to the upper-level unit name recorded in the data processing unit. The data processing units at this layer are sorted from large to small according to the running time and their weight scores are calculated, and then all data processing units at this layer are added to the path field of the upper-level unit.

[0058] In this embodiment, the weight score of the data processing unit is calculated based on the data processing unit with the longest running time in each layer of data processing units, and its weight is set to 1. The weight scores of other data processing units in this layer are the running time of the current data processing unit divided by the running time of the benchmark data processing unit. Assuming that the running time of the data processing unit with the longest running time in this layer of data processing units is 30ms, its weight is 1, and the running time of another data processing unit is 10ms, then its weight score is 30ms / 10ms=3. The higher the weight score of the task of each layer of data processing units, the more data can be processed in the same time.

[0059] In this embodiment, the path field in the data processing unit stores all optional destination data processing units that are subsequently scheduled to process the stream data processed by the data processing unit.

[0060] In this embodiment, the cluster scheduler traverses the working node information linked list and sends the improved data generation unit and data processing unit allocation information to each working node through the network.

[0061] At this point, the cluster scheduler's scheduling work is completed, and all data generation units and data processing units in a task topology have been scheduled to the working nodes.

[0062] Step 5: The flow data generated by the data generation unit in the working node or the flow data processed by the data processing unit is randomly selected by the node manager according to the weight score of the target data processing unit for sampling, and the waiting queue length of the flow data of the target data processing unit is obtained;

[0063] In this embodiment, the stream data generated by the data generating unit in the working node or the stream data processed by the data processing unit is submitted to the stream data sending queue of the working node manager.

[0064] In this embodiment, the flow data includes information of all destination data processing units, including their IP addresses and weight scores.

[0065] In this embodiment, the working node manager reads a stream data to be sent from the head of the stream data sending queue, and obtains all target data processing units of the stream data according to the information identified in the stream data.

[0066] In this embodiment, the working node manager randomly selects two sampling data processing units according to the weight scores of all target data processing units. The working node manager inquires the number of flow data waiting to be processed in the two sampling data processing units through the network.

[0067] In this embodiment, the sampling data processing unit is selected by random selection based on the weight score of the data processing unit. Assuming that the sum of the weight scores of all target data processing units is 100, and the score of one target data processing unit is 10, the probability of its being selected is 10%.

[0068] Step 6: The node manager calculates the load size of the destination data processing unit according to the waiting queue length, and sends the stream data to the destination data processing unit with a smaller load.

[0069] In this embodiment, the working node manager calculates the load sizes of the two sampling data processing units respectively according to the amount of flow data waiting to be processed in the two sampling data processing units.

[0070] In this embodiment, the load size of the data processing unit is the ratio of the number of flow data to the weight score of the data processing unit. The larger the load size, the longer the waiting time for processing a new flow data after it arrives. Assuming that the weight of one of the sampling data processing units is 3 and the number of flow data to be processed is 6, its load size is 2; the weight of another sampling data processing unit is 6 and the number of flow data to be processed is 6, its load size is 1.

[0071] In this embodiment, the working node manager selects a sampling data processing unit with a smaller load and sends the stream data to the sampling data processing unit through the network.

[0072] At this point, one stream data in the working node has been scheduled, and all stream data in this cluster are also scheduled using the scheduling method.

[0073] The stream data in the present invention is an abstraction of events in the event stream in the distributed real-time processing system, the data generation unit is a stream data generation unit running in the working node, and the data processing unit is a stream data processing unit running in the working node. Task topology is a task topology that describes multiple data generation units and data processing units in the distributed real-time processing system.

[0074] The present invention can improve the scheduling strategy of the scheduler in the existing distributed real-time processing system, so that the streaming data can still be efficiently scheduled to the data processing unit with lighter load in the heterogeneous CPU cluster, so that the load of the data processing unit in the entire cluster is in a relatively balanced state, and the computing resources in the heterogeneous CPU cluster are efficiently utilized.

[0075] In specific implementation, the method proposed in the technical solution of the present invention can be implemented by technical personnel in this field using computer software technology to realize automatic operation process. System devices for implementing the method, such as computer-readable storage media storing the corresponding computer program of the technical solution of the present invention and computer equipment running the corresponding computer program, should also be within the scope of protection of the present invention.

[0076] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A scheduling method for a heterogeneous CPU cluster distributed real-time processing system, characterized in that: The following steps are involved: Step 1: Get the computing power of each working node in the cluster; First, the working node resources are initialized, the IP address and port number of the node manager are configured, the number of data generation units and data processing unit slots of the node are configured according to the configuration file and the number of CPU cores of the node, a stream data receiving queue is initialized for each data processing unit according to the number of data processing unit slots, and the computing power score of the CPU of the node is calculated; the working node sends the resource information of the node to the cluster scheduler through the network, and the cluster scheduler maintains a linked list of working node information and inserts the received working node resource information into the linked list in ascending order of CPU computing power score; the CPU computing power score is the score obtained by the working node running the benchmark job on a single core; Step 2: The cluster scheduler allocates data generation units and data processing units to the working nodes according to the task topology information and the computing power of the working nodes; The task topology information includes several types of data generation units and data processing units; the parallelism of each data generation unit and data processing unit, that is, the number of such data generation units or data processing units in the entire cluster; the parent path information of each data processing unit; and the computing power constraint conditions of each data processing unit; Step 3: The working node runs the data processing unit test instance assigned by the cluster scheduler to obtain its actual running time; The worker node manager receives the worker node information sent by the cluster scheduler, including the allocation results of the data generation unit and the data processing unit; the worker node manager traverses the array containing the allocation results, puts them into unused unit slots, runs its test instance and calculates its running time; Step 4: The cluster scheduler calculates the weight score of the data processing unit according to the actual running time of the data processing unit in the working node, and adds the destination data processing unit information of the data generating unit and the data processing unit; Step 5: The flow data generated by the data generation unit in the working node or the flow data processed by the data processing unit is randomly selected by the node manager according to the weight score of the target data processing unit for sampling, and the waiting queue length of the flow data of the target data processing unit is obtained; Step 6: The node manager calculates the load size of the destination data processing unit according to the waiting queue length, and sends the stream data to the destination data processing unit with a smaller load.

2. The scheduling method for a heterogeneous CPU cluster distributed real-time processing system according to claim 1, characterized in that: The weight score of the data processing unit described in step 4 is the relative score between all parallel data processing units of the same type and has nothing to do with data processing units of other types. Among all data processing units of the same type, the data processing unit with the longest running time is selected as the benchmark data processing unit, and its weight score is 1. The weight scores of the remaining data processing units are the ratio of the running time of the current data processing unit to the running time of the benchmark data processing unit.

3. The scheduling method for a heterogeneous CPU cluster distributed real-time processing system according to claim 1, characterized in that: In step 5, the node manager randomly selects two target data processing units according to the weight scores of the target data processing units. The selection is based on the weight scores of the data processing units. The higher the score, the greater the probability of being selected. Assuming that the sum of the weight scores of all parallel data processing units of the same type is Sn, and the weight score of one data processing unit is Si, the probability of the data processing unit being selected is Pi = Si / Sn.

4. The scheduling method for a heterogeneous CPU cluster distributed real-time processing system according to any one of claims 1 to 3, characterized in that: In step 6, the load size value of the data processing unit is the ratio of the waiting queue length value of the data processing unit to the weight score of the data processing unit.

5. A scheduling device for a heterogeneous CPU cluster distributed real-time processing system, used to implement the method described in any one of claims 1 to 4; characterized in that: Includes cluster scheduler and node manager; The cluster scheduler is used to schedule and allocate all data generation units and data processing units in the task topology, record and save the status and computing power of all working nodes and the scheduling records of data generation units and data processing units; specifically includes the following modules: The first module is used to communicate with all working nodes in the cluster through the network; The second module is used to save the status of the working nodes and the allocation records of the data generation unit and the data processing unit; The third module is used to calculate the allocation results of all data generating units and data processing units; The node manager is used to manage the operation of all data generation units and data processing units in the working node, and send the stream data generated by the data generation unit and the stream data processed by the data processing unit to the next destination data processing unit; specifically includes the following modules: The fourth module is used for network communication with the cluster scheduler and other node managers; The fifth module is used to process and run the data generation unit and the data processing unit assigned to the working node; The sixth module is used to collect the flow data generated by this node and send it to the appropriate next destination data processing unit.