CN104301257B - A kind of resource allocation methods, device and equipment - Google Patents
A kind of resource allocation methods, device and equipment Download PDFInfo
- Publication number
- CN104301257B CN104301257B CN201410476386.3A CN201410476386A CN104301257B CN 104301257 B CN104301257 B CN 104301257B CN 201410476386 A CN201410476386 A CN 201410476386A CN 104301257 B CN104301257 B CN 104301257B
- Authority
- CN
- China
- Prior art keywords
- resource
- time
- service application
- resources
- expected
- 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.)
- Expired - Fee Related
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种资源分配方法、装置及设备,本发明中获取业务应用的生命周期属性信息,所述生命周期属性信息反映所述业务应用预期占用资源的时间信息;基于所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,并为所述业务应用预约所述预约资源;在达到所述业务应用预期占用资源的起始时间时,将所述预约资源分配给所述业务应用。通过本发明能够使得基础设施管理系统中的资源利用率在可预期时间内得到优化,并保持优化状态。
The invention discloses a resource allocation method, device and equipment. In the invention, the life cycle attribute information of a business application is obtained, and the life cycle attribute information reflects the time information of the resource that the business application is expected to occupy; based on the life cycle attribute The information determines the reserved resources that can optimize the resource utilization rate in the subsequent predictable time, and reserves the reserved resources for the business application; when the start time when the business application is expected to occupy resources is reached, the reserved resources are allocated to The business application. Through the invention, the utilization rate of resources in the infrastructure management system can be optimized within a predictable time, and the optimized state can be maintained.
Description
技术领域technical field
本发明涉及资源分配技术领域,尤其涉及一种资源分配方法、装置及设备。The present invention relates to the technical field of resource allocation, in particular to a resource allocation method, device and equipment.
背景技术Background technique
随着云概念的推广,业务应用层与管理层的分层架构广泛应用于要求资源动态分配的解决方案中。With the promotion of the cloud concept, the layered architecture of business application layer and management layer is widely used in solutions that require dynamic allocation of resources.
业务应用向基础设施管理系统发送业务资源请求,以申请处理特定业务所需的基础设施资源以运行其实例。基础设施管理系统针对业务应用发送的业务资源请求中请求的资源规格(资源规格例如可以是CPU、内存和网络连接等物理规格,也可以是其它一些质量属性要求),以及系统内可用的资源分布情况,进行综合分析并进行资源的分配。Business applications send business resource requests to the infrastructure management system to apply for the infrastructure resources needed to process specific businesses to run their instances. The resource specifications requested in the service resource requests sent by the infrastructure management system for business applications (resource specifications can be physical specifications such as CPU, memory, and network connections, or other quality attribute requirements), and the distribution of resources available in the system situation, conduct a comprehensive analysis and allocate resources.
目前,基础设施管理系统进行资源分配时,在满足资源规格的前提下,优先选取已启用的基础设施资源实体进行资源分配,尽量不使用未启用的基础设施资源实体,并在选取的基础设施资源实体中优先选择剩余资源最少的基础设施资源实体进行资源分配,在业务应用占用资源时间达到后,资源被释放。At present, when the infrastructure management system allocates resources, under the premise of meeting the resource specifications, it first selects the enabled infrastructure resource entities for resource allocation, and tries not to use unenabled infrastructure resource entities. Among the entities, the infrastructure resource entity with the least remaining resources is preferentially selected for resource allocation, and the resources are released after the resource occupation time of the business application reaches.
上述进行资源分配的过程在一定程度上能够提高资源利用率,然而,不同业务应用占用资源的时间不尽相同,例如图1中基础设施资源实体1上的资源(1/2)在短时间后被释放,然而基础设施资源实体1上的资源(1/4)和基础设施资源实体2上的资源(1/2)需要长期被占用,虽然资源(1/4)占用基础设施资源实体的资源较少,但是还是需要运行基础设施资源实体1,故需要同时运行基础设施资源实体1和基础设施资源实体2,基础设施管理系统中的资源利用率很难在长时间内保持优化的状态。The above process of resource allocation can improve resource utilization to a certain extent. However, different business applications occupy resources at different times. For example, the resource (1/2) on infrastructure resource entity 1 in Figure 1 is is released, but the resource (1/4) on the infrastructure resource entity 1 and the resource (1/2) on the infrastructure resource entity 2 need to be occupied for a long time, although the resource (1/4) occupies the resources of the infrastructure resource entity Less, but still needs to run the infrastructure resource entity 1, so the infrastructure resource entity 1 and the infrastructure resource entity 2 need to be run at the same time, the resource utilization rate in the infrastructure management system is difficult to maintain an optimized state for a long time.
发明内容Contents of the invention
本发明实施例提供一种资源分配方法、装置及设备,以优化基础设施管理系统中的资源利用率。Embodiments of the present invention provide a resource allocation method, device, and equipment to optimize resource utilization in an infrastructure management system.
第一方面,提供一种资源分配方法,包括:In the first aspect, a resource allocation method is provided, including:
获取业务应用的生命周期属性信息,所述生命周期属性信息反映所述业务应用预期占用资源的时间信息;Obtaining life cycle attribute information of a business application, where the life cycle attribute information reflects time information when the business application is expected to occupy resources;
基于所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,并为所述业务应用预约所述预约资源;Determining reserved resources that can optimize the resource utilization rate within a predictable subsequent time based on the life cycle attribute information, and reserve the reserved resources for the business application;
在达到所述业务应用预期占用资源的起始时间时,将所述预约资源分配给所述业务应用。When the start time at which the service application is expected to occupy resources is reached, the reserved resource is allocated to the service application.
结合第一方面,在第一种实现方式中,为所述业务应用预约所述预约资源之前,所述方法还包括:With reference to the first aspect, in a first implementation manner, before reserving the reservation resource for the service application, the method further includes:
在后继可预期时间内资源利用率满足进一步优化条件的前提下,对已预约资源进行重预约。On the premise that the resource utilization rate meets the further optimization conditions in the subsequent foreseeable time, the reserved resources are re-booked.
结合第一方面或者第一方面的第一种实现方式,在第二种实现方式中,所述获取业务应用的生命周期属性信息,包括:In combination with the first aspect or the first implementation of the first aspect, in the second implementation, the acquisition of life cycle attribute information of a business application includes:
调用业务资源请求接口携带业务应用生命周期属性信息功能;Call the service resource request interface to carry the service application life cycle attribute information function;
通过调用的业务资源请求接口携带业务应用生命周期属性信息功能,获取业务应用的生命周期属性信息。The service application lifecycle attribute information is obtained by calling the service resource request interface to carry the service application lifecycle attribute information function.
结合第一方面的上述任一种实现方式,在第三种实现方式中,基于所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,包括:In combination with any of the above-mentioned implementations of the first aspect, in a third implementation, determining a reserved resource that can optimize resource utilization within a subsequent predictable time based on the life cycle attribute information includes:
在设定的部分资源集合中,基于所述生命周期属性信息,优先选择能够优化后继可预期时间内资源利用率的预约资源。Among the set partial resource sets, based on the life cycle attribute information, the reserved resources that can optimize the utilization rate of resources within a predictable subsequent time are preferentially selected.
第二方面,提供一种资源分配装置,包括获取单元、预约单元和分配单元,其中:In the second aspect, a resource allocation device is provided, including an acquisition unit, a reservation unit, and an allocation unit, wherein:
所述获取单元,用于获取业务应用的生命周期属性信息,所述生命周期属性信息反映所述业务应用预期占用资源的时间信息;The acquiring unit is configured to acquire lifecycle attribute information of a service application, where the lifecycle attribute information reflects time information when the service application is expected to occupy resources;
所述预约单元,用于基于所述获取单元获取的所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,并为所述业务应用预约所述预约资源;The reserving unit is configured to determine, based on the lifecycle attribute information acquired by the acquiring unit, a reserved resource that can optimize resource utilization within a predictable subsequent time, and reserve the reserved resource for the business application;
所述分配单元,用于在达到所述业务应用预期占用资源的起始时间时,将所述预约单元预约的预约资源分配给所述业务应用。The allocating unit is configured to allocate the reserved resource reserved by the reservation unit to the service application when the start time at which the service application is expected to occupy resources is reached.
结合第二方面,在第一种实现方式中,所述装置还包括重预约单元,其中:With reference to the second aspect, in the first implementation manner, the device further includes a rescheduling unit, wherein:
所述重预约单元,用于在后继可预期时间内资源利用率满足进一步优化条件的前提下,在所述预约单元为所述业务应用预约所述预约资源之前,对已预约资源进行重预约。The re-reservation unit is configured to re-reserve reserved resources before the reservation unit reserves the reserved resources for the service application on the premise that the resource utilization rate meets further optimization conditions within a predictable subsequent time.
结合第二方面或者第二方面的第一种实现方式,在第二种实现方式中,所述获取单元,具体用于按如下方式获取业务应用的生命周期属性信息:In combination with the second aspect or the first implementation manner of the second aspect, in the second implementation manner, the acquisition unit is specifically configured to acquire the life cycle attribute information of the business application in the following manner:
调用业务资源请求接口携带业务应用生命周期属性信息功能;Call the service resource request interface to carry the service application life cycle attribute information function;
通过调用的业务资源请求接口携带业务应用生命周期属性信息功能,获取业务应用的生命周期属性信息。The service application lifecycle attribute information is obtained by calling the service resource request interface to carry the service application lifecycle attribute information function.
结合第二方面的任一种实现方式,在第三种实现方式中,所述预约单元,具体用于按如下方式基于所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源:With reference to any implementation manner of the second aspect, in a third implementation manner, the reservation unit is specifically configured to determine, based on the life cycle attribute information, a reservation that can optimize resource utilization within a subsequent predictable time in the following manner: resource:
在设定的部分资源集合中,基于所述生命周期属性信息,优先选择能够优化后继可预期时间内资源利用率的预约资源。Among the set partial resource sets, based on the life cycle attribute information, the reserved resources that can optimize the utilization rate of resources within a predictable subsequent time are preferentially selected.
第三方面,提供一种资源分配设备,包括通信接口、存储器和处理器,其中:In a third aspect, a resource allocation device is provided, including a communication interface, a memory, and a processor, wherein:
所述存储器,用于存储所述处理器执行的程序代码;The memory is used to store program codes executed by the processor;
所述处理器,用于调用所述存储器存储的程序代码,实现如下功能:The processor is configured to call the program code stored in the memory to realize the following functions:
通过通信接口获取业务应用的生命周期属性信息,所述生命周期属性信息反映业务应用预期占用资源的时间信息,并基于所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,为所述业务应用预约所述预约资源,在达到业务应用预期占用资源的起始时间时,将所述预约资源分配给所述业务应用。Obtain life cycle attribute information of business applications through a communication interface, the life cycle attribute information reflects the time information of the expected resources occupied by the business application, and based on the life cycle attribute information, determine the reserved resources that can optimize the resource utilization rate in the subsequent predictable time , reserving the reserved resource for the service application, and allocating the reserved resource to the service application when a start time at which the service application is expected to occupy the resource is reached.
结合第三方面,在第一种实现方式中,所述处理器,还用于:With reference to the third aspect, in the first implementation manner, the processor is further configured to:
在后继可预期时间内资源利用率满足进一步优化条件的前提下,在为所述业务应用预约所述预约资源之前,对已预约资源进行重预约。On the premise that the utilization rate of resources in a subsequent foreseeable time meets further optimization conditions, before reserving the reserved resources for the service application, re-reserve the reserved resources.
本发明实施例提供的资源分配方法、装置及设备,获取业务应用的生命周期属性信息,该生命周期属性信息中能够反映业务应用预期占用资源的时间信息,故可预先获知后继可预期时间内资源被占用的时间。然后基于获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,为业务应用预约所述预约资源,在达到业务应用预期占用资源的起始时间时,将所述预约资源分配给业务应用,能够使得基础设施管理系统中的资源利用率在可预期时间内得到优化,并保持优化状态。The resource allocation method, device, and equipment provided by the embodiments of the present invention obtain the life cycle attribute information of the business application, which can reflect the time information of the expected occupation of resources by the business application, so that the subsequent resources within the expected time can be known in advance time occupied. Then, based on the acquired life cycle attribute information, determine the reserved resources that can optimize the utilization rate of resources within the expected period of time, reserve the reserved resources for the business application, and when the start time of the expected occupation of resources by the business application is reached, the reserved resources Assigned to business applications, the resource utilization in the infrastructure management system can be optimized within a predictable time and maintain an optimized state.
附图说明Description of drawings
图1为现有技术中资源分配示意图;FIG. 1 is a schematic diagram of resource allocation in the prior art;
图2为本发明实施例可应用的系统架构图;FIG. 2 is a system architecture diagram applicable to an embodiment of the present invention;
图3为为本发明实施例提供的资源分配设备构成示意图;FIG. 3 is a schematic diagram of a resource allocation device provided by an embodiment of the present invention;
图4为本发明实施例提供的资源分配方法流程图;FIG. 4 is a flowchart of a resource allocation method provided by an embodiment of the present invention;
图5A为现有资源分配过程示意图;FIG. 5A is a schematic diagram of an existing resource allocation process;
图5B为本发明实施例提供的资源分配过程示意图;FIG. 5B is a schematic diagram of a resource allocation process provided by an embodiment of the present invention;
图6A为本发明实施例提供的资源分配装置构成示意图;FIG. 6A is a schematic structural diagram of a resource allocation device provided by an embodiment of the present invention;
图6B为本发明实施例提供的另一资源分配装置构成示意图。FIG. 6B is a schematic diagram of another resource allocation device provided by an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,并不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
图2所示为本发明实施例提供的资源分配方法可应用的系统架构示意图,如图2所示,基础设施管理系统的业务资源请求接口具有获取业务应用的业务资源请求功能,基础设施管理系统通过资源请求接口获取业务应用的业务资源请求,资源分配与管理模块基于获取的业务资源请求,在资源池中选择资源为业务应用分配。本发明实施例中可扩展业务资源请求接口的功能,使其具有获取业务应用的生命周期属性信息的功能,获取业务应用的生命周期属性信息,生命周期属性信息反映业务应用预期占用资源的时间信息。资源分配与管理模块基于获取的生命周期属性信息进行资源分配,以达到在预期时间内对基础设施管理系统中的资源利用率进行优化的目的。Figure 2 is a schematic diagram of the applicable system architecture of the resource allocation method provided by the embodiment of the present invention. As shown in Figure 2, the service resource request interface of the infrastructure management system has the function of obtaining the service resource request of the service application, and the infrastructure management system The service resource request of the service application is obtained through the resource request interface, and the resource allocation and management module selects resources from the resource pool to allocate to the service application based on the obtained service resource request. In the embodiment of the present invention, the function of the service resource request interface can be extended, so that it has the function of obtaining the life cycle attribute information of the business application, and obtains the life cycle attribute information of the business application, and the life cycle attribute information reflects the time information that the service application is expected to occupy resources . The resource allocation and management module allocates resources based on the obtained life cycle attribute information, so as to achieve the purpose of optimizing the resource utilization rate in the infrastructure management system within the expected time.
需要说明的是,本发明实施例中提供的资源分配方法并不局限于图2所示的系统架构图,例如本发明实施例中还可应用于资源分配功能与资源管理功能通过两个单独的模块实现。It should be noted that the resource allocation method provided in the embodiment of the present invention is not limited to the system architecture diagram shown in FIG. module implementation.
本发明实施例提供一种资源分配设备300,如图3所示该资源分配设备300包括通信接口301、存储器302和处理器303。当然根据实际情况,本发明实施例中提供的资源分配设备300可能还包括通信总线,本发明实施例不做限定。An embodiment of the present invention provides a resource allocation device 300 . As shown in FIG. 3 , the resource allocation device 300 includes a communication interface 301 , a memory 302 and a processor 303 . Of course, according to actual conditions, the resource allocation device 300 provided in the embodiment of the present invention may further include a communication bus, which is not limited in the embodiment of the present invention.
本发明实施例中通信接口301,使用诸如收发器一类的装置,与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。In the embodiment of the present invention, the communication interface 301 uses a device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (Wireless Local Area Networks, WLAN), etc.
本发明实施例中存储器302,可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。The memory 302 in the embodiment of the present invention may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or a memory that can store Other types of dynamic storage devices for information and instructions can also be Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or Other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disc storage medium or other magnetic storage device, or can be used to carry or store desired information in the form of instructions or data structures program code and any other medium that can be accessed by a computer, but is not limited to this.
本发明实施例中处理器303,可以是一个通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本发明方案程序执行的集成电路。Processor 303 in the embodiment of the present invention can be a general-purpose central processing unit (CPU), a microprocessor, a specific application integrated circuit (application-specific integrated circuit, ASIC), or one or more programs for controlling the present invention implementation of the integrated circuit.
本发明实施例中存储器302,用于存储处理器303执行的程序代码。In the embodiment of the present invention, the memory 302 is used to store program codes executed by the processor 303 .
处理器303,用于调用存储器302存储的程序代码,实现如下功能:The processor 303 is used to call the program code stored in the memory 302 to realize the following functions:
通过通信接口301获取业务应用的生命周期属性信息,该生命周期属性信息反映业务应用预期占用资源的时间信息。The life cycle attribute information of the service application is acquired through the communication interface 301, and the life cycle attribute information reflects the time information of the resource that the service application is expected to occupy.
基于获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,并为业务应用预约该确定的预约资源;在达到业务应用预期占用资源的起始时间时,将确定的预约资源分配给业务应用。Based on the obtained life cycle attribute information, determine the reserved resources that can optimize the resource utilization rate in the subsequent predictable time, and reserve the determined reserved resources for the business application; when the start time of the expected resource occupation of the business application is reached, the determined reserved resources Resources are allocated to business applications.
在一种实现方式中,本发明实施例中处理器303还用于:In an implementation manner, the processor 303 in this embodiment of the present invention is further configured to:
在后继可预期时间内资源利用率满足进一步优化条件的前提下,在为所述业务应用预约所述预约资源之前,对已预约资源进行重预约;其中,进一步优化条件是指可以对后继可预期时间内的资源分配进行调优,例如可以使整体资源利用率最高。On the premise that the utilization rate of resources within the subsequent predictable time satisfies further optimization conditions, before reserving the reserved resources for the business application, re-reserve the reserved resources; wherein, the further optimization condition means that the subsequent predictable Optimize the resource allocation within a certain time, for example, to maximize the overall resource utilization.
具体的,本发明实施例中通信接口301可以是业务资源请求接口,该业务资源请求接口具有携带业务应用生命周期属性信息的扩展功能,处理器303可调用业务资源请求接口携带业务应用生命周期属性信息功能;通过调用的业务资源请求接口携带业务应用生命周期属性信息功能,获取业务应用的生命周期属性信息。Specifically, in the embodiment of the present invention, the communication interface 301 may be a service resource request interface, and the service resource request interface has an extended function of carrying service application life cycle attribute information, and the processor 303 may call the service resource request interface to carry the service application life cycle attribute Information function: obtain the life cycle attribute information of the business application by calling the service resource request interface to carry the service application life cycle attribute information function.
具体的,本发明实施例中处理器303可采用如下方式基于所述生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源:Specifically, in the embodiment of the present invention, the processor 303 can determine the reserved resource that can optimize the resource utilization rate in the subsequent expected time based on the life cycle attribute information in the following manner:
A:确定设定资源集合中已启用基础设施资源实体。A: Make sure that the infrastructure resource entity is enabled in the set resource collection.
本发明实施例中设定资源集合可以是基础设施管理系统中的全部资源,也可以是基础设施管理系统中的部分资源。The set resource set in the embodiment of the present invention may be all resources in the infrastructure management system, or may be some resources in the infrastructure management system.
本发明实施例中优选在基础设施管理系统中设定部分资源,进行基于生命周期属性信息进行资源分配,以使基础设施管理系统对外可同时支持原有分配机制(即不考虑资源占用的生命周期),以及基于生命周期信息进行资源分配的机制。并且本发明实施例中设定部分资源进行基于生命周期信息进行资源分配,可避免原有资源分配机制的不确定性对基于生命周期属性信息进行资源分配的影响。In the embodiment of the present invention, it is preferable to set some resources in the infrastructure management system, and perform resource allocation based on life cycle attribute information, so that the infrastructure management system can simultaneously support the original allocation mechanism externally (that is, the life cycle of resource occupation is not considered). ), and a mechanism for resource allocation based on lifecycle information. Moreover, in the embodiment of the present invention, some resources are set to perform resource allocation based on life cycle information, which can avoid the influence of uncertainty of the original resource allocation mechanism on resource allocation based on life cycle attribute information.
B:在设定的部分资源集合中,基于生命周期属性信息,优先选择能够优化后继可预期时间内资源利用率的预约资源。B: In the set part of the resource set, based on the life cycle attribute information, preferentially select the reserved resources that can optimize the resource utilization rate within the predictable subsequent time.
本发明实施例中,例如可以选择在后继可预期时间内资源被占用时间与生命周期属性信息中预期占用资源时间相近、且未分配资源满足业务应用所需资源条件的已启用基础设施资源实体上的资源,作为预约资源。In this embodiment of the present invention, for example, it is possible to select an enabled infrastructure resource entity whose resource occupation time is close to the expected resource occupation time in the life cycle attribute information in the subsequent predictable time period, and whose unallocated resources meet the resource conditions required by the business application. resources, as reserved resources.
本发明实施例上述提供的资源分配设备300,可以是基础设施管理系统,也可以是基础设施管理系统中的部件,本发明实施例不做限定。The resource allocation device 300 provided above in the embodiment of the present invention may be an infrastructure management system or a component in the infrastructure management system, which is not limited in the embodiment of the present invention.
本发明实施例提供的资源分配设备300,获取业务应用的生命周期属性信息,该生命周期属性信息中能够反映业务应用预期占用资源的时间信息,故可预先获知后继可预期时间内资源被占用的时间。然后基于获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,为业务应用预约所述预约资源,在达到业务应用预期占用资源的起始时间时,将所述预约资源分配给业务应用,能够使得基础设施管理系统中的资源利用率在可预期时间内得到优化,并保持优化状态。The resource allocation device 300 provided by the embodiment of the present invention acquires the life cycle attribute information of the business application, which can reflect the time information of the expected occupation of resources by the business application, so it can be known in advance that the resources will be occupied within the expected time in the future time. Then, based on the acquired life cycle attribute information, determine the reserved resources that can optimize the utilization rate of resources within the expected period of time, reserve the reserved resources for the business application, and when the start time of the expected occupation of resources by the business application is reached, the reserved resources Assigned to business applications, the resource utilization in the infrastructure management system can be optimized within a predictable time and maintain an optimized state.
本发明实施例以下将对资源分配方法的实现方法进行详细说明。In the embodiment of the present invention, the implementation method of the resource allocation method will be described in detail below.
图4所示为本发明实施例提供的资源分配方法实现流程图,图4所示方法的执行主体例如可以是基础设施管理系统,也可以是基础设施管理系统的部件,本发明实施例不做限定。如图4所示,该方法包括:Figure 4 is a flow chart showing the implementation of the resource allocation method provided by the embodiment of the present invention. The execution subject of the method shown in Figure 4 may be, for example, an infrastructure management system, or a component of the infrastructure management system, and the embodiment of the present invention does not limited. As shown in Figure 4, the method includes:
S101:获取业务应用的生命周期属性信息。S101: Obtain lifecycle attribute information of a service application.
本发明实施例中生命周期属性信息反映业务应用预期占用资源的时间信息。In the embodiment of the present invention, the life cycle attribute information reflects the time information that the service application is expected to occupy resources.
本发明实施例中可扩展资源请求接口具有携带业务应用生命周期属性信息的功能,通过调用业务资源请求接口携带业务应用生命周期属性信息功能,获取业务应用的生命周期属性信息。In the embodiment of the present invention, the scalable resource request interface has the function of carrying the service application life cycle attribute information, and obtains the service application life cycle attribute information by calling the service resource request interface to carry the service application life cycle attribute information function.
本发明实施例中生命周期属性信息例如可采用如下表1所示的结构进行表示,The life cycle attribute information in the embodiment of the present invention can be represented by the structure shown in Table 1 below, for example,
表1Table 1
需要说明的是,本发明实施例中生命周期属性信息并不限于表1所列举的若干例子,还应包括任何可用于描述资源预期被占用的时间的方式。例如还可以是一个时间列表用于列出预期的各个不规则(非重复性周期)的使用时间。It should be noted that the lifecycle attribute information in the embodiment of the present invention is not limited to the examples listed in Table 1, but should also include any manner that can be used to describe the time when the resource is expected to be occupied. For example, a time list may also be used to list expected irregular (non-repetitive cycle) usage times.
S102:基于生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,并为业务应用预约该确定的预约资源。S102: Based on the life cycle attribute information, determine a reserved resource that can optimize resource utilization within a predictable subsequent time, and reserve the determined reserved resource for the business application.
本发明实施例中为业务应用预约确定的预约资源,该被预约的预约资源没有真正被分配并占用,但是该预约资源在被预约的时间内,不能再被预约或分配给除当前被预约的业务应用以外的其它业务应用。In the embodiment of the present invention, the reserved resources are reserved for business applications. The reserved reserved resources are not actually allocated and occupied, but the reserved resources can no longer be reserved or allocated to other than the currently reserved resources within the reserved time. Business applications other than business applications.
本发明实施例中基于生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源过程中,可采用以减少资源碎片、启用的基础设施资源实体数目最少、长时间处于优化状态中的至少一个为优化目标,进行预约资源的确定。In the embodiment of the present invention, based on the life cycle attribute information to determine the resource reservation process that can optimize the resource utilization rate within the expected period of time, it can be used to reduce resource fragmentation, enable the minimum number of infrastructure resource entities, and stay in the optimized state for a long time At least one of the optimization objectives is used to determine reserved resources.
例如,本发明实施例中基于生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源的过程,可采用如下方式:For example, in the embodiment of the present invention, based on the life cycle attribute information, the process of determining the reservation resource that can optimize the resource utilization rate within the expected subsequent time may be as follows:
确定设定资源集合中已启用基础设施资源实体,并确定已启用基础设施资源实体上已分配资源和已预约资源预期占用资源的时间。Determine the enabled infrastructure resource entities in the set resource collection, and determine the expected resource occupancy time of the allocated resources and reserved resources on the enabled infrastructure resource entities.
优先选择在后继可预期时间内资源被占用时间与所述生命周期属性信息中预期占用资源时间相近、且未分配资源满足业务应用所需资源条件的已启用基础设施资源实体上的资源,作为预约资源。Preferentially select the resources on the enabled infrastructure resource entity whose resource occupation time is close to the expected resource occupation time in the life cycle attribute information in the subsequent predictable time, and whose unallocated resources meet the resource conditions required by the business application, as the reservation resource.
S103:在达到业务应用预期占用资源的起始时间时,将预约资源分配给业务应用。S103: Allocate reserved resources to the service application when the start time of resource occupation expected by the service application is reached.
本发明实施例提供的资源分配方法,获取业务应用的生命周期属性信息,该生命周期属性信息中能够反映业务应用预期占用资源的时间信息,故可预先获知后继可预期时间内资源被占用的时间。然后基于获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,为业务应用预约所述预约资源,在达到业务应用预期占用资源的起始时间时,将所述预约资源分配给业务应用,能够使得基础设施管理系统中的资源利用率在可预期时间内得到优化,并保持优化状态。The resource allocation method provided by the embodiment of the present invention obtains the life cycle attribute information of the business application, and the life cycle attribute information can reflect the time information that the business application is expected to occupy the resources, so the resource occupation time in the subsequent predictable time can be known in advance . Then, based on the acquired life cycle attribute information, determine the reserved resources that can optimize the utilization rate of resources within the expected period of time, reserve the reserved resources for the business application, and when the start time of the expected occupation of resources by the business application is reached, the reserved resources Assigned to business applications, the resource utilization in the infrastructure management system can be optimized within a predictable time and maintain an optimized state.
本发明实施例中基于业务应用的生命周期属性信息为业务应用进行资源预约的预约资源,未被真正分配并占用,故本发明实施例中通过对预约信息的更改,即可实现将另一基础设施资源实体的资源预约给业务应用,而不涉及任何资源迁移技术,技术实现简单易行。In the embodiment of the present invention, based on the life cycle attribute information of the business application, the reserved resources for resource reservation for the business application are not actually allocated and occupied. Therefore, in the embodiment of the present invention, by changing the reservation information, another basic The resources of the facility resource entity are reserved for business applications without involving any resource migration technology, and the technical implementation is simple and easy.
可选的,本发明实施例中为了进一步达到基础设施管理系统中资源长时间内处于优化状态,即资源利用率满足进一步优化条件的前提下,可对已预约资源进行重预约,其中,进一步优化条件,例如可以是能够减少资源碎片、能够使启用的基础设施资源实体数目最少或者能够使基础设施管理系统中的基础设施资源实体能够在长时间内处于优化状态。Optionally, in the embodiment of the present invention, in order to further ensure that the resources in the infrastructure management system are in an optimized state for a long time, that is, on the premise that the resource utilization rate meets further optimization conditions, the reserved resources can be re-reserved, wherein the further optimization The condition may be, for example, that resource fragmentation can be reduced, the number of enabled infrastructure resource entities can be minimized, or the infrastructure resource entities in the infrastructure management system can be in an optimized state for a long time.
例如本发明实施例中可在当前基础设施资源实体上已预约资源在后继可预期时间内资源占用时间与当前业务应用预期占用资源的时间相近、且当前基础设施资源实体的未分配资源不满足当前业务应用所需资源的情况下,对当前基础设施资源实体上已预约资源进行重预约,将已预约的资源和当前应用所需的资源分配到同一基础设施资源实体上,优化资源利用率。For example, in the embodiment of the present invention, the resource occupancy time of the resources reserved on the current infrastructure resource entity can be expected to be close to the time when the current business application is expected to occupy resources, and the unallocated resources of the current infrastructure resource entity do not meet the current requirements. In the case of resources required by business applications, re-reserve the reserved resources on the current infrastructure resource entity, and allocate the reserved resources and the resources required by the current application to the same infrastructure resource entity to optimize resource utilization.
本发明实施例以下将结合实际应用对上述进行资源分配的过程进行详细说明。The embodiments of the present invention will hereinafter describe the above resource allocation process in detail in combination with practical applications.
本发明实施例中假设基础设施管理系统中的基础设施资源实体的资源规格相同,资源总量记为1S,3个基础设施资源实体对应的资源分别为Sn,n=1、2和3。业务应用申请的资源规格为0.25S、0.5S或0.75S三种(现实中资源规格是多维度的)。假设基础设施管理系统需要依次处理5次资源请求rX(X=A、B、C、D、E),其请求的资源规格和时序关系如图5A和图5B所示,其中相邻两个时刻间的间隔均为时间T,且rA和rD对应的资源在使用一段时间后被释放,rB、rC和rE则继续长期占用。In the embodiment of the present invention, it is assumed that the resource specifications of the infrastructure resource entities in the infrastructure management system are the same, the total amount of resources is denoted as 1S, and the resources corresponding to the three infrastructure resource entities are respectively Sn, where n=1, 2 and 3. The resource specifications for business application applications are 0.25S, 0.5S or 0.75S (resource specifications are multi-dimensional in reality). Assuming that the infrastructure management system needs to process 5 resource requests rX in sequence (X=A, B, C, D, E), the requested resource specifications and timing relationships are shown in Figure 5A and Figure 5B, where two adjacent time points The interval between is time T, and the resources corresponding to rA and rD are released after a period of use, while rB, rC and rE continue to be occupied for a long time.
图5A为按照不考虑生命周期属性信息的原有分配机制进行资源分配的示意图,图5B为按照本发明实施例提供的基于生命周期属性信息进行资源分配的示意图。FIG. 5A is a schematic diagram of resource allocation according to the original allocation mechanism that does not consider life cycle attribute information, and FIG. 5B is a schematic diagram of resource allocation based on life cycle attribute information according to an embodiment of the present invention.
图5A中,在无法预计后继可预期时间内的资源被占用时间的情况下,按照优先从已有部分资源被分配的基础设施资源实体上分配资源,也即尽量启用新的基础设施资源实体,以及在满足上述条件下,优先选择剩余资源最少、已被分配业务资源最少的基础设施资源实体进行资源分配。这点的作用是避免资源“碎片化”,提高资源利用率。按照资源利用率=实际分配的资源总量/已启用基础设施资源实体的资源总量的确定方式,简单计算可得到t1~t6期间总体资源利用率只有约56%。在t6之后如果分配情况没有改变,则利用率将长期维持在约33%的低水平。In Fig. 5A, when it is impossible to predict the resource occupation time in the subsequent predictable time, resources are allocated from the infrastructure resource entities that have been allocated some resources according to the priority, that is, new infrastructure resource entities are used as much as possible, And when the above conditions are met, the infrastructure resource entities with the least remaining resources and the least allocated business resources are preferentially selected for resource allocation. The function of this point is to avoid "fragmentation" of resources and improve resource utilization. According to the determination method of resource utilization ratio=actually allocated total resources/the total resources of enabled infrastructure resource entities, a simple calculation can obtain that the overall resource utilization ratio during t1-t6 is only about 56%. After t6 if the distribution situation does not change, the utilization rate will remain at a low level of about 33% for a long time.
图5B中,按照本发明实施例提供的基于生命周期属性信息进行资源分配的过程如下:In FIG. 5B, the process of resource allocation based on life cycle attribute information provided by the embodiment of the present invention is as follows:
A:在t1之前,rA和rC提前进行了资源预约,虽然两者的预期占用资源的时间差异很大,但当时并没有其它资源分布可进行优化调配,所以它们都被预约到s1(资源未真正分配占用,仍处于下电状态)。A: Before t1, rA and rC made resource reservations in advance. Although the expected resource occupation time of the two was very different, there were no other resource distributions for optimal allocation at that time, so they were all reserved to s1 (resources were not allocated). The real allocation is occupied, and it is still in the power-off state).
B:t1时,rA按照原来的预约进行了资源的分配,s1上电。而在处理rB时,系统分析到rB与rC在后继长时间的预期占用资源的时间基本相同,分配到一起能带来长期的资源优化效果。因此,启动s2分配rB资源,并将rC重预约到s2。B: At t1, rA allocates resources according to the original reservation, and s1 is powered on. When dealing with rB, the system analyzes that rB and rC are expected to occupy resources for a long time in the future, which is basically the same, and allocating them together can bring long-term resource optimization effects. Therefore, start s2 to allocate rB resources, and reschedule rC to s2.
C:t4时处理rE,在不考虑生命周期属性信息的情况下,按照通用策略应该用s3分配。但由于rE和rB即rC在后继可预期时间内预期占用资源的时间基本相同(均长时间运行),所以对分配策略进行适当调整,指定由s2分配。C: rE is processed at t4, and s3 should be used for allocation according to the general strategy without considering the life cycle attribute information. However, since rE and rB, that is, rC, are expected to occupy resources in the subsequent predictable time, they are basically the same (both run for a long time), so the allocation strategy is adjusted appropriately and designated to be allocated by s2.
通过上述资源分配方式,按照前述资源利用率的计算方式,采用本发明方法的在该示例中的结果是,t1~t6时间内,资源利用率为67.5%(原来为56%);t6后的长时间运行的资源利用率为100%。Through the above-mentioned resource allocation method, according to the calculation method of the aforementioned resource utilization rate, the result of adopting the method of the present invention in this example is that, within the time t1~t6, the resource utilization rate is 67.5% (originally 56%); Long-running resource utilization is 100%.
本发明实施例提供的资源分配方法,获取业务应用的生命周期属性信息,该生命周期属性信息中能够反映业务应用预期占用资源的时间信息,故可预先获知后继可预期时间内资源被占用的时间。然后基于获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,为业务应用预约所述预约资源,在达到业务应用预期占用资源的起始时间时,将所述预约资源分配给业务应用,能够使得基础设施管理系统中的资源利用率在可预期时间内得到优化,并保持优化状态。进一步的,本发明实施例中还可在必要时执行简单的无风险的“重预约”调整,最终使总体资源的使用能在可预期的一段时间内保持优化状态,技术实现简单。The resource allocation method provided by the embodiment of the present invention obtains the life cycle attribute information of the business application, and the life cycle attribute information can reflect the time information that the business application is expected to occupy the resources, so the resource occupation time in the subsequent predictable time can be known in advance . Then, based on the acquired life cycle attribute information, determine the reserved resources that can optimize the utilization rate of resources within the expected period of time, reserve the reserved resources for the business application, and when the start time of the expected occupation of resources by the business application is reached, the reserved resources Assigned to business applications, the resource utilization in the infrastructure management system can be optimized within a predictable time and maintain an optimized state. Furthermore, in the embodiment of the present invention, simple risk-free "rebooking" adjustments can be performed when necessary, so that the use of overall resources can be kept in an optimized state for a predictable period of time, and the technical implementation is simple.
需要说明的是,本发明实施例中基础设施管理系统中的基础设施资源实体上的资源可以是基础设施管理系统所管理上层业务应用使用的资源或其组合,例如可以是网络资源(网络连接和通信带宽等)、存储资源、某类特殊处理能力(例如特殊硬件提供的数据加解密处理能力)等等。并且,资源分配的形式也是多样的,例如以计算资源为例(其它类型资源类似),所分配的资源形式也不只限于使用虚拟化技术的虚拟机,还可包括任何可将物理资源的部分或整体提供给申请者使用的形式,例如Linux内核提供的CGroups技术即能将一个OS管理下的资源(一般为一个物理服务器)划分为多个含有一定资源的实体。进一步的,基础设施资源实体也是多样的,以计算资源为例(其它类型资源类似),其物理资源实体所指的范围也不一定为一台物理服务器,而可以是任何能提供一定量计算资源的物理或逻辑集合。例如可以是一个机框内若干刀片服务器、一个机房内的服务器,或者被逻辑划分到一个集群内的服务器等等。It should be noted that the resources on the infrastructure resource entity in the infrastructure management system in the embodiment of the present invention may be the resources used by the upper-layer business applications managed by the infrastructure management system or a combination thereof, such as network resources (network connections and Communication bandwidth, etc.), storage resources, certain types of special processing capabilities (such as data encryption and decryption processing capabilities provided by special hardware), etc. Moreover, there are various forms of resource allocation. For example, computing resources are taken as an example (other types of resources are similar), and the form of allocated resources is not limited to virtual machines using virtualization technology, but can also include any part of physical resources or The form provided to applicants as a whole, such as the CGroups technology provided by the Linux kernel, can divide a resource under the management of an OS (usually a physical server) into multiple entities containing certain resources. Furthermore, infrastructure resource entities are also diverse. Taking computing resources as an example (similar to other types of resources), the scope of the physical resource entity does not necessarily refer to a physical server, but can be any server that can provide a certain amount of computing resources. A physical or logical collection of . For example, it may be several blade servers in a chassis, servers in a computer room, or servers logically divided into a cluster, and so on.
进一步的,基于本发明实施例上述提供的资源分配方法,可根据实际情况将基于生命周期属性信息进行资源分配的方式灵活运用于目前的基础设施Furthermore, based on the resource allocation method provided above in the embodiment of the present invention, the method of resource allocation based on life cycle attribute information can be flexibly applied to the current infrastructure according to the actual situation
管理系统中,例如:management system, such as:
A:生命周期属性信息作为必选属性A: Life cycle attribute information is a mandatory attribute
例如在一些企业或部门内部的基础设施管理系统,为了最大程度地获得本发明方法的效果,可能会要求其用户(如部门内人员)必须在提出资源申请时提供其对应的预计的生命周期信息。For example, in some enterprises or internal infrastructure management systems of departments, in order to maximize the effect of the method of the present invention, its users (such as personnel in the department) may be required to provide their corresponding estimated life cycle information when submitting a resource application .
还例如在一些企业或部门内部的基础设施管理系统,为了最大程度地获得本发明方法的效果,会严格按照其用户(如部门内人员)在提出资源申请时指定的命周期来分配资源,即在所预先指定的生命周期范围外的时间,用户不能访问使用该资源。当然采用此种方式需要将该约束条件通过使用例如规范等方式提前知会用户。For example, in some enterprises or internal infrastructure management systems of departments, in order to obtain the effect of the method of the present invention to the greatest extent, resources will be allocated strictly according to the life cycle specified by its users (such as personnel in the department) when submitting resource applications, that is, Users cannot access and use the resource at times outside the pre-specified lifetime range. Of course, this way needs to be notified to the user in advance of the constraint condition by means such as a specification.
B:生命周期属性信息作为可选属性B: Life cycle attribute information as an optional attribute
本发明实施例提供的基于生命周期属性信息进行资源分配的方式可以只应用于基础设施管理系统中的设定部分基础设施资源管理实体,而在其余部分应用原有的资源分配方法。一个典型的例子可以是,基础设施管理系统对外可同时支持资源请求携带或不携带生命周期信息的情况,但在内部将两类请求区分处理,对携带了生命周期信息的请求使用本发明的方法进行资源分配和优化,并为其指定一个专用的资源集合;其余请求继续使用原有分配机制(即不考虑资源占用的生命周期),并指定另外一个资源集合承担资源分配。将两者区分处理的好处是,前者的资源分配均基于资源生命周期进行分析和优化,避免了后者(不考虑资源占用的生命周期)的资源分配和使用的不确定性对前者效果的影响。The resource allocation method based on the life cycle attribute information provided by the embodiment of the present invention can only be applied to some infrastructure resource management entities in the infrastructure management system, and the original resource allocation method can be applied to the rest. A typical example may be that the infrastructure management system can support resource requests with or without life cycle information externally, but internally distinguishes the two types of requests, and uses the method of the present invention for requests that carry life cycle information Perform resource allocation and optimization, and specify a dedicated resource set for it; the remaining requests continue to use the original allocation mechanism (that is, regardless of the life cycle of resource occupation), and specify another resource set to undertake resource allocation. The advantage of distinguishing between the two is that the resource allocation of the former is analyzed and optimized based on the resource life cycle, which avoids the influence of the uncertainty of resource allocation and use of the latter (regardless of the life cycle of resource occupation) on the effect of the former. .
基于上述实施例提供的资源分配方法,本发明实施例还提供一种资源分配装置600,如图6A所示,该资源分配装置600包括获取单元601、预约单元602和分配单元603,其中:Based on the resource allocation method provided by the above embodiments, the embodiment of the present invention also provides a resource allocation device 600, as shown in FIG. 6A, the resource allocation device 600 includes an acquisition unit 601, a reservation unit 602, and an allocation unit 603, wherein:
获取单元601,用于获取业务应用的生命周期属性信息,其中,生命周期属性信息反映业务应用预期占用资源的时间信息。The acquiring unit 601 is configured to acquire lifecycle attribute information of a service application, wherein the lifecycle attribute information reflects time information of a resource that is expected to be occupied by the service application.
预约单元602,用于基于获取单元601获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,并为业务应用预约预约资源。The reservation unit 602 is configured to determine, based on the life cycle attribute information obtained by the obtaining unit 601 , a reserved resource that can optimize resource utilization within a predictable subsequent time, and reserve the reserved resource for the business application.
分配单元603,用于在达到业务应用预期占用资源的起始时间时,将预约单元602预约的预约资源分配给业务应用。The allocating unit 603 is configured to allocate the reserved resource reserved by the reservation unit 602 to the service application when the start time at which the service application is expected to occupy the resource is reached.
在第一种实现方式中,资源分配装置600还包括重预约单元604,如图6B所示,其中:In the first implementation manner, the resource allocation apparatus 600 further includes a re-reservation unit 604, as shown in FIG. 6B, wherein:
重预约单元604,用于在后继可预期时间内资源利用率满足进一步优化条件的前提下,在预约单元602为业务应用预约预约资源之前,对已预约资源进行重预约。The re-reservation unit 604 is configured to re-reserve reserved resources before the reservation unit 602 reserves resources for business applications on the premise that the resource utilization rate meets further optimization conditions within a predictable subsequent time.
在第二种实现方式中,获取单元601,具体用于按如下方式获取业务应用的生命周期属性信息:In the second implementation manner, the obtaining unit 601 is specifically configured to obtain the lifecycle attribute information of the service application in the following manner:
调用业务资源请求接口携带业务应用生命周期属性信息功能。Call the service resource request interface to carry the service application lifecycle attribute information function.
通过调用的业务资源请求接口携带业务应用生命周期属性信息功能,获取业务应用的生命周期属性信息。The service application lifecycle attribute information is obtained by calling the service resource request interface to carry the service application lifecycle attribute information function.
在第三种实现方式中,预约单元602,具体用于按如下方式基于生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源:In the third implementation manner, the reservation unit 602 is specifically configured to determine, based on the lifecycle attribute information, reserved resources that can optimize resource utilization within the expected subsequent time in the following manner:
在设定的部分资源集合中,基于生命周期属性信息,优先选择能够优化后继可预期时间内资源利用率的预约资源。In the set part of the resource set, based on the life cycle attribute information, the reserved resources that can optimize the resource utilization rate in the subsequent predictable time are preferentially selected.
本发明实施例上述提供的资源分配装置600,可以是基础设施管理系统,也可以是基础设施管理系统中的部件,本发明实施例不做限定。The resource allocation apparatus 600 provided above in the embodiment of the present invention may be an infrastructure management system, or may be a component in the infrastructure management system, which is not limited in the embodiment of the present invention.
本发明实施例提供的资源分配装置600,获取业务应用的生命周期属性信息,该生命周期属性信息中能够反映业务应用预期占用资源的时间信息,故可预先获知后继可预期时间内资源被占用的时间。然后基于获取的生命周期属性信息确定能够优化后继可预期时间内资源利用率的预约资源,为业务应用预约所述预约资源,在达到业务应用预期占用资源的起始时间时,将所述预约资源分配给业务应用,能够使得基础设施管理系统中的资源利用率在可预期时间内得到优化,并保持优化状态。进一步的,本发明实施例中还可在必要时执行简单的无风险的“重预约”调整,最终使总体资源的使用能在可预期的一段时间内保持优化状态,技术实现简单。The resource allocation device 600 provided by the embodiment of the present invention acquires the life cycle attribute information of the business application, which can reflect the time information of the expected occupation of resources by the business application, so it can be known in advance that the resource will be occupied within the expected time in the future time. Then, based on the acquired life cycle attribute information, determine the reserved resources that can optimize the utilization rate of resources within the expected period of time, reserve the reserved resources for the business application, and when the start time of the expected occupation of resources by the business application is reached, the reserved resources Assigned to business applications, the resource utilization in the infrastructure management system can be optimized within a predictable time and maintain an optimized state. Furthermore, in the embodiment of the present invention, simple risk-free "rebooking" adjustments can be performed when necessary, so that the use of overall resources can be kept in an optimized state for a predictable period of time, and the technical implementation is simple.
需要说明的是,本发明实施例提供的资源分配装置600,可用于实现图4、图5B的资源分配方法,故本发明实施例中对资源分配装置600描述不够详尽的地方,可参考相关方式实施例的描述,在此不再赘述。It should be noted that the resource allocation device 600 provided in the embodiment of the present invention can be used to implement the resource allocation methods shown in Fig. 4 and Fig. 5B. Therefore, where the description of the resource allocation device 600 in the embodiment of the present invention is not detailed enough, you can refer to related methods The description of the embodiment will not be repeated here.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.
Claims (10)
- A kind of 1. resource allocation methods, it is characterised in that including:The lifetime property information of service application is obtained, service application described in the lifetime property message reflection is expected to account for With the temporal information of resource;It is determined that having enabled infrastructure resources entity in default resource collection, and infrastructure resources entity is enabled described in determination On distributed resource and reserve resource is expected to take the time of resource, select within the follow-up expectable time described to have enabled base Resource has been distributed on Infrastructure resource entity and reserve resource is expected to take the time of resource and lifetime property letter It is close and described enabled the physically unallocated resource of infrastructure resources that service application described in breath is expected to take resource time Meet the resource of resources supplIes needed for the service application, the reservation is preengage as reserve resource, and for the service application Resource, wherein, the time is close, refers to described enable infrastructure resources and physically distributed resource and reserve resource It is expected that the time for taking resource is expected the difference of occupancy resource time with service application described in the lifetime property information, Less than or equal to about definite value;When reaching the initial time of the service application expection occupancy resource, the reserve resource is distributed into the business should With.
- 2. the method as described in claim 1, it is characterised in that before preengaging the reserve resource for the service application, institute Stating method also includes:On the premise of resource utilization meets further optimal conditions within the follow-up expectable time, weight is carried out to reserve resource Reservation.
- 3. method as claimed in claim 1 or 2, it is characterised in that the lifetime property information for obtaining service application, Including:Service resources request interface is called to carry service application lifetime property informational function;Service application lifetime property informational function is carried by the service resources request interface of calling, obtains service application Lifetime property information.
- 4. the method as described in claim 1, it is characterised in that after being determined to optimization based on the lifetime property information After the reserve resource of resource utilization in the expectable time, including:In the part resource set of setting, based on the lifetime property information, prioritizing selection can optimize it is follow-up can be pre- The reserve resource of resource utilization in time phase.
- A kind of 5. resource allocation device, it is characterised in that including:Acquiring unit, for obtaining the lifetime property information of service application, described in the lifetime property message reflection Service application is expected to take the temporal information of resource;Appointment unit, for determining to have enabled infrastructure resources entity in default resource collection, and base is enabled described in determination Resource has been distributed on Infrastructure resource entity and reserve resource is expected to take the time of resource;Selection is in the follow-up expectable time It is interior it is described enabled infrastructure resources physically distributed resource and reserve resource be expected time of occupancy resource with it is described Acquiring unit obtain the lifetime property information described in service application be expected take resource time it is close and it is described The resource that the physically unallocated resource of infrastructure resources meets resources supplIes needed for the service application is enabled, is provided as reservation Source, and the reserve resource is preengage for the service application, wherein, the time is close, refers to described enable infrastructure Resource has been distributed on resource entity and reserve resource is expected to take the time of resource and institute in the lifetime property information State service application to be expected to take the difference of resource time, less than or equal to about definite value;Allocation unit, it is for when reaching the service application and being expected to take the initial time of resource, the appointment unit is pre- Reserve resource about distributes to the service application.
- 6. device as claimed in claim 5, it is characterised in that described device also include reappoint unit, for it is follow-up can It is that the service application is pre- in the appointment unit on the premise of resource utilization meets further optimal conditions in expeced time Before about described reserve resource, reserve resource is reappointed.
- 7. the device as described in claim 5 or 6, it is characterised in that the acquiring unit, specifically for obtaining as follows The lifetime property information of service application:Service resources request interface is called to carry service application lifetime property informational function;Service application lifetime property informational function is carried by the service resources request interface of calling, obtains service application Lifetime property information.
- 8. device as claimed in claim 5, it is characterised in that the appointment unit, specifically for being based on institute as follows State the reserve resource that lifetime property information is determined to optimize resource utilization in the follow-up expectable time:In the part resource set of setting, based on the lifetime property information, prioritizing selection can optimize it is follow-up can be pre- The reserve resource of resource utilization in time phase.
- A kind of 9. resource allocation apparatus, it is characterised in that including communication interface, memory and processor, wherein:The memory, for storing the program code of the computing device;The processor, for calling the program code of the memory storage, implement function such as:The lifetime property information of service application is obtained by communication interface, the lifetime property message reflection business should With the expected temporal information for taking resource, infrastructure resources entity has been enabled in resource collection it is determined that presetting, and described in determination Enabled infrastructure resources physically distributed resource and reserve resource be expected take resource time, select it is follow-up can In expeced time it is described enabled infrastructure resources physically distributed resource and reserve resource be expected occupancy resource when Between be expected to take that resource time is close and the basis that enabled is set with service application described in the lifetime property information The resource that unallocated resource on resource entity meets resources supplIes needed for the service application is applied, as reserve resource, and is institute State service application and preengage the reserve resource, wherein, the time is close, refers to described enable infrastructure resources physically Resource is distributed and reserve resource is expected to take the time of resource and service application described in the lifetime property information It is expected that take the difference of resource time, less than or equal to about definite value, when reaching service application and being expected to take the initial time of resource, The reserve resource is distributed into the service application.
- 10. equipment as claimed in claim 9, it is characterised in that the processor, be additionally operable to:On the premise of resource utilization meets further optimal conditions within the follow-up expectable time, for the service application it is pre- Before about described reserve resource, reserve resource is reappointed.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410476386.3A CN104301257B (en) | 2014-09-17 | 2014-09-17 | A kind of resource allocation methods, device and equipment |
PCT/CN2015/089050 WO2016041446A1 (en) | 2014-09-17 | 2015-09-07 | Resource allocation method, apparatus and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410476386.3A CN104301257B (en) | 2014-09-17 | 2014-09-17 | A kind of resource allocation methods, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104301257A CN104301257A (en) | 2015-01-21 |
CN104301257B true CN104301257B (en) | 2018-01-02 |
Family
ID=52320829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410476386.3A Expired - Fee Related CN104301257B (en) | 2014-09-17 | 2014-09-17 | A kind of resource allocation methods, device and equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104301257B (en) |
WO (1) | WO2016041446A1 (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104301257B (en) * | 2014-09-17 | 2018-01-02 | 华为技术有限公司 | A kind of resource allocation methods, device and equipment |
CN105357251A (en) * | 2015-09-24 | 2016-02-24 | 浪潮集团有限公司 | Resource pool management system and management method |
CN105354090B (en) * | 2015-10-16 | 2019-04-16 | 安一恒通(北京)科技有限公司 | Management method and device of virtual equipment |
CN106911731B (en) * | 2015-12-22 | 2020-05-19 | 阿里巴巴集团控股有限公司 | Scheduling method and device for internet information resources |
CN108616553B (en) * | 2016-12-13 | 2020-08-04 | 中国移动通信有限公司研究院 | Method and device for resource scheduling of cloud computing resource pool |
CN109903023B (en) * | 2018-11-22 | 2023-07-11 | 创新先进技术有限公司 | Resource allocation method and system |
CN114764371A (en) * | 2021-01-13 | 2022-07-19 | 华为技术有限公司 | Task scheduling method and management system |
CN113011845A (en) * | 2021-03-18 | 2021-06-22 | 中国建设银行股份有限公司 | Equipment full life cycle management system |
CN113886069B (en) * | 2021-09-08 | 2025-04-18 | 北京奇艺世纪科技有限公司 | Resource allocation method, device, electronic device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101035013A (en) * | 2006-03-08 | 2007-09-12 | 中兴通讯股份有限公司 | Resource receiving control method and system |
CN103713955A (en) * | 2013-12-31 | 2014-04-09 | 曙光云计算技术有限公司 | Method and device for managing resource dynamic allocation |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040244001A1 (en) * | 2003-05-30 | 2004-12-02 | Haller John Henry | Methods of allocating use of multiple resources in a system |
KR101567829B1 (en) * | 2009-06-09 | 2015-11-20 | 엘지전자 주식회사 | Method of data transmission and data reception and devices in wireless networks |
CN102083208B (en) * | 2009-11-30 | 2013-09-25 | 普天信息技术研究院有限公司 | Resource allocation method and device |
CN104301257B (en) * | 2014-09-17 | 2018-01-02 | 华为技术有限公司 | A kind of resource allocation methods, device and equipment |
-
2014
- 2014-09-17 CN CN201410476386.3A patent/CN104301257B/en not_active Expired - Fee Related
-
2015
- 2015-09-07 WO PCT/CN2015/089050 patent/WO2016041446A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101035013A (en) * | 2006-03-08 | 2007-09-12 | 中兴通讯股份有限公司 | Resource receiving control method and system |
CN103713955A (en) * | 2013-12-31 | 2014-04-09 | 曙光云计算技术有限公司 | Method and device for managing resource dynamic allocation |
Also Published As
Publication number | Publication date |
---|---|
WO2016041446A1 (en) | 2016-03-24 |
CN104301257A (en) | 2015-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104301257B (en) | A kind of resource allocation methods, device and equipment | |
US12081454B2 (en) | Systems and methods for provision of a guaranteed batch | |
US8352611B2 (en) | Allocating computer resources in a cloud environment | |
US8756599B2 (en) | Task prioritization management in a virtualized environment | |
US10338970B2 (en) | Multi-platform scheduler for permanent and transient applications | |
CN104580524A (en) | Resource scaling method and cloud platform with same | |
EP3293632B1 (en) | Dynamically varying processing capacity entitlements | |
CN105159782A (en) | Cloud host based method and apparatus for allocating resources to orders | |
CN106326003B (en) | A kind of job scheduling and computational resource allocation method | |
WO2017088393A1 (en) | Bandwidth allocation method and system | |
CN106681835A (en) | Resource allocation method and resource manager | |
CN105718316A (en) | Job scheduling method and apparatus | |
CN108052384A (en) | A kind of task processing method, service platform and electronic equipment | |
CN105808341A (en) | Method, apparatus and system for scheduling resources | |
CN104537045A (en) | Service distribution method and device based on distributive system | |
CN114155026A (en) | A resource allocation method, device, server and storage medium | |
US10643193B2 (en) | Dynamic workload capping | |
US10310738B2 (en) | Avoid out of space outage in a thinly provisioned box | |
US10956228B2 (en) | Task management using a virtual node | |
US9213575B2 (en) | Methods and systems for energy management in a virtualized data center | |
WO2017133421A1 (en) | Method and device for sharing resources among multiple tenants | |
KR20160063430A (en) | Method for managing and assigning available resourse by reservation of virtual machine | |
JPWO2014115282A1 (en) | Computer system and computer resource allocation method | |
CN114880068A (en) | Management method, apparatus, device and storage medium for reserved resources | |
CN116467068A (en) | Resource scheduling method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180102 |