A resource configuration method, device, medium and equipment

Through real-time monitoring and dynamic adjustment of resource allocation, the problem of unreasonable resource allocation in the scheduling system is solved, task resource utilization is optimized, job failures caused by insufficient resources are reduced, and the rational use of cluster resources is ensured.

CN111813545BActive Publication Date: 2024-09-24BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010604115.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2024-09-24
Estimated Expiration
2040-09-24

AI Technical Summary

Technical Problem

The scheduling system cannot monitor and adjust task resource usage in real time, resulting in resource waste or shortage. It is difficult for users to accurately estimate the resources required for tasks, resulting in unreasonable resource allocation.

Method used

By obtaining job tasks submitted by users, query historical resource information based on job tags, monitor resource usage of tasks in real time, dynamically adjust resource allocation, including obtaining application meta-information and container resource information, analyze resource application and usage, and issue alarms based on thresholds. Signal reallocation of resources.

Benefits of technology

Optimizes task resource utilization, reduces job failures due to insufficient resources, and ensures reasonable and healthy use of cluster resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present disclosure provides a resource configuration method, apparatus, medium and device, the method comprising: obtaining a job task submitted by a user, wherein the job task comprises a job label and a resource declaration for marking the job type, and the resource declaration comprises at least one resource information required to complete the job task; querying the historical resource information of the job task based on the job label; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job label; calculating the predicted resource demand of the job task based on the historical resource information of the job task; and allocating at least one resource based on the predicted resource demand. The present disclosure can recommend and adjust the resources of a task based on the historical operation status of the task, so that the user's resource application is more reasonable, thereby ensuring reasonable and healthy resource usage of the entire cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a resource configuration method, apparatus, medium and device. Background Art

[0002] When the scheduling system processes the tasks input by users into the cluster system, it is necessary to allocate system resources according to the submitted tasks, so as to use system resources reasonably and process user tasks efficiently. When submitting a task, the user needs to judge and specify the size of the required resources, but often cannot accurately estimate the resources required for the task. At the same time, in order to ensure the safe operation of the task, the user often applies for larger resources. In the prior art, if the actual resources used during the task operation do not reach the size of the declared resources, it will cause a waste of resources. If the actual resources used by the user far exceed the size of the declared resources, when the machine resources are insufficient, it will seriously affect the operation of the user's tasks. The current scheduling system is also unable to monitor and display the actual real-time resource usage of queues, applications, and containers, and cannot dynamically adjust the allocated resources according to the real-time resource usage, which often leads to waste or shortage of resources.

[0003] Therefore, dynamic monitoring of the actual usage of system resources is of great significance for users to apply for resources more reasonably and for cluster resource tuning.

[0004] Public Content

[0005] The purpose of the present disclosure is to provide a resource configuration method, apparatus, medium and device, which can solve at least one of the above-mentioned technical problems. The specific solution is as follows:

[0006] According to the specific implementation manner of the present disclosure, in the first aspect, the present disclosure provides a resource configuration method, including: obtaining a job task submitted by a user, wherein the job task includes a job label and a resource declaration for marking the job type, and the resource declaration includes at least one resource information required to complete the job task; querying the historical resource information of the job task based on the job label; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job label; calculating the predicted resource demand of the job task based on the historical resource information of the job task; and allocating at least one resource based on the predicted resource demand.

[0007] Optionally, it also includes: real-time monitoring of the resource operation status under each job tag of the system and the relationship between the at least one allocated resource and the job task, and dynamically adjusting the at least one allocated resource.

[0008] Optionally, the real-time monitoring system monitors the operating status of resources under each job label and the relationship between the at least one allocated resource and the job task, and dynamically adjusts the at least one allocated resource, including: obtaining application meta-information through the resource management module of the scheduling system, the application meta-information including the application ID, application name, queue name, cluster name and application label when the task is running; obtaining container resource information through the node management module of the scheduling system; associating the application meta-information and the corresponding resource information of the container; monitoring the associated application meta-information and resource information of the container in real time, and analyzing the resource application and actual resource usage of the container.

[0009] Optionally, obtaining the resource information of the container through the node management module of the scheduling system includes: obtaining the resource information of the container through the node management module of the scheduling system, the resource information of the container including the process type and the disk type; obtaining the resource information of each sub-process in the process type through the process tree module, the resource information including CPU information, memory information, input and output information or network interface information.

[0010] Optionally, the real-time monitoring is performed on the associated application metadata and resource information of the container, and the resource application and actual resource usage of the container are analyzed, including: real-time monitoring of the CPU usage, memory usage, input and output device usage or network interface usage frequency under the current task, and analyzing the resource application and actual resource usage of the container based on the monitoring results.

[0011] Optionally, after analyzing the resource application and actual resource usage of the container according to the monitoring results, the method includes: issuing a first alarm signal when the CPU usage, memory usage, input / output device usage or network interface usage frequency exceeds a first threshold; and the scheduling system reallocates the resource information that generates the first alarm signal according to the first alarm signal.

[0012] Optionally, after analyzing the resource application and actual resource usage of the container according to the monitoring results, the method includes: issuing a second alarm signal when the CPU usage, memory usage, input and output device usage or network interface usage frequency is lower than a second threshold; and the scheduling system reallocates the resource information that generates the second alarm signal according to the second alarm signal.

[0013] Optionally, the method further includes: recording resource information that generates the first alarm signal and / or the second alarm signal into the historical resource information and updating the historical resource information.

[0014] According to the specific implementation manner of the present disclosure, in the second aspect, the present disclosure provides a resource configuration device, including: an acquisition unit, used to acquire a job task submitted by a user, wherein the job task includes a job label and a resource declaration for marking the job type, and the resource declaration includes at least one resource information required to complete the job task; a query unit, used to query the historical resource information of the job task based on the job label; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job label; a calculation unit, used to calculate the predicted resource demand of the job task based on the historical resource information of the job task; and an allocation unit, used to allocate at least one resource based on the predicted resource demand.

[0015] According to a specific implementation of the present disclosure, in a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the program implements any of the above methods when executed by a processor.

[0016] According to the specific implementation of the present disclosure, in a fourth aspect, the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above items.

[0017] Compared with the prior art, the above scheme of the embodiment of the present disclosure has at least the following beneficial effects: the resource configuration method provided by the present disclosure can dynamically understand whether the configuration of system resources is reasonable by real-time monitoring of the operating status of system resource information and the status of allocated resources, and timely adjust the allocation status when it is unreasonable. For tasks where the requested resources are greater than the actual used resources, the task resource utilization rate can be optimized, thereby further optimizing the cluster resource utilization rate. For tasks where the requested resources are less than the actual used resources, the user task running speed can be improved, and the probability of user job failure due to OOM can be reduced. For periodically running tasks, the present invention can recommend adjustments to the resources of the task based on the historical running status of the task, so that the user's resource application is more reasonable, thereby ensuring that the resource usage of the entire cluster is reasonable and healthy. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0019] Figure 1A structural diagram of a resource configuration system according to an embodiment of the present disclosure is shown;

[0020] Figure 2 A structural diagram of a resource configuration module according to an embodiment of the present disclosure is shown;

[0021] Figure 3 A flow chart of a resource configuration method according to an embodiment of the present disclosure is shown;

[0022] Figure 4 A flow chart of a data collection method according to an embodiment of the present disclosure is shown;

[0023] Figure 5 A schematic diagram of the structure of a resource configuration device according to an embodiment of the present disclosure is shown;

[0024] Figure 6 A schematic diagram of a connection structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0026] The terms used in the embodiments of the present disclosure are only for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. The singular forms "a", "said" and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.

[0027] It should be understood that the term "and / or" used 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. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0028] It should be understood that although the terms first, second, third, etc. may be used to describe ... in the embodiments of the present disclosure, these ... should not be limited to these terms. These terms are only used to distinguish .... For example, without departing from the scope of the embodiments of the present disclosure, the first ... may also be referred to as the second ..., and similarly, the second ... may also be referred to as the first ....

[0029] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0030] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity 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 commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.

[0031] The optional embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0032] Figure 1 A structural diagram of a resource configuration system provided in an embodiment of the present disclosure is shown. Figure 1 As shown, the resource configuration system of the embodiment of the present disclosure includes three modules, namely a data acquisition module, a data archiving module and a data processing module. Figure 2 Shows the corresponding Figure 1 The resource configuration system structure diagram includes a specific resource configuration module structure diagram.

[0033] like Figure 1 As shown, the data collection module is a module embedded in the scheduling system, such as the YARN (Yet Another Resource Negotiator) scheduling system. The data collection module is responsible for collecting the actual resource usage of each container in the cluster and sending the data to the data archiving module in real time. The user labels the completed current job task. For example, if the current job task is a photo editing task, the photo editing task is labeled. If the current job task is a table calculation, the table calculation task is labeled. The data collection module collects the resources required for the labeled tasks for subsequent analysis and monitoring.

[0034] The process of collecting data through the dispatching system is as follows: Figure 2As shown, the scheduling system YARN includes a resource management module RM and a node management module NM. The resource management module RM of the scheduling system obtains application meta information, which includes application ID, application name, queue name, cluster name, and application label when the task is running; and the node management module NM of the scheduling system obtains container resource information. The scheduling system YARN regularly transfers the APP status in the memory of the resource management module RM to the meta information message queue, and starts a streaming processing job downstream of the meta information message queue. Through the streaming processing job, the container information and application meta information are combined in real time according to the APP ID or higher dimensions to form real-time resource usage information including various application meta information and indicators.

[0035] The data archiving module is a stable storage system used to store the resource usage of all containers. The data archiving module can be Figure 2 The OLAP storage system or other forms of storage systems shown in the figure, the OLAP storage system includes, for example, the database Clickhouse. The data is sent to the OLAP storage system, and the user can monitor the application and actual use of cluster, queue, node, application and container dimension resources in the OLAP storage system in real time through the monitoring system, and can also obtain the required data from the OLAP storage system for analysis through the analysis system.

[0036] The data processing module includes a data monitoring module and a data analysis module, which are used to split the archived data according to the user's task tags, and through the historical resource usage of related tasks, such as taking the maximum value, taking the average value or other custom models, to obtain the most suitable resources for the user to submit the task next time. The scheduling system sets the requested resource amount in the task submitted by the user as the result calculated by the data processing module during the next scheduling.

[0037] Specifically, Figure 3 As shown, according to a specific implementation of the present disclosure, the present disclosure provides a resource configuration method, comprising the following method steps:

[0038] Step S304: Acquire the job task submitted by the user, wherein the job task includes a job tag for marking the job type and a resource declaration, and the resource declaration includes at least one resource information required to complete the job task.

[0039] The cluster receives the job tasks submitted by the user through the resource scheduling system, wherein the job tasks include a job tag and at least one resource declaration. The job tag is the task type information marked according to the job task, for example, a drawing task is marked with a drawing tag, an audio task is marked with an audio tag, etc. The resource declaration includes various resource types and quantity information required to complete the job task corresponding to the job tag, such as CPU information, memory information, storage information, network interface information, input and output information, etc. After the task obtains the required resource information, it executes the relevant job to complete the task.

[0040] The resource scheduling system includes but is not limited to YARN, Mesos, etc. YARN is taken as an example below. The cluster receives job tasks submitted by users through the resource scheduling system YARN. The RM module of the resource scheduling system YARN is responsible for scheduling tasks to a certain NM module in the cluster according to the resources required by the job tasks and the system resource status. The NM module allocates resources corresponding to the job tasks for operation.

[0041] The various resources required for the job task submitted by the user are split through the data processing module. The splitting can be carried out according to the actual task. Different tasks have different splitting methods. The same task can also have different splitting methods based on the analysis of historical data. There is no specific limitation on this. As an example, it includes but is not limited to the following splitting forms. For example, for a drawing task, the user resource declaration indicates that a CPU, a GPU, 100M memory, and a network interface are required. The system can split the task into CPU0, GPU0, 200M memory, and network interface 1; CPU0, GPU0, GPU1, 100M memory 1, 100M memory 2, and network interface 1; CPU0, CPU1, GPU0, GPU2, 100M memory 1, 50M memory 3, and network interface 2, etc. No grouping is done here, as long as the split resources can meet the job task.

[0042] Step S306: querying historical resource information of the job task based on the job tag; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job tag.

[0043] According to the label information of the job task, query the resource information used in the corresponding historical tasks under the current task, and allocate corresponding resources to the current task according to the resource information configured in the historical tasks. For example, if the current task is a drawing task, calculate the historical resource usage of the tasks under the label related to the drawing task, such as the historical resource usage of: 1 GPU, 100M memory, 1 GPU, 150M memory, etc. Perform subsequent resource analysis and allocation based on the query results.

[0044] Step S308: Calculate the predicted resource demand of the job task based on the historical resource information of the job task.

[0045] According to step S306, the historical resource information usage under the current task is queried and the predicted resource usage is reasonably given; the prediction methods include but are not limited to the mean method, the increment method, the shrinkage method, the minimum method, the maximum method, etc. As an example, it can be understood that, for example, when the system needs 100M memory, according to the above historical data analysis, usually 100M memory cannot meet the execution of the task, then the system will automatically allocate more than 100M memory to the task, for example, increase 20%-30% of redundant space. According to the above historical data analysis, usually 100M memory can far meet the execution of the task and usually only 10M memory is sufficient, then the system will automatically allocate 30M memory to the task, and increase 20%-30% of redundant space under the previous task data. For another example, if the historical data shows that the memory usage under the current label task is 100M, 150M, and 200M, then you can allocate 150M of content using the average method, allocate 200M of memory using the maximum method, or allocate 100M of memory using the minimum method.

[0046] Step S310: Allocate at least one resource based on the predicted resource demand.

[0047] After querying, analyzing, and calculating the status of the tasks to be assigned, the system allocates at least one resource based on the current remaining resource status. As an example, when a user submits a task, he believes that the task requires 100M of memory. After querying, analyzing, and calculating, 130M of memory should normally be allocated. However, at this time, while ensuring system security, only 120M can be allocated. The system will allocate 120M of memory to the current task.

[0048] Optionally, the method further includes step S312: real-time monitoring of the resource operation status under each job tag of the system and the relationship between the at least one allocated resource and the job task, and dynamically adjusting the at least one allocated resource.

[0049] As one of the implementation methods, Figure 2 As shown, the real-time monitoring system resource operation status under each job label includes: obtaining application meta information through the resource management module of the scheduling system, and the application meta information includes the application ID, application name, queue name, cluster name and application label when the task is running. Obtain the resource information of the container through the node management module of the scheduling system; gather the application meta information and the resource information of the container on the same node; monitor the application meta information and the resource information of the container stored in the same node in real time, and analyze the resource application and actual resource usage of the container.

[0050] As one of the implementation methods, Figure 4 As shown, the obtaining of the resource information of the container through the node management module of the scheduling system includes: obtaining the resource information of the container through the node management module of the scheduling system, the resource information of the container including the process type and the disk type; obtaining the resource information of each sub-process in the process type through the process tree module, the resource information including CPU information, memory information, input and output information or network interface information.

[0051] The node management module NM periodically obtains all container information in the memory. For each container, the node management module NM can obtain various container-level resource types such as the process tree and disk path belonging to the container. For various container-level resource types, further collection can be performed at the lower layer. For example, for process types, information about each process can be collected. For each process, the various resources used by the process can be obtained by using the process tree cgroup or other statistical methods such as directly reading / proc, including but not limited to cpu, mem, io, etc. The node management module NM aggregates the data from bottom to top to the container level, and then sends it to the message queue.

[0052] Optionally, the real-time monitoring of the application metadata and the resource information of the container stored in the same node, and the analysis of the resource application and actual resource usage of the container include: real-time monitoring of the CPU usage, memory usage, input / output device usage or network interface usage frequency under the current task, and analyzing the resource application and actual resource usage of the container according to the monitoring results. The system call monitoring module monitors the allocated system resources in real time to make a reasonable analysis. For example, when the memory application index is 100M, the actual situation usually remains at around 80M, which means that the system application index and the allocation index are relatively matched. Otherwise, the usage is maintained at a low state or overflow occurs, which means that the allocation status has not achieved the expected effect.

[0053] Optionally, after analyzing the resource application and actual resource usage of the container according to the monitoring results, the method includes: when the CPU utilization rate, memory utilization rate, input / output device utilization rate or network interface utilization rate exceeds a first threshold, a first alarm signal is issued; the scheduling system reallocates the resource information that generates the first alarm signal according to the first alarm signal. Similarly, as an example, for example, when the memory application index is 100M, the actual situation usually reaches a threshold of 95M, and the system will generate an alarm signal, indicating that there is an overflow risk at this time, and informing the system that a larger memory needs to be allocated to meet the needs of the task. Similarly, a risk threshold can be set for the CPU utilization rate, the input / output device utilization rate or the network interface utilization rate. When the risk threshold is reached, the system generates an alarm signal, and the user can automatically or manually reallocate the risk resources.

[0054] Optionally, after analyzing the resource application and actual resource usage of the container according to the monitoring results, the following includes: when the CPU usage, memory usage, input / output device usage or network interface usage frequency is lower than a second threshold, a second alarm signal is issued; the scheduling system reallocates the resource information that generates the second alarm signal according to the second alarm signal. Similarly, as an example, for example, when the memory application index is 100M, the actual situation is usually 10M, which is far less than the usage threshold of 50M (50%), the system will generate an alarm signal, indicating that the resource usage is insufficient at this time, and informing the system that a smaller memory needs to be allocated to meet the needs of the task. Similarly, a threshold can be set for the CPU usage, the input / output device usage or the network interface usage. When the threshold is not reached, the system generates an alarm signal, and the user can automatically or manually reallocate the risk resources to facilitate the release of resources and improve the overall resource utilization of the system.

[0055] As an implementation method, it also includes: recording the resource information that generates the first alarm signal and / or the second alarm signal into the historical resource information and updating the historical resource information; and allocating various resource information of estimated scale according to the updated historical resource information and the job label.

[0056] The system will record the resource allocation situation that generates the alarm and input it into the training model for training. When such training records reach a certain number, more reasonable resource information will be allocated for such tasks that are generated again, so that the overall operating efficiency of the system can be maximized.

[0057] The resource allocation method provided by the present disclosure can dynamically understand whether the configuration of system resources is reasonable by real-time monitoring of the operating status of system resource information and the status of allocated resources. When it is unreasonable, the allocation status can be adjusted in time. For tasks where the requested resources are greater than the actual used resources, the task resource utilization rate can be optimized, thereby further optimizing the cluster resource utilization rate. For tasks where the requested resources are less than the actual used resources, the user task running speed can be improved, and the probability of user job failure due to OOM can be reduced. For periodically running tasks, the present invention can recommend and adjust the resources of the task based on the historical running status of the task, so that the user's resource application is more reasonable, thereby ensuring the reasonable and healthy use of resources of the entire cluster.

[0058] In addition, the present disclosure also provides an apparatus embodiment that is consistent with the above-mentioned embodiment, which is used to implement the method steps described in the above-mentioned embodiment. The explanation based on the same name meaning is the same as that of the above-mentioned embodiment, and has the same technical effect as the above-mentioned embodiment, which will not be repeated here.

[0059] Specifically, Figure 5 As shown, according to a specific embodiment of the present disclosure, the present disclosure provides a resource configuration device, including:

[0060] An acquisition unit 502 is used to acquire a job task submitted by a user, wherein the job task includes a job tag for marking a job type and a resource declaration, and the resource declaration includes at least one resource information required to complete the job task;

[0061] A query unit 504 is used to query the historical resource information of the job task based on the job tag; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job tag;

[0062] A calculation unit 506, configured to calculate the predicted resource demand of the job task based on the historical resource information of the job task;

[0063] The allocating unit 508 is configured to allocate at least one resource based on the predicted resource demand.

[0064] Optionally, a processing unit (not shown) is further included for monitoring in real time the resource operation status under each job tag of the system and the relationship between the at least one allocated resource and the job task, and dynamically adjusting the at least one allocated resource.

[0065] As one of the implementation methods, Figure 2As shown, the processing unit is also used to obtain application meta-information through the resource management module of the scheduling system, the application meta-information including the application ID, application name, queue name, cluster name and application label when the task is running; obtain the resource information of the container through the node management module of the scheduling system; aggregate the application meta-information and the resource information of the container on the same node; monitor the application meta-information and the resource information of the container stored in the same node in real time, and analyze the resource application status and actual resource usage of the container.

[0066] As one of the implementation methods, Figure 4 As shown, the acquisition unit 502 is also used to obtain the resource information of the container through the node management module of the scheduling system, and the resource information of the container includes the process type and the disk type; obtain the resource information of each sub-process in the process type through the process tree module, and the resource information includes CPU information, memory information, input and output information or network interface information.

[0067] As an implementation mode, the processing unit is also used to monitor in real time the CPU usage, memory usage, input and output device usage or network interface usage frequency under the current task, and analyze the resource application and actual resource usage of the container based on the monitoring results.

[0068] As an embodiment, the processing unit is also used to issue a first alarm signal when the CPU usage, memory usage, input and output device usage or network interface usage frequency exceeds a first threshold; the scheduling system reallocates the resource information that generates the first alarm signal based on the first alarm signal.

[0069] As an embodiment, the processing unit is also used to issue a second alarm signal when the CPU usage, memory usage, input and output device usage or network interface usage frequency is lower than a second threshold; the scheduling system reallocates the resource information that generates the second alarm signal based on the second alarm signal.

[0070] As an implementation manner, the processing unit is further used to record the resource information that generates the first alarm signal and / or the second alarm signal into the historical resource information and update the historical resource information.

[0071] The resource configuration device provided by the present disclosure can dynamically understand whether the configuration of system resources is reasonable by real-time monitoring of the operating status of system resource information and the status of allocated resources. When it is unreasonable, the allocation status can be adjusted in time. For tasks where the requested resources are greater than the actual used resources, the task resource utilization rate can be optimized, thereby further optimizing the cluster resource utilization rate. For tasks where the requested resources are less than the actual used resources, the user task running speed can be improved, and the probability of user job failure due to OOM can be reduced. For periodically running tasks, the present invention can recommend adjustments to the resources of the task based on the historical running status of the task, so that the user's resource application is more reasonable, thereby ensuring reasonable and healthy resource use of the entire cluster.

[0072] like Figure 6 As shown, this embodiment provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method steps described in the above embodiment.

[0073] An embodiment of the present disclosure provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the method steps described in the above embodiment.

[0074] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0075] like Figure 6 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In RAM 603, various programs and data required for the operation of the electronic device are also stored. The processing device 601, ROM 602, and RAM 603 are connected to each other via a bus 605. An input / output (I / O) interface 605 is also connected to the bus 605.

[0076] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 605 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 605. The communication devices 605 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0077] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 605, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0078] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0079] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0080] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0081] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0082] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

Claims

1. A resource configuration method, characterized in that: include: Obtaining a job task submitted by a user, wherein the job task includes a job tag for marking a job type and a resource declaration, wherein the resource declaration includes at least one resource information required to complete the job task; and the resource information is split according to the analysis result of historical data; Querying historical resource information of the job task based on the job tag; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job tag; Calculating predicted resource requirements for the job task based on historical resource information of the job task; allocating at least one resource based on the predicted resource demand; The analysis results of the historical data are obtained by: Acquire application meta information through a resource management module of the scheduling system, wherein the application meta information includes an application tag; Obtaining resource information of the container through the node management module of the scheduling system; Associating the application meta information with the corresponding resource information of the container; The associated application meta-information and resource information of the container are monitored in real time, and the resource application status and actual resource usage status of the container are analyzed according to the monitoring results; and the analysis results are obtained.

2. The method according to claim 1, characterized in that The application meta information also includes the application ID, application name, queue name, and cluster name when the task is running.

3. The method according to claim 1, characterized in that The obtaining resource information of the container through the node management module of the scheduling system includes: Obtaining resource information of the container through the node management module of the scheduling system, where the resource information of the container includes a process type and a disk type; The resource information of each sub-process in the process type is obtained through the process tree module, and the resource information includes CPU information, memory information, input and output information or network interface information.

4. The method according to claim 3, characterized in that The real-time monitoring of the associated application meta-information and resource information of the container, and analyzing resource application and actual resource usage of the container according to the monitoring result, include: Monitor the CPU usage, memory usage, input / output device usage, or network interface usage frequency of the current task in real time, and analyze the resource application and actual resource usage of the container based on the monitoring results.

5. The method according to claim 4, characterized in that After analyzing the resource application and actual resource usage of the container according to the monitoring result, the method further comprises: When the CPU usage, memory usage, input / output device usage, or network interface usage frequency exceeds a first threshold, a first alarm signal is issued; The scheduling system reallocates resource information for generating the first alarm signal according to the first alarm signal.

6. The method according to claim 4, characterized in that After analyzing the resource application and actual resource usage of the container according to the monitoring result, the method further comprises: When the CPU usage, memory usage, input / output device usage or network interface usage frequency is lower than a second threshold, a second alarm signal is issued; The scheduling system reallocates resource information for generating the second alarm signal according to the second alarm signal.

7. A resource allocation device, characterized in that: include: An acquisition unit, used for acquiring a job task submitted by a user, wherein the job task includes a job tag for marking the job type and a resource declaration, wherein the resource declaration includes at least one resource information required to complete the job task; the resource information is split according to the analysis result of the historical data; A query unit, configured to query the historical resource information of the job task based on the job tag; the historical resource information is obtained by real-time monitoring and analysis of completed job tasks with the same job tag; A calculation unit, configured to calculate the predicted resource demand of the job task based on the historical resource information of the job task; an allocating unit, configured to allocate at least one resource based on the predicted resource demand; The analysis results of the historical data are obtained by: Acquire application meta information through a resource management module of the scheduling system, wherein the application meta information includes an application tag; Obtaining resource information of the container through the node management module of the scheduling system; Associating the application meta information with the corresponding resource information of the container; The associated application meta-information and resource information of the container are monitored in real time, and the resource application status and actual resource usage status of the container are analyzed according to the monitoring results; and the analysis results are obtained.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method according to any one of claims 1 to 6.