A method and device for detecting resource utilization of big data tasks
By collecting and analyzing the resource utilization data of the big data platform in real time, the resource usage of the Hadoop platform is optimized, the problem of resource waste is solved, and the resource usage efficiency and platform operating efficiency are improved.
Patent Information
- Application Number
- CN202010596936.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-06-28
AI Technical Summary
The existing Hadoop big data platform cannot effectively monitor and optimize task resource utilization, resulting in resource waste and increased costs.
By collecting resource utilization data of subtasks in real time, tracing back to computing tasks and application jobs, calculating resource utilization, and performing resource optimization operations, including early warning and resource parameter adjustment, to ensure resource usage efficiency and savings.
It achieves precise optimization of big data platform resources, reduces resource waste, improves resource utilization, avoids resource competition, and ensures the normal operation of application jobs.
Smart Images

Figure CN111782466B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of big data platforms, and in particular to a method and device for detecting resource utilization of big data tasks. Background Art
[0002] In recent years, with the popularization of the Internet and the rapid development of Web (network) technology, global data has exploded, making big data processing a new research hotspot. Hadoop is an open source framework based on the MapReduce programming model developed by the Apache Foundation. It is widely used in large-scale data processing such as web search, data mining, and scientific computing.
[0003] Currently, many companies are using Hadoop for large-scale data processing. The Hadoop-based big data platform provides client log records of task execution, including task execution progress and task execution exception information. However, it does not calculate the resource consumption and resource waste of the task itself, and thus cannot control the reasonable and efficient use of resources on the big data platform, which will cause a large waste of platform resource costs. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, an embodiment of the present application provides a big data task resource utilization detection method and device.
[0005] According to one aspect of an embodiment of the present application, a method for detecting resource utilization of a big data task is provided, comprising:
[0006] Determine the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks;
[0007] Obtain computing resource utilization data corresponding to the subtask;
[0008] Calculate task resource utilization data corresponding to the computing task and / or job resource utilization data corresponding to the application job according to the computing resource utilization data;
[0009] Execute resource optimization operations corresponding to the task resource utilization data and / or the operation resource utilization data.
[0010] Optionally, the computing resource utilization data includes a resource application amount, a maximum resource usage amount, and a running time corresponding to the subtask, and calculating task resource utilization data corresponding to the computing task according to the computing resource utilization data includes:
[0011] Calculate the resource abnormality corresponding to the subtask according to the resource application amount, the maximum resource usage and the running time;
[0012] The task resource abnormality corresponding to the computing task is obtained according to the resource abnormality of all subtasks under the computing task.
[0013] Optionally, the calculating the job resource utilization data corresponding to the application job according to the computing resource utilization data includes:
[0014] Calculate the resource abnormality corresponding to the subtask according to the resource application amount, the maximum resource usage and the running time;
[0015] Obtaining the task resource abnormality amount corresponding to the computing task according to the resource abnormality amounts of all subtasks under the computing task;
[0016] The abnormal amount of job resources corresponding to the application job is obtained according to the abnormal amounts of task resources of all computing tasks corresponding to the application job.
[0017] Optionally, the executing the resource optimization operation corresponding to the task resource utilization data and / or the job resource utilization data includes:
[0018] When it is determined according to the task resource utilization data that the computing task satisfies a first preset condition, performing an early warning operation on the computing task;
[0019] and / or,
[0020] When it is determined according to the job resource utilization data that the application job meets a second preset condition, an early warning operation is performed on the application job.
[0021] Optionally, when it is determined according to the task resource utilization data that the computing task satisfies a first preset condition and / or it is determined according to the job resource utilization data that the application job satisfies a second preset condition, executing the resource optimization operation corresponding to the task resource utilization data and / or the job resource utilization data further includes:
[0022] Determining resource optimization parameters corresponding to the first preset condition and / or the second preset condition;
[0023] The resource parameters of the big data platform are determined according to the resource optimization parameters.
[0024] Optionally, determining the resource optimization parameter corresponding to the first preset condition and / or the second preset condition includes:
[0025] Determining a resource optimization level corresponding to the first preset condition and / or the second preset condition;
[0026] The resource optimization parameter corresponding to the resource optimization level is obtained.
[0027] Optionally, the method further includes:
[0028] Obtaining historical resource utilization data of the big data platform;
[0029] Determine the target computing resource amount corresponding to the subtask according to the historical resource utilization data;
[0030] The resource optimization parameter is determined according to the target computing resource amount.
[0031] Optionally, the determining of the computing task corresponding to the application job of the big data platform and the subtasks included in the computing task includes:
[0032] Collecting real-time operation data corresponding to the application operation;
[0033] Determine the computing task corresponding to the application job according to the real-time job data;
[0034] Collecting real-time computing task data corresponding to the computing task;
[0035] The subtasks included in the computing task are determined according to the real-time computing task data.
[0036] According to another aspect of an embodiment of the present application, a big data task resource utilization detection device is provided, comprising:
[0037] A determination module, used to determine the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks;
[0038] An acquisition module, used to acquire computing resource utilization data corresponding to the subtask;
[0039] A calculation module, configured to calculate task resource utilization data corresponding to the computing task and / or job resource utilization data corresponding to the application job according to the computing resource utilization data;
[0040] An execution module is used to execute the resource optimization operation corresponding to the task resource utilization data and / or the operation resource utilization data.
[0041] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0042] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0043] The memory is used to store computer programs;
[0044] The processor is used to implement the above method steps when executing a computer program.
[0045] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0046] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0047] By collecting resource utilization data of subtasks on the big data platform in real time, tracing back to the computing tasks and corresponding application jobs to which the subtasks belong, the resource utilization of computing tasks and application jobs can be accurately analyzed, so that resource optimization can be performed more accurately based on the resource utilization of each task and job. While ensuring the normal operation of application jobs, the amount of resources used by application jobs is minimized, saving computing resources on the big data platform, and while ensuring the efficiency of job operation, the resource utilization rate of application jobs on the platform is improved to avoid resource waste or competition. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 A flowchart of a big data task resource utilization detection method provided in an embodiment of the present application;
[0051] Figure 2 A flowchart of a big data task resource utilization detection method provided by another embodiment of the present application;
[0052] Figure 3 A flowchart of a big data task resource utilization detection method provided by another embodiment of the present application;
[0053] Figure 4 A flowchart of a big data task resource utilization detection method provided by another embodiment of the present application;
[0054] Figure 5 A flowchart of a big data task resource utilization detection method provided by another embodiment of the present application;
[0055] Figure 6 A flowchart of a big data task resource utilization detection method provided by another embodiment of the present application;
[0056] Figure 7 A block diagram of a big data task resource utilization detection device provided in an embodiment of the present application;
[0057] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 making creative work are within the scope of protection of this application.
[0059] On the big data platform, an application job (prdtask) is a business job requested by a user, such as querying the user's historical transaction data over a period of time; each application job may be split into one or more computing tasks (Jobs) during processing, and each job can have one or more subtasks (Tasks).
[0060] For Hadoop, a job is a Mapreduce program, and a job can have one or more tasks, which can be divided into Map Tasks and Reduce Tasks.
[0061] In the embodiment of the present application, the resource utilization of the Job is analyzed according to the resource utilization of each Task under the application job, and the resource utilization of the application job is further obtained, so as to determine whether there is resource waste or resource shortage in the application job, and whether resource optimization of the application job is required.
[0062] The following first introduces a big data task resource utilization detection method provided by an embodiment of the present invention.
[0063] Figure 1 A flowchart of a method for detecting resource utilization of a big data task provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0064] Step S11, determining the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks.
[0065] Each prdtask has its corresponding job ID, and its corresponding JobID can be queried based on the job ID.
[0066] The JobTracker generates a unique JobID for each job of the application. The JobID contains the JobTracker ID and the job number. The string representation of the JobID is: job_ <jobtrackerid> _ <jobnumber>For example, job_200707121733_0003 indicates that this is job number 3 of Jobtracker200707121733.
[0067] The TaskID of each Task contains the JobID of the Job to which it belongs, the Map or Reduce task, and the Task number. The string representation of TaskID is:
[0068] task_ <jobtrackerid> _ <jobnumber> _[m|r]_ <tasknumber>For example, task_200707121733_0003_m_000005 indicates task 000005 of Job200707121733_0003, which is a Map task.
[0069] In this step, based on the association relationship between IDs, the Job corresponding to prdtask and the Tasks included in the Job can be determined.
[0070] Step S12, obtaining computing resource utilization data corresponding to the subtask.
[0071] The computing resource utilization data may include memory utilization data and / or CPU utilization data. In practice, memory is prone to resource waste or resource shortage, so in this embodiment, subsequent analysis may be performed based on the memory utilization data of the task.
[0072] Step S13, calculating task resource utilization data corresponding to the computing task and / or job resource utilization data corresponding to the application job according to the computing resource utilization data.
[0073] In this step, the task resource utilization data of a Job can be obtained based on the computing resource utilization data of all Tasks included in it. The job resource utilization data of an application job can be obtained based on the task resource utilization data of all Jobs corresponding to it.
[0074] Step S14: executing resource optimization operations corresponding to the task resource utilization data and / or the operation resource utilization data.
[0075] When it is determined that there is resource waste based on task resource utilization data and / or job resource utilization data, the resource application amount of Task, Job or prdtask can be reduced, and when there is insufficient resources, the resource application amount of Task, Job or prdtask can be increased.
[0076] In this embodiment, by collecting resource utilization data of subtasks on the big data platform in real time, tracing back to the computing tasks and corresponding application jobs to which the subtasks belong, the resource utilization of computing tasks and application jobs is accurately analyzed, so that resource optimization can be performed more accurately according to the resource utilization of each task and job. While ensuring the normal operation of the application job, the amount of resources used by the application job is minimized, the computing resources of the big data platform are saved, and while ensuring the operation efficiency, the resource utilization rate of the application job on the platform is improved to avoid resource waste or competition.
[0077] Figure 2 This is a flowchart of a method for detecting resource utilization of a big data task provided by another embodiment of the present application. Figure 2 As shown, in an optional embodiment, the above step S11 includes:
[0078] Step S21, collecting real-time operation data corresponding to the application operation;
[0079] Step S22, determining the computing task corresponding to the application job according to the real-time job data;
[0080] Step S23, collecting real-time computing task data corresponding to the computing task;
[0081] Step S24, determining the subtasks included in the computing task according to the real-time computing task data.
[0082] The real-time job data includes the job ID corresponding to the application job prdtask. Based on the job ID, the JobIDs of all the corresponding computing tasks Job can be queried. The real-time computing task data includes the JobID of the computing task Job and the TaskIDs of all its subtasks Task. All the tasks included in the computing task Job can be determined based on the real-time computing task data.
[0083] In this embodiment, data is collected in real time during the running of the application job to perform resource calculation and optimization, so as to minimize the amount of resources used by the application job while ensuring the normal operation of the application job, thereby saving the computing resources of the big data platform.
[0084] In an optional embodiment, the computing resource utilization data includes the resource application amount, the maximum resource usage and the running time corresponding to the subtask. When the resource application amount is greater than the maximum resource usage, there is a waste of computing resources, and when the resource application amount is less than the maximum resource usage, there is a shortage of computing resources. Both the waste and shortage of computing resources can be considered as computing resource abnormalities.
[0085] Figure 3 This is a flowchart of a method for detecting resource utilization of a big data task provided by another embodiment of the present application. Figure 3 As shown, step S13 includes:
[0086] Step S31, calculating the resource abnormality corresponding to the subtask according to the resource application amount, the maximum resource usage and the running time.
[0087] Step S32, obtaining the task resource abnormality corresponding to the computing task according to the resource abnormality of all subtasks under the computing task.
[0088] Step S33, obtaining the abnormal amount of job resources corresponding to the application job according to the abnormal amounts of task resources of all computing tasks corresponding to the application job.
[0089] The step of calculating the task resource utilization data of the Job includes the above steps S31 and S32 ; and the step of calculating the abnormal amount of job resources of the application job includes the above steps S31 to S33 .
[0090] Specifically, the memory utilization data in the computing resource utilization data includes: the memory application amount and the maximum memory usage of each Task.
[0091] The following describes step S13 in detail by taking the calculation of memory waste as an example.
[0092] The memory request amount Container_size of the Task is greater than the maximum memory usage peak_memory_used.
[0093] The memory application amount Container_size is the size of the Yarn (Yet Another Resource Negotiator) container applied for each Task.
[0094] The maximum memory usage peak_memory_used can be calculated based on the maximum physical memory usage max_physical_memory and virtual memory usage virtual_memory of each task:
[0095] Among them, 2.1 is the default value of the virtual memory ratio yarn.nodemanager.vmem-pmem-ratio.
[0096] The amount of memory wasted_resource wasted for each Task can be calculated using the following formula:
[0097] wasted_resource = (Container_size - 1.5 × peak_memory_used) × runtime, where runtime is the running time of the Task.
[0098] Job task memory waste amount wasted_resource Job The sum of all task resource waste under it:
[0099] Among them, there are n+1 tasks under this job, i=0, 1, 2...n, wasted_resource i The amount of memory wasted by the i-th Task in this Job.
[0100] Wasted_resource Amount of job memory wasted by the application job prdtask The sum of all corresponding Job resource waste:
[0101] Among them, the application job prdtask has m+1 jobs, j=0, 1, 2...m, wasted_resource Jobj wasted_resource j It is the task memory waste of the jth job under the application job prdtask.
[0102] In this embodiment, there may also be a situation of insufficient resources, that is, the resource application amount is less than the maximum resource usage. In this case, the task resource shortage of each Job and / or the job resource shortage of the application job can be calculated based on the resource shortage of each Task.
[0103] In the above step S13, Storm (an open source distributed real-time big data processing framework) can be used to calculate the abnormal amount of resources in each step.
[0104] Optionally, step S14 includes: when it is determined based on the task resource utilization data that the computing task meets the first preset condition, performing an early warning operation on the computing task; and / or, when it is determined based on the job resource utilization data that the application job meets the second preset condition, performing an early warning operation on the application job.
[0105] In this embodiment, Siddhi, a lightweight, simple, open source complex event process engine (Complex Event Processing, CEP), can be used to determine whether resource waste or shortage occurs, and to warn Job / application jobs in real time based on the judgment results. Siddhi uses a SQL-like language to describe event stream tasks, which can well support the development of an extensible, configurable stream task execution engine. In the relevant design, in order to support different types of warning rules, different business logic codes need to be written, but after using Siddhi, only different stream tasks Siddhiql need to be configured, that is, different rule tasks and warning businesses can be supported. SQL-like event tasks are abstracted through business rules to implement business processes, and other subsequent event tasks are triggered according to business calculation results, such as external system API (warning, notification) call processes, data storage, and data consumption.
[0106] Figure 4 This is a flowchart of a method for detecting resource utilization of a big data task provided by another embodiment of the present application. Figure 4 As shown, in an optional embodiment, when a resource abnormality occurs, the above step S14 further includes:
[0107] Step S41, determining resource optimization parameters corresponding to the first preset condition and / or the second preset condition;
[0108] Step S42, determining resource parameters of the big data platform according to the resource optimization parameters.
[0109] Optionally, the resource optimization parameters in step S41 can be obtained by analyzing historical resource utilization data of a big data platform. Figure 5 This is a flowchart of a method for detecting resource utilization of a big data task provided by another embodiment of the present application. Figure 5 As shown, the method further comprises the following steps:
[0110] Step S51, obtaining historical resource utilization data of the big data platform;
[0111] Step S52, determining the target computing resource amount corresponding to the subtask according to the historical resource utilization data;
[0112] Step S53, determining resource optimization parameters according to the target computing resource amount.
[0113] In this embodiment, the resource optimization parameters used for resource optimization of application jobs can determine the historical resource utilization data of computing tasks and application jobs based on historical data stored offline, and then obtain the target resource computing amount of the subtask. The resource optimization parameters are analyzed based on the historical data, and the resources of the task jobs are optimized in real time.
[0114] Optionally, when there is waste or shortage of resources, resource optimization parameters can be calculated based on a pre-trained resource optimization model. The resource optimization model analyzes the minimum amount of resources used by the job / application while ensuring normal execution, and obtains the resource optimization parameters of the big data platform based on the minimum amount of resources.
[0115] The resource optimization model can be trained based on the historical resource utilization data of the big data platform. The historical resource utilization data includes the memory usage, CPU usage, whether the execution is successful, the running time and other data of the job / application. Based on these data, the resource optimization algorithm can be trained.
[0116] For example, through the resource optimization model, according to the distribution of memory consumption, for application jobs that waste too much memory or apply for insufficient resources, resource optimization is performed by reducing 500MB of memory or increasing 500MB of memory application each time.
[0117] Figure 6 This is a flowchart of a method for detecting resource utilization of a big data task provided by another embodiment of the present application. Figure 6 As shown, optionally, step S41 includes:
[0118] Step S61, determining a resource optimization level corresponding to the first preset condition and / or the second preset condition;
[0119] Step S62: Obtain resource optimization parameters corresponding to the resource optimization level.
[0120] For example, taking the settings of MapReduce memory-related parameters as an example, the resource optimization levels and corresponding resource optimization parameters are shown in Table 1 below.
[0121] Table 1
[0122] Resource optimization parameters Resource optimization level RM memory parameters (container-level memory) 1 AM memory parameters (task-level memory) 2 AM JVM memory parameters 3
[0123] Among them, RM stands for resource manager (ResourceManager), AM stands for application controller (ApplicationMaster), and AM JVM stands for application controller Java virtual machine (ApplicationMasterJavaVirtualMachine).
[0124] The following is a detailed description of the resource optimization parameters for each optimization level:
[0125] (1)RM memory parameters include:
[0126] RM1: yarn.scheduler.minimum-allocation-mb, the minimum memory that can be applied for a single container, that is, the minimum memory application amount for each Task;
[0127] RM2: yarn.scheduler.maximum-allocation-mb, the maximum memory that can be applied for a single container, that is, the maximum memory application amount for each task.
[0128] (2)AM memory parameters
[0129] AM1: mapreduce.map.memory.mb, the memory size allocated to the Map Container, that is, the memory application amount for each MapTask;
[0130] AM2: mapreduce.reduce.memory.mb, the memory size allocated to the Reduce Container, that is, the memory application amount for each ReduceTask.
[0131] yarn.app.mapreduce.am.resource.mb, the amount of memory occupied by MR AppMaster, where MRAppMaster is the ApplicationMaster implementation of MapReduce, which enables the MapReduce computing framework to run on YARN.
[0132] Among them, RM1≤AM1≤RM2, RM1≤AM2≤RM2, and generally AM2 is twice of AM1.
[0133] (3)AMJVM memory parameters
[0134] mapreduce.map.java.opts indicates the parameters for configuring the Map side;
[0135] mapreduce.reduce.java.opts indicates the parameters for configuring the Reduce side.
[0136] mapreduce.map.java.opts and mapreduce.reduce.java.opts are the startup parameters passed to the virtual machine when starting the JVM virtual machine. The options related to memory are -Xmx, -Xms, etc., which indicate the maximum amount of memory that the JVM program (java, scala, etc.) can use. Once this size is exceeded, the JVM will throw an Out of Memory exception and terminate the process.
[0137] In this embodiment, the resource optimization model automatically obtains the memory parameters of each MapReduce execution and the resource utilization of the application job in real time, and recommends the memory parameter values and recommended adjustment parameters and adjustment resource amounts when the resource consumption is minimized during the historical operation of the application job.
[0138] The following are device embodiments of the present application, which can be used to execute method embodiments of the present application.
[0139] Figure 7 This is a block diagram of a big data task resource utilization detection device provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 7 As shown, the big data task resource utilization detection device includes:
[0140] A determination module 71 is used to determine the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks;
[0141] An acquisition module 72 is used to acquire computing resource utilization data corresponding to a subtask;
[0142] A calculation module 73, configured to calculate task resource utilization data corresponding to the computing task and / or job resource utilization data corresponding to the application job according to the computing resource utilization data;
[0143] The execution module 74 is used to execute resource optimization operations corresponding to the task resource utilization data and / or the operation resource utilization data.
[0144] In the embodiment of the present application, for the big data platform built on Hadoop, real-time data is collected through Kafka, and offline historical data is stored through Hive.
[0145] Among them, Kafka is a high-throughput distributed publish-subscribe messaging system that can process all action stream data of consumers on the big data platform. Hive is a data warehouse tool based on Hadoop, which is used for data extraction, transformation, and loading. It is a mechanism that can store, query, and analyze large-scale data stored in Hadoop.
[0146] The offline historical data stored in Hive is synchronized to the relational database MySQL. Kafka loads the offline historical data and real-time data from MySQL to the resource usage warning engine. The resource usage warning engine monitors the resource usage of task operations through Eagle (an open source distributed real-time security monitoring solution). Storm calculates the abnormal situation of resource usage, and Storm can trigger warning operations or resource optimization operations based on the abnormal situation of resource utilization. Storm calculates the resource optimization parameters under the abnormal situation based on the pre-trained resource optimization model, and uses the optimization parameters to optimize the resource parameters of the computing task or application job.
[0147] The present application also provides an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0148] Memory 1503, used for storing computer programs;
[0149] The processor 1501 is used to implement the steps of the above method embodiment when executing the computer program stored in the memory 1503.
[0150] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0151] The communication interface is used for communication between the above electronic device and other devices.
[0152] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0153] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0154] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method embodiment described below are implemented.
[0155] It should be noted that, for the above-mentioned device, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0156] It should be further noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0157] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.< / tasknumber> < / jobnumber> < / jobtrackerid> < / jobnumber> < / jobtrackerid>
Claims
1. A method for detecting resource utilization of a big data task, characterized in that: include: Determine the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks; Obtain computing resource utilization data corresponding to the subtask; Calculate task resource utilization data corresponding to the computing task and / or job resource utilization data corresponding to the application job according to the computing resource utilization data; Executing resource optimization operations corresponding to the task resource utilization data and / or the operation resource utilization data; The executing of the resource optimization operation corresponding to the task resource utilization data and / or the operation resource utilization data includes: The resource optimization parameters are calculated based on the pre-trained resource optimization model; the resource optimization model analyzes the minimum amount of resources used by the computing tasks and / or application jobs while ensuring the normal execution of the computing tasks and / or application jobs, and obtains the resource optimization parameters of the big data platform based on the minimum amount of resources; Execute the resource optimization operation according to the resource optimization parameter; The resource optimization model automatically obtains the memory parameters of each MapReduce run and the resource utilization of the application job in real time, and recommends the memory parameter values and recommended adjustment parameters and adjustment resource amounts under the condition of minimum resource consumption in the historical running process of the application job.
2. The method according to claim 1, characterized in that The computing resource utilization data includes the resource application amount, maximum resource usage and running time corresponding to the subtask; and calculating the task resource utilization data corresponding to the computing task according to the computing resource utilization data includes: Calculate the resource abnormality corresponding to the subtask according to the resource application amount, the maximum resource usage and the running time; The task resource abnormality amount corresponding to the computing task is obtained according to the resource abnormality amounts of all subtasks under the computing task.
3. The method according to claim 2, characterized in that The calculating the job resource utilization data corresponding to the application job according to the computing resource utilization data includes: Calculate the resource abnormality corresponding to the subtask according to the resource application amount, the maximum resource usage and the running time; Obtaining the task resource abnormality amount corresponding to the computing task according to the resource abnormality amounts of all subtasks under the computing task; The abnormal amount of job resources corresponding to the application job is obtained according to the abnormal amounts of task resources of all computing tasks corresponding to the application job.
4. The method according to claim 1, characterized in that: The executing of the resource optimization operation corresponding to the task resource utilization data and / or the operation resource utilization data includes: When it is determined according to the task resource utilization data that the computing task satisfies a first preset condition, performing an early warning operation on the computing task; and / or, When it is determined according to the job resource utilization data that the application job meets a second preset condition, an early warning operation is performed on the application job.
5. The method according to claim 4, characterized in that When it is determined according to the task resource utilization data that the computing task satisfies a first preset condition and / or it is determined according to the job resource utilization data that the application job satisfies a second preset condition, executing the resource optimization operation corresponding to the task resource utilization data and / or the job resource utilization data further includes: Determining resource optimization parameters corresponding to the first preset condition and / or the second preset condition; The resource parameters of the big data platform are determined according to the resource optimization parameters.
6. The method according to claim 5, characterized in that The determining of the resource optimization parameters corresponding to the first preset condition and / or the second preset condition includes: Determining a resource optimization level corresponding to the first preset condition and / or the second preset condition; The resource optimization parameter corresponding to the resource optimization level is obtained.
7. The method according to claim 5, characterized in that The method further comprises: Obtaining historical resource utilization data of the big data platform; Determine the target computing resource amount corresponding to the subtask according to the historical resource utilization data; The resource optimization parameter is determined according to the target computing resource amount.
8. The method according to claim 1, characterized in that The step of determining the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks includes: Collecting real-time operation data corresponding to the application operation; Determine the computing task corresponding to the application job according to the real-time job data; Collecting real-time computing task data corresponding to the computing task; The subtasks included in the computing task are determined according to the real-time computing task data.
9. A big data task resource utilization detection device, characterized in that: include: A determination module, used to determine the computing tasks corresponding to the application jobs of the big data platform and the subtasks included in the computing tasks; An acquisition module, used to acquire computing resource utilization data corresponding to the subtask; A calculation module, configured to calculate task resource utilization data corresponding to the computing task and / or job resource utilization data corresponding to the application job according to the computing resource utilization data; An execution module, used for executing resource optimization operations corresponding to the task resource utilization data and / or the operation resource utilization data; The execution module is used to calculate resource optimization parameters based on a pre-trained resource optimization model; the resource optimization model analyzes the minimum amount of resources used by the computing tasks and / or application jobs while ensuring the normal execution of the computing tasks and / or application jobs, and obtains the resource optimization parameters of the big data platform based on the minimum amount of resources; the resource optimization operation is performed based on the resource optimization parameters; wherein the resource optimization model automatically obtains the memory parameters of each MapReduce execution and the resource utilization of the application jobs in real time, and recommends the memory parameter values and recommended adjustment parameters and adjustment resource amounts under the condition of minimum resource consumption during the historical operation of the application job.
10. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-8 when executing the computer program.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method steps described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Resource allocation method and device, computer readable storage medium and electronic equipment
CN110874272A
