WO2016177258A1 - 计算资源管理方法和装置 - Google Patents
计算资源管理方法和装置 Download PDFInfo
- Publication number
- WO2016177258A1 WO2016177258A1 PCT/CN2016/079157 CN2016079157W WO2016177258A1 WO 2016177258 A1 WO2016177258 A1 WO 2016177258A1 CN 2016079157 W CN2016079157 W CN 2016079157W WO 2016177258 A1 WO2016177258 A1 WO 2016177258A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- value
- computing resource
- task
- health score
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
Definitions
- the present application relates to the field of data processing technologies, and in particular, to a computing resource management method and apparatus.
- this method has the following problems: It is impossible to form a long-term effective optimization mechanism; each time it takes a lot of manpower and material resources to confirm; the clean-up is impossible, and the N major tasks of calculating the resource consumption can only solve the short-term crisis. There are still a large number of tasks with other unreasonable situations that cannot be effectively governed.
- the present application aims to solve at least one of the technical problems in the related art to some extent.
- an object of the present application is to propose a computing resource management method, which can implement a long-term optimization mechanism, does not require human confirmation, and can not only optimize large tasks but also optimize other tasks.
- Another object of the present application is to propose a computing resource management apparatus.
- the computing resource management method includes: determining computing resource related information included in the information to be managed, where the computing resource related information includes: a task, and/or a node; Calculating a health score of the resource-related information; calculating a health score of the information about the to-be-managed information as a parameter of the pre-established health model; and determining the health of the information to be managed
- the computing resource management is performed on the information to be managed.
- the computing resource management method proposed by the embodiment of the first aspect of the present application adopts a health model
- the information to be managed is managed by computing resources.
- there is a need to manage large-scale computing resources there is a unified standard, which can form a long-term effective mechanism, does not require confirmation, and can not only optimize large tasks, but also optimize other tasks. Therefore, feasible and effective computing resource management can be realized, which can be applied to a large-scale data management scenario.
- the computing resource management apparatus includes: a determining module, configured to determine computing resource related information included in the information to be managed, where the computing resource related information includes: a task, and/ Or a node, an obtaining module, configured to obtain a health score of the computing resource related information, and a calculating module, configured to calculate the health of the computing resource related information as a parameter of a pre-established health model, and calculate the to-be-managed a health component of the information; a management module, configured to perform computing resource management on the information to be managed according to the health score of the information to be managed.
- the computing resource management apparatus proposed by the embodiment of the second aspect of the present application can perform computing resource management by using the health degree model to manage the information, and can have a unified standard when it is necessary to manage large-scale computing resources, thereby forming a long-term effective
- the mechanism does not require confirmation, and can not only optimize large tasks, but also optimize other tasks, so that feasible and effective computing resource management can be implemented, which can be applied to large-scale data management scenarios.
- FIG. 1 is a schematic flowchart of a method for managing a computing resource according to an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a computing resource management apparatus according to another embodiment of the present application.
- FIG. 1 is a schematic flowchart of a computing resource management method according to an embodiment of the present application, where the method includes:
- S11 Determine computing resource related information included in the information to be managed, where the computing resource related information includes: a task, and/or a node.
- the information to be managed includes but is not limited to: a data developer, an application, and a business unit (BU).
- a data developer includes but is not limited to: a data developer, an application, and a business unit (BU).
- BU business unit
- Each information to be managed may include: one or more tasks; or one or more nodes; or one or more tasks, and one or more nodes.
- a plurality refers to at least two.
- S12 Acquire a health score of the computing resource related information.
- the health score includes: a task-level health score corresponding to the task, and a node-level health score of the corresponding node.
- the task level can be called the Open Data Processing Service (ODPS) task level
- the node level can be called the Skynet node level
- Skynet is a scheduling system.
- the deduction system is taken as an example.
- the value corresponding to the deduction item is deducted from the default value, and the minimum deduction is 0.
- the default value is 100 as an example.
- the health score of each task is obtained according to at least one of the following deduction items:
- Tilt value lack of responsible person value, simple processing value, violent scan value, repeated calculation of value, output is null value, and map parameter setting is unreasonable.
- each task includes at least one fuxi_task, and sum() represents a summation operation
- Fuxi_task tilt max (runtime) / avg (runtime) - 3;
- each fuxi_task includes at least one fuxi_instance
- the runtime is the running time of each fuxi_instance
- max() is the maximum value operation
- avg() is the mean operation.
- the number of instances of a fuxi_task is less than or equal to 3, it does not constitute a data skew.
- the maximum value of the slope is related to the number of instances.
- biz_id when the task has a responsible person, there will be biz_id.
- the person responsible in this embodiment is not limited to the case where there is a biz_id, but also includes the case where the responsible person does not have the biz_id.
- the result table is grounded, that is, the operation corresponding to the task is a write operation, such as: insert overwrite, creat;
- A4 number of days scanned -31 ⁇ [0, ⁇ );
- the monthly task does not count for violent scans.
- the second and above partitions are first aggregated to the sky partition.
- A5 column similarity* partition record number similarity* input table similarity ⁇ [0,1);
- the column similarity is the cosine similarity of two strings, and the two strings are respectively composed of columns of two input tables, and the two input tables are tables of data corresponding to the two tasks currently compared;
- the number of partition records is similar to the covariance of the number of records when the number of partition records of 7-61 days is greater than 1000;
- the average running time refers to the average of the running time of all fuxi_instances included in a fuxi_task.
- the fuxi_task needs to satisfy the following conditions:
- the health score of each task is obtained according to at least one of the following deduction items:
- B1 number of days in the last 10 days to break the baseline ⁇ [0, 10].
- the B task at 5 o'clock baseline time depends on the A task at 8 o'clock in the baseline time. If the A task is completed at 7 o'clock, the A task does not break the baseline, but since the output time of B is necessarily later than 7 o'clock, B The task counts the baseline. In addition, do not count hours of tasks.
- the upstream table is produced by Skynet, and the downstream table has dependencies through bloodline resolution, but is not configured, and the partition read is 0.
- B6 0 or 1 ⁇ 0,1 ⁇ , where the value is 1 if the node is the same as the import source of other nodes, otherwise 0.
- B8 0 or 1 ⁇ 0,1 ⁇ , where if the number of records imported for 7 days is consistent and greater than 1000 rows (the number of specific rows can also be set), the value is 1; otherwise, it is 0.
- the calculation formula of the health score of a single node is:
- D greatest(0,(100-least(b1*(p+1)*10,100)-30*b2-10*b3-10*b4-50*b5-50*b6-50*b7-50*b8) ) ⁇ 4/1000000;
- p is the default Skynet priority ⁇ [0,8].
- S13 Calculate the health score of the information to be managed by using the health of the computing resource related information as a parameter of a pre-established health model.
- the health of the computing resource related information is used as a parameter of a pre-established health model, and the health score of the information to be managed is calculated, including:
- the health score E of the information to be managed is calculated by using the following calculation formula:
- n is the weight of the task level, which can be calculated by the following formula: log (task running time *plan_cpu_cost+1), plan_cpu_cost is fetched by the underlying database;
- m is the weight of the node level, which can be calculated by the following formula: the priority of the node is +1, wherein the priority of the node can be preset by the user;
- x is the number of tasks with nodes
- y is the number of tasks without nodes.
- tasks with nodes refer to production tasks
- tasks with no nodes refer to development tasks. Because some people have more development tasks such as analysts, some people have more production tasks, such as professional data development engineers, etc., in order to avoid imbalance, they are weighted average.
- S14 Perform computing resource management on the information to be managed according to the health score of the information to be managed.
- the computing resources can be managed according to the preset policy and the information to be managed.
- a threshold may be set in advance. When the health score of a piece of information to be managed is less than the threshold, it is determined that the information to be managed is information that needs to be optimized, and information corresponding to the optimization may be displayed for each task and node it includes. Deducted items for targeted optimization.
- the information to be managed is a data developer, if a data developer's health score is greater than a threshold, the data developer may be rewarded, and when the data developer's health score is less than a threshold, the data is developed. The punishment is punishable, so that the data developer's optimization enthusiasm can be mobilized.
- the cluster to which this embodiment is applied includes, but is not limited to, a Hadoop cluster and an odps cluster.
- the health degree model to perform management of resource management, it is possible to have a unified standard when managing large-scale computing resources, thereby forming a long-term effective mechanism, without human confirmation, and Not only optimizes large tasks, but also optimizes other tasks, so it can implement feasible and effective computing resource management, which can be applied to large-scale data management scenarios.
- This embodiment can be very suitable for large-scale computing resource management by selecting various specific task levels and node level deduction items.
- the apparatus 20 includes a determination module 21, an acquisition module 22, a calculation module 23, and a management module 24.
- a determining module 21 configured to determine computing resource related information included in the information to be managed, where the computing resource related information includes: a task, and/or a node;
- the information to be managed includes but is not limited to: a data developer, an application, and a business unit (BU).
- a data developer includes but is not limited to: a data developer, an application, and a business unit (BU).
- BU business unit
- the obtaining module 22 is configured to obtain a health score of the computing resource related information.
- the health score includes: a task-level health score corresponding to the task, and a node-level health score of the corresponding node.
- the task level can be called the Open Data Processing Service (ODPS) task level
- the node level can be called the Skynet node level
- Skynet is a scheduling system.
- the deduction system is taken as an example.
- the value corresponding to the deduction item is deducted from the default value, and the minimum deduction is 0.
- the default value is 100 as an example.
- the obtaining module 22 is specifically configured to:
- the health score of each task is obtained according to at least one of the following deduction items:
- Tilt value lack of responsible person value, simple processing value, violent scan value, repeated calculation of value, output is null value, mapping parameter setting is unreasonable value.
- the obtaining module 22 is specifically configured to calculate a health score of a single task by using the following calculation formula:
- C is the health score of a single task
- a1 is the slope value
- a2 is the number of responsible persons
- a3 is the simple processing value
- a4 is the violent scan value
- a5 is the repeated calculation value
- a6 is the output null value
- a7 is the mapping The parameter setting is not reasonable.
- the obtaining module 22 is specifically configured to:
- the health score of each node is obtained according to at least one of the following deduction items:
- the node breaks the baseline value, depends on the reasonableness value, the reasonable value of the responsible person, the value of the task error day, the output table is not read, the value is imported into the same value, the output is null, and the continuous consistent value is imported.
- the obtaining module 22 is specifically configured to calculate a health score of a single node by using the following calculation formula:
- D greatest(0,(100-least(b1*(p+1)*10,100)-30*b2-10*b3-10*b4-50*b5-50*b6-50*b7-50*b8) ) ⁇ 4/1000000;
- D is the health score of a single node
- b1 is the baseline value of the node break
- b2 is the value of dependency rationality
- b3 is the reasonable value of the responsible person
- b4 is the number of days of task error
- b5 is the value of the output table is not read
- b6 is the same
- b7 is the output null value
- b8 is the import consistent value.
- the calculating module 23 is configured to calculate the health score of the information to be managed by using the health of the computing resource related information as a parameter of a pre-established health model;
- the calculating module 23 is specifically configured to:
- E is the health score of the information to be managed
- n is the weight of the task level, which can be calculated by the following formula: log (task running time *plan_cpu_cost+1), plan_cpu_cost is fetched by the underlying database;
- m is the weight of the node level, which can be calculated by the following formula: the priority of the node is +1, wherein the priority of the node can be preset by the user;
- x is the number of tasks with nodes
- y is the number of tasks without nodes
- the management module 24 is configured to perform computing resource management on the information to be managed according to the health score of the information to be managed.
- the computing resources can be managed according to the preset policy and the information to be managed.
- a threshold may be set in advance. When the health score of a piece of information to be managed is less than the threshold, it is determined that the information to be managed is information that needs to be optimized, and information corresponding to the optimization may be displayed for each task and node it includes. Deducted items for targeted optimization.
- the information to be managed is a data developer, if a data developer's health score is greater than a threshold, the data developer may be rewarded, and when the data developer's health score is less than a threshold, the data is developed. The punishment is punishable, so that the data developer's optimization enthusiasm can be mobilized.
- the cluster to which this embodiment is applied includes, but is not limited to, a Hadoop cluster and an odps cluster.
- the health degree model to perform management of resource management, it is possible to have a unified standard when managing large-scale computing resources, thereby forming a long-term effective mechanism, without human confirmation, and Not only optimizes large tasks, but also optimizes other tasks, so it can implement feasible and effective computing resource management, which can be applied to large-scale data management scenarios.
- This embodiment can be very suitable for large-scale computing resource management by selecting various specific task levels and node level deduction items.
- portions of the application can be implemented in hardware, software, firmware, or a combination thereof.
- multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
- a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
- each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种计算资源管理方法和装置,该计算资源管理方法包括确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点(S11);获取所述计算资源相关信息的健康分(S12);将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分(S13);根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理(S14)。该方法能够实现的长期优化机制,不需要人为确认,以及不仅可以优化大任务还可以优化其他任务。
Description
本申请涉及数据处理技术领域,尤其涉及一种计算资源管理方法和装置。
随着大数据时代的到来,各企业都会遇到一个问题:计算规模以井喷模式快速增长,而计算资源的成本压力也会随之快速增长。并且随着计算量和业务复杂度越来越高,计算资源管理的难度也越来越大。
现有技术中,一般是整个集群遇到计算资源瓶颈了,然后新加机器又有困难的时候,才会发起一次清理,一般的清理都是先找到计算资源消耗较大的N个大任务,然后从大任务着手,看看能不能进行逻辑优化以节省计算资源或者对无用的计算任务直接清理掉。危机过去以后,就又任其照原样发展了。
但是,这种方式存在如下问题:不可能形成长期有效的优化机制;每次要花费大量的人力物力去确认;清理不可能彻底,计算资源消耗较大的N个大任务只能解决短期的危机,还有大量存在其他不合理情况的任务无法得到有效的治理。
发明内容
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。
为此,本申请的一个目的在于提出一种计算资源管理方法,该方法可以实现的长期优化机制,不需要人为确认,以及不仅可以优化大任务还可以优化其他任务。
本申请的另一个目的在于提出一种计算资源管理装置。
为达到上述目的,本申请第一方面实施例提出的计算资源管理方法,包括:确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点;获取所述计算资源相关信息的健康分;将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分;根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理。
本申请第一方面实施例提出的计算资源管理方法,通过采用健康度模型对
待管理的信息进行计算资源管理,可以在需要管理大规模计算资源时,有一个统一的标准,从而可以形成长期有效的机制,不需要确认,并且可以不仅优化大任务,还可以优化其他任务,因此可以实现可行且有效的计算资源管理,可以应用到大规模数据管理场景下。
为达到上述目的,本申请第二方面实施例提出的计算资源管理装置,包括:确定模块,用于确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点;获取模块,用于获取所述计算资源相关信息的健康分;计算模块,用于将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分;管理模块,用于根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理。
本申请第二方面实施例提出的计算资源管理装置,通过采用健康度模型对待管理的信息进行计算资源管理,可以在需要管理大规模计算资源时,有一个统一的标准,从而可以形成长期有效的机制,不需要确认,并且可以不仅优化大任务,还可以优化其他任务,因此可以实现可行且有效的计算资源管理,可以应用到大规模数据管理场景下。
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1是本申请一实施例提出的计算资源管理方法的流程示意图;
图2是本申请另一实施例提出的计算资源管理装置的结构示意图。
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的模块或具有相同或类似功能的模块。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。相反,本申请的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。
图1是本申请一实施例提出的计算资源管理方法的流程示意图,该方法包括:
S11:确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点。
其中,待管理的信息包括但不限于:数据开发者,应用程序,业务单元(Business Unit,BU)。
每个待管理的信息可以包括:一个或多个任务;或者,一个或多个节点;或者,一个或多个任务,以及,一个或多个节点。其中,多个是指至少两个。
S12:获取所述计算资源相关信息的健康分。
其中,本实施例中,健康分包括:对应任务的任务级健康分,以及,对应节点的节点级健康分。任务级可以称为开放数据处理服务(Open Data Processing Service,ODPS)任务级,节点级可以称为天网节点级,天网是一种调度系统。
本实施例以扣分制为例,当出现一个扣分项时,从默认的数值开始扣除扣分项对应的数值,最少扣为0。本实施例中以默认值是100为例。
一个实施例中,当所述计算资源相关信息是任务时,根据如下扣分项中的至少一项获取每种任务的健康分:
倾斜度数值,缺责任人数值,简单加工数值,暴力扫描数值,重复计算数值,产出为空数值,映射(map)参数设置不合理数值。
具体的,(1)倾斜度数值a1的计算公式是:
a1=odps_task倾斜度=100-sum(fuxi_task倾斜度)∈[0,∞);
其中,每个任务(odps_task)包括至少一个fuxi_task,sum()表示求和运算,
fuxi_task倾斜度=max(runtime)/avg(runtime)-3;
其中,每个fuxi_task包括至少一个fuxi_instance,runtime是每个fuxi_instance的运行时间,max()是最大值运算,avg()是均值运算。
由于fuxi_instance同时满足如下的两个条件才算数据倾斜:
max(runtime)>5min
max(runtime)>3*avg(runtime)
因此,如果一个fuxi_task的instance数小于等于3时,不构成数据倾斜。倾斜度的最大值和instance数有关。
(2)缺责任人数值a2的计算公式是:
a2=0或者1∈{0,1},其中,当任务有责任人(owner)时,a2=0,无责任人时,a1=0。
通常来讲,当任务有责任人时,就会有biz_id。但是,本实施例中有责任人不限于有biz_id的情况,还包括有责任人无biz_id的情况。
(3)简单加工数值a3的计算公式是:
a3=0或者1∈{0,1},其中,当是简单加工时,a3=1,否则a3=0。
其中,当同时满足如下三点表明是简单加工:
结果表落地,也就是任务对应的操作是写操作,写操作例如:insert overwrite,creat;
纯select,也就是任务对应的操作没有join,没有函数之类复杂的sql;
where里只有分区字段,其中,where是任务对应的sql中的一个参数。
(4)暴力扫描数值a4的计算公式是:
a4=扫描的天数-31∈[0,∞);
其中,计算暴力扫描数值的任务同时满足如下条件:
扫描某个表大于一个月的分区;
avg(天分区大小)>500M,或者,sum(分区大小)>100G;
月任务不计暴力扫描。
其中,一个月采用30天,在计算a4时,二级及以上分区先汇总到天分区。
(5)重复计算数值a5的计算公式是:
a5=column相似度*分区记录数相似度*输入表的相似度∈[0,1);
其中,column相似度是两个字符串的余弦相似性,两个字符串是分别由两个输入表的列组成的,两个输入表是当前比较的两个任务分别对应的取数据的表;
分区记录数相似度是7-61天的分区记录数在大于1000时,这些记录数的协方差;
输入表的相似度是两个输入表的余弦相似度,两个输入表是当前比较的两个任务分别对应的取数据的表。
(6)产出为空数值a6的计算公式是:
a6=0或者1∈{0,1},其中,当任务产出的表或分区的记录数为0,则a6=1,否则a6=0。
需要说明的是,当一个任务为多路输出时,所有表或分区为空才算空,因此,上述的任务产出的表或分区的记录数是指任务产出的表或分区的所有记录数。
(7)映射参数设置不合理数值a7的计算公式是:
a7=100-平均运行时长∈[0,100];
其中,平均运行时长是指一个fuxi_task包括的所有fuxi_instance的运行时间(runtime)的平均值,该fuxi_task需要同时满足如下条件:
仅对无依赖的第一层fuxi_task统计(应该都是map task);
仅统计fuxi_instance数大于100的fuxi_task(这里的100也可以是小于100的值)。
因此,按照上述计算公式,如果平均运行时长小于100s,就认为map参数设置不合理,属于split size设小了。
需要说明的是,上述的运行时长是实际时间,而不是master时间。另外,如果一个odps_task有多个同时满足上述条件的fuxi_task,则取分数最低的作为这里的a7。
以对应任务的上述各项均包括为例,单个任务的健康分C的计算公式是:
C=greatest(0,(100-least(a1,20)-30*a2-10*a3-least(a4/15,15)-10*a5-10*a6-a7))^4/1000000;
其中,greatest为取最大值运算,least是取最小值运算。
另一个实施例中,当所述计算资源相关信息是任务时,根据如下扣分项中的至少一项获取每种任务的健康分:
节点破基线数值,依赖合理性数值,责任人合理性数值,任务出错天数数值,产出表没有被读数值,同源导入数值,产出为空数值,导入持续一致数值。
具体的,(1)节点破基线数值b1的计算公式是:
b1=最近10天破基线的天数∈[0,10]。
需要说明的是,只与本节点对应基线的时间做比较,不做上下游依赖的推导。比如:基线时间5点的B任务依赖了基线时间8点的A任务,如果A任务在7点完成,则A任务不算破基线,但由于B的产出时间必然晚于7点,所以B任务算破基线。另外,不计小时任务。
(2)依赖合理性数值b2的计算公式是:
b2=0或者1∈{0,1},其中,当依赖不合理时取值为1,否则为0。
其中,同时满足如下条件属于依赖不合理:
上游表由天网产出,下游表通过血缘解析有依赖,但是没配置,且读到的分区为0。
(3)责任人(owner)合理性数值b3的计算公式是:
b3=0,1,2或者3∈{0,1,2,3},其中,
和表owner一致,任务owner且未离职:0
和表owner不完全一致,任务owner未离职:1
和表owner一致,任务owner但已离职:2
和表owner不完全一致,任务owner且已离职:3
(4)任务出错天数数值b4的计算公式是:
b4=近10天的任务出错天数,具体取值:
天任务=近10天出错天数*1;
周任务=近10天出错天数*3;
月任务=近10天出错天数*5。
需要说明的是,有出错记录就算(修复了也要算、生产冒烟也算)。一天内出错多次,只取一次。小时任务一天内只算一次。
(5)产出表没有被读数值b5的计算公式是:
b5=0或者1∈{0,1},其中,最近一个月产出表没有被读取记录则为1,否则为0。
需要说明的是,只考虑该任务自身,不考虑其下游。新上线的任务给10天的豁免期,即节点创建时间需要是当前时间10天前的才统计。
(6)同源导入数值b6的计算公式是:
b6=0或者1∈{0,1},其中,如果该节点与其他节点的导入源相同,则取值1,否则为0。
需要说明的是,仅针对datax节点。
(7)产出为空数值b7的计算公式是:
b7=0或者1∈{0,1},其中,如果该节点导入的数据量为0,则取值1,否则为0。
需要说明的是,仅针对datax节点。
(8)导入持续一致数值b8的计算公式是:
b8=0或者1∈{0,1},其中,如果持续7天导入的记录数一致且大于1000行(具体行数也可以设置),则取值1,否则为0。
需要说明的是,仅针对datax节点。
以上述对应节点的各项均包括为例,单个节点的健康分的计算公式是:
D=greatest(0,(100-least(b1*(p+1)*10,100)-30*b2-10*b3-10*b4-50*b5-50*b6-50*b7-50*b8))^4/1000000;
其中,greatest为取最大值运算,least是取最小值运算;
p是预设的天网优先级∈[0,8]。
S13:将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分。
具体的,所述将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分,包括:
采用如下计算公式,计算所述待管理的信息的健康分E:
E=y/(x+y)*((∑(C*n)/∑n)^4/1000000)+x/(x+y)*((∑(D*m)/∑m)^4/1000000);
其中,n是任务级别的权重,具体可以用如下公式计算得到:log(任务运行时间*plan_cpu_cost+1),plan_cpu_cost由底层数据库抓取;
m是节点级别的权重,具体可以用如下公式计算得到:节点的优先级+1,其中,节点的优先级可以由用户预设;
x是有节点的任务数,y是无节点的任务数,其中,通常来讲,有节点的任务是指生产任务,无节点的任务是指开发任务。由于有些人开发任务比较多比如分析师等,有些人生产任务比较多比如专业的数据开发工程师等,为避免失衡所以把两者进行加权平均。
S14:根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理。
其中,可以根据预设的策略,对待管理的信息进行计算资源管理。例如,可以预先设置一个阈值,当某个待管理的信息的健康分小于该阈值时,确定该待管理的信息是需要优化的信息,对应需要优化的信息可以展示其包括的任务和节点的每个扣分项,从而有针对性的进行优化。或者,当待管理的信息是数据开发者时,如果一个数据开发者的健康分大于阈值,则可以奖励该数据开发者,反之,当一个数据开发者的健康分小于阈值时,对该数据开发者进行惩罚,从而可以调动数据开发者的优化积极性。
本实施例应用的集群包括但不限于:Hadoop集群,odps集群。
本实施例中,通过采用健康度模型对待管理的信息进行计算资源管理,可以在需要管理大规模计算资源时,有一个统一的标准,从而可以形成长期有效的机制,不需要人为确认,并且可以不仅优化大任务,还可以优化其他任务,因此可以实现可行且有效的计算资源管理,可以应用到大规模数据管理场景下。本实施例通过选择上述各种具体的任务级别和节点级别的扣分项,可以非常适用于大规模的计算资源管理。
图2是本申请另一实施例提出的计算资源管理装置的结构示意图,该
装置20包括:确定模块21,获取模块22,计算模块23和管理模块24。
确定模块21,用于确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点;
其中,待管理的信息包括但不限于:数据开发者,应用程序,业务单元(Business Unit,BU)。
每个待管理的信息可以包括:一个或多个任务;或者,一个或多个节点;或者,一个或多个任务,以及,一个或多个节点。其中,多个是指至少两个。
获取模块22,用于获取所述计算资源相关信息的健康分;
其中,本实施例中,健康分包括:对应任务的任务级健康分,以及,对应节点的节点级健康分。任务级可以称为开放数据处理服务(Open Data Processing Service,ODPS)任务级,节点级可以称为天网节点级,天网是一种调度系统。
本实施例以扣分制为例,当出现一个扣分项时,从默认的数值开始扣除扣分项对应的数值,最少扣为0。本实施例中以默认值是100为例。
一个实施例中,所述获取模块22具体用于:
当所述计算资源相关信息是任务时,根据如下扣分项中的至少一项获取每种任务的健康分:
倾斜度数值,缺责任人数值,简单加工数值,暴力扫描数值,重复计算数值,产出为空数值,映射参数设置不合理数值。
相应的,如果单个任务与上述各扣分项均相关,所述获取模块22具体用于采用如下计算公式计算单个任务的健康分:
C=greatest(0,(100-least(a1,20)-30*a2-10*a3-least(a4/15,15)-10*a5-10*a6-a7))^4/1000000;
其中,greatest为取最大值运算,least是取最小值运算;
C是单个任务的健康分,a1是倾斜度数值,a2是缺责任人数值,a3是简单加工数值,a4是暴力扫描数值,a5是重复计算数值,a6是产出为空数值,a7是映射参数设置不合理数值。
其中,上述各数值的计算公式可以参见方法实施例中的相关描述,在此不再赘述。
另一个实施例中,所述获取模块22具体用于:
当所述计算资源相关信息是节点时,根据如下扣分项中的至少一项获取每种节点的健康分:
节点破基线数值,依赖合理性数值,责任人合理性数值,任务出错天数数值,产出表没有被读数值,同源导入数值,产出为空数值,导入持续一致数值。
相应的,如果单个任务与上述各扣分项均相关,所述获取模块22具体用于采用如下计算公式计算单个节点的健康分:
D=greatest(0,(100-least(b1*(p+1)*10,100)-30*b2-10*b3-10*b4-50*b5-50*b6-50*b7-50*b8))^4/1000000;
其中,greatest为取最大值运算,least是取最小值运算;
D是单个节点的健康分,b1是节点破基线数值,b2是依赖合理性数值,b3是责任人合理性数值,b4是任务出错天数数值,b5是产出表没有被读数值,b6是同源导入数值,b7是产出为空数值,b8是导入持续一致数值。
其中,上述各数值的计算公式可以参见方法实施例中的相关描述,在此不再赘述。
计算模块23,用于将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分;
具体的,所述计算模块23具体用于:
采用如下计算公式,计算所述待管理的信息的健康分:
E=y/(x+y)*((∑(C*n)/∑n)^4/1000000)+x/(x+y)*((∑(D*m)/∑m)^4/1000000);
其中,E是待管理的信息的健康分;
n是任务级别的权重,具体可以用如下公式计算得到:log(任务运行时间*plan_cpu_cost+1),plan_cpu_cost由底层数据库抓取;
m是节点级别的权重,具体可以用如下公式计算得到:节点的优先级+1,其中,节点的优先级可以由用户预设;
x是有节点的任务数,y是无节点的任务数。
管理模块24,用于根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理。
其中,可以根据预设的策略,对待管理的信息进行计算资源管理。例如,可以预先设置一个阈值,当某个待管理的信息的健康分小于该阈值时,确定该待管理的信息是需要优化的信息,对应需要优化的信息可以展示其包括的任务和节点的每个扣分项,从而有针对性的进行优化。或者,当待管理的信息是数据开发者时,如果一个数据开发者的健康分大于阈值,则可以奖励该数据开发者,反之,当一个数据开发者的健康分小于阈值时,对该数据开发者进行惩罚,从而可以调动数据开发者的优化积极性。
本实施例应用的集群包括但不限于:Hadoop集群,odps集群。
本实施例中,通过采用健康度模型对待管理的信息进行计算资源管理,可以在需要管理大规模计算资源时,有一个统一的标准,从而可以形成长期有效的机制,不需要人为确认,并且可以不仅优化大任务,还可以优化其他任务,因此可以实现可行且有效的计算资源管理,可以应用到大规模数据管理场景下。本实施例通过选择上述各种具体的任务级别和节点级别的扣分项,可以非常适用于大规模的计算资源管理。
需要说明的是,在本申请的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是指至少两个。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。
Claims (12)
- 一种计算资源管理方法,其特征在于,包括:确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点;获取所述计算资源相关信息的健康分;将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分;根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理。
- 根据权利要求1所述的方法,其特征在于,所述获取所述计算资源相关信息的健康分,包括:当所述计算资源相关信息是任务时,根据如下扣分项中的至少一项获取每种任务的健康分:倾斜度数值,缺责任人数值,简单加工数值,暴力扫描数值,重复计算数值,产出为空数值,映射参数设置不合理数值。
- 根据权利要求1所述的方法,其特征在于,所述获取所述计算资源相关信息的健康分,包括:当所述计算资源相关信息是节点时,根据如下扣分项中的至少一项获取每种节点的健康分:节点破基线数值,依赖合理性数值,责任人合理性数值,任务出错天数数值,产出表没有被读数值,同源导入数值,产出为空数值,导入持续一致数值。
- 根据权利要求2所述的方法,其特征在于,如果单个任务与上述各扣分项均相关,所述获取所述计算资源相关信息的健康分,包括:单个任务的健康分的计算公式是:C=greatest(0,(100-least(a1,20)-30*a2-10*a3-least(a4/15,15)-10*a5-10*a6-a7))^4/1000000;其中,greatest为取最大值运算,least是取最小值运算;C是单个任务的健康分,a1是倾斜度数值,a2是缺责任人数值,a3是简单加工数值,a4是暴力扫描数值,a5是重复计算数值,a6是产出为空数值,a7是映射参数设置不合理数值。
- 根据权利要求3所述的方法,其特征在于,如果单个节点与上述各扣 分项均相关,所述获取所述计算资源相关信息的健康分,包括:单个节点的健康分的计算公式是:D=greatest(0,(100-least(b1*(p+1)*10,100)-30*b2-10*b3-10*b4-50*b5-50*b6-50*b7-50*b8))^4/1000000;其中,greatest为取最大值运算,least是取最小值运算;D是单个节点的健康分,b1是节点破基线数值,b2是依赖合理性数值,b3是责任人合理性数值,b4是任务出错天数数值,b5是产出表没有被读数值,b6是同源导入数值,b7是产出为空数值,b8是导入持续一致数值。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分,包括:采用如下计算公式,计算所述待管理的信息的健康分:E=y/(x+y)*((∑(C*n)/∑n)^4/1000000)+x/(x+y)*((∑(D*m)/∑m)^4/1000000);其中,E是待管理的信息的健康分;n是任务级别的权重,具体可以用如下公式计算得到:log(任务运行时间*plan_cpu_cost+1),plan_cpu_cost由底层数据库抓取;m是节点级别的权重,具体可以用如下公式计算得到:节点的优先级+1,其中,节点的优先级可以由用户预设;x是有节点的任务数,y是无节点的任务数。
- 一种计算资源管理装置,其特征在于,包括:确定模块,用于确定待管理的信息包括的计算资源相关信息,所述计算资源相关信息包括:任务,和/或,节点;获取模块,用于获取所述计算资源相关信息的健康分;计算模块,用于将所述计算资源相关信息的健康度作为预先建立的健康度模型的参数,计算所述待管理的信息的健康分;管理模块,用于根据所述待管理的信息的健康分,对所述待管理的信息进行计算资源管理。
- 根据权利要求7所述的装置,其特征在于,所述获取模块具体用于:当所述计算资源相关信息是任务时,根据如下扣分项中的至少一项获取每种任务的健康分:倾斜度数值,缺责任人数值,简单加工数值,暴力扫描数值,重复计算数值,产出为空数值,映射参数设置不合理数值。
- 根据权利要求7所述的装置,其特征在于,所述获取模块具体用于:当所述计算资源相关信息是节点时,根据如下扣分项中的至少一项获取每种节点的健康分:节点破基线数值,依赖合理性数值,责任人合理性数值,任务出错天数数值,产出表没有被读数值,同源导入数值,产出为空数值,导入持续一致数值。
- 根据权利要求8所述的装置,其特征在于,如果单个任务与上述各扣分项均相关,所述获取模块具体用于采用如下计算公式计算单个任务的健康分:C=greatest(0,(100-least(a1,20)-30*a2-10*a3-least(a4/15,15)-10*a5-10*a6-a7))^4/1000000;其中,greatest为取最大值运算,least是取最小值运算;C是单个任务的健康分,a1是倾斜度数值,a2是缺责任人数值,a3是简单加工数值,a4是暴力扫描数值,a5是重复计算数值,a6是产出为空数值,a7是映射参数设置不合理数值。
- 根据权利要求9所述的装置,其特征在于,如果单个任务与上述各扣分项均相关,所述获取模块具体用于采用如下计算公式计算单个节点的健康分:D=greatest(0,(100-least(b1*(p+1)*10,100)-30*b2-10*b3-10*b4-50*b5-50*b6-50*b7-50*b8))^4/1000000;其中,greatest为取最大值运算,least是取最小值运算;D是单个节点的健康分,b1是节点破基线数值,b2是依赖合理性数值,b3是责任人合理性数值,b4是任务出错天数数值,b5是产出表没有被读数值,b6是同源导入数值,b7是产出为空数值,b8是导入持续一致数值。
- 根据权利要求7-11任一项所述的装置,其特征在于,所述计算模块具体用于:采用如下计算公式,计算所述待管理的信息的健康分:E=y/(x+y)*((∑(C*n)/∑n)^4/1000000)+x/(x+y)*((∑(D*m)/∑m)^4/1000000);其中,E是待管理的信息的健康分;n是任务级别的权重,具体可以用如下公式计算得到:log(任务运行时间*plan_cpu_cost+1),plan_cpu_cost由底层数据库抓取;m是节点级别的权重,具体可以用如下公式计算得到:节点的优先级+1,其中,节点的优先级可以由用户预设;x是有节点的任务数,y是无节点的任务数。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510226967.6 | 2015-05-06 | ||
| CN201510226967.6A CN106203757A (zh) | 2015-05-06 | 2015-05-06 | 计算资源管理方法和装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016177258A1 true WO2016177258A1 (zh) | 2016-11-10 |
Family
ID=57217439
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/079157 Ceased WO2016177258A1 (zh) | 2015-05-06 | 2016-04-13 | 计算资源管理方法和装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106203757A (zh) |
| WO (1) | WO2016177258A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113778727B (zh) * | 2020-06-19 | 2024-10-18 | 北京沃东天骏信息技术有限公司 | 数据处理方法及装置、电子设备和计算机可读存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101604264A (zh) * | 2009-07-08 | 2009-12-16 | 深圳先进技术研究院 | 超级计算机的任务调度方法及系统 |
| US20140025414A1 (en) * | 2012-07-20 | 2014-01-23 | Bret Dwayne Worden | Health assessment method and system for assets |
| US20140173092A1 (en) * | 2012-12-17 | 2014-06-19 | Microsoft Corporation | Exchange of server health and client information through headers for request management |
| US20140280899A1 (en) * | 2013-03-15 | 2014-09-18 | Herman Dean Brewster, JR. | Methods and apparatus for scoring the condition of nodes in a communication network and taking action based on node health scores |
| CN104380277A (zh) * | 2012-06-29 | 2015-02-25 | 英特尔公司 | 用于管理云调度环境中的服务器硬件资源的方法、系统和设备 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8250582B2 (en) * | 2009-09-25 | 2012-08-21 | International Business Machines Corporation | Chargeback reduction planning for information technology management |
| CN103440167B (zh) * | 2013-09-04 | 2016-06-29 | 福州大学 | Hadoop多作业环境下自学习反馈的任务调度方法 |
| CN104391749B (zh) * | 2014-11-26 | 2020-06-05 | 北京奇艺世纪科技有限公司 | 一种资源分配方法及装置 |
-
2015
- 2015-05-06 CN CN201510226967.6A patent/CN106203757A/zh active Pending
-
2016
- 2016-04-13 WO PCT/CN2016/079157 patent/WO2016177258A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101604264A (zh) * | 2009-07-08 | 2009-12-16 | 深圳先进技术研究院 | 超级计算机的任务调度方法及系统 |
| CN104380277A (zh) * | 2012-06-29 | 2015-02-25 | 英特尔公司 | 用于管理云调度环境中的服务器硬件资源的方法、系统和设备 |
| US20140025414A1 (en) * | 2012-07-20 | 2014-01-23 | Bret Dwayne Worden | Health assessment method and system for assets |
| US20140173092A1 (en) * | 2012-12-17 | 2014-06-19 | Microsoft Corporation | Exchange of server health and client information through headers for request management |
| US20140280899A1 (en) * | 2013-03-15 | 2014-09-18 | Herman Dean Brewster, JR. | Methods and apparatus for scoring the condition of nodes in a communication network and taking action based on node health scores |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106203757A (zh) | 2016-12-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20220217213A1 (en) | Method and system for summarizing user activities of tasks into a single activity score using machine learning to predict probabilities of completeness of the tasks | |
| US10255108B2 (en) | Parallel execution of blockchain transactions | |
| US9098587B2 (en) | Variable duration non-event pattern matching | |
| US11386433B2 (en) | Method and system for managing membership of communication channels associated with projects of an enterprise entity | |
| Lim et al. | How to Fit when No One Size Fits. | |
| US20180157978A1 (en) | Predicting Performance of Database Queries | |
| CN114036130A (zh) | 一种元数据分析处理方法及装置 | |
| Hesse et al. | ESPBench: The enterprise stream processing benchmark | |
| CN109978392B (zh) | 敏捷软件开发管理方法、装置、电子设备、存储介质 | |
| CN111492344A (zh) | 用于监测结构化查询语言(sql)查询的执行的系统和方法 | |
| CN110609740A (zh) | 一种确定任务间依赖关系的方法及装置 | |
| CN108549683A (zh) | 数据查询方法以及系统 | |
| US20210334246A1 (en) | Virtual transaction queues for database replication | |
| CN113760176A (zh) | 数据存储方法和装置 | |
| WO2020259325A1 (zh) | 一种适用于机器学习的特征处理方法及装置 | |
| CN110941536B (zh) | 监控方法及系统、第一服务器集群 | |
| CN110737673A (zh) | 一种数据处理的方法及系统 | |
| US11650987B2 (en) | Query response using semantically similar database records | |
| CN116010380A (zh) | 一种基于可视化建模的数据仓库自动化管理方法 | |
| WO2020151054A1 (zh) | 一种数据同步方法及装置 | |
| Suriarachchi et al. | Big provenance stream processing for data intensive computations | |
| CN108920564B (zh) | 基于区块链的人才管理方法及其终端 | |
| US20180091359A1 (en) | Determining topology using log messages | |
| AU2015276830B2 (en) | Dynamic n-dimensional cubes for hosted analytics | |
| WO2016177258A1 (zh) | 计算资源管理方法和装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16789252 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16789252 Country of ref document: EP Kind code of ref document: A1 |