CN114265676B - Cluster resource scheduling method, device, equipment and medium - Google Patents
Cluster resource scheduling method, device, equipment and medium Download PDFInfo
- Publication number
- CN114265676B CN114265676B CN202111496693.4A CN202111496693A CN114265676B CN 114265676 B CN114265676 B CN 114265676B CN 202111496693 A CN202111496693 A CN 202111496693A CN 114265676 B CN114265676 B CN 114265676B
- Authority
- CN
- China
- Prior art keywords
- scheduling
- resource scheduling
- cluster
- resource
- task
- 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.)
- Active
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Multi Processors (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及数据处理技术领域,尤其涉及一种集群资源调度方法、装置、设备及介质。The present invention relates to the field of data processing technology, and in particular to a cluster resource scheduling method, device, equipment and medium.
背景技术Background Art
租户的概念不止局限于集群的用户,它可以包含为一组计算、内存、存储等资源组成的工作负载集合。而在多租户集群中,需要在一个集群范围内对不同的租户提供尽可能的安全隔离,以最大程度的避免租户间的资源争抢,同时需要保证租户之间公平地分配共享集群资源。The concept of tenants is not limited to cluster users, but can include a set of workloads consisting of computing, memory, storage and other resources. In a multi-tenant cluster, it is necessary to provide as much security isolation as possible for different tenants within a cluster to avoid resource contention between tenants to the greatest extent possible, while ensuring that shared cluster resources are fairly distributed among tenants.
然而,目前集群资源调度方式,如Kubernetes集群的资源调度方式是针对每个租户的资源调度任务依次进行分配,只考虑在当前资源调度任务的情况下的最优资源调度方式,并没有考虑多租户形成的多资源调度任务的场景。导致多租户的多资源调度任务的场景下,集群整体资源的利用效率较低。However, the current cluster resource scheduling method, such as the resource scheduling method of the Kubernetes cluster, allocates resource scheduling tasks for each tenant in turn, only considering the optimal resource scheduling method under the current resource scheduling task, and does not consider the scenario of multiple resource scheduling tasks formed by multiple tenants. As a result, in the scenario of multiple resource scheduling tasks for multiple tenants, the overall cluster resource utilization efficiency is low.
发明内容Summary of the invention
本发明提供一种集群资源调度方法、装置、设备及介质,用以解决目前集群资源调度方式在多租户的多资源调度任务的场景下,集群整体资源的利用效率较低的问题。The present invention provides a cluster resource scheduling method, device, equipment and medium, which are used to solve the problem that the overall cluster resource utilization efficiency is low in the current cluster resource scheduling method in the scenario of multi-tenant multi-resource scheduling tasks.
本发明第一方面提供一种集群资源调度方法,包括:A first aspect of the present invention provides a cluster resource scheduling method, comprising:
获取预设时间段内各租户的资源调度任务;Obtain resource scheduling tasks for each tenant within a preset time period;
根据各所述资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级;Determine the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and the matching preset resource scheduling threshold range;
根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源;Determine the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and the preset scheduling priority sequence;
对各资源调度任务对应的集群调度资源进行调度。Schedule the cluster scheduling resources corresponding to each resource scheduling task.
进一步地,如上所述的方法,所述资源调度任务包括租户请求的待调度资源;Further, in the method as described above, the resource scheduling task includes resources to be scheduled requested by the tenant;
所述根据各所述资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级,包括:The determining the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and the matching preset resource scheduling threshold range includes:
将各所述待调度资源与匹配的预设资源调度阈值范围进行比较,以生成比较结果;Comparing each of the to-be-scheduled resources with a matching preset resource scheduling threshold range to generate a comparison result;
根据各比较结果确定各资源调度任务对应的调度优先级。The scheduling priority corresponding to each resource scheduling task is determined according to each comparison result.
进一步地,如上所述的方法,所述根据各比较结果确定各资源调度任务对应的调度优先级,包括:Furthermore, in the above method, determining the scheduling priority corresponding to each resource scheduling task according to each comparison result includes:
若比较结果为各所述待调度资源小于匹配的预设资源调度阈值范围的最小值,则确定该资源调度任务的调度优先级为高;If the comparison result is that each of the resources to be scheduled is less than the minimum value of the matched preset resource scheduling threshold range, then determining that the scheduling priority of the resource scheduling task is high;
若比较结果为各所述待调度资源处于匹配的预设资源调度阈值范围中,则确定该资源调度任务的调度优先级为中;If the comparison result is that each of the resources to be scheduled is within the matching preset resource scheduling threshold range, then determining that the scheduling priority of the resource scheduling task is medium;
若比较结果为各所述待调度资源等于匹配的预设资源调度阈值范围的最大值,则确定该资源调度任务的调度优先级为低;If the comparison result is that each of the resources to be scheduled is equal to the maximum value of the matched preset resource scheduling threshold range, then determining that the scheduling priority of the resource scheduling task is low;
若比较结果为各所述待调度资源大于匹配的预设资源调度阈值范围的最大值,则将该资源调度任务确定为下一预设时间段的资源调度任务。If the comparison result is that each of the resources to be scheduled is greater than the maximum value of the matched preset resource scheduling threshold range, the resource scheduling task is determined as the resource scheduling task for the next preset time period.
进一步地,如上所述的方法,所述根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源,包括:Furthermore, in the above method, determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority order includes:
按照从调度优先级高往调度优先级低的顺序,且针对每一调度优先级的各资源调度任务都进行如下处理:In order from high scheduling priority to low scheduling priority, each resource scheduling task of each scheduling priority is processed as follows:
判断集群中是否存在与当前调度优先级内的各资源调度任务匹配的集群节点;所述匹配的集群节点包括多个服务器;所述多个服务器的空闲资源大于匹配的资源调度任务的待调度资源;Determine whether there is a cluster node in the cluster that matches each resource scheduling task within the current scheduling priority; the matching cluster node includes multiple servers; the idle resources of the multiple servers are greater than the to-be-scheduled resources of the matching resource scheduling task;
若确定存在,则确定各资源调度任务匹配的集群节点中空闲比率最低的服务器;If it is determined to exist, then determine the server with the lowest idle ratio among the cluster nodes that match each resource scheduling task;
将所述空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源。The idle resources of the server with the lowest idle ratio are determined as cluster scheduling resources corresponding to each resource scheduling task.
进一步地,如上所述的方法,所述确定各资源调度任务匹配的集群节点中空闲比率最低的服务器,包括:Furthermore, in the above method, the step of determining the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task includes:
确定与各资源调度任务匹配的所述多个服务器的空闲资源;Determining idle resources of the plurality of servers that match each resource scheduling task;
将各服务器的空闲资源与对应资源调度任务的待调度资源之间的差值除以各服务器的资源总限额,以生成各服务器对应的空闲比率;Divide the difference between the idle resources of each server and the resources to be scheduled of the corresponding resource scheduling task by the total resource limit of each server to generate the idle ratio corresponding to each server;
根据各服务器对应的空闲比率确定空闲比率最低的服务器。A server with the lowest idle ratio is determined according to the idle ratios corresponding to the servers.
进一步地,如上所述的方法,所述确定各资源调度任务匹配的集群节点中空闲比率最低的服务器之前,还包括:Furthermore, in the above method, before determining the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task, the method further includes:
判断与当前调度优先级内的各资源调度任务匹配的集群节点是否为多个;Determine whether there are multiple cluster nodes matching each resource scheduling task within the current scheduling priority;
若确定匹配的集群节点为多个,则针对匹配的每个集群节点,确定各资源调度任务匹配的集群节点中空闲比率最低的服务器;If it is determined that there are multiple matching cluster nodes, then for each matching cluster node, determine the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task;
根据各集群节点中空闲比率最低的服务器以及预设集群空闲比率算法确定预设集群空闲比率算法输出最小值;Determine the minimum value output by the preset cluster idle ratio algorithm according to the server with the lowest idle ratio in each cluster node and the preset cluster idle ratio algorithm;
将预设集群空闲比率算法输出最小值时对应的各资源调度任务匹配的空闲比率最低的服务器确定为目标服务器;The server with the lowest idle ratio matched by each resource scheduling task when the preset cluster idle ratio algorithm outputs the minimum value is determined as the target server;
所述将所述空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源,包括:The step of determining the idle resources of the server with the lowest idle ratio as the cluster scheduling resources corresponding to each resource scheduling task includes:
将各目标服务器的空闲资源确定为各资源调度任务对应的集群调度资源。The idle resources of each target server are determined as the cluster scheduling resources corresponding to each resource scheduling task.
进一步地,如上所述的方法,若当前调度优先级为高,且若集群中不存在与当前调度优先级内的各资源调度任务匹配的集群节点,则所述方法还包括:Furthermore, in the above method, if the current scheduling priority is high, and if there is no cluster node in the cluster that matches each resource scheduling task within the current scheduling priority, the method further includes:
获取集群中调度优先级为中或低对应的已调度集群调度资源;Get the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority in the cluster;
按照预设调度策略将调度优先级为中或低对应的已调度集群调度资源分配至当前调度优先级的各资源调度任务中;其中,预设调度策略为使资源调度后的每个所述已调度集群调度资源大于或等于对应预设资源调度阈值范围的最小值。According to the preset scheduling strategy, the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority are allocated to each resource scheduling task of the current scheduling priority; wherein the preset scheduling strategy is to make each of the scheduled cluster scheduling resources after resource scheduling greater than or equal to the minimum value of the corresponding preset resource scheduling threshold range.
本发明第二方面提供一种集群资源调度装置,包括:A second aspect of the present invention provides a cluster resource scheduling device, comprising:
获取模块,用于获取预设时间段内各租户的资源调度任务;The acquisition module is used to obtain the resource scheduling tasks of each tenant within a preset time period;
优先级确定模块,用于根据各所述资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级;A priority determination module, used to determine the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and a matching preset resource scheduling threshold range;
资源确定模块,用于根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源;A resource determination module is used to determine the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority sequence;
资源调度模块,用于对各资源调度任务对应的集群调度资源进行调度。The resource scheduling module is used to schedule the cluster scheduling resources corresponding to each resource scheduling task.
进一步地,如上所述的装置,所述资源调度任务包括租户请求的待调度资源;Further, in the above-mentioned device, the resource scheduling task includes resources to be scheduled requested by the tenant;
所述优先级确定模块具体用于:The priority determination module is specifically used for:
将各所述待调度资源与匹配的预设资源调度阈值范围进行比较,以生成比较结果;根据各比较结果确定各资源调度任务对应的调度优先级。Compare each of the to-be-scheduled resources with a matching preset resource scheduling threshold range to generate a comparison result; and determine a scheduling priority corresponding to each resource scheduling task according to each comparison result.
进一步地,如上所述的装置,所述优先级确定模块在根据各比较结果确定各资源调度任务对应的调度优先级时,具体用于:Furthermore, in the above-mentioned device, when determining the scheduling priority corresponding to each resource scheduling task according to each comparison result, the priority determination module is specifically used to:
若比较结果为各所述待调度资源小于匹配的预设资源调度阈值范围的最小值,则确定该资源调度任务的调度优先级为高;若比较结果为各所述待调度资源处于匹配的预设资源调度阈值范围中,则确定该资源调度任务的调度优先级为中;若比较结果为各所述待调度资源等于匹配的预设资源调度阈值范围的最大值,则确定该资源调度任务的调度优先级为低;若比较结果为各所述待调度资源大于匹配的预设资源调度阈值范围的最大值,则将该资源调度任务确定为下一预设时间段的资源调度任务。If the comparison result is that each of the resources to be scheduled is less than the minimum value of the matching preset resource scheduling threshold range, then the scheduling priority of the resource scheduling task is determined to be high; if the comparison result is that each of the resources to be scheduled is within the matching preset resource scheduling threshold range, then the scheduling priority of the resource scheduling task is determined to be medium; if the comparison result is that each of the resources to be scheduled is equal to the maximum value of the matching preset resource scheduling threshold range, then the scheduling priority of the resource scheduling task is determined to be low; if the comparison result is that each of the resources to be scheduled is greater than the maximum value of the matching preset resource scheduling threshold range, then the resource scheduling task is determined as the resource scheduling task for the next preset time period.
进一步地,如上所述的装置,所述资源确定模块具体用于:Further, in the above device, the resource determination module is specifically used for:
按照从调度优先级高往调度优先级低的顺序,且针对每一调度优先级的各资源调度任务都进行如下处理:判断集群中是否存在与当前调度优先级内的各资源调度任务匹配的集群节点;所述匹配的集群节点包括多个服务器;所述多个服务器的空闲资源大于匹配的资源调度任务的待调度资源;若确定存在,则确定各资源调度任务匹配的集群节点中空闲比率最低的服务器;将所述空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源。In order from high scheduling priority to low scheduling priority, the following processing is performed for each resource scheduling task of each scheduling priority: determine whether there is a cluster node in the cluster that matches each resource scheduling task within the current scheduling priority; the matching cluster node includes multiple servers; the idle resources of the multiple servers are greater than the resources to be scheduled of the matching resource scheduling task; if it is determined that it exists, determine the server with the lowest idle ratio among the cluster nodes that match each resource scheduling task; determine the idle resources of the server with the lowest idle ratio as the cluster scheduling resources corresponding to each resource scheduling task.
进一步地,如上所述的装置,所述资源确定模块在确定各资源调度任务匹配的集群节点中空闲比率最低的服务器时,具体用于:Furthermore, in the above-mentioned device, when determining the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task, the resource determination module is specifically used to:
确定与各资源调度任务匹配的所述多个服务器的空闲资源;将各服务器的空闲资源与对应资源调度任务的待调度资源之间的差值除以各服务器的资源总限额,以生成各服务器对应的空闲比率;根据各服务器对应的空闲比率确定空闲比率最低的服务器。Determine the idle resources of the multiple servers that match each resource scheduling task; divide the difference between the idle resources of each server and the resources to be scheduled of the corresponding resource scheduling task by the total resource limit of each server to generate the idle ratio corresponding to each server; determine the server with the lowest idle ratio based on the idle ratios corresponding to each server.
进一步地,如上所述的装置,所述资源确定模块还用于:Further, in the above device, the resource determination module is also used for:
判断与当前调度优先级内的各资源调度任务匹配的集群节点是否为多个;若确定匹配的集群节点为多个,则针对匹配的每个集群节点,确定各资源调度任务匹配的集群节点中空闲比率最低的服务器;根据各集群节点中空闲比率最低的服务器以及预设集群空闲比率算法确定预设集群空闲比率算法输出最小值;将预设集群空闲比率算法输出最小值时对应的各资源调度任务匹配的空闲比率最低的服务器确定为目标服务器;Determine whether there are multiple cluster nodes that match each resource scheduling task within the current scheduling priority; if it is determined that there are multiple matching cluster nodes, then for each matching cluster node, determine the server with the lowest idle ratio among the cluster nodes that match each resource scheduling task; determine the minimum value output by the preset cluster idle ratio algorithm based on the server with the lowest idle ratio among each cluster node and the preset cluster idle ratio algorithm; determine the server with the lowest idle ratio that matches each resource scheduling task corresponding to the minimum value output by the preset cluster idle ratio algorithm as the target server;
所述资源确定模块在将所述空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源时,具体用于:When the resource determination module determines the idle resources of the server with the lowest idle ratio as the cluster scheduling resources corresponding to each resource scheduling task, it is specifically used to:
将各目标服务器的空闲资源确定为各资源调度任务对应的集群调度资源。The idle resources of each target server are determined as the cluster scheduling resources corresponding to each resource scheduling task.
进一步地,如上所述的装置,若当前调度优先级为高,且若集群中不存在与当前调度优先级内的各资源调度任务匹配的集群节点,则所述资源确定模块还用于:Further, in the above-mentioned device, if the current scheduling priority is high, and if there is no cluster node in the cluster that matches each resource scheduling task within the current scheduling priority, the resource determination module is further used to:
获取集群中调度优先级为中或低对应的已调度集群调度资源;按照预设调度策略将调度优先级为中或低对应的已调度集群调度资源分配至当前调度优先级的各资源调度任务中;其中,预设调度策略为使资源调度后的每个所述已调度集群调度资源大于或等于对应预设资源调度阈值范围的最小值。Obtain the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority in the cluster; allocate the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority to each resource scheduling task of the current scheduling priority according to the preset scheduling strategy; wherein the preset scheduling strategy is to make each of the scheduled cluster scheduling resources after resource scheduling greater than or equal to the minimum value of the corresponding preset resource scheduling threshold range.
本发明第三方面提供一种电子设备,包括:存储器,处理器;A third aspect of the present invention provides an electronic device, comprising: a memory, a processor;
存储器;用于存储所述处理器可执行指令的存储器;Memory; Memory for storing instructions executable by the processor;
其中,所述处理器被配置为由所述处理器执行第一方面任一项所述的集群资源调度方法。The processor is configured to execute the cluster resource scheduling method described in any one of the first aspects.
本发明第四方面提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现第一方面任一项所述的集群资源调度方法。A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the cluster resource scheduling method described in any one of the first aspects.
本发明第五方面提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现第一方面任一项所述的集群资源调度方法。A fifth aspect of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the cluster resource scheduling method described in any one of the first aspects.
本发明提供的一种集群资源调度方法、装置、设备及介质,该方法包括:获取预设时间段内各租户的资源调度任务;根据各所述资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级;根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源;对各资源调度任务对应的集群调度资源进行调度。本发明的集群资源调度方法,通过获取预设时间段内各租户的资源调度任务,并根据各所述资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级,从而针对各调度优先级,按照预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源,以实现对各资源调度任务对应的集群调度资源进行调度。本发明的集群资源调度方法在多租户场景中考虑了每个租户的资源调度任务的调度优先级,从而可以以调度优先级为基准进行资源调度,提高了集群整体资源的利用效率。The present invention provides a cluster resource scheduling method, device, equipment and medium, the method comprising: obtaining resource scheduling tasks of each tenant within a preset time period; determining the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and the matching preset resource scheduling threshold range; determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and the preset scheduling priority order; scheduling the cluster scheduling resources corresponding to each resource scheduling task. The cluster resource scheduling method of the present invention obtains the resource scheduling tasks of each tenant within a preset time period, and determines the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and the matching preset resource scheduling threshold range, thereby determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to the preset scheduling priority order for each scheduling priority, so as to realize the scheduling of the cluster scheduling resources corresponding to each resource scheduling task. The cluster resource scheduling method of the present invention takes into account the scheduling priority of the resource scheduling task of each tenant in a multi-tenant scenario, so that resource scheduling can be performed based on the scheduling priority, thereby improving the utilization efficiency of the overall cluster resources.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。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.
图1为可以实现本发明实施例的集群资源调度方法的场景图;FIG1 is a scenario diagram of a cluster resource scheduling method that can implement an embodiment of the present invention;
图2为本发明第一实施例提供的集群资源调度方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a cluster resource scheduling method provided by a first embodiment of the present invention;
图3为本发明第二实施例提供的集群资源调度方法的流程示意图;FIG3 is a schematic diagram of a flow chart of a cluster resource scheduling method provided by a second embodiment of the present invention;
图4a为本发明第二实施例提供的集群资源调度方法的租户A的预设资源调度阈值范围示意图;FIG4a is a schematic diagram of a preset resource scheduling threshold range of tenant A in a cluster resource scheduling method provided in a second embodiment of the present invention;
图4b为本发明第二实施例提供的集群资源调度方法的租户B的预设资源调度阈值范围示意图;FIG4b is a schematic diagram of a preset resource scheduling threshold range for tenant B in the cluster resource scheduling method provided in the second embodiment of the present invention;
图4c为本发明第二实施例提供的集群资源调度方法的租户C的预设资源调度阈值范围示意图;FIG4c is a schematic diagram of a preset resource scheduling threshold range of tenant C in the cluster resource scheduling method provided in the second embodiment of the present invention;
图5为本发明第二实施例提供的集群资源调度方法的调度优先级示意图;FIG5 is a schematic diagram of scheduling priorities of a cluster resource scheduling method provided by a second embodiment of the present invention;
图6为本发明第三实施例提供的集群资源调度装置的结构示意图;FIG6 is a schematic diagram of the structure of a cluster resource scheduling device provided by a third embodiment of the present invention;
图7为本发明第四实施例提供的电子设备的结构示意图。FIG. 7 is a schematic diagram of the structure of an electronic device provided by a fourth embodiment of the present invention.
通过上述附图,已示出本发明明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本发明构思的范围,而是通过参考特定实施例为本领域技术人员说明本发明的概念。The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments.
具体实施方式DETAILED DESCRIPTION
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本发明的实施例进行描述。The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
为了清楚理解本申请的技术方案,首先对现有技术的方案进行详细介绍。在云数据的逐渐发展中,租用集群资源成为了公司或用户的常用选择。租户的概念不止局限于集群的用户,它可以包含为一组计算、内存、存储等资源组成的工作负载集合。由于租户使用集群资源的时间相互独立,多租户同时需求集群资源的场景时有发生。目前集群的资源调度主要针对单个租户的资源调度任务提供局部最优选择,即使同时存在多个租户的资源调度任务,也会按照一个一个的方式提供每个资源调度任务的局部最优选择。而这种方式,由于对租户资源隔离性较弱,可能会造成租户建的资源抢夺,同时,对集群整体资源的利用效率较低。In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail. With the gradual development of cloud data, renting cluster resources has become a common choice for companies or users. The concept of tenants is not limited to cluster users, it can include a set of workloads consisting of a group of computing, memory, storage and other resources. Since the time when tenants use cluster resources is independent of each other, scenarios where multiple tenants demand cluster resources at the same time often occur. At present, the resource scheduling of the cluster mainly provides local optimal choices for the resource scheduling tasks of a single tenant. Even if there are resource scheduling tasks for multiple tenants at the same time, the local optimal choice for each resource scheduling task will be provided one by one. However, this method may cause resource snatching by tenants due to the weak isolation of tenant resources. At the same time, the utilization efficiency of the overall cluster resources is low.
所以针对现有技术中目前集群资源调度方式在多租户的多资源调度任务的场景下,集群整体资源的利用效率较低的问题,发明人在研究中发现,为了解决该问题,可以综合考虑每个租户的资源调度任务的独特性,比如某些资源调度任务需求的资源较多,某些资源调度任务需求的资源较少等,按照每个租户的资源调度任务的独特性对各资源调度任务进行调度优先级划分,从而按照调度优先级,对各资源调度任务进行整体最优的资源调度。Therefore, in view of the problem that the overall cluster resource utilization efficiency is low in the current cluster resource scheduling method in the scenario of multi-tenant multi-resource scheduling tasks, the inventors have found in the research that in order to solve this problem, the uniqueness of each tenant's resource scheduling task can be comprehensively considered. For example, some resource scheduling tasks require more resources, while some resource scheduling tasks require fewer resources, etc., and the scheduling priorities of each resource scheduling task are divided according to the uniqueness of each tenant's resource scheduling task, so as to perform the overall optimal resource scheduling for each resource scheduling task according to the scheduling priority.
具体的,首先通过获取预设时间段内各租户的资源调度任务,并根据各资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级,从而针对各调度优先级,按照预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源,以实现对各资源调度任务对应的集群调度资源进行调度。本发明的集群资源调度方法在多租户场景中考虑了每个租户的资源调度任务的调度优先级,从而可以以调度优先级为基准进行资源调度,提高了集群整体资源的利用效率。Specifically, firstly, the resource scheduling tasks of each tenant within a preset time period are obtained, and the scheduling priority corresponding to each resource scheduling task is determined according to each resource scheduling task and the matching preset resource scheduling threshold range, so as to determine the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to the preset scheduling priority order, so as to realize the scheduling of the cluster scheduling resources corresponding to each resource scheduling task. The cluster resource scheduling method of the present invention takes into account the scheduling priority of the resource scheduling task of each tenant in a multi-tenant scenario, so that resource scheduling can be performed based on the scheduling priority, thereby improving the overall resource utilization efficiency of the cluster.
发明人基于上述的创造性发现,提出了本申请的技术方案。Based on the above creative findings, the inventor proposed the technical solution of the present application.
下面对本发明实施例提供的集群资源调度方法的应用场景进行介绍。如图1所示,其中,1为电子设备,2为租户,3为集群。本发明实施例提供的集群资源调度方法对应的应用场景的网络架构中包括:电子设备1、租户2和集群3。租户2可以以各用户所使用的电子设备构建与电子设备1的网络连接,其中租户2包括租户A、租户B以及租户N等多个租户,集群3包括集群节点A、集群节点B以及集群节点N等多个集群节点。The following is an introduction to the application scenario of the cluster resource scheduling method provided in an embodiment of the present invention. As shown in Figure 1, 1 is an electronic device, 2 is a tenant, and 3 is a cluster. The network architecture of the application scenario corresponding to the cluster resource scheduling method provided in an embodiment of the present invention includes: electronic device 1, tenant 2, and cluster 3. Tenant 2 can establish a network connection with electronic device 1 using the electronic devices used by each user, wherein tenant 2 includes multiple tenants such as tenant A, tenant B, and tenant N, and cluster 3 includes multiple cluster nodes such as cluster node A, cluster node B, and cluster node N.
在租户2中的多个租户,如租户A、租户B以及租户N向电子设备1发送对应的资源调度任务A、B以及N时,电子设备1根据资源调度任务A、B以及N以及与资源调度任务A、B以及N匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级。假设资源调度任务A小于预设资源调度阈值范围的最小值,则可以将资源调度任务A的调度优先级确定为高,假设资源调度任务B处于预设资源调度阈值范围中,则可以将资源调度任务B的调度优先级确定为中,假设资源调度任务N等于预设资源调度阈值范围的最大值,则可以将资源调度任务N的调度优先级确定为低。然后电子设备1根据资源调度任务A、B以及N的调度优先级以及预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源,最后,电子设备1对接集群3,对各资源调度任务对应的集群调度资源进行调度。When multiple tenants in tenant 2, such as tenant A, tenant B, and tenant N, send corresponding resource scheduling tasks A, B, and N to electronic device 1, electronic device 1 determines the scheduling priority corresponding to each resource scheduling task according to resource scheduling tasks A, B, and N and the preset resource scheduling threshold range matching resource scheduling tasks A, B, and N. Assuming that resource scheduling task A is less than the minimum value of the preset resource scheduling threshold range, the scheduling priority of resource scheduling task A can be determined as high, assuming that resource scheduling task B is within the preset resource scheduling threshold range, the scheduling priority of resource scheduling task B can be determined as medium, and assuming that resource scheduling task N is equal to the maximum value of the preset resource scheduling threshold range, the scheduling priority of resource scheduling task N can be determined as low. Then, electronic device 1 determines the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to the scheduling priorities of resource scheduling tasks A, B, and N and the preset scheduling priority order. Finally, electronic device 1 connects to cluster 3 to schedule the cluster scheduling resources corresponding to each resource scheduling task.
下面结合说明书附图对本发明实施例进行介绍。The embodiments of the present invention are described below in conjunction with the accompanying drawings.
图2为本发明第一实施例提供的集群资源调度方法的流程示意图,如图2所示,本实施例中,本发明实施例的执行主体为集群资源调度装置,该集群资源调度装置可以集成在电子设备中。则本实施例提供的集群资源调度方法包括以下几个步骤:FIG2 is a flow chart of a cluster resource scheduling method provided by the first embodiment of the present invention. As shown in FIG2, in this embodiment, the execution subject of the embodiment of the present invention is a cluster resource scheduling device, which can be integrated in an electronic device. The cluster resource scheduling method provided by this embodiment includes the following steps:
步骤S101,获取预设时间段内各租户的资源调度任务。Step S101, obtaining resource scheduling tasks for each tenant within a preset time period.
本实施例中,预设时间段可以根据需求进行设置,比如设置成十分钟,一分钟等,从而以时间段的方式,对需处理的多个资源调度任务进行划分。In this embodiment, the preset time period can be set according to demand, such as ten minutes, one minute, etc., so that the multiple resource scheduling tasks to be processed are divided in the form of time periods.
各租户的资源调度任务一般包括租户的待调度资源、租户标识等数据,租户的待调度资源指租户请求调度的集群资源。The resource scheduling tasks of each tenant generally include data such as the tenant's resources to be scheduled and the tenant ID. The tenant's resources to be scheduled refer to the cluster resources that the tenant requests to schedule.
集群资源包括集群节点中各服务器的内存、处理器资源、磁盘资源等。在进行资源调度时可以将资源调度任务的待调度资源进行取整处理。Cluster resources include memory, processor resources, disk resources, etc. of each server in the cluster node. When performing resource scheduling, the resources to be scheduled of the resource scheduling task can be rounded up.
步骤S102,根据各资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级。Step S102: determining the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and a matching preset resource scheduling threshold range.
本实施例中,预先对每个租户设置了资源调度阈值范围,资源调度阈值范围的最小值对应能满足租户正常运作的最小资源量,而资源调度阈值范围的最大值对应租户超额运作时的最大资源量。一般情况下,该租户需求的集群资源处于预设资源调度阈值范围中。In this embodiment, a resource scheduling threshold range is pre-set for each tenant, the minimum value of the resource scheduling threshold range corresponds to the minimum amount of resources that can meet the tenant's normal operation, and the maximum value of the resource scheduling threshold range corresponds to the maximum amount of resources when the tenant operates in excess. Generally, the cluster resources required by the tenant are within the preset resource scheduling threshold range.
若某资源调度任务需调度的集群资源小于资源调度阈值范围的最小值,则不能满足租户正常运作,因而,可以将该资源调度任务的调度优先级设为最高一档。同理,若某资源调度任务需调度的集群资源处于资源调度阈值范围中,说明调度的集群资源能满足租户正常运作,且还存在被调度空间,可以将该资源调度任务的调度优先级设为次一档。若某资源调度任务需调度的集群资源等于资源调度阈值范围的最大值,说明调度的集群资源能满足租户正常运作,且还存在较大的被调度空间,可以将该资源调度任务的调度优先级设为更次一档。若某资源调度任务需调度的集群资源大于资源调度阈值范围的最大值,说明目前该租户处于非正常运作状态,可以等待该租户将某些程序执行完成后,再进行集群资源调度,因而,可以将该资源调度任务的调度优先级设为最低一档。If the cluster resources that a resource scheduling task needs to schedule are less than the minimum value of the resource scheduling threshold range, the tenant cannot operate normally. Therefore, the scheduling priority of the resource scheduling task can be set to the highest level. Similarly, if the cluster resources that a resource scheduling task needs to schedule are within the resource scheduling threshold range, it means that the scheduled cluster resources can meet the tenant's normal operation and there is still room to be scheduled. The scheduling priority of the resource scheduling task can be set to the next level. If the cluster resources that a resource scheduling task needs to schedule are equal to the maximum value of the resource scheduling threshold range, it means that the scheduled cluster resources can meet the tenant's normal operation and there is still a large space to be scheduled. The scheduling priority of the resource scheduling task can be set to the next level. If the cluster resources that a resource scheduling task needs to schedule are greater than the maximum value of the resource scheduling threshold range, it means that the tenant is currently in an abnormal operation state. You can wait for the tenant to complete the execution of certain programs before scheduling cluster resources. Therefore, the scheduling priority of the resource scheduling task can be set to the lowest level.
步骤S103,根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源。Step S103: determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority sequence.
本实施例中,预设调度优先级顺序以从最高档-最低档的顺序为佳,也可以根据需求进行设置,本实施例中不进行限定。In this embodiment, the preset scheduling priority order is preferably in the order from the highest gear to the lowest gear, and can also be set according to needs, which is not limited in this embodiment.
针对每一调度优先级中各资源调度任务,可以按照随机或预设顺序确定每个资源调度任务对应的集群调度资源。For each resource scheduling task in each scheduling priority, the cluster scheduling resource corresponding to each resource scheduling task may be determined in a random or preset order.
步骤S104,对各资源调度任务对应的集群调度资源进行调度。Step S104: Schedule the cluster scheduling resources corresponding to each resource scheduling task.
本实施例中,在确定出各资源调度任务对应的集群调度资源后,即可以对各资源调度任务对应的集群调度资源进行调度。In this embodiment, after the cluster scheduling resources corresponding to each resource scheduling task are determined, the cluster scheduling resources corresponding to each resource scheduling task can be scheduled.
本发明实施例提供的一种集群资源调度方法,该方法包括:获取预设时间段内各租户的资源调度任务。根据各资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级。根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源。对各资源调度任务对应的集群调度资源进行调度。A cluster resource scheduling method provided by an embodiment of the present invention includes: obtaining resource scheduling tasks of each tenant within a preset time period. Determining the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and a matching preset resource scheduling threshold range. Determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority sequence. Scheduling the cluster scheduling resources corresponding to each resource scheduling task.
本发明实施例的集群资源调度方法,通过获取预设时间段内各租户的资源调度任务,并根据各资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级,从而针对各调度优先级,按照预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源,以实现对各资源调度任务对应的集群调度资源进行调度。本发明实施例的集群资源调度方法在多租户场景中考虑了每个租户的资源调度任务的调度优先级,从而可以以调度优先级为基准进行资源调度,提高了集群整体资源的利用效率。The cluster resource scheduling method of the embodiment of the present invention obtains the resource scheduling tasks of each tenant within a preset time period, and determines the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and the matching preset resource scheduling threshold range, thereby determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority in accordance with the preset scheduling priority order for each scheduling priority, so as to schedule the cluster scheduling resources corresponding to each resource scheduling task. The cluster resource scheduling method of the embodiment of the present invention takes into account the scheduling priority of the resource scheduling task of each tenant in a multi-tenant scenario, so that resource scheduling can be performed based on the scheduling priority, thereby improving the overall resource utilization efficiency of the cluster.
图3为本发明第二实施例提供的集群资源调度方法的流程示意图,如图3所示,本实施例提供的集群资源调度方法,是在本发明上一实施例提供的集群资源调度方法的基础上,对各个步骤进行了进一步的细化。则本实施例提供的集群资源调度方法包括以下步骤。FIG3 is a flow chart of a cluster resource scheduling method provided by a second embodiment of the present invention. As shown in FIG3, the cluster resource scheduling method provided by this embodiment is based on the cluster resource scheduling method provided by the previous embodiment of the present invention, and each step is further refined. The cluster resource scheduling method provided by this embodiment includes the following steps.
步骤S201,获取预设时间段内各租户的资源调度任务。Step S201, obtaining resource scheduling tasks for each tenant within a preset time period.
本实施例中,步骤201的实现方式与本发明上一实施例中的步骤101的实现方式类似,在此不再一一赘述。In this embodiment, the implementation of step 201 is similar to the implementation of step 101 in the previous embodiment of the present invention, and will not be described in detail here.
步骤S202,将各待调度资源与匹配的预设资源调度阈值范围进行比较,以生成比较结果,其中,资源调度任务包括租户请求的待调度资源。Step S202: compare each resource to be scheduled with a matching preset resource scheduling threshold range to generate a comparison result, wherein the resource scheduling task includes the resource to be scheduled requested by the tenant.
本实施例中,比较结果可以为小于预设资源调度阈值范围的最小值,处于预设资源调度阈值范围内,等于预设资源调度阈值范围最大值,大于预设资源调度阈值范围最大值。In this embodiment, the comparison result may be less than the minimum value of the preset resource scheduling threshold range, within the preset resource scheduling threshold range, equal to the maximum value of the preset resource scheduling threshold range, or greater than the maximum value of the preset resource scheduling threshold range.
步骤S203,根据各比较结果确定各资源调度任务对应的调度优先级。Step S203: determining the scheduling priority corresponding to each resource scheduling task according to each comparison result.
根据各比较结果确定各资源调度任务对应的调度优先级具体可以为:The scheduling priority corresponding to each resource scheduling task can be determined according to the comparison results:
若比较结果为各待调度资源小于匹配的预设资源调度阈值范围的最小值,则确定该资源调度任务的调度优先级为高。If the comparison result is that each resource to be scheduled is smaller than the minimum value of the matched preset resource scheduling threshold range, it is determined that the scheduling priority of the resource scheduling task is high.
若比较结果为各待调度资源处于匹配的预设资源调度阈值范围中,则确定该资源调度任务的调度优先级为中。If the comparison result is that each resource to be scheduled is within the matching preset resource scheduling threshold range, then the scheduling priority of the resource scheduling task is determined to be medium.
若比较结果为各待调度资源等于匹配的预设资源调度阈值范围的最大值,则确定该资源调度任务的调度优先级为低。If the comparison result is that each resource to be scheduled is equal to the maximum value of the matching preset resource scheduling threshold range, it is determined that the scheduling priority of the resource scheduling task is low.
若比较结果为各待调度资源大于匹配的预设资源调度阈值范围的最大值,则将该资源调度任务确定为下一预设时间段的资源调度任务。If the comparison result is that each resource to be scheduled is greater than the maximum value of the matched preset resource scheduling threshold range, the resource scheduling task is determined as the resource scheduling task for the next preset time period.
预先对每个租户设置了资源调度阈值范围,资源调度阈值范围的最小值对应能满足租户正常运作的最小资源量,而资源调度阈值范围的最大值对应租户超额运作时的最大资源量。一般情况下,该租户需求的集群资源处于预设资源调度阈值范围中。A resource scheduling threshold range is pre-set for each tenant. The minimum value of the resource scheduling threshold range corresponds to the minimum amount of resources that can meet the tenant's normal operation, and the maximum value of the resource scheduling threshold range corresponds to the maximum amount of resources when the tenant operates in excess. Generally, the cluster resources required by the tenant are within the preset resource scheduling threshold range.
若某资源调度任务需调度的集群资源小于资源调度阈值范围的最小值,则不能满足租户正常运作,因而,可以将该资源调度任务的调度优先级设为高。同理,若某资源调度任务需调度的集群资源处于资源调度阈值范围中,说明调度的集群资源能满足租户正常运作,且还存在被调度空间,可以将该资源调度任务的调度优先级设为中。If the cluster resources that a resource scheduling task needs to schedule are less than the minimum value of the resource scheduling threshold range, it cannot meet the normal operation of the tenant, so the scheduling priority of the resource scheduling task can be set to high. Similarly, if the cluster resources that a resource scheduling task needs to schedule are within the resource scheduling threshold range, it means that the scheduled cluster resources can meet the normal operation of the tenant and there is still room for scheduling, so the scheduling priority of the resource scheduling task can be set to medium.
若某资源调度任务需调度的集群资源等于资源调度阈值范围的最大值,说明调度的集群资源能满足租户正常运作,且还存在较大的被调度空间,可以将该资源调度任务的调度优先级设为低。If the cluster resources that a resource scheduling task needs to schedule are equal to the maximum value of the resource scheduling threshold range, it means that the scheduled cluster resources can meet the normal operation of the tenant and there is still a large scheduling space. The scheduling priority of the resource scheduling task can be set to low.
若某资源调度任务需调度的集群资源大于资源调度阈值范围的最大值,说明目前该租户处于非正常运作状态,可以等待该租户将某些程序执行完成后,再进行集群资源调度,因而,可以将该资源调度任务确定为下一预设时间段的资源调度任务,从而在下一预设时间段内进行处理,提高所有租户的整体调度效率。If the cluster resources that need to be scheduled by a resource scheduling task are greater than the maximum value of the resource scheduling threshold range, it means that the tenant is currently in an abnormal operation state. You can wait until the tenant completes the execution of certain programs before performing cluster resource scheduling. Therefore, you can determine the resource scheduling task as the resource scheduling task for the next preset time period, so that it can be processed within the next preset time period, thereby improving the overall scheduling efficiency of all tenants.
步骤S204,根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源。Step S204: determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority sequence.
本实施例中,步骤204的实现方式与本发明上一实施例中的步骤103的实现方式类似,在此不再一一赘述。In this embodiment, the implementation of step 204 is similar to the implementation of step 103 in the previous embodiment of the present invention, and will not be described in detail here.
可选的,本实施例中,根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源,包括:Optionally, in this embodiment, determining the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority order includes:
按照从调度优先级高往调度优先级低的顺序,且针对每一调度优先级的各资源调度任务都进行如下处理:In order from high scheduling priority to low scheduling priority, each resource scheduling task of each scheduling priority is processed as follows:
判断集群中是否存在与当前调度优先级内的各资源调度任务匹配的集群节点。匹配的集群节点包括多个服务器。多个服务器的空闲资源大于匹配的资源调度任务的待调度资源。It is determined whether there is a cluster node in the cluster that matches each resource scheduling task within the current scheduling priority. The matching cluster nodes include multiple servers. The idle resources of the multiple servers are greater than the to-be-scheduled resources of the matching resource scheduling task.
若确定存在,则确定各资源调度任务匹配的集群节点中空闲比率最低的服务器。If it is determined that it exists, then the server with the lowest idle ratio among the cluster nodes that match each resource scheduling task is determined.
将空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源。The idle resources of the server with the lowest idle ratio are determined as the cluster scheduling resources corresponding to each resource scheduling task.
本实施例中,按照从调度优先级高至低的方式,先处理调度优先级高的资源调度任务。同时,针对每一调度优先级中的各资源调度任务,需要确定匹配的集群节点中空闲比率最低的服务器。该空闲比率最低代表服务器在将资源提供给租户后,服务器的空闲资源占服务器的全部资源的比例是同一集群节点的所有服务器中最小的。这样选择的目的是为了在资源调度后,使被调度的服务器能处在尽可能满载运行状态,提高服务器的资源利用率。In this embodiment, resource scheduling tasks with high scheduling priorities are processed first in descending order of scheduling priority. At the same time, for each resource scheduling task in each scheduling priority, it is necessary to determine the server with the lowest idle ratio in the matching cluster node. The lowest idle ratio means that after the server provides resources to tenants, the proportion of the server's idle resources to the server's total resources is the smallest among all servers in the same cluster node. The purpose of this selection is to enable the scheduled server to be in a fully loaded operating state as much as possible after resource scheduling, thereby improving the resource utilization of the server.
可选的,本实施例中,确定各资源调度任务匹配的集群节点中空闲比率最低的服务器,包括:Optionally, in this embodiment, determining the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task includes:
确定与各资源调度任务匹配的多个服务器的空闲资源。Idle resources of multiple servers matching each resource scheduling task are determined.
将各服务器的空闲资源与对应资源调度任务的待调度资源之间的差值除以各服务器的资源总限额,以生成各服务器对应的空闲比率。The difference between the idle resources of each server and the resources to be scheduled of the corresponding resource scheduling task is divided by the total resource limit of each server to generate the idle ratio corresponding to each server.
根据各服务器对应的空闲比率确定空闲比率最低的服务器。A server with the lowest idle ratio is determined according to the idle ratios corresponding to the servers.
本实施例中,空闲比率最低代表被调度的服务器能处在尽可能满载运行状态,因而,需要考虑各服务器的空闲资源与对应资源调度任务的待调度资源之间的差值除以各服务器的资源总限额。In this embodiment, the lowest idle ratio means that the scheduled server can be in the most fully loaded running state possible. Therefore, it is necessary to consider the difference between the idle resources of each server and the resources to be scheduled of the corresponding resource scheduling task divided by the total resource limit of each server.
服务器资源可以包括磁盘、内存以及处理器的资源,从而综合考虑全部的资源。Server resources can include disk, memory, and processor resources, so all resources are taken into consideration comprehensively.
可选的,本实施例中,确定各资源调度任务匹配的集群节点中空闲比率最低的服务器之前,还包括:Optionally, in this embodiment, before determining the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task, the method further includes:
判断与当前调度优先级内的各资源调度任务匹配的集群节点是否为多个。Determine whether there are multiple cluster nodes matching each resource scheduling task within the current scheduling priority.
若确定匹配的集群节点为多个,则针对匹配的每个集群节点,确定各资源调度任务匹配的集群节点中空闲比率最低的服务器。If it is determined that there are multiple matching cluster nodes, then for each matching cluster node, a server with the lowest idle ratio among the cluster nodes matching each resource scheduling task is determined.
根据各集群节点中空闲比率最低的服务器以及预设集群空闲比率算法确定预设集群空闲比率算法输出最小值。The minimum value output by the preset cluster idle ratio algorithm is determined according to the server with the lowest idle ratio in each cluster node and the preset cluster idle ratio algorithm.
将预设集群空闲比率算法输出最小值时对应的各资源调度任务匹配的空闲比率最低的服务器确定为目标服务器。The server with the lowest idle ratio matched by each resource scheduling task corresponding to the minimum value output by the preset cluster idle ratio algorithm is determined as the target server.
将空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源,包括:The idle resources of the server with the lowest idle ratio are determined as the cluster scheduling resources corresponding to each resource scheduling task, including:
将各目标服务器的空闲资源确定为各资源调度任务对应的集群调度资源。The idle resources of each target server are determined as the cluster scheduling resources corresponding to each resource scheduling task.
本实施例中,由于每个调度优先级中的资源调度任务数量为多个,当资源调度任务匹配的集群节点也为多个时,资源调度任务数量的可选择方案数量也将是多个。而为了从整体触发,使整体的资源调度效果较好,需要对每种可选择方案进行进一步的筛选。In this embodiment, since there are multiple resource scheduling tasks in each scheduling priority, when there are multiple cluster nodes matching the resource scheduling tasks, there will also be multiple selectable solutions for the number of resource scheduling tasks. In order to trigger the whole and make the overall resource scheduling effect better, it is necessary to further screen each selectable solution.
假设资源调度任务数量有10个,每个资源调度任务匹配的集群节点为3个,则最终形成的资源调度方案可能有3的十次方个,需要从这些方案中选择最好的一个方案作为最终的资源调度方案。一般情况下,会选择各资源调度任务匹配的各集群节点中空闲比率最低的服务器作为最终方案。Assuming that there are 10 resource scheduling tasks and each resource scheduling task matches 3 cluster nodes, there may be 3 to the power of 10 resource scheduling solutions. The best one needs to be selected from these solutions as the final resource scheduling solution. In general, the server with the lowest idle ratio among the cluster nodes matched by each resource scheduling task will be selected as the final solution.
可选的,本实施例中,若当前调度优先级为高,且若集群中不存在与当前调度优先级内的各资源调度任务匹配的集群节点,则本实施例方法还包括:Optionally, in this embodiment, if the current scheduling priority is high, and if there is no cluster node in the cluster that matches each resource scheduling task within the current scheduling priority, the method of this embodiment further includes:
获取集群中调度优先级为中或低对应的已调度集群调度资源。Get the scheduled cluster resources corresponding to the medium or low scheduling priority in the cluster.
按照预设调度策略将调度优先级为中或低对应的已调度集群调度资源分配至当前调度优先级的各资源调度任务中。其中,预设调度策略为使资源调度后的每个已调度集群调度资源大于或等于对应预设资源调度阈值范围的最小值。According to the preset scheduling strategy, the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority are allocated to each resource scheduling task of the current scheduling priority. The preset scheduling strategy is to make each scheduled cluster scheduling resource after resource scheduling greater than or equal to the minimum value of the corresponding preset resource scheduling threshold range.
本实施例中,为了确保高调度优先级的资源调度需求,当各集群节点的服务器的空闲资源都不能满足高调度优先级的资源调度需求时,可以从已调度集群调度资源的历史资源调度任务中获取资源。In this embodiment, in order to ensure resource scheduling requirements with high scheduling priority, when the idle resources of the servers of each cluster node cannot meet the resource scheduling requirements with high scheduling priority, resources can be obtained from the historical resource scheduling tasks of the scheduled cluster scheduling resources.
比如在上一时间段内,调度了集群资源的调度优先级为中或低的资源调度任务,此时正占用集群中的服务器资源,此时,可以获取其所占用的服务器资源,并在确保该资源调度任务以及对应租户能满足正常运作的情况下,将已调度集群调度资源分配至高调度优先级的各资源调度任务中,从而确保当前高调度优先级的资源调度需求。For example, in the previous time period, a resource scheduling task with a medium or low scheduling priority of cluster resources was scheduled, and is currently occupying server resources in the cluster. At this time, the server resources occupied by it can be obtained, and while ensuring that the resource scheduling task and the corresponding tenant can meet normal operation, the scheduled cluster scheduling resources can be allocated to each resource scheduling task with a high scheduling priority, thereby ensuring the current high scheduling priority resource scheduling needs.
具体可以根据已调度集群调度资源多少,从而确定调度至当前高调度优先级的资源,在已调度集群调度资源在再次调度后能满足对应租户的正常运作的情况下,可以尽可能调度更多的资源给当前高调度优先级的资源调度任务。Specifically, the resources to be scheduled to the current high scheduling priority can be determined based on the number of resources scheduled by the scheduled cluster. If the resources scheduled by the scheduled cluster can meet the normal operation of the corresponding tenants after re-scheduling, more resources can be scheduled to the current high scheduling priority resource scheduling tasks as much as possible.
步骤S205,对各资源调度任务对应的集群调度资源进行调度。Step S205: Schedule the cluster scheduling resources corresponding to each resource scheduling task.
本实施例中,步骤205的实现方式与本发明上一实施例中的步骤104的实现方式类似,在此不再一一赘述。In this embodiment, the implementation of step 205 is similar to the implementation of step 104 in the previous embodiment of the present invention, and will not be described in detail here.
为了更好的理解本实施例的集群资源调度方法,下面将以Kubernetes集群为例,进行详细说明。In order to better understand the cluster resource scheduling method of this embodiment, a Kubernetes cluster is taken as an example for detailed description.
Kubernetes提供了默认的调度器,一般系统均使用该调度器管理服务集群。该调度器使用的方式是对每个租户的资源调度任务,按照一个一个的处理方式,进行集群资源调度,从而达到局部最优,却忽略了整体情况。Kubernetes provides a default scheduler, which is generally used by all systems to manage service clusters. The scheduler schedules cluster resources for each tenant's resource scheduling task one by one, thus achieving local optimality, but ignoring the overall situation.
本实施例中,可以在保留Kubernetes原有调度方式的情况下,应用本实施例的集群资源调度方法。对每个租户,预先设置了对应的资源调度阈值范围,资源调度阈值范围的两端分别为租户的需保证的资源最小值和可使用的资源最大值。当一个租户的资源最小值未满足时,它将优先于其他同级租户获得资源,资源最小值是租户保留资源的下限,而租户申请的资源不能超过资源最大值。In this embodiment, the cluster resource scheduling method of this embodiment can be applied while retaining the original scheduling method of Kubernetes. For each tenant, a corresponding resource scheduling threshold range is pre-set, and the two ends of the resource scheduling threshold range are the minimum resource value that needs to be guaranteed and the maximum resource value that can be used by the tenant. When the minimum resource value of a tenant is not met, it will have priority over other tenants of the same level to obtain resources. The minimum resource value is the lower limit of the tenant's reserved resources, and the resources applied by the tenant cannot exceed the maximum resource value.
如图4a、图4b以及图4c所示,租户也分为多种情况,比如租户B的资源整体需求较小,租户A的资源整体需求较大。租户A需求的资源最小值大于租户B的资源最小值,租户A的资源最大值也大于租户B的资源最大值。租户C的资源最小值等于资源最大值说明该租户的资源需求非常刚性,不允许共享资源给其他租户。As shown in Figures 4a, 4b, and 4c, tenants can be divided into multiple situations. For example, the overall resource demand of tenant B is relatively small, while the overall resource demand of tenant A is relatively large. The minimum resource value required by tenant A is greater than the minimum resource value of tenant B, and the maximum resource value of tenant A is also greater than the maximum resource value of tenant B. The minimum resource value of tenant C is equal to the maximum resource value, which means that the resource demand of this tenant is very rigid and it is not allowed to share resources with other tenants.
对于资源调度任务,如图5所示,可以根据资源调度任务的调度优先级别划分为多个队列,不同调度优先级的资源调度任务分配到不同的队列。假设调度优先级分为1-3,则可以按照调度优先级分成多个队列,调度优先级1的包括资源调度任务1-1,资源调度任务1-2,资源调度任务1-3等,同理,调度优先级2包括资源调度任务2-1,资源调度任务2-2,资源调度任务2-3,资源调度任务2-4等,调度优先级3包括资源调度任务3-1,资源调度任务3-2,资源调度任务3-3。As shown in FIG5 , resource scheduling tasks can be divided into multiple queues according to the scheduling priority of the resource scheduling tasks, and resource scheduling tasks of different scheduling priorities are assigned to different queues. Assuming that the scheduling priorities are divided into 1-3, multiple queues can be divided according to the scheduling priorities, and scheduling priority 1 includes resource scheduling tasks 1-1, resource scheduling tasks 1-2, resource scheduling tasks 1-3, etc. Similarly, scheduling priority 2 includes resource scheduling tasks 2-1, resource scheduling tasks 2-2, resource scheduling tasks 2-3, resource scheduling tasks 2-4, etc., and scheduling priority 3 includes resource scheduling tasks 3-1, resource scheduling tasks 3-2, and resource scheduling tasks 3-3.
调度优先级1是最高优先级,支持对其他资源调度任务的抢占。优先级2的资源调度任务支持分配失败,但是不支持被抢占。优先级3的资源调度任务支持分配失败,也支持被抢占。Scheduling priority 1 is the highest priority and supports preemption of other resource scheduling tasks. Resource scheduling tasks with priority 2 support allocation failure, but do not support preemption. Resource scheduling tasks with priority 3 support allocation failure and also support preemption.
在进行租户的资源调度时,可以先判断是使用Kubernetes的默认调度方式,还是本实施例的集群资源调度方法,以兼容两种调度方式。When performing resource scheduling for tenants, it can be determined whether to use the default scheduling method of Kubernetes or the cluster resource scheduling method of this embodiment to be compatible with both scheduling methods.
在确定各租户对应的资源调度任务对应的调度优先级后,先处理调度优先级为1的各资源调度任务,然后再逐次处理优先级2和优先级3的资源调度任务。After determining the scheduling priorities corresponding to the resource scheduling tasks corresponding to each tenant, the resource scheduling tasks with a scheduling priority of 1 are processed first, and then the resource scheduling tasks with priorities 2 and 3 are processed one by one.
对于优先级为1的各资源调度任务,可以按照预设顺序或者随机顺序(且多次随机),对各资源调度任务逐个进行分配。比如确定是否存在集群节点中的多个服务器的空闲资源大于匹配的资源调度任务的待调度资源。确定服务器是否正常运作,确定该资源调度任务是否对服务器的型号等有要求等。For each resource scheduling task with a priority of 1, each resource scheduling task can be assigned one by one according to a preset order or a random order (and multiple random orders). For example, it is determined whether there are multiple servers in the cluster node whose idle resources are greater than the resources to be scheduled for the matching resource scheduling task. It is determined whether the server is operating normally, and whether the resource scheduling task has requirements for the server model, etc.
然后在匹配的多个服务器中选取空闲比率最小的服务器。Then, the server with the smallest idle ratio is selected from the multiple matching servers.
为了提高资源调度的精确度以及效率,可以对优先级1的各资源调度任务的选取的空闲比率最小的服务器流程,进行多次重复进行。每次选取时,采用不同的顺序,采用不同的匹配集群节点。In order to improve the accuracy and efficiency of resource scheduling, the process of selecting the server with the smallest idle ratio for each resource scheduling task of priority 1 can be repeated multiple times, with different orders and different matching cluster nodes used each time.
如果资源不能满足,则确定是否抢占正在占用服务器资源的历史低调度优先级的资源,抢占时需要注意给被抢占租户保留资源最小值的资源。If the resources cannot be satisfied, determine whether to preempt the resources with a historically low scheduling priority that are currently occupying the server resources. When preempting, care needs to be taken to reserve the minimum resources for the preempted tenant.
然后对于优先级2和优先级3同样进行调度,但是在执行过程中不进行抢占相关的计算。从而完成所有资源调度任务的调度。Then, priority 2 and priority 3 are scheduled in the same way, but no preemption-related calculations are performed during the execution process, thereby completing the scheduling of all resource scheduling tasks.
图6为本发明第三实施例提供的集群资源调度装置的结构示意图,如图6所示,本实施例中,该集群资源调度装置300包括:FIG6 is a schematic diagram of the structure of a cluster resource scheduling device provided in a third embodiment of the present invention. As shown in FIG6 , in this embodiment, the cluster resource scheduling device 300 includes:
获取模块301,用于获取预设时间段内各租户的资源调度任务。The acquisition module 301 is used to acquire the resource scheduling tasks of each tenant within a preset time period.
优先级确定模块302,用于根据各资源调度任务与匹配的预设资源调度阈值范围确定各资源调度任务对应的调度优先级。The priority determination module 302 is used to determine the scheduling priority corresponding to each resource scheduling task according to each resource scheduling task and the matching preset resource scheduling threshold range.
资源确定模块303,用于根据各调度优先级和预设调度优先级顺序确定各调度优先级中各资源调度任务对应的集群调度资源。The resource determination module 303 is used to determine the cluster scheduling resources corresponding to each resource scheduling task in each scheduling priority according to each scheduling priority and a preset scheduling priority sequence.
资源调度模块304,用于对各资源调度任务对应的集群调度资源进行调度。The resource scheduling module 304 is used to schedule the cluster scheduling resources corresponding to each resource scheduling task.
本实施例提供的集群资源调度装置可以执行图2所示方法实施例的技术方案,其实现原理和技术效果与图2所示方法实施例类似,在此不再一一赘述。The cluster resource scheduling device provided in this embodiment can execute the technical solution of the method embodiment shown in FIG. 2 . Its implementation principle and technical effects are similar to those of the method embodiment shown in FIG. 2 , and will not be described in detail here.
同时,本发明提供的集群资源调度装置在上一实施例提供的集群资源调度装置的基础上,对集群资源调度装置300进行了进一步的细化。Meanwhile, the cluster resource scheduling device provided by the present invention further refines the cluster resource scheduling device 300 based on the cluster resource scheduling device provided by the previous embodiment.
可选的,本实施例中,资源调度任务包括租户请求的待调度资源。Optionally, in this embodiment, the resource scheduling task includes resources to be scheduled requested by the tenant.
优先级确定模块302具体用于:The priority determination module 302 is specifically used for:
将各待调度资源与匹配的预设资源调度阈值范围进行比较,以生成比较结果。根据各比较结果确定各资源调度任务对应的调度优先级。Each resource to be scheduled is compared with a matching preset resource scheduling threshold range to generate a comparison result, and a scheduling priority corresponding to each resource scheduling task is determined according to each comparison result.
可选的,本实施例中,优先级确定模块302在根据各比较结果确定各资源调度任务对应的调度优先级时,具体用于:Optionally, in this embodiment, when determining the scheduling priority corresponding to each resource scheduling task according to each comparison result, the priority determination module 302 is specifically used to:
若比较结果为各待调度资源小于匹配的预设资源调度阈值范围的最小值,则确定该资源调度任务的调度优先级为高。若比较结果为各待调度资源处于匹配的预设资源调度阈值范围中,则确定该资源调度任务的调度优先级为中。若比较结果为各待调度资源等于匹配的预设资源调度阈值范围的最大值,则确定该资源调度任务的调度优先级为低。若比较结果为各待调度资源大于匹配的预设资源调度阈值范围的最大值,则将该资源调度任务确定为下一预设时间段的资源调度任务。If the comparison result is that each resource to be scheduled is less than the minimum value of the matching preset resource scheduling threshold range, the scheduling priority of the resource scheduling task is determined to be high. If the comparison result is that each resource to be scheduled is within the matching preset resource scheduling threshold range, the scheduling priority of the resource scheduling task is determined to be medium. If the comparison result is that each resource to be scheduled is equal to the maximum value of the matching preset resource scheduling threshold range, the scheduling priority of the resource scheduling task is determined to be low. If the comparison result is that each resource to be scheduled is greater than the maximum value of the matching preset resource scheduling threshold range, the resource scheduling task is determined as the resource scheduling task for the next preset time period.
可选的,本实施例中,资源确定模块303具体用于:Optionally, in this embodiment, the resource determination module 303 is specifically used to:
按照从调度优先级高往调度优先级低的顺序,且针对每一调度优先级的各资源调度任务都进行如下处理:判断集群中是否存在与当前调度优先级内的各资源调度任务匹配的集群节点。匹配的集群节点包括多个服务器。多个服务器的空闲资源大于匹配的资源调度任务的待调度资源。若确定存在,则确定各资源调度任务匹配的集群节点中空闲比率最低的服务器。将空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源。In order from high scheduling priority to low scheduling priority, the following processing is performed for each resource scheduling task of each scheduling priority: Determine whether there is a cluster node in the cluster that matches each resource scheduling task within the current scheduling priority. The matching cluster nodes include multiple servers. The idle resources of multiple servers are greater than the resources to be scheduled of the matching resource scheduling task. If it is determined that there is, determine the server with the lowest idle ratio among the cluster nodes matched by each resource scheduling task. Determine the idle resources of the server with the lowest idle ratio as the cluster scheduling resources corresponding to each resource scheduling task.
可选的,本实施例中,资源确定模块303在确定各资源调度任务匹配的集群节点中空闲比率最低的服务器时,具体用于:Optionally, in this embodiment, when determining the server with the lowest idle ratio among the cluster nodes matching each resource scheduling task, the resource determination module 303 is specifically configured to:
确定与各资源调度任务匹配的多个服务器的空闲资源。将各服务器的空闲资源与对应资源调度任务的待调度资源之间的差值除以各服务器的资源总限额,以生成各服务器对应的空闲比率。根据各服务器对应的空闲比率确定空闲比率最低的服务器。Determine the idle resources of multiple servers that match each resource scheduling task. Divide the difference between the idle resources of each server and the resources to be scheduled of the corresponding resource scheduling task by the total resource limit of each server to generate the idle ratio corresponding to each server. Determine the server with the lowest idle ratio based on the idle ratios corresponding to each server.
可选的,本实施例中,资源确定模块303还用于:Optionally, in this embodiment, the resource determination module 303 is further used to:
判断与当前调度优先级内的各资源调度任务匹配的集群节点是否为多个。若确定匹配的集群节点为多个,则针对匹配的每个集群节点,确定各资源调度任务匹配的集群节点中空闲比率最低的服务器。根据各集群节点中空闲比率最低的服务器以及预设集群空闲比率算法确定预设集群空闲比率算法输出最小值。将预设集群空闲比率算法输出最小值时对应的各资源调度任务匹配的空闲比率最低的服务器确定为目标服务器。Determine whether there are multiple cluster nodes that match each resource scheduling task within the current scheduling priority. If it is determined that there are multiple matching cluster nodes, then for each matching cluster node, determine the server with the lowest idle ratio among the cluster nodes that match each resource scheduling task. Determine the minimum value output by the preset cluster idle ratio algorithm based on the server with the lowest idle ratio among each cluster node and the preset cluster idle ratio algorithm. Determine the server with the lowest idle ratio that matches each resource scheduling task when the preset cluster idle ratio algorithm outputs the minimum value as the target server.
资源确定模块303在将空闲比率最低的服务器的空闲资源确定为各资源调度任务对应的集群调度资源时,具体用于:When determining the idle resources of the server with the lowest idle ratio as the cluster scheduling resources corresponding to each resource scheduling task, the resource determination module 303 is specifically used to:
将各目标服务器的空闲资源确定为各资源调度任务对应的集群调度资源。The idle resources of each target server are determined as the cluster scheduling resources corresponding to each resource scheduling task.
可选的,本实施例中,若当前调度优先级为高,且若集群中不存在与当前调度优先级内的各资源调度任务匹配的集群节点,则资源确定模块303还用于:Optionally, in this embodiment, if the current scheduling priority is high, and if there is no cluster node in the cluster that matches each resource scheduling task within the current scheduling priority, the resource determination module 303 is further used to:
获取集群中调度优先级为中或低对应的已调度集群调度资源。按照预设调度策略将调度优先级为中或低对应的已调度集群调度资源分配至当前调度优先级的各资源调度任务中。其中,预设调度策略为使资源调度后的每个已调度集群调度资源大于或等于对应预设资源调度阈值范围的最小值。Obtain the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority in the cluster. Allocate the scheduled cluster scheduling resources corresponding to the medium or low scheduling priority to each resource scheduling task of the current scheduling priority according to the preset scheduling strategy. Among them, the preset scheduling strategy is to make each scheduled cluster scheduling resource after resource scheduling greater than or equal to the minimum value of the corresponding preset resource scheduling threshold range.
本实施例提供的集群资源调度装置可以执行图2-图5所示方法实施例的技术方案,其实现原理和技术效果与图2-图5所示方法实施例类似,在此不再一一赘述。The cluster resource scheduling device provided in this embodiment can execute the technical solutions of the method embodiments shown in Figures 2 to 5. Its implementation principle and technical effects are similar to those of the method embodiments shown in Figures 2 to 5, and will not be described in detail here.
根据本发明的实施例,本发明还提供了一种电子设备、一种计算机可读存储介质和一种计算机程序产品。According to an embodiment of the present invention, the present invention also provides an electronic device, a computer-readable storage medium and a computer program product.
如图7所示,图7是本发明第四实施例提供的电子设备的结构示意图。电子设备旨在各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明的实现。As shown in Figure 7, Figure 7 is a schematic diagram of the structure of an electronic device provided by a fourth embodiment of the present invention. The electronic device is intended to be a digital computer in various forms, such as a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and/or required herein.
如图7所示,该电子设备包括:处理器401、存储器402。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理。As shown in Fig. 7, the electronic device includes: a processor 401 and a memory 402. The various components are connected to each other using different buses and can be installed on a common mainboard or in other ways as required. The processor can process instructions executed in the electronic device.
存储器402即为本发明所提供的非瞬时计算机可读存储介质。其中,存储器存储有可由至少一个处理器执行的指令,以使至少一个处理器执行本发明所提供的集群资源调度方法。本发明的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本发明所提供的集群资源调度方法。The memory 402 is a non-transient computer-readable storage medium provided by the present invention. The memory stores instructions executable by at least one processor to enable at least one processor to execute the cluster resource scheduling method provided by the present invention. The non-transient computer-readable storage medium of the present invention stores computer instructions, which are used to enable a computer to execute the cluster resource scheduling method provided by the present invention.
存储器402作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本发明实施例中的集群资源调度方法对应的程序指令/模块(例如,附图6所示的获取模块301、优先级确定模块302、资源确定模块303和资源调度模块304)。处理器401通过运行存储在存储器402中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的集群资源调度方法。The memory 402, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions/modules corresponding to the cluster resource scheduling method in the embodiment of the present invention (for example, the acquisition module 301, the priority determination module 302, the resource determination module 303 and the resource scheduling module 304 shown in FIG. 6). The processor 401 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 402, that is, the cluster resource scheduling method in the above method embodiment is implemented.
同时,本实施例还提供一种计算机产品,当该计算机产品中的指令由电子设备的处理器执行时,使得电子设备能够执行上述实施例一至二的集群资源调度方法。At the same time, this embodiment also provides a computer product. When instructions in the computer product are executed by a processor of an electronic device, the electronic device can execute the cluster resource scheduling methods of the above-mentioned embodiments 1 to 2.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明实施例的其它实施方案。本发明旨在涵盖本发明实施例的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明实施例的一般性原理并包括本发明实施例未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明实施例的真正范围和精神由下面的权利要求书指出。Those skilled in the art will readily appreciate other implementations of the embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the embodiments of the present invention that follow the general principles of the embodiments of the present invention and include common knowledge or customary techniques in the art that are not disclosed in the embodiments of the present invention. The specification and examples are to be considered merely as exemplary, and the true scope and spirit of the embodiments of the present invention are indicated by the following claims.
应当理解的是,本发明实施例并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明实施例的范围仅由所附的权利要求书来限制。It should be understood that the embodiments of the present invention are not limited to the precise structures described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the embodiments of the present invention is limited only by the appended claims.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111496693.4A CN114265676B (en) | 2021-12-08 | 2021-12-08 | Cluster resource scheduling method, device, equipment and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111496693.4A CN114265676B (en) | 2021-12-08 | 2021-12-08 | Cluster resource scheduling method, device, equipment and medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114265676A CN114265676A (en) | 2022-04-01 |
| CN114265676B true CN114265676B (en) | 2024-08-27 |
Family
ID=80826695
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111496693.4A Active CN114265676B (en) | 2021-12-08 | 2021-12-08 | Cluster resource scheduling method, device, equipment and medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114265676B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114756347B (en) * | 2022-04-19 | 2024-06-11 | 中国联合网络通信集团有限公司 | Cluster-based server resource scheduling method and device, cloud platform and medium |
| CN115568028A (en) * | 2022-09-29 | 2023-01-03 | 中国联合网络通信集团有限公司 | Resource scheduling method, device and storage medium |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109992403A (en) * | 2017-12-30 | 2019-07-09 | 中国移动通信集团福建有限公司 | Optimization method, device, terminal device and storage medium for multi-tenant resource scheduling |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108268317B (en) * | 2016-12-30 | 2020-07-28 | 华为技术有限公司 | Resource allocation method and device |
| CN107864211B (en) * | 2017-11-17 | 2019-09-10 | 中国联合网络通信集团有限公司 | Cluster resource dispatching method and system |
| CN108769254B (en) * | 2018-06-25 | 2019-09-20 | 星环信息科技(上海)有限公司 | Resource-sharing application method, system and equipment based on preemption scheduling |
| WO2020030978A1 (en) * | 2018-08-09 | 2020-02-13 | Lenovo (Singapore) Pte. Ltd. | Uplink transmission power allocation |
| CN109783225B (en) * | 2018-12-12 | 2023-09-08 | 华南理工大学 | A tenant priority management method and system for a multi-tenant big data platform |
| CN109992418B (en) * | 2019-03-25 | 2023-01-06 | 华南理工大学 | SLA-aware resource priority scheduling method and system for multi-tenant big data platform |
-
2021
- 2021-12-08 CN CN202111496693.4A patent/CN114265676B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109992403A (en) * | 2017-12-30 | 2019-07-09 | 中国移动通信集团福建有限公司 | Optimization method, device, terminal device and storage medium for multi-tenant resource scheduling |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114265676A (en) | 2022-04-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107688492B (en) | Resource control method and device and cluster resource management system | |
| CN111352736B (en) | Scheduling method and device for big data resources, server and storage medium | |
| CN108268317B (en) | Resource allocation method and device | |
| CN108667867B (en) | Data storage method and device | |
| Karthick et al. | An efficient multi queue job scheduling for cloud computing | |
| US9471390B2 (en) | Scheduling mapreduce jobs in a cluster of dynamically available servers | |
| US9973512B2 (en) | Determining variable wait time in an asynchronous call-back system based on calculated average sub-queue wait time | |
| Li et al. | Feedback dynamic algorithms for preemptable job scheduling in cloud systems | |
| CN109564528B (en) | System and method for computing resource allocation in distributed computing | |
| CN107018091B (en) | Resource request scheduling method and device | |
| CN111798113B (en) | Resource allocation method, device, storage medium and electronic equipment | |
| CN114443263A (en) | Video memory management method, device, equipment and system | |
| Huang et al. | A workflow for runtime adaptive task allocation on heterogeneous MPSoCs | |
| CN114265676B (en) | Cluster resource scheduling method, device, equipment and medium | |
| CN104268018A (en) | Job scheduling method in Hadoop cluster and job scheduler | |
| CN111488206A (en) | Deep learning task scheduling method, system, terminal and storage medium | |
| CN112749002A (en) | Method and device for dynamically managing cluster resources | |
| CN117149440B (en) | Task scheduling method and device, electronic equipment and storage medium | |
| CN112817722A (en) | Time-sharing scheduling method based on priority, terminal and storage medium | |
| CN114489978A (en) | Resource scheduling method, device, equipment and storage medium | |
| CN111143063B (en) | Task resource reservation method and device | |
| CN105051689A (en) | Method, apparatus and system for scheduling resource pool in multi-core system | |
| CN112988363B (en) | Resource scheduling method, device, server and storage medium | |
| CN105607955A (en) | Calculation task distribution method and apparatus | |
| CN117806789B (en) | Task processing method and device of multi-core operating system and computing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |