Cluster scheduling simulation method, device and equipment

By generating random time series and task objects, simulating the task sequence and transferring the usage status of computing power provider objects, the lack of distributed computer cluster scheduling simulation technology is solved, and the development and debugging of scheduling algorithms on distributed computer clusters is realized. Improved scheduling efficiency and quality.

CN118939421APending Publication Date: 2024-11-12BEIJING GONGJI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410983506.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing technology lacks scheduling simulation technology and frameworks for distributed computer clusters, making it difficult to efficiently schedule workloads on distributed computer clusters, and cannot meet a wide range of computing needs.

Method used

By generating random time series and task objects, simulate task sequences, and transferring the usage status of the computing power provider object based on the scheduling instructions and the model parameters of the computing power provider object, calculating the scheduling evaluation parameters, and establishing a simulation technology for a distributed computer cluster based on the scheduling instructions and the model parameters of the computing power provider object, transferring the usage status of the computing power provider object, calculating the scheduling evaluation parameters, and establishing a simulation technology for a distributed computer cluster and framework.

Benefits of technology

The development, debugging and testing of distributed computer cluster scheduling algorithms is realized, the efficiency and quality of the scheduling process are improved, and the application of actual scheduling algorithms in distributed environments is supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939421A_ABST
    Figure CN118939421A_ABST
Patent Text Reader

Abstract

The invention discloses a cluster scheduling simulation method, a cluster scheduling simulation device and cluster scheduling simulation equipment, which are used for realizing simulation aiming at scheduling of a distributed computer cluster. The method comprises the steps that a random time sequence is generated, and task objects are generated according to task attributes; task objects are added to time points included in the random time sequence, and a task sequence is generated; according to the scheduling instruction for the task sequence and / or the model parameter of the computing power provider object, transferring the use state of the computing power provider object; and calculating a scheduling evaluation parameter according to the use state of the computing power provider object and / or the parameter value of the task sequence executed by the computing power provider object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer simulation technology, and in particular to a cluster scheduling simulation method, device and equipment. Background Art

[0002] Scientific computing, artificial intelligence training, website application services and other workloads often need to run on computer clusters consisting of multiple computers due to their requirements for performance and stability. Computer clusters as infrastructure often need to deploy multiple different workloads at the same time, which makes efficient and reliable scheduling of workloads on computer clusters a common demand.

[0003] Since traditional supercomputing clusters, cloud vendors and other computing service providers generally use centralized computer rooms, most of the existing computer workload scheduling technologies are also targeted at application scenarios in such computer rooms. However, there is still a lack of corresponding scheduling algorithms for computer clusters composed of a large number of computers distributed in different geographical locations and connected through the Internet. In order to support the development, debugging and testing of actual scheduling algorithms, it is necessary to simulate the scheduling algorithms. At present, there is also a lack of simulation technology and framework for distributed computer cluster scheduling. Summary of the invention

[0004] In view of this, embodiments of the present application provide a cluster scheduling simulation method, apparatus, and device to implement scheduling simulation for a distributed computer cluster.

[0005] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:

[0006] A cluster scheduling simulation method, the method comprising:

[0007] Generate a random time series and generate task objects based on task attributes;

[0008] Adding the task object at the time point included in the random time sequence to generate a task sequence;

[0009] Transferring the usage state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object;

[0010] The scheduling evaluation parameter is calculated according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence.

[0011] In a possible implementation, calculating the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence includes:

[0012] Calculate the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object, and calculate the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence; wherein k is a positive integer;

[0013] The total computing time of each computing power provider object is divided by the total startup time of each computing power provider object to obtain the computer load rate.

[0014] In a possible implementation, the calculating the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object includes:

[0015] The duration of the kth computing power provider object being in the startup, idle, and busy states is accumulated to obtain the total startup duration of the kth computing power provider object;

[0016] The calculating the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence includes:

[0017] The duration of the kth computing power provider object executing the target task in the task sequence is accumulated to obtain the total calculation duration of the kth computing power provider object; the duration of the kth computing power provider object executing the target task in the task sequence is the scale of the target task divided by the efficiency of the kth computing power provider object in completing the target task, and the efficiency of the kth computing power provider object in completing the target task is the duration taken by the kth computing power provider object to complete the target task of unit scale.

[0018] In a possible implementation, calculating the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence includes:

[0019] The relative response speed is calculated according to the generation time, execution start time and execution end time of each task in the task sequence.

[0020] In a possible implementation, the calculating the relative response speed according to the generation time, execution start time, and execution end time of each task in the task sequence includes:

[0021] Subtract the execution end time of the i-th task in the task sequence from the execution start time to obtain the execution duration of the i-th task in the task sequence; wherein i is a positive integer;

[0022] Subtracting the execution end time of the i-th task in the task sequence from the generation time to obtain the total response time of the i-th task in the task sequence;

[0023] The relative response speed is obtained by dividing the sum of the execution time of each task in the task sequence by the sum of the total response time of each task in the task sequence.

[0024] In one possible implementation, the execution end time of the i-th task in the task sequence is the execution start time of the i-th task in the task sequence plus the execution duration of the i-th task in the task sequence; the execution duration of the i-th task in the task sequence is the scale of the i-th task in the task sequence divided by the efficiency of the target computing power provider object in completing the i-th task in the task sequence; the efficiency of the target computing power provider object in completing the i-th task in the task sequence is the time taken by the target computing power provider object to complete the i-th task in the task sequence of unit scale.

[0025] In a possible implementation, transferring the usage state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameter of the computing power provider object includes one or more of the following:

[0026] According to the model parameters of the computing power provider object, when the first target condition is met, the usage state of the computing power provider object is changed from idle, busy or shut down to unavailable;

[0027] According to the model parameters of the computing power provider object, when the second target condition is met, the use state of the computing power provider object is transferred from unavailable to shutdown;

[0028] According to the startup scheduling instruction, the usage state of the computing power provider object is transferred from shutdown to startup;

[0029] After the preset startup time has passed, the usage state of the computing power provider object is changed from startup to idle;

[0030] According to the shutdown scheduling instruction, the usage state of the computing power provider object is transferred from idle to shutdown;

[0031] According to the scheduling instructions of the assigned tasks, the usage state of the computing power provider object is changed from idle to busy;

[0032] After the task is executed, the usage state of the computing power provider object is changed from busy to idle.

[0033] A cluster scheduling simulation device, the device comprising:

[0034] The first generating unit is used to generate a random time series and generate a task object according to the task attributes;

[0035] A second generating unit, used for adding the task object at the time point included in the random time sequence to generate a task sequence;

[0036] A state transfer unit, used to transfer the use state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object;

[0037] A calculation unit is used to calculate a scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence.

[0038] A cluster scheduling simulation device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the cluster scheduling simulation method as described above is implemented.

[0039] A computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the cluster scheduling simulation method as described above.

[0040] It can be seen that the embodiments of the present application have the following beneficial effects:

[0041] The embodiment of the present application generates a random time sequence and a task object, and adds a task object at the time point included in the random time sequence to obtain a task sequence. The tasks in the task sequence are scheduled and assigned to the computing power provider object, and the computing power provider object transfers the usage state according to the scheduling instructions and / or its own model parameters, and simulates the operation of the computer through the computing power provider object. The scheduling evaluation parameters can also be calculated based on the usage state of the computing power provider object and / or the parameter values ​​generated by the computing power provider object executing the task sequence to evaluate the scheduling process. Thereby, a simulation technology and framework for distributed computer clusters are established, which can support the development, debugging and testing of actual scheduling algorithms on distributed computer clusters. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of an exemplary application scenario provided for an embodiment of the present application;

[0043] Figure 2 A flow chart of a cluster scheduling simulation method provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the use state transfer of the computing power provider object in an embodiment of the present application;

[0045] Figure 4 This is a schematic diagram of an implementation architecture in an embodiment of the present application;

[0046] Figure 5 This is a schematic diagram of a simulation result in an embodiment of the present application;

[0047] Figure 6 This is another schematic diagram of simulation results in an embodiment of the present application;

[0048] Figure 7 A schematic diagram of a cluster scheduling simulation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0050] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.

[0051] There are two major differences between distributed computer clusters and centralized computer rooms:

[0052] (1) The computers that make up the distributed computer cluster have considerable heterogeneity in their hardware configurations. When building a computer room, generally only a few types of computers are selected. However, since the computers in a distributed computer cluster come from thousands of households, the hardware configurations of the computers are extremely diverse.

[0053] (2) Computers in traditional computer rooms can provide stable services to the cluster most of the time, and may be unavailable due to failures only in a very small percentage of the time. However, computers in a distributed computer cluster may be connected or disconnected at any time due to the personal needs of the owner.

[0054] Currently, only a few specific scientific computing tasks have achieved large-scale collaborative computing on such distributed computer clusters. However, due to their simplicity, these tasks require almost no scheduling to achieve collaborative work and cannot meet the computing needs of a wider range of workloads.

[0055] Implementing efficient scheduling of a wide range of workloads on distributed computer clusters is a complex and unsolved problem due to two characteristics of distributed computer clusters. In order to support the development, debugging and testing of actual scheduling algorithms, it is necessary to simulate the scheduling algorithms. Currently, there is a lack of simulation technology and framework for distributed computer cluster scheduling.

[0056] Based on this, the embodiment of the present application provides a cluster scheduling simulation method, device and equipment, which is aimed at the new demand of developing and debugging scheduling algorithms used in distributed computer clusters, and realizes a scheduling simulation platform for this demand. The main difference between this demand and traditional similar problems is that the computing task input of this distributed computer cluster and the state of each computer that makes up the cluster are both highly dynamic random processes. Therefore, the embodiment of the present application simulates the task input by adopting a random process model, and uses a state machine with randomness to simulate each computer that makes up the cluster. In addition, scheduling evaluation parameters can also be calculated to evaluate indicators such as the quality of the scheduling process. Thereby, a simulation technology and framework for distributed computer clusters are established to support the development, debugging and testing of actual scheduling algorithms on distributed computer clusters.

[0057] In order to facilitate understanding of the cluster scheduling simulation method provided in the embodiment of the present application, Figure 1 See the example scenario shown in the figure. Figure 1 As shown, this figure is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.

[0058] The cluster scheduling simulation method provided in the embodiment of the present application can be applied to terminal devices, such as computers, servers, etc., to simulate the scheduling process of a computer cluster. In the embodiment of the present application, a random time sequence is first generated, and the random time sequence includes multiple random time points. Corresponding task objects can also be generated according to task attributes. Adding task objects at the time points included in the random time sequence can constitute a task sequence. The tasks (i.e., task objects) in the task queue are assigned to the simulated computing power provider object by the scheduling algorithm, and the computing power provider object is used to simulate the computer in the cluster. According to the scheduling instructions of the scheduling algorithm and the model parameters of the computing power provider object itself, the usage status of the computing power provider object is transferred, thereby simulating the usage of the computer in the scheduling process. In addition, the scheduling evaluation parameters can also be calculated to evaluate the scheduling process.

[0059] Those skilled in the art will understand that Figure 1 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.

[0060] To facilitate understanding of the present application, a cluster scheduling simulation method provided in an embodiment of the present application is described below with reference to the accompanying drawings.

[0061] See also Figure 2 As shown, this figure is a flow chart of a cluster scheduling simulation method provided by an embodiment of the present application, such as Figure 2 As shown, the method may include S201-S204:

[0062] S201: Generate a random time series, and generate a task object according to task attributes.

[0063] First, we can simulate the distribution of various access operations in time when users actually use various applications, and generate a random time series of workload requirements. The random time series can be understood as a random timestamp sequence. Then, we simulate the specific attributes of various tasks and generate task objects based on the probability distribution of the scale of each specific task in such tasks. For example, in a speech-to-text task, the task object is speech audio, and speech audio with random duration can be generated as the task object; in an image recognition task, the task object is an image, etc.

[0064] S202: Add task objects at the time points included in the random time sequence to generate a task sequence.

[0065] After the random time series and specific task objects are generated, the task objects are added at the time points included in the random time series, and the two can be combined to obtain the task sequence.

[0066] One run can get a task sequence obtained by a specific type of workload within a specified period of time. Any number of different task sequences can be merged in the order of timestamps based on the random time series contained therein, and a task sequence containing multiple workload types and within the time period to be simulated can be obtained. For example, the first task sequence is (time point 1-speech 1, time point 3-speech 2), and the first task sequence is (time point 2-image 1, time point 4-image 2), which can be merged into the total task sequence (time point 1-speech 1, time point 2-image 1, time point 3-speech 2, time point 4-image 2).

[0067] S203: Transferring the usage status of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object.

[0068] The computing power provider model is instantiated as a computing power provider object, which is used to simulate a computer in a distributed computer cluster. Multiple computing power provider objects form a simulated distributed computer cluster. Task objects can be assigned to computing power provider objects through a scheduling algorithm. The embodiments of this application do not focus on the specific setting rules of the scheduling algorithm, and the scheduling algorithm can be set according to actual conditions.

[0069] The computing power provider model itself records the computer model of the computing power provider, and the computer model corresponds to the resource consumption of this model of computer when it is idle and busy, for example, the cost generated per second during idle and busy computing. At the same time, the model parameters of the computing power provider object can simulate the time characteristics of this computer access scheduling platform.

[0070] A single computing power provider object has five possible states: "Unavailable" (complete refusal to provide services), "Powered Off" (powered off but can be woken up by the scheduling platform at any time, does not consume electricity when powered off, and does not incur fees), "Starting Up" (preparation time from receiving the power-on signal to starting the service, charges are incurred at the busy price but services cannot be provided), "Idle" (available to provide services at any time, charges are incurred at the idle price), and "Busy" (calculating, unable to provide services, charges are incurred at the busy price).

[0071] A single power provider object can accept three scheduling instructions of the scheduling algorithm: "power on", "power off", and "assign tasks". It can also accept the scheduling check instruction "get current status" and audit instructions such as calculating total cost. These instructions will cause the usage status of the power provider object to change. In addition, the conditions for the use status of the power provider to change can also be simulated by the model parameters of the power provider object.

[0072] In a possible implementation, S203 may include one or more of the following implementations of transferring the usage state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object:

[0073] According to the model parameters of the computing power provider object, when the first target condition is met, the usage state of the computing power provider object is changed from idle, busy or shut down to unavailable;

[0074] According to the model parameters of the computing power provider object, when the second target condition is met, the use state of the computing power provider object is transferred from unavailable to shutdown;

[0075] According to the startup scheduling instruction, the usage state of the computing power provider object is transferred from shutdown to startup;

[0076] After the preset startup time has passed, the usage state of the computing power provider object is changed from startup to idle;

[0077] According to the shutdown scheduling instruction, the usage state of the computing power provider object is transferred from idle to shutdown;

[0078] According to the scheduling instructions of the assigned tasks, the usage state of the computing power provider object is changed from idle to busy;

[0079] After the task is executed, the usage state of the computing power provider object is changed from busy to idle.

[0080] See also Figure 3 As shown, a schematic diagram of the use state transfer of the computing power provider object is shown. It can be seen from the figure that user behaviors such as user connection and user offline and computer behaviors such as task calculation and startup will cause the use state transfer of the computing power provider object, and the conditions for the occurrence of these state transfers are simulated by the model parameters of the computing power provider object.

[0081] Among them, the state transition rules caused by task calculation and startup are relatively simple. After the computing power provider object enters the "busy" state, it automatically switches back to the "idle" state after the calculation time. The calculation time can refer to the description of the subsequent embodiments; the computing power provider object has a model parameter of "preset startup time". After entering the "starting" state, it automatically switches to the "idle" state after the preset startup time.

[0082] The rules for user connection and user offline are relatively complex, and the model parameters can be set according to the actual situation. Assuming that you want to simulate the scenario where users use computers independently during working hours and join the computer cluster when the computers are idle after get off work, a possible model parameter is: at 7 o'clock in the morning, because the user needs to go to work, "user offline" must occur, that is, the first target condition is achieved at 7 o'clock in the morning; users may get off work at evenly distributed times between 6 o'clock and 9 o'clock in the evening, and "user connection" occurs at a random time during this period, that is, the second target condition is achieved at this random time. A simpler scenario is that the computing power provider object is specially prepared for this computer cluster, is connected 24 hours a day, and does not appear in the "user offline" state.

[0083] The above process can simulate the usage of computers in a distributed computer cluster during the scheduling process of the scheduling algorithm.

[0084] S204: Calculate scheduling evaluation parameters according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence.

[0085] The scheduling evaluation parameters can be calculated from the usage status of the computing power provider object and / or the relevant parameter values ​​generated when the computing power provider object executes the task to evaluate whether the scheduling process of the scheduling algorithm is reasonable. The scheduling evaluation parameters may include computer load rate, relative response speed, gross profit rate, etc. For details on how to calculate the scheduling evaluation parameters, please refer to the description of the subsequent embodiments.

[0086] The embodiment of the present application generates a random time sequence and a task object, and adds a task object at the time point included in the random time sequence to obtain a task sequence. The tasks in the task sequence are scheduled and assigned to the computing power provider object, and the computing power provider object transfers the usage state according to the scheduling instructions and / or its own model parameters, and simulates the operation of the computer through the computing power provider object. The scheduling evaluation parameters can also be calculated based on the usage state of the computing power provider object and / or the parameter values ​​generated by the computing power provider object executing the task sequence to evaluate the scheduling process. Thereby, a simulation technology and framework for distributed computer clusters are established, which can support the development, debugging and testing of actual scheduling algorithms on distributed computer clusters.

[0087] In a possible implementation, S204 may include calculating the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence:

[0088] A1: Calculate the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object, and calculate the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence; where k is a positive integer.

[0089] The specific implementation of calculating the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object includes:

[0090] The durations of the k-th computing power provider object being in the startup, idle, and busy states are accumulated to obtain the total startup duration of the k-th computing power provider object.

[0091] That is, the total power-on time of the kth computing power provider object refers to the total time that the computing power provider object is in the "power-on", "idle" and "busy" states.

[0092] The specific implementation of calculating the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence includes:

[0093] The duration of the target task in the task sequence executed by the kth computing power provider object is accumulated to obtain the total computing duration of the kth computing power provider object;

[0094] The duration of the kth computing power provider object executing the target task in the task sequence is the scale of the target task divided by the efficiency of the kth computing power provider object in completing the target task. The efficiency of the kth computing power provider object in completing the target task is the duration taken by the kth computing power provider object to complete the target task of unit scale.

[0095] In the embodiment of the present application, the computing power provider object is also responsible for saving the specific computing progress of the current task during the simulation calculation. The specific computing progress refers to the time required for a computing power provider object in a busy state to complete the calculation. Assume that the scale of the i-th task (target task) is w i , which is assigned to the kth computing power provider object. According to the calculation efficiency table, the efficiency of this computing power provider object in completing this type of workload is p ki , then the time required for calculation is w i / p ki .

[0096] Among them, the computational efficiency table records the "key-value pairs" of the time required to calculate various types of workloads of unit scale on various models of computers. The key is a tuple of workload type and computer model, and the value is the time required to calculate the workload of unit scale. This key-value pair will also be provided to the scheduling algorithm module for reference during scheduling. An alternative scheduling strategy is to always assign tasks to the computer with the shortest time each time. For example, the i-th task is an image recognition task, the scale of images is 10, and the efficiency of the k-th computing power provider object to complete the image recognition task is 0.1 seconds for 1 image (task of unit scale), then the calculation time of the i-th task is 1 second.

[0097] If the execution start time is The current time is t, and the execution ends at The execution time is

[0098] The total computing time of the kth computing power provider object is calculated as follows: if the i-th task in the task sequence is assigned to the computing power provider object, and the computing power provider object successfully completes the i-th task, then the above-mentioned computing time w is calculated. i / p ki The time is added to the total calculation time.

[0099] A2: Divide the total computing time of each computing power provider object by the total startup time of each computing power provider object to obtain the computer load rate.

[0100] The total computing time of each computing power provider object is summed to obtain a first value, and the total startup time of each computing power provider object is summed to obtain a second value. The first value divided by the second data can obtain the computer load rate of the cluster, and the computer load rate is used to evaluate the busyness of each computer in the cluster. In order to improve the utilization rate of computers in the cluster, the computer load rate should be increased to keep the computer as busy as possible.

[0101] In a possible implementation, S204 may include calculating the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence:

[0102] The relative response speed is calculated based on the generation time, execution start time, and execution end time of each task in the task sequence.

[0103] The time point corresponding to a task in the task sequence is the time when the task is generated. The time when the i-th task is generated is Execution start time The execution ends at Execution start time The execution ends at Please refer to the description of the above embodiment. According to the generation time, execution start time and execution end time of each task, the relative response speed can be calculated. The relative response speed can evaluate the speed of cluster response to tasks.

[0104] In a possible implementation, the specific implementation of calculating the relative response speed according to the generation time, execution start time, and execution end time of each task in the task sequence may include:

[0105] B1: Subtract the execution end time of the i-th task in the task sequence from the execution start time to obtain the execution duration of the i-th task in the task sequence; where i is a positive integer.

[0106] B2: Subtract the execution end time of the i-th task in the task sequence from the generation time to obtain the total response time of the i-th task in the task sequence.

[0107] B3: Divide the sum of the execution time of each task in the task sequence by the sum of the total response time of each task in the task sequence to obtain the relative response speed.

[0108] In the embodiment of the present application, the relative response speed is calculated as follows: for the i-th task in the task sequence, the generation time of the task is set to The task is assigned to a computing power provider object and the execution starts at The execution completion time is Then the calculation expression of relative response speed is:

[0109]

[0110] From this calculation method, we can see that the relative response speed ranges from (0,1], and the closer the value is to 1, the closer the cluster service quality is to the ideal situation of allocating an idle computer to each task.

[0111] In one possible implementation, the execution end time of the i-th task in the task sequence is the execution start time of the i-th task in the task sequence plus the execution duration of the i-th task in the task sequence; the execution duration of the i-th task in the task sequence is the scale of the i-th task in the task sequence divided by the efficiency of the target computing power provider object in completing the i-th task in the task sequence; the efficiency of the target computing power provider object in completing the i-th task in the task sequence is the time taken by the target computing power provider object to complete the i-th task in the task sequence of unit scale.

[0112] That is, the execution end time is w i is the size of the i-th task in the task sequence, p ki The efficiency of the k-th computing power provider object in completing the i-th task in the task sequence. The target computing power provider object is the k-th computing power provider object.

[0113] In addition, the gross profit margin can also be calculated as a scheduling evaluation parameter. The calculation method of "gross profit margin" is: Assume that for the k-th type of workload, the profit per unit workload is e k , the workload of the lth task of the kth workload is m k,l ; The expenditure incurred by the jth computing power provider object is c j , then the calculation expression of "gross profit margin" is:

[0114]

[0115] See also Figure 4 As shown, a schematic diagram of the implementation architecture of the cluster scheduling simulation method provided by the embodiment of the present application is shown. In practical applications, the embodiment of the present application may include a task sequence generator and a virtual scheduler. Among them, the task sequence generator is used to simulate a series of computing tasks (called task sequences) dynamically generated with user access in the actual operation scenario; the virtual scheduler is used to simulate the processing process of the entire computer cluster on the task sequence, and at the same time, statistical scheduling evaluation parameters.

[0116] The task sequence generator needs to rely on two models at runtime: the task time series model and the single task model. Among them, the task time series model is used to simulate the temporal distribution of various access operations when users actually use various applications. The task time series model can output a timestamp sequence (random time series) caused by workload demand after specifying the model parameters. The single task model is used to simulate the specific properties of various tasks, describing the types of tasks and the probability distribution of the scale of each specific task in such tasks. When the task sequence generator is running, it will first use the task time series model to generate a timestamp sequence of demand occurrence, and then use the single task model to generate the corresponding specific tasks at each timestamp in the timestamp sequence. The two are combined to obtain a task sequence.

[0117] The task sequence generator can be run once to obtain a task sequence for a specific type of workload within a specified period of time. Any number of different task sequences can be merged in the order of timestamps based on the random time series contained in them to obtain a task sequence that includes all workload types to be simulated and all time periods to be simulated.

[0118] In addition to receiving the task sequence as input, the virtual scheduler model also needs to rely on the computing power provider model, computing efficiency table and scheduling algorithm module when running.

[0119] The computing power provider model can be instantiated as a computing power provider object. The scheduling algorithm module provides an operating environment for the actual scheduling algorithm. The scheduling algorithm module needs to simulate the operation process of the entire platform over time, call the scheduling algorithm written by the user when necessary, and provide the scheduling algorithm with necessary information. The scheduling algorithm module also audits the operation of the cluster at runtime to obtain scheduling evaluation parameters.

[0120] The cluster scheduling simulation method provided by the embodiment of the present application is described with an actual application scenario. A speech-to-text task is run on a distributed computer cluster. At this time, the client request from the Internet constitutes the input of the task. According to some statistical principles, the task sequence generator can be set to generate a timestamp sequence in a Poisson flow manner. In the embodiment of the present application, it is assumed that an average of 2 requests are generated per minute.

[0121] The single task model is set to the duration of each audio segment to follow a certain distribution. For simplicity, it is assumed that it conforms to a uniform distribution within the interval of [5, 10] minutes. Audio transcription services are generally charged by duration, for example, 0.042 yuan per second of audio.

[0122] On the virtual scheduler side, assume that the cluster is powered by one or more computers with one or two 4090 graphics cards installed. It takes 2 minutes for this type of computer to boot up and start the service software, and the price is 1.15 yuan per hour. According to actual measurement results, using the mainstream whisper voice transcription software, a computer with a single 4090 graphics card can transcribe 13 minutes of audio per minute, and a computer with two graphics cards can transcribe 26 minutes of audio per minute. Therefore, the calculation efficiency table is:

[0123] {("whisper","4090"):13.0,("whisper","dual4090"):26.0}

[0124] In the embodiment of the present application, it is assumed that all computers participating in the calculation can access the scheduling platform stably and at all times, so the computing power provider object will not enter the "unavailable" state, but will only transfer between the other four states.

[0125] As a demonstration, assume that the following scheduling algorithm is adopted: whenever the platform receives a new computing task, if there are still computers in the idle state in the platform, the task will be immediately assigned to the computer that has entered the idle state the shortest time. If there are no computers in the idle state in the platform, but there are computers in the shutdown state, and the remaining time for the currently busy computer to complete the current task exceeds the time required to start up, a new computer will be started and assigned a task. Otherwise, it means that the entire platform is busy or starting up, and can only wait for a computer to enter the idle state before assigning a task. In addition, to save energy, if any computer is in the "idle" state for 10 consecutive minutes, a "shutdown" command will be sent to it.

[0126] Figure 5 The figure shows the generation time, execution start time, and execution completion time of each task received by the platform when only a single computer provides computing power for 24 hours of continuous simulation. Among them, blue represents the generation time of the task, that is, the time when the task is received, orange represents the execution start time of the task, that is, the time when the task starts calculation, and green represents the execution completion time of the task, that is, the task completion time. In the figure, the execution start time and execution completion time of each task basically coincide, the orange line is covered by the green line, and there is a gap with the generation time of each task, and there is a delay in the task response. At this time, after simulation calculation, the gross profit margin of the platform is 92.97%, but the relative response speed is only 0.58%. That is, the platform is in an unfavorable state of overload operation and extremely poor user experience.

[0127] Figure 6 The situation when 6 computers provide computing power is given. Among them, blue represents the time when the task is generated, that is, the time when the task is received, orange represents the time when the task is started, that is, the time when the task is started, and green represents the time when the task is completed. In the figure, the time when each task is generated, the time when the execution starts, and the time when the execution is completed are basically coincident, and the orange line and the blue line are covered by the green line. At this time, after simulation calculation, the gross profit margin of the platform is 84.80%, and the relative response speed is increased to 75.23%, which is a relatively ideal operating state.

[0128] If the scheduling strategy is changed, for example, the automatic shutdown strategy is cancelled when there are still 6 computers, the gross profit rate drops to 62.11% and the relative response speed increases to 93.43%. It can be seen that the simulation technology provided in the embodiment of the present application reasonably simulates the impact of different algorithms on service quality and gross profit rate.

[0129] Based on a cluster scheduling simulation method provided by the above method embodiment, an embodiment of the present application further provides a cluster scheduling simulation device, which will be described below in conjunction with the accompanying drawings.

[0130] See also Figure 7 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a cluster scheduling simulation device provided in an embodiment of the present application. Figure 7 As shown, the cluster scheduling simulation device includes:

[0131] The first generating unit 701 is used to generate a random time sequence and generate a task object according to the task attributes;

[0132] The second generating unit 702 is used to add the task object at the time point included in the random time sequence to generate a task sequence;

[0133] A state transfer unit 703, used to transfer the use state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object;

[0134] The calculation unit 704 is used to calculate the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence.

[0135] In a possible implementation, the computing unit includes:

[0136] The first calculation subunit is used to calculate the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object, and calculate the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence; wherein k is a positive integer;

[0137] The second calculation subunit is used to divide the sum of the total calculation time of each computing power provider object by the sum of the total startup time of each computing power provider object to obtain the computer load rate.

[0138] In a possible implementation manner, the first computing subunit is specifically configured to:

[0139] The duration of the kth computing power provider object being in the startup, idle, and busy states is accumulated to obtain the total startup duration of the kth computing power provider object;

[0140] The duration of the kth computing power provider object executing the target task in the task sequence is accumulated to obtain the total calculation duration of the kth computing power provider object; the duration of the kth computing power provider object executing the target task in the task sequence is the scale of the target task divided by the efficiency of the kth computing power provider object in completing the target task, and the efficiency of the kth computing power provider object in completing the target task is the duration taken by the kth computing power provider object to complete the target task of unit scale.

[0141] In a possible implementation, the computing unit includes:

[0142] The third calculation subunit is used to calculate the relative response speed according to the generation time, execution start time and execution end time of each task in the task sequence.

[0143] In a possible implementation manner, the third computing subunit is specifically configured to:

[0144] Subtract the execution end time of the i-th task in the task sequence from the execution start time to obtain the execution duration of the i-th task in the task sequence; wherein i is a positive integer;

[0145] Subtracting the execution end time of the i-th task in the task sequence from the generation time to obtain the total response time of the i-th task in the task sequence;

[0146] The relative response speed is obtained by dividing the sum of the execution time of each task in the task sequence by the sum of the total response time of each task in the task sequence.

[0147] In one possible implementation, the execution end time of the i-th task in the task sequence is the execution start time of the i-th task in the task sequence plus the execution duration of the i-th task in the task sequence; the execution duration of the i-th task in the task sequence is the scale of the i-th task in the task sequence divided by the efficiency of the target computing power provider object in completing the i-th task in the task sequence; the efficiency of the target computing power provider object in completing the i-th task in the task sequence is the time taken by the target computing power provider object to complete the i-th task in the task sequence of unit scale.

[0148] In a possible implementation, the state transfer unit is used for one or more of the following:

[0149] According to the model parameters of the computing power provider object, when the first target condition is met, the usage state of the computing power provider object is changed from idle, busy or shut down to unavailable;

[0150] According to the model parameters of the computing power provider object, when the second target condition is met, the use state of the computing power provider object is transferred from unavailable to shutdown;

[0151] According to the startup scheduling instruction, the usage state of the computing power provider object is transferred from shutdown to startup;

[0152] After the preset startup time has passed, the usage state of the computing power provider object is changed from startup to idle;

[0153] According to the shutdown scheduling instruction, the usage state of the computing power provider object is transferred from idle to shutdown;

[0154] According to the scheduling instructions of the assigned tasks, the usage state of the computing power provider object is changed from idle to busy;

[0155] After the task is executed, the usage state of the computing power provider object is changed from busy to idle.

[0156] In addition, an embodiment of the present application also provides a cluster scheduling simulation device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the cluster scheduling simulation method as described in any one of the above items is implemented.

[0157] The embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the cluster scheduling simulation method as described in any one of the above items.

[0158] An embodiment of the present application further provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes any of the cluster scheduling simulation methods described above.

[0159] The embodiment of the present application generates a random time sequence and a task object, and adds a task object at the time point included in the random time sequence to obtain a task sequence. The tasks in the task sequence are scheduled and assigned to the computing power provider object, and the computing power provider object transfers the usage state according to the scheduling instructions and / or its own model parameters, and simulates the operation of the computer through the computing power provider object. The scheduling evaluation parameters can also be calculated based on the usage state of the computing power provider object and / or the parameter values ​​generated by the computing power provider object executing the task sequence to evaluate the scheduling process. Thereby, a simulation technology and framework for distributed computer clusters are established, which can support the development, debugging and testing of actual scheduling algorithms on distributed computer clusters.

[0160] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0161] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0162] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0163] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0164] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A cluster scheduling simulation method, characterized in that: The method comprises: Generate a random time series and generate task objects based on task attributes; Adding the task object at the time point included in the random time sequence to generate a task sequence; Transferring the usage state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object; The scheduling evaluation parameter is calculated according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence.

2. The method according to claim 1, characterized in that The calculating the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence includes: Calculate the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object, and calculate the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence; wherein k is a positive integer; The total computing time of each computing power provider object is divided by the total startup time of each computing power provider object to obtain the computer load rate.

3. The method according to claim 2, characterized in that The calculating the total startup time of the kth computing power provider object according to the usage status of the kth computing power provider object includes: The duration of the kth computing power provider object being in the startup, idle, and busy states is accumulated to obtain the total startup duration of the kth computing power provider object; The calculating the total computing time of the kth computing power provider object according to the parameter value of the computing power provider object executing the task sequence includes: The duration of the kth computing power provider object executing the target task in the task sequence is accumulated to obtain the total calculation duration of the kth computing power provider object; the duration of the kth computing power provider object executing the target task in the task sequence is the scale of the target task divided by the efficiency of the kth computing power provider object in completing the target task, and the efficiency of the kth computing power provider object in completing the target task is the duration taken by the kth computing power provider object to complete the target task of unit scale.

4. The method according to claim 1, characterized in that The calculating the scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence includes: The relative response speed is calculated according to the generation time, execution start time and execution end time of each task in the task sequence.

5. The method according to claim 4, characterized in that The calculating of the relative response speed according to the generation time, execution start time, and execution end time of each task in the task sequence includes: Subtract the execution end time of the i-th task in the task sequence from the execution start time to obtain the execution duration of the i-th task in the task sequence; wherein i is a positive integer; Subtracting the execution end time of the i-th task in the task sequence from the generation time to obtain the total response time of the i-th task in the task sequence; The relative response speed is obtained by dividing the sum of the execution time of each task in the task sequence by the sum of the total response time of each task in the task sequence.

6. The method according to claim 5, characterized in that The execution end time of the i-th task in the task sequence is the execution start time of the i-th task in the task sequence plus the execution duration of the i-th task in the task sequence. The execution duration of the i-th task in the task sequence is the scale of the i-th task in the task sequence divided by the efficiency of the target computing power provider object in completing the i-th task in the task sequence. The efficiency of the target computing power provider object in completing the i-th task in the task sequence is the time taken by the target computing power provider object to complete the i-th task in the task sequence of unit scale.

7. The method according to claim 1, characterized in that The transferring of the usage state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameter of the computing power provider object includes one or more of the following: According to the model parameters of the computing power provider object, when the first target condition is met, the usage state of the computing power provider object is changed from idle, busy or shut down to unavailable; According to the model parameters of the computing power provider object, when the second target condition is met, the use state of the computing power provider object is transferred from unavailable to shutdown; According to the startup scheduling instruction, the usage state of the computing power provider object is transferred from shutdown to startup; After the preset startup time has passed, the usage state of the computing power provider object is changed from startup to idle; According to the shutdown scheduling instruction, the usage state of the computing power provider object is transferred from idle to shutdown; According to the scheduling instructions of the assigned tasks, the usage state of the computing power provider object is changed from idle to busy; After the task is executed, the usage state of the computing power provider object is changed from busy to idle.

8. A cluster scheduling simulation device, characterized in that: The device comprises: The first generating unit is used to generate a random time series and generate a task object according to the task attributes; A second generating unit, used for adding the task object at the time point included in the random time sequence to generate a task sequence; A state transfer unit, used to transfer the use state of the computing power provider object according to the scheduling instruction for the task sequence and / or the model parameters of the computing power provider object; A calculation unit is used to calculate a scheduling evaluation parameter according to the usage status of the computing power provider object and / or the parameter value of the computing power provider object executing the task sequence.

9. A cluster scheduling simulation device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the cluster scheduling simulation method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the cluster scheduling simulation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Service response method and system

    CN109584105A

  • Task scheduling simulation system

    CN111324445A

  • Network heterogeneous computing platform testing method and device and computer equipment

    CN114297041A

  • Network simulation method and device for distributed AI cluster

    CN114610484A

  • Centralized scheduling simulation device and method based on cluster trajectory data

    CN116800640A