Resource allocation method and device

By dynamically adjusting cluster resource usage weights based on job characteristics, the problem of unfair resource allocation and job starvation in private cloud data centers is solved, and fair allocation and efficient utilization of resources are achieved.

CN113765949BActive Publication Date: 2024-10-22HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202010490013.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-02
Publication Date
2024-10-22
Estimated Expiration
2040-06-02

AI Technical Summary

Technical Problem

In the scenario of a private cloud data center, multiple users share the resources of the node cluster. How to achieve fair allocation of resources has become an urgent problem to be solved. In the existing technology, the weight setting of historical resource usage information and real-time resource usage information depends on management. employee experience, leading to problems such as unfair resource allocation and job starvation.

Method used

By determining the characteristics of jobs submitted within a preset time period, the historical and real-time resource usage weights of the cluster are calculated based on the high resource consumption ratio of the jobs, and users' priorities are dynamically adjusted to avoid unfair resource allocation and job starvation.

Benefits of technology

It achieves the accuracy and flexibility of resource allocation, reduces the administrator's dependence on experience, improves resource utilization, and avoids the problems of unfair resource allocation and job starvation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113765949B_ABST
    Figure CN113765949B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for resource allocation, the method comprising: determining the characteristics of multiple jobs submitted within a preset time period; determining a first impact factor and a second impact factor according to the characteristics of the multiple jobs, wherein the first impact factor is a weight corresponding to the historical resource usage information of the cluster, and the second impact factor is a weight corresponding to the real-time resource usage information of the cluster; determining a target user according to the user's historical resource usage information, the first impact factor, the real-time resource usage information, and the second impact factor. The technical solution of the present application can achieve fair allocation of resources and avoid the problem of unfair resource allocation caused by improper parameter settings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and more specifically, to a method and device for resource allocation. Background Art

[0002] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0003] During AI training, resources need to be allocated for jobs submitted by users. In the scenario of a private cloud data center, multiple users share resources in a node cluster. Therefore, how to achieve fair allocation of resources among multiple users becomes an urgent problem to be solved. Summary of the invention

[0004] The present application provides a method and device for resource allocation, which can achieve fair allocation of resources and avoid the problem of unfair resource allocation caused by improper parameter settings.

[0005] In a first aspect, a method for resource allocation is provided, comprising: determining characteristics of multiple jobs submitted within a preset time period; determining a first influencing factor and a second influencing factor based on the characteristics of the multiple jobs, wherein the first influencing factor is a weight corresponding to historical resource usage information of a cluster, and the second influencing factor is a weight corresponding to real-time resource usage information of the cluster; determining a target user based on the user's historical resource usage information, the first influencing factor, the real-time resource usage information, and the second influencing factor.

[0006] In the above technical solution, the weights corresponding to the historical resource usage information of the cluster and the weights corresponding to the real-time resource usage information of the cluster are determined according to the characteristics of multiple jobs submitted in the cluster within a preset time period. On the one hand, the weights corresponding to the historical resource usage information of the cluster and the weights corresponding to the real-time resource usage information of the cluster are more accurate. On the other hand, the above weights are more flexible. When the type or characteristics of the cluster job changes, the weights corresponding to the historical resource usage information of the cluster and the weights corresponding to the real-time resource usage information of the cluster will also change accordingly. In this way, problems such as unfair resource allocation and starvation of other users' jobs can be avoided.

[0007] In a possible implementation, the characteristics of the multiple jobs include a proportion of high-resource-consuming jobs among the multiple jobs, and the high-resource-consuming jobs are jobs that occupy resources greater than a first threshold.

[0008] In another possible implementation, the proportion of the high resource consumption jobs includes one or more of the following: the proportion of the number of users of the high resource consumption jobs to the number of users, the ratio of the number of the high resource consumption jobs to the number of the multiple jobs.

[0009] In another possible implementation, if the proportion of the high resource consumption jobs is greater than a second threshold, the first impact factor is set to a value positively correlated with the proportion; if the proportion of the high resource consumption jobs is less than or equal to the second threshold, the first impact factor is set to a value positively correlated with the proportion.

[0010] In another possible implementation, it also includes: displaying one or more of the following through a user interface UI: characteristics of the multiple jobs, the first influencing factor, and the second influencing factor; wherein the UI interface is used to adjust the first influencing factor and the second influencing factor.

[0011] In another possible implementation, the historical resource usage ratio of each of the multiple users in the cluster is determined based on the historical resource usage information of the multiple users; the real-time resource usage ratio of each of the at least one user in the cluster is determined based on the real-time resource usage information of the at least one user; and the target user is determined based on the historical resource usage ratio of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user, and the second influencing factor.

[0012] In another possible implementation, the first influencing factor is positively correlated with the proportion of the high resource consumption jobs, and the second influencing factor is negatively correlated with the proportion of the high resource consumption jobs.

[0013] In another possible implementation manner, the target user is determined according to the user's historical resource usage information, the first influencing factor, real-time resource usage information, the second influencing factor, and the user's weight.

[0014] In a second aspect, a resource allocation device is provided, including:

[0015] A determination module, for determining characteristics of a plurality of jobs submitted within a preset time period;

[0016] The determination module is further configured to determine a first influencing factor and a second influencing factor according to the characteristics of the plurality of jobs, wherein the first influencing factor is a weight corresponding to historical resource usage information of the cluster, and the second influencing factor is a weight corresponding to real-time resource usage information of the cluster;

[0017] The determination module is further used to determine the target user according to the user's historical resource usage information, the first influencing factor, the real-time resource usage information and the second influencing factor.

[0018] In a possible implementation, the characteristics of the multiple jobs include a proportion of high-resource-consuming jobs among the multiple jobs, and the high-resource-consuming jobs are jobs that occupy resources greater than a first threshold.

[0019] In another possible implementation, the proportion of the high resource consumption jobs includes one or more of the following: the proportion of the number of users of the high resource consumption jobs to the number of users, the ratio of the number of the high resource consumption jobs to the number of the multiple jobs.

[0020] In another possible implementation, the determination module is specifically used to: if the proportion of the high resource consumption jobs is greater than a second threshold, set the first impact factor to a value positively correlated with the proportion; if the proportion of the high resource consumption jobs is less than or equal to the second threshold, set the first impact factor to a value positively correlated with the proportion.

[0021] In another possible implementation, it also includes: a display module, used to display one or more of the following through a user interface UI: characteristics of the multiple jobs, the first influencing factor, and the second influencing factor; wherein the UI interface is used to adjust the first influencing factor and the second influencing factor.

[0022] In another possible implementation, the determination module is specifically used to: determine the historical resource usage ratio of each of the multiple users in the cluster based on the historical resource usage information of multiple users; determine the real-time resource usage ratio of each of the at least one user in the cluster based on the real-time resource usage information of the at least one user; determine the target user based on the historical resource usage ratio of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user and the second influencing factor.

[0023] In another possible implementation, the first influencing factor is positively correlated with the proportion of the high resource consumption jobs, and the second influencing factor is negatively correlated with the proportion of the high resource consumption jobs.

[0024] In another possible implementation manner, the determination module is specifically configured to determine the target user according to the user's historical resource usage information, the first influencing factor, real-time resource usage information, the second influencing factor, and the user's weight.

[0025] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the second aspect.

[0026] In a third aspect, a device for resource allocation is provided, comprising: a memory for storing a program; and a processor for executing the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute:

[0027] Determine the characteristics of multiple jobs submitted within a preset time period; determine a first influencing factor and a second influencing factor based on the characteristics of the multiple jobs, wherein the first influencing factor is a weight corresponding to the historical resource usage information of the cluster, and the second influencing factor is a weight corresponding to the real-time resource usage information of the cluster; determine a target user based on the user's historical resource usage information, the first influencing factor, the real-time resource usage information, and the second influencing factor.

[0028] In a possible implementation, the characteristics of the multiple jobs include a proportion of high-resource-consuming jobs among the multiple jobs, and the high-resource-consuming jobs are jobs that occupy resources greater than a first threshold.

[0029] In another possible implementation, the proportion of the high resource consumption jobs includes one or more of the following: the proportion of the number of users of the high resource consumption jobs to the number of users, the ratio of the number of the high resource consumption jobs to the number of the multiple jobs.

[0030] In another possible implementation, if the proportion of the high resource consumption jobs is greater than a second threshold, the first impact factor is set to a value positively correlated with the proportion;

[0031] If the proportion of the jobs with high resource consumption is less than or equal to the second threshold, the first impact factor is set to a value positively correlated with the proportion.

[0032] In another possible implementation, it also includes: displaying one or more of the following through a user interface UI: characteristics of the multiple jobs, the first influencing factor, and the second influencing factor; wherein the UI interface is used to adjust the first influencing factor and the second influencing factor.

[0033] In another possible implementation, the historical resource usage ratio of each of the multiple users in the cluster is determined based on the historical resource usage information of the multiple users; the real-time resource usage ratio of each of the at least one user in the cluster is determined based on the real-time resource usage information of the at least one user; and the target user is determined based on the historical resource usage ratio of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user, and the second influencing factor.

[0034] In another possible implementation, the first influencing factor is positively correlated with the proportion of the high resource consumption jobs, and the second influencing factor is negatively correlated with the proportion of the high resource consumption jobs.

[0035] It should be understood that the expansion, limitation, explanation and description of the relevant contents in the above-mentioned first aspect also apply to the same contents in the third aspect.

[0036] According to a fourth aspect, a computer storage medium is provided, wherein the computer storage medium stores a program code, wherein the program code includes instructions for executing the steps in the method for resource allocation in the first aspect and any one of the implementations of the first aspect.

[0037] The above storage medium may specifically be a non-volatile storage medium.

[0038] In a fifth aspect, a chip is provided, which includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the resource allocation method in the above-mentioned first aspect and any one of the implementation methods of the first aspect.

[0039] Optionally, as an implementation method, the chip may also include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the resource allocation method in the first aspect and any one of the implementation methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of a typical fully connected network model provided in an embodiment of the present application.

[0041] Figure 2 It is a schematic diagram of the training process of the neural network model provided in the embodiment of the present application.

[0042] Figure 3 It is a possible system architecture diagram applicable to the embodiment of the present application.

[0043] Figure 4 It is a schematic flowchart of a resource allocation method provided in an embodiment of the present application.

[0044] Figure 5 It is a schematic flowchart of a specific implementation method of step 420.

[0045] Figure 6 It is a schematic flowchart of a specific implementation method of step 430.

[0046] Figure 7 It is a schematic block diagram of a resource allocation device 700 provided in an embodiment of the present application.

[0047] Figure 8 It is a schematic diagram of the hardware structure of the resource allocation device 800 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] It should be understood that in the various embodiments of the present application, “first”, “second”, “third”, “fourth”, etc. are only used to refer to different objects and do not mean any other limitations on the objects referred to.

[0050] Since the embodiments of the present application involve a large number of professional terms, in order to facilitate understanding, the relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.

[0051] 1. Homework

[0052] A job is a collection of program instances that need to be executed to complete a specific computing business, usually corresponding to a set of processes, containers, or other runtime entities on one or more computers. A job can contain multiple tasks.

[0053] 2. Mission

[0054] An instance of a set of program instances within a job, usually corresponding to a process, container, or other runtime entity on a computer.

[0055] 3. Deep Neural Networks

[0056] A deep neural network (DNN), also known as a multi-layer neural network, can be understood as a neural network with multiple hidden layers. According to the position of different layers, the neural network inside the DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.

[0057] For example, Figure 1 The figure shows a typical fully connected network model, which includes an input layer 110, a hidden layer 120, a hidden layer 130 and an output layer 140; data flows in from the input layer 110, and is gradually calculated to finally obtain the result from the output layer 140; each intermediate layer has several parameters, and the output is calculated with the input of the previous layer; the model parameters require a large amount of data to be fitted through model training, so as to obtain the best model effect.

[0058] In the embodiment of the present application, the training job in the deep neural network training process can also be referred to as a deep learning job.

[0059] 4. Operations with high resource consumption

[0060] A job with high resource consumption is a job where the resources occupied by the job are greater than a first threshold. In the embodiment of the present application, the job with high resource consumption may include but is not limited to: a long-duration job, a large job, and the like.

[0061] 5. Long-term homework

[0062] A long-duration job may be a job whose single execution time is greater than a preset threshold time. Specifically, in an example, a single deep learning job in a deep neural network that takes a long time to execute can be understood as a long-duration job.

[0063] For the sake of ease of description, the training process of the deep neural network model is first explained below.

[0064] For example, Figure 2 Schematic diagram of the training process of the deep neural network model provided in the embodiment of the present application. The training process includes steps S210 to S280, and steps S210 to S280 are described in detail below.

[0065] S210: The network model is loaded for the first time.

[0066] S220: Input training data into the network model.

[0067] S230: Initialize the parameters of the network model according to the training data.

[0068] S240, forward propagation.

[0069] Among them, the forward propagation algorithm refers to using several weight coefficient matrices W, bias vectors b and input value vectors x to perform a series of linear operations and activation operations; that is, starting from the input layer, layer by layer, backward calculations are performed until the output layer is calculated, and the output result is a value.

[0070] S250. Calculate the loss according to the result.

[0071] For example, in the process of training a deep neural network, because we hope that the output of the deep neural network is as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the deep neural network); for example, if the network's predicted value is too high, adjust the weight vector to make it predict lower, and continue to adjust it until the deep neural network can predict the target value we really want or a value very close to the target value we really want.

[0072] Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which is an important equation used to measure the difference between the predicted value and the target value. Taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the deep neural network becomes a process of minimizing this loss as much as possible.

[0073] S260, back propagation.

[0074] For example, the neural network can use the error back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the parameters in the initial neural network model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, which aims to obtain the optimal parameters of the neural network model, such as the weight matrix.

[0075] S270, network model parameters are continuously updated.

[0076] S280: Save the parameters or weights of the network model.

[0077] Since the training process of the above network model requires a large number of iterative training (tens of thousands of times) to obtain the final model parameter values ​​to meet the corresponding task requirements, the model training of deep neural networks is often a very time-consuming process. Therefore, there are more long-term tasks in deep learning jobs.

[0078] When allocating resources to such deep learning jobs, once the allocated resources start running, it may take several days to release the resources. If no preemption mechanism is used, other users cannot use these resources during this period. Other jobs in the queue may have to wait a long time to obtain resources, causing other users' jobs to starve to death.

[0079] 6. Big homework

[0080] A large job may be a job that requires more resources than a preset threshold for a single run. Specifically, in an example, a single deep learning job in a deep neural network requires more resources for a single run, which can be understood as a large job.

[0081] In deep neural networks, as network models become more complex and data volumes grow, the amount of computation required for model training becomes extremely large; therefore, distributed training is used to meet the timeliness requirements of model generation. Distributed training refers to the collaborative processing of a deep learning job by multiple nodes or multiple processors. Therefore, a single deep learning job in a deep neural network requires a large amount of resources.

[0082] It should be noted that the difference between deep learning jobs and big data jobs is that the multiple different subtasks of deep learning jobs cannot be processed in batches, but need to be scheduled in groups. Group scheduling is a scheduling algorithm for parallel systems, which schedules tasks on multiple nodes or multiple processors to run simultaneously. Therefore, when allocating resources to such deep learning jobs, either all the resources required for the running of multiple tasks in the job are met, or no resources are allocated, because partial resource satisfaction will only lead to resource waste. Therefore, there are more large jobs in deep learning jobs.

[0083] 7. Resource pooling

[0084] Since there are many large jobs in deep learning jobs, deep learning jobs require a large amount of resources. At the same time, since the resources for running deep learning jobs, such as the central processing unit (CPU) or graphics processing unit (GPU) of the computing node, are relatively expensive, cloud data centers have become the best carrier for running such jobs. In the cloud environment, through time-sharing and resource elasticity, the software and hardware environment architecture costs of individual users are reduced and resource utilization is maximized.

[0085] 8. Resource Allocation

[0086] In the scenario of a private cloud data center, multiple users share a resource pool. It is no longer a model where a single person enjoys exclusive resources. Multiple users / tenants share cluster resources. Therefore, a dedicated scheduler is required to schedule jobs for different users and select appropriate nodes for different tasks of the job. On the one hand, it can meet the job's requirements for the hardware and software environment, and on the other hand, it can improve resource utilization and achieve the purpose of resource sharing and time-sharing reuse.

[0087] Basic resource allocation, that is, when users in the cluster have resource requirements, resources are scheduled for different jobs of multiple users, and appropriate nodes and resources are selected for different jobs to place tasks. Specifically, idle resources in the cluster can be allocated to users according to certain rules, so that users can obtain resources to complete their jobs / tasks.

[0088] Fair resource allocation means that multiple users / tenants will share cluster resources. Since there is no price leverage, it is necessary to ensure fair resource allocation among users to avoid malicious resource competition among multiple users.

[0089] As an example, in a private cloud or enterprise data center, the total cluster resources are limited and multiple users share resources. On the one hand, when processing deep learning workloads, due to the huge amount of data to be processed, there are often too many people in the cluster and too little resources. On the other hand, when using a shared cluster, users may tend to apply for a large number of resources, hoping to obtain more resources in the game among users. Therefore, in such a shared cluster scenario, fair scheduling becomes a common method and mechanism for data center resource management and scheduling.

[0090] Generally, the resource usage that different users expect to obtain can be defined by weight. For example, if the weights of users A, B, and C are 1:1:2, then in the case of full job competition, A, B, and C can obtain 1 / 4, 1 / 4, and 1 / 2 of the cluster resources respectively. Jobs between A and B no longer have an absolute static priority configuration, but a dynamic priority is calculated based on the user's weight and the resources they have obtained, thereby achieving fair resource allocation.

[0091] In the scenario of fair resource allocation, the user's weight is defined by the administrator. The cluster administrator assigns weights to different users or departments based on various factors (such as the number of personnel or costs incurred by each department) and uses them as fair scheduling input. Users can submit job or task resource requirements at will. The scheduling system automatically allocates resources to users based on the fair resource allocation method, according to the weights of different users, current cluster information, etc., so that users can obtain resources with corresponding weights, ensuring the fairness of users' use of cluster resources.

[0092] On the one hand, fair resource allocation can encourage full resource sharing and improve resource utilization. On the other hand, it provides a resource allocation plan for multiple users in the scenario of cluster resource shortage to avoid malicious competition and the problem of user job starvation. If there is no fair resource allocation mechanism and user jobs in the cluster are allowed to compete freely, malicious users will obtain excessive resources and occupy the entire cluster, and other users' jobs will starve or fail, and resources will be allocated in a disorderly manner. The business execution needs of the enterprise (such as periodic model training updates) cannot be responded to in a timely manner, which will affect the business operation of the entire enterprise.

[0093] 9. Hierarchical User Model

[0094] In the actual resource usage and management scenarios of enterprises or large organizations, the management of all users is often not flat. Multiple users form a group, multiple groups form a department, and multiple departments form a large organizational structure. Such a hierarchical user model often better meets the management needs of enterprises or organizations. Therefore, in the fair allocation plan of resources, it is necessary to consider the fair allocation needs of each organizational level. The hierarchical resource management model of the organization and the weight of each organization can be defined by the administrator. The resource allocation plan needs to allocate resources based on the cluster resource usage and the hierarchical management model to meet the fair allocation needs of each level.

[0095] In the related technical solution, the dynamic priority of each user is calculated based on the historical resource usage information and real-time resource usage information of each user, and suitable nodes (such as servers) are selected and resources are allocated for different tasks of the high-priority user's job, so as to run the tasks included in the high-priority user's job.

[0096] However, in the related art, the weights of historical resource usage information (also called influencing factors) and real-time resource usage information (also called influencing factors) are set based on the experience of the administrator. On the one hand, the weights configured based on the experience of the administrator are not very accurate, which will lead to the problem of unfair resource allocation. If the weight of real-time resource usage information is set too large, in scenarios with more large jobs, such as the training scenario of a deep neural network model, it may cause users with less real-time resource usage information to obtain more resources, and other users cannot obtain resources to complete their jobs / tasks, resulting in the starvation of other users' jobs. If the weight of historical resource usage information is set too large, the user's real-time resource usage will be ignored, and resources for running their jobs / tasks will be continuously allocated to high-priority users (users with less historical resource usage information have the highest priority). In scenarios with fewer large jobs and more small jobs, a large amount of resources will be allocated to high-priority users at one time, resulting in a single user being allocated too many resources in a single cycle, and other users having a long queue time. On the other hand, since the above weights are manually configured by the administrator when the cluster is started, they are less flexible and can only adapt to scenarios with a single cluster job type and long-term invariance. If the job type in the cluster occurs, the above weights cannot be adjusted in real time, resulting in unfair resource allocation or other job starvation problems.

[0097] In view of this, the present application proposes a resource allocation method and a resource allocation device, which automatically senses and analyzes the characteristics of cluster operations in real time, and adjusts the weight of historical resource usage information and the weight of real-time resource usage information in real time according to the characteristics of cluster operations. The accuracy of parameter configuration is improved, the parameter setting of cluster resource allocation is prevented from relying on the experience of the administrator, and the configuration difficulty is reduced, thereby reducing the occurrence of problems such as job starvation and unfairness in different scenarios.

[0098] Figure 3 It is a possible system architecture diagram applicable to the embodiment of the present application.

[0099] like Figure 3 As shown, the system architecture may include a control node 310 and basic hardware resources 320. The control node 310 may include a user graphical interface / client 311, a job management service 312, and a resource management service 313.

[0100] Schematically, the user graphical interface / client 311 can be used to receive jobs submitted from different users. The job management service 312 can be used to manage and submit jobs received from different users. The resource management service 313 may include a resource management device 3131 and a resource allocation device 3132, wherein the resource management device 3131 can be used to bind and release resources, and the resource allocation device 3132 can schedule resources for jobs according to the needs of different jobs. The basic hardware resources 320 may include, but are not limited to, a central processing unit (CPU), memory, network, GPU, and remote direct memory access (RDMA).

[0101] Exemplarily, a user can submit a job through the user graphical interface / client 311; after receiving the request, the job management service 312 can parse the job and submit the resource request to the resource management service 313; after receiving the request, the resource management service 313 can select a suitable node from the managed basic hardware resources 320 (i.e., the underlying physical resources) through the resource allocation device 3132 to place the job; after the resource allocation device 3132 completes the node selection, it starts the corresponding job on the corresponding node, and this part of the resources is occupied by the job until the job is completed and the resources are released through the resource management device 3131.

[0102] Combine the following Figure 4 The resource allocation method of the embodiment of the present application is introduced in detail.

[0103] Figure 4 The resource allocation method shown can be implemented by Figure 3 The resource allocation device 3132 shown is used to execute and is applied to Figure 3 The system architecture shown. Figure 4 The method shown includes steps 410 - 440 , and steps 410 - 440 are described in detail below.

[0104] Step 410: Determine characteristics of a plurality of jobs submitted within a preset time period.

[0105] In an embodiment of the present application, the characteristics of multiple jobs submitted in the past period of time can be determined. Specifically, as an example, the characteristics of the multiple jobs may include the proportion of high resource consumption jobs among the multiple jobs. Among them, the proportion of high resource consumption jobs may include one or more of the following: the proportion of users of high resource consumption jobs to the proportion of users, the ratio of the number of high resource consumption jobs to the number of the multiple jobs.

[0106] It should be understood that the proportion of users of jobs with high resource consumption to users may be the ratio of the number of users of jobs with high resource consumption to the number of users corresponding to all jobs. All jobs may be historical jobs currently running and currently submitted jobs, or historical jobs within a period of time and currently submitted jobs, which is not specifically limited in this application.

[0107] Step 420: Determine a first influencing factor and a second influencing factor according to the characteristics of the plurality of jobs.

[0108] The first impact factor is the weight corresponding to the historical resource usage information of the cluster, and the second impact factor is the weight corresponding to the real-time resource usage information of the cluster. It should be understood that in some embodiments, the sum of the first impact factor and the second impact factor is less than or equal to 1.

[0109] In the embodiment of the present application, the characteristics of the job are positively correlated with the first influencing factor and negatively correlated with the second influencing factor. As an example, the characteristic of the job is the proportion of jobs with high resource consumption among multiple jobs. That is to say, if the proportion of jobs with high resource consumption among multiple jobs is large, the first influencing factor can be set to be large and the second influencing factor can be set to be small; if the proportion of jobs with high resource consumption among multiple jobs is small, the first influencing factor can be set to be small and the second influencing factor can be set to be large.

[0110] In one possible implementation, if the proportion of jobs with high resource consumption is greater than a second threshold, the first impact factor is set to a value that is positively correlated with the proportion of jobs with high resource consumption, and the second impact factor is set to a value that is negatively correlated with the proportion of jobs with high resource consumption. In another possible implementation, if the proportion of jobs with high resource consumption is less than or equal to the second threshold, the first impact factor is set to a value that is positively correlated with the proportion of jobs with high resource consumption, and the second impact factor is set to a value that is negatively correlated with the proportion of jobs with high resource consumption.

[0111] Step 430: Determine the target user according to the user's historical resource usage information, the first influencing factor, the real-time resource usage information, and the second influencing factor.

[0112] The target user in the embodiment of the present application may be a high-priority user. That is, for multiple users in the cluster, the multiple users can be prioritized according to each user's historical resource usage information, the first influencing factor, each user's real-time resource usage information and the second influencing factor, and a high-priority user can be selected from the multiple users.

[0113] It should be noted that the first impact factor and the second impact factor determined in the embodiment of the present application are for the entire cluster, that is, for multiple users in the cluster, the first impact factor and the second impact factor used by each user are the same.

[0114] Optionally, in some embodiments, the historical resource usage ratio of each of the multiple users in the cluster can be determined based on the historical resource usage information of the multiple users, and the real-time resource usage ratio of each of the at least one user in the cluster can be determined based on the real-time resource usage information of the at least one user, thereby determining the target user based on the historical resource usage ratio of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user and the second influencing factor.

[0115] Step 440: Allocate resources to at least one job or task submitted by the target user.

[0116] In the embodiment of the present application, after determining the target user, a job can be selected from at least one job submitted by the target user, and a node can be selected for the job and a task can be assigned. A task can also be selected from multiple tasks included in a job of the target user, and a node can be selected for the task and a task can be assigned.

[0117] In the above technical solution, the weights corresponding to the historical resource usage information of the cluster and the weights corresponding to the real-time resource usage information of the cluster are determined according to the characteristics of multiple jobs submitted in the cluster within a preset time period. On the one hand, the weights corresponding to the historical resource usage information of the cluster and the weights corresponding to the real-time resource usage information of the cluster are more accurate. On the other hand, the above weights are more flexible. When the type or characteristics of the cluster job changes, the weights corresponding to the historical resource usage information of the cluster and the weights corresponding to the real-time resource usage information of the cluster will also change accordingly. In this way, problems such as unfair resource allocation and starvation of other users' jobs can be avoided.

[0118] Optionally, in some embodiments, one or more of the following may be displayed through a user interface (UI): the characteristics of the plurality of jobs, the first influencing factor, and the second influencing factor, wherein the UI is used to adjust the first influencing factor and the second influencing factor.

[0119] Optionally, the UI interface may also display one or more of the following: cluster resource usage, job queue status, etc.

[0120] Below Figure 3 As an example, the system architecture shown in Figure 5A specific implementation method of step 420 is described with reference to a specific example.

[0121] It should be understood that Figure 5 The examples are only intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to Figure 5 Those skilled in the art can obviously make various equivalent modifications or changes based on the examples given, and such modifications and changes also fall within the scope of the embodiments of the present application.

[0122] Figure 5 The method shown may include steps 510 - 530 , and steps 510 - 530 are described in detail below.

[0123] Step 510: Collect and record the task running status of all users in the cluster in real time.

[0124] In the embodiment of the present application, the task running status of the user in the cluster may include, but is not limited to: the resource usage of the user's completed tasks and running tasks, the start time of the task running, and other information.

[0125] Optionally, in some embodiments, the historical resource usage of each user over a period of time may be processed by means of sliding average or the like, so as to increase the impact of recent resource usage on priority allocation.

[0126] Optionally, in some embodiments, it is also possible to record only the resource usage of the user in each period by periodic calculation, without real-time updating, thereby improving processing efficiency.

[0127] Step 520: Count and analyze the operation characteristics of the cluster in the recent period.

[0128] In the embodiment of the present application, the job characteristics of the cluster in the recent period can be determined according to the task running conditions of all users in the cluster collected and recorded in step 510. The job characteristics may include, but are not limited to: the number and proportion of jobs with high resource message requirements, the average waiting time of jobs, the number of queued jobs and the required resources, and other information.

[0129] It should be understood that the jobs with high resource message requirements in the embodiments of the present application may include, but are not limited to: large jobs and long-duration jobs.

[0130] The following describes a possible method for determining whether a job submitted by a user is a large job.

[0131] In the embodiment of the present application, the amount of resources R that each user should theoretically obtain can be calculated. iIf the total amount of resources is Total, in one possible implementation, in a scenario where users have no weight, the amount of resources each user should get is Where n is the number of users. In another possible implementation, in a scenario where users have weights, if the user weight is w i , then the amount of resources each user should get If the resource requirements of a task or multiple tasks that need to be scheduled simultaneously in a job exceed the resource amount R that the user deserves i , the job can be determined as a large job.

[0132] The following describes a possible method for determining whether a job submitted by a user is a long-duration job.

[0133] In the embodiment of the present application, if the running time of a task or a job exceeds a preset threshold, the job can be determined as a long-time job.

[0134] It should be noted that the above-mentioned preset threshold may be a period of historical resource usage statistics, or may be a value custom-set by an administrator, and this application does not make any specific limitation on this.

[0135] In the embodiment of the present application, the operation characteristics of the cluster obtained through analysis in the recent period of time may also be presented to the administrator in a visual manner, for example, through a user graphical interface / client 311 .

[0136] Step 530: Determine the influencing factor parameters of historical resource usage and the influencing factor parameters of real-time resource usage according to the job characteristics of the cluster in a recent period of time.

[0137] In an embodiment of the present application, the job characteristics of the cluster in a recent period of time can be obtained, such as the number and proportion of high resource message demand jobs, the average waiting time of jobs, and other information, so as to calculate the reference values ​​of the influencing factor parameters of historical resource usage and the reference values ​​of the influencing factor parameters of real-time resource usage.

[0138] As an example, the proportion of jobs with high resource consumption in the cluster over the past period of time can be determined, and the reference value of the influencing factor parameter of historical resource use can be determined based on the proportion of jobs with high resource consumption. The reference value of the influencing factor parameter of real-time resource use can then be determined based on the reference value of the influencing factor parameter of historical resource use.

[0139] Specifically, if the proportion of high-resource-consuming jobs in the cluster is larger in the past period of time, then resource allocation tends to be based on historical resource usage, and the reference value of the parameter of the impact factor of historical resource usage can be set to a higher value, so as to avoid starvation of such large jobs of users. Conversely, if the proportion of high-resource-consuming jobs is smaller, then resource allocation tends to be based on the proportion of real-time resource usage, and the reference value of the parameter of the impact factor of real-time resource usage can be set to a higher value. In this way, in scenarios with more small jobs, it can be avoided that a large amount of resources are allocated to high-priority users at one time, resulting in a single user being allocated too many resources in a single cycle, and other users having to wait in line for a long time.

[0140] It should be understood that there are many ways to implement information on the proportion of jobs with high resource consumption in a cluster over a period of time in the past, and the embodiments of the present application do not specifically limit this. In one possible implementation, the proportion of jobs with high resource consumption can be the ratio of the number of jobs with high resource consumption in the past period of time to the total number of jobs in the past period of time. In another possible implementation, the proportion of jobs with high resource consumption can also be the ratio of the number of users who submitted the high resource consumption job to the total number of users in the past period of time.

[0141] Specifically, assuming that the proportion of jobs with high resource consumption is β, in the embodiment of the present application, the reference value α of the impact factor of historical resource usage can be calculated based on the proportion β of jobs with high resource consumption, wherein the reference value α of the impact factor is linearly related to the proportion β of jobs with high resource consumption. For example, α=kβ+v, wherein k and v can be set according to the algorithm, and α≤1 can be ensured.

[0142] It should be noted that k and v do not need to be configured by the administrator, and can be set by the algorithm developer. For example, k = 0.8, v = 0.2. Another example is k = 1, v = 0.

[0143] In the embodiment of the present application, the reference value of the impact factor of historical resource usage is α, and the reference value of the impact factor of real-time resource usage is 1-α.

[0144] In an embodiment of the present application, the reference value of the influencing factor of historical resource usage and the reference value of the influencing factor of real-time resource usage can also be presented to the administrator in a visual manner, for example, through a user graphical interface / client 311.

[0145] In one possible implementation, the administrator can obtain the job characteristics of the cluster in the recent period of time through the user graphical interface / client 311, and modify or adjust the reference value of the impact factor of historical resource use and the reference value of the impact factor of real-time resource use based on the job characteristics, so as to determine the priority of the user according to the modified or adjusted reference value of the impact factor of historical resource use and the reference value of the impact factor of real-time resource use. In this way, the administrator can adjust the value of the impact factor parameter of historical resource use and real-time resource use according to the operation status of the cluster, so that the value of the impact factor parameter is more accurate, thereby achieving fair allocation of resources within the cluster. In another possible implementation, the administrator can also choose not to modify or adjust the reference value of the impact factor of historical resource use and the reference value of the impact factor of real-time resource use.

[0146] In another possible implementation, the administrator can also select the automatic execution mode through the user graphical interface / client 311 interface, and directly determine the priority of the user according to the reference value of the impact factor of the historical resource use and the reference value of the impact factor of the real-time resource use. In this way, the parameters can be automatically updated, reducing the manual participation of the administrator.

[0147] Below Figure 3 As an example, the system architecture shown in Figure 6 A specific implementation method of step 430 is described with reference to a specific example.

[0148] It should be understood that Figure 6 The examples are only intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to Figure 6 Those skilled in the art can obviously make various equivalent modifications or changes based on the examples given, and such modifications and changes also fall within the scope of the embodiments of the present application.

[0149] Figure 6 The method shown may include steps 610 - 650 , each of which is described in detail below.

[0150] Step 610: Calculate the historical resource usage ratio of each user.

[0151] In the embodiment of the present application, historical resource usage information of all tasks of each user in the past period of time can be counted. The historical resource usage information can be the resource usage amount of the completed task × resource usage time. And the historical resource usage ratio of each user is calculated based on the historical resource usage information.

[0152] As an example, for each user, each dimension of resources can be counted separately, and the historical usage ratio of each user's single-dimensional resources in the entire cluster (also referred to as the historical resource usage ratio) can be calculated. It should be understood that in the multi-dimensional resource usage ratio, the resource dimension that is dominantly used can be found. Generally, the maximum value of the multi-dimensional resources can be taken as the final historical resource usage ratio of the user.

[0153] Step 620: Calculate the real-time resource usage ratio of each user.

[0154] In an embodiment of the present application, the resource usage of each user's running task can be obtained, and the real-time resource usage ratio of the user can be determined based on the resource usage.

[0155] It should be understood that the method for calculating the real-time resource usage ratio of each user is similar to the method for calculating the historical resource usage ratio of each user. For each user, the real-time resource usage ratio of each user's single-dimensional resources in the entire cluster can also be calculated.

[0156] Step 630: Calculate the final resource usage ratio of each user according to the historical resource usage ratio and the real-time resource usage ratio of each user.

[0157] In the embodiment of the present application, the final resource usage ratio of each user can be determined by weighted summation according to the historical resource usage ratio, the impact factor α of the historical resource usage, the real-time resource usage ratio, and the impact factor 1-α of the real-time resource usage. As an example, the final resource usage ratio of the user = historical resource usage ratio * α + real-time resource usage ratio * (1-α).

[0158] Step 640: Find the user with the highest priority.

[0159] In the embodiment of the present application, the priority of the user can also be dynamically determined according to the final resource usage ratio of the user. There are many specific implementation methods, and two possible implementation methods are introduced below.

[0160] In a possible implementation, when the weight of each user is the same, the user with the smallest resource usage ratio has the highest priority, and resources are preferentially allocated to the job / task submitted by the user with the highest priority.

[0161] In another possible implementation, when the weight of each user is different, the weight of each user is the resources that the user deserves. The user with the highest priority can be found by comparing the user's final resource usage ratio and the resource ratio that the user deserves. For example, the ratio of the user's final resource usage ratio and the resource ratio that the user deserves is calculated. The smaller the ratio, the higher the priority of the user, and resources can be allocated to the job / task submitted by the user with the highest priority.

[0162] Step 650: Allocate resources to the job / task submitted by the user with the highest priority.

[0163] In an embodiment of the present application, after determining the highest priority user, it is also possible to determine the highest priority task / job among the tasks / jobs submitted by the user, and based on the cluster operation status, prioritize attempts to select a suitable node from the managed basic hardware resources 320 (i.e., underlying physical resources) for the highest priority task / job to place the task / job.

[0164] It should be understood that the above cluster operation status may include but is not limited to: total cluster resources, number of nodes, resource utilization, etc.

[0165] In the above technical solution, by introducing an automatic analysis and perception mechanism for cluster workload characteristics, cluster workload characteristics and recommended influencing factor parameters are presented to the administrator, so that the best decision for cluster configuration can be made in a semi-automatic or fully automated manner. The administrator can set up automatic calculation and update algorithm parameter configurations for the cluster, or manually adjust such configuration parameters of the cluster based on the recommended values ​​given by the system and his own experience, thereby avoiding dependence on the administrator's experience, improving the accuracy of parameter configuration, and reducing the problem of unfair resource allocation that may be caused by improper parameter settings.

[0166] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0167] Combination of the above Figures 1 to 6 , describes in detail the resource allocation method in the embodiment of the present application, and will be combined with Figure 7 and Figure 8 , describes the device embodiment of the present application in detail. It should be understood that the resource allocation device in the embodiment of the present application can execute the various resource allocation methods in the aforementioned embodiment of the present application, that is, the specific working process of the following various products can refer to the corresponding process in the aforementioned method embodiment.

[0168] Figure 7 It is a schematic block diagram of a resource allocation device 700 provided in an embodiment of the present application.

[0169] It should be understood that the resource allocation apparatus 700 can perform Figures 4 to 6 To avoid repetition, the steps in the resource allocation method shown are not described in detail here. The resource allocation device 700 includes: a determination module 710,

[0170] A determination module 710, for determining characteristics of a plurality of jobs submitted within a preset time period;

[0171] The determination module 710 is further configured to determine a first influencing factor and a second influencing factor according to the characteristics of the plurality of jobs, wherein the first influencing factor is a weight corresponding to historical resource usage information of the cluster, and the second influencing factor is a weight corresponding to real-time resource usage information of the cluster;

[0172] The determination module 710 is further configured to determine a target user according to the user's historical resource usage information, the first influencing factor, the real-time resource usage information, and the second influencing factor.

[0173] Optionally, the characteristics of the multiple jobs include a proportion of jobs with high resource consumption among the multiple jobs, and the jobs with high resource consumption are jobs that occupy resources greater than a first threshold.

[0174] Optionally, the proportion of the high resource consumption jobs includes one or more of the following: the proportion of the number of users of the high resource consumption jobs to the number of users, and the ratio of the number of the high resource consumption jobs to the number of the multiple jobs.

[0175] Optionally, the determination module 710 is specifically used to: if the proportion of the high resource consumption jobs is greater than a second threshold, set the first impact factor to a value positively correlated with the proportion; if the proportion of the high resource consumption jobs is less than or equal to the second threshold, set the first impact factor to a value positively correlated with the proportion.

[0176] Optionally, it also includes: a display module 720, which is used to display one or more of the following through a user interface UI: characteristics of the multiple jobs, the first influencing factor and the second influencing factor; wherein the UI interface is used to adjust the first influencing factor and the second influencing factor.

[0177] Optionally, the determination module 710 is specifically used to: determine the historical resource usage ratio of each of the multiple users in the cluster based on the historical resource usage information of multiple users; determine the real-time resource usage ratio of each of the at least one user in the cluster based on the real-time resource usage information of the at least one user; determine the target user based on the historical resource usage ratio of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user and the second influencing factor.

[0178] Optionally, the first influencing factor is positively correlated with the proportion of the high resource consumption jobs, and the second influencing factor is negatively correlated with the proportion of the high resource consumption jobs.

[0179] Optionally, the determination module 710 is specifically used to determine the target user according to the user's historical resource usage information, the first influencing factor, real-time resource usage information, the second influencing factor and the user's weight.

[0180] It should be understood that the resource allocation device 700 is implemented in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0181] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0182] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0183] Figure 8 It is a schematic diagram of the hardware structure of the resource allocation device 800 provided in an embodiment of the present application.

[0184] Figure 8 The resource allocation apparatus 800 shown may include a memory 801 , a processor 802 , a communication interface 803 and a bus 804 . The memory 801 , the processor 802 , and the communication interface 803 are connected to each other through the bus 804 .

[0185] The memory 801 may be a read-only memory (ROM), a static storage device, or a random access memory (RAM). The memory 801 may store a program. When the program stored in the memory 801 is executed by the processor 802, the processor 802 and the communication interface 803 are used to execute the various steps of the resource allocation method of the embodiment of the present application. For example, Figures 4 to 6 The various steps of the resource allocation method are shown.

[0186] The processor 802 may be a general-purpose CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits for executing related programs to implement the embodiments of the present application. Figure 7 The functions that need to be executed by the units in the resource allocation device shown, or the resource allocation method of the method embodiment of the present application.

[0187] The processor 802 may also be an integrated circuit chip with signal processing capability. In the implementation process, each step of the resource allocation method of the embodiment of the present application may be completed by an integrated logic circuit of hardware in the processor 802 or by instructions in the form of software.

[0188] The processor 802 may also be a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801, and combines its hardware to complete the functions required to be performed by the units included in the device for resource allocation in the embodiments of the present application, or executes the method for resource allocation in the embodiments of the present application.

[0189] For example, processor 802 may communicate with Figure 7 The resource allocation device shown corresponds to the determination module 710.

[0190] The communication interface 803 uses a transceiver device such as but not limited to a transceiver to implement communication between the resource allocation apparatus 800 and other devices or a communication network.

[0191] The bus 804 may include a path for transmitting information between various components of the apparatus 800 for resource allocation (eg, the memory 801 , the processor 802 , and the communication interface 803 ).

[0192] It should be noted that although the above-mentioned resource allocation device 800 only shows a memory, a processor, and a communication interface, in the specific implementation process, those skilled in the art should understand that the resource allocation device 800 may also include other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the above-mentioned resource allocation device 800 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the above-mentioned resource allocation device 800 may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 8 All devices shown in .

[0193] The embodiment of the present application also provides a chip, which includes a transceiver unit and a processing unit. The transceiver unit can be an input / output circuit or a communication interface; the processing unit is a processor or a microprocessor or an integrated circuit integrated on the chip; the chip can execute the resource allocation method in the above method embodiment.

[0194] An embodiment of the present application also provides a computer-readable storage medium having instructions stored thereon, and when the instructions are executed, the resource allocation method in the above method embodiment is executed.

[0195] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed, execute the resource allocation method in the above method embodiment.

[0196] It should be understood that the processor in the embodiment of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0197] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0198] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0199] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0200] In this application, "at least one" means one or more, and "more than one" means two or more. "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 be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0201] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0202] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0203] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0204] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0205] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0206] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0207] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0208] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for resource allocation, characterized in that: include: Determining characteristics of a plurality of jobs submitted within a preset time period, wherein the characteristics of the plurality of jobs include a proportion of jobs with high resource consumption among the plurality of jobs; Determine a first influencing factor and a second influencing factor according to the characteristics of the multiple jobs, wherein the first influencing factor is a weight corresponding to the historical resource usage information of the cluster, the second influencing factor is a weight corresponding to the real-time resource usage information of the cluster, the characteristics of the multiple jobs are positively correlated with the first influencing factor, and the characteristics of the multiple jobs are negatively correlated with the second influencing factor; Determine a target user according to the user's historical resource usage information, the first influencing factor, the user's real-time resource usage information, and the second influencing factor; Resources are allocated to at least one job or task submitted by the target user.

2. The method according to claim 1, characterized in that The high resource consumption job is a job that occupies resources greater than a first threshold.

3. The method according to claim 2, characterized in that The proportion of the high resource consumption jobs includes one or more of the following: the proportion of the number of users of the high resource consumption jobs to the number of users, and the ratio of the number of the high resource consumption jobs to the number of the multiple jobs.

4. The method according to claim 2, characterized in that: The determining the first influencing factor and the second influencing factor according to the characteristics of the plurality of operations comprises: Setting the first impact factor to a value that is positively correlated with the proportion of the high resource consumption job; The second impact factor is set to a value that is negatively correlated with the proportion of the high resource consumption jobs.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Displaying one or more of the following through a user interface UI: characteristics of the plurality of jobs, the first influencing factor, and the second influencing factor; The UI is used to adjust the first influencing factor and the second influencing factor.

6. The method according to any one of claims 1 to 4, characterized in that The determining of the target user according to the user's historical resource usage information, the first influencing factor, the real-time resource usage information, and the second influencing factor includes: Determine, according to the historical resource usage information of the multiple users, the historical resource usage ratio of each of the multiple users in the cluster; Determine the real-time resource usage ratio of each user of the at least one user in the cluster according to the real-time resource usage information of the at least one user; The target user is determined according to the historical resource usage ratios of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user, and the second influencing factor.

7. The method according to any one of claims 1 to 4, characterized in that The determining of the target user according to the user's historical resource usage information, the first influencing factor, the real-time resource usage information, and the second influencing factor includes: The target user is determined according to the user's historical resource usage information, the first influencing factor, real-time resource usage information, the second influencing factor, and the user's weight.

8. A resource allocation device, characterized in that: include: A determination module, configured to determine characteristics of a plurality of jobs submitted within a preset time period, wherein the characteristics of the plurality of jobs include a proportion of jobs with high resource consumption among the plurality of jobs; The determination module is further configured to determine a first influencing factor and a second influencing factor according to the characteristics of the plurality of jobs, wherein the first influencing factor is a weight corresponding to historical resource usage information of the cluster, the second influencing factor is a weight corresponding to real-time resource usage information of the cluster, the characteristics of the plurality of jobs are positively correlated with the first influencing factor, and the characteristics of the plurality of jobs are negatively correlated with the second influencing factor; The determination module is further configured to determine a target user according to the user's historical resource usage information, the first influencing factor, the user's real-time resource usage information, and the second influencing factor.

9. The device according to claim 8, characterized in that The high resource consumption job is a job that occupies resources greater than a first threshold.

10. The device according to claim 9, characterized in that The proportion of the high resource consumption jobs includes one or more of the following: the proportion of the number of users of the high resource consumption jobs to the number of users, and the ratio of the number of the high resource consumption jobs to the number of the multiple jobs.

11. The device according to claim 9, characterized in that The determination module is specifically used for: Setting the first impact factor to a value that is positively correlated with the proportion of the high resource consumption job; The second impact factor is set to a value that is negatively correlated with the proportion of the high resource consumption jobs.

12. The device according to any one of claims 8 to 11, characterized in that Also includes: A display module, configured to display one or more of the following through a user interface UI: characteristics of the plurality of jobs, the first influencing factor, and the second influencing factor; The UI is used to adjust the first influencing factor and the second influencing factor.

13. The device according to any one of claims 8 to 11, characterized in that The determination module is specifically used for: Determine, according to the historical resource usage information of the multiple users, the historical resource usage ratio of each of the multiple users in the cluster; Determine the real-time resource usage ratio of each user of the at least one user in the cluster according to the real-time resource usage information of the at least one user; The target user is determined according to the historical resource usage ratios of the multiple users, the first influencing factor, the real-time resource usage ratio of the at least one user, and the second influencing factor.

14. The device according to any one of claims 9 to 11, characterized in that The determination module is specifically used for: The target user is determined according to the user's historical resource usage information, the first influencing factor, real-time resource usage information, the second influencing factor, and the user's weight.

15. A device for resource allocation, characterized in that: The device comprises a processor, a memory and a communication interface, wherein the memory is used to store computer-executable instructions. When the resource allocation device is running, the processor runs the computer-executable instructions in the memory to execute the resource allocation method as claimed in any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that: The invention comprises a computer program, which, when being executed on a computer, causes the computer to execute the resource allocation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Preemptive manpower resource collocation method and system based on task priority

    CN101320329A

  • Resource service system and resource distribution method thereof

    CN104168318A

  • Unified resource scheduling method and system in cloud environment

    CN107239329A

  • Resource configuration method and apparatus, electronic device

    CN108460618A

  • Resource allocation method and device

    CN108924221A