CN115202858A - Cloud resource allocation method and related equipment - Google Patents

Cloud resource allocation method and related equipment Download PDF

Info

Publication number
CN115202858A
CN115202858A CN202110392814.4A CN202110392814A CN115202858A CN 115202858 A CN115202858 A CN 115202858A CN 202110392814 A CN202110392814 A CN 202110392814A CN 115202858 A CN115202858 A CN 115202858A
Authority
CN
China
Prior art keywords
cloud
resource
resources
product
time
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.)
Pending
Application number
CN202110392814.4A
Other languages
Chinese (zh)
Inventor
张吉海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to CN202110392814.4A priority Critical patent/CN115202858A/en
Publication of CN115202858A publication Critical patent/CN115202858A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a cloud resource allocation method and related equipment. The method comprises the following steps: obtaining at least one predicted value, wherein the at least one predicted value is the resource amount of cloud resources in a cloud resource pool occupied by a first product within a time period from T0 to T1, the time T0 is the current time, and the time T1 is a time after the time T0; determining a first cloud resource according to the at least one predicted value, wherein the first cloud resource is an idle resource in a cloud resource pool from time T0 to time T1; receiving a first request from a user side of a second product within a time period from T0 to T1, wherein the first request is used for requesting cloud resources of a first resource amount; and when the unused resource amount in the first cloud resource is larger than the first resource amount, allocating the cloud resource of the first resource amount in the first cloud resource to the second product. According to the method, idle resources in the time from T0 to T1 of the cloud resource pool are predicted, and the idle resources are allocated to the second product for use, so that the problem of idle resources in the cloud resource pool is solved, and the resource utilization rate is improved.

Description

Cloud resource allocation method and related equipment
Technical Field
The scheme relates to the technical field of cloud computing, in particular to a cloud resource allocation method and related equipment.
Background
Cloud computing (cloud computing) has gained wide attention in the scientific research community and the industrial community as an emerging industry in recent years. Cloud computing is a service related to information technology, software and the internet, and integrates a plurality of computing resources to form a computing resource sharing pool, which is also called as a cloud or a cloud resource pool, so that automatic management is realized through software, and tenants can acquire resources in the cloud resource pool at any time according to requirements.
In general, a resource pool of an Elastic Cloud Service (ECS) of a public cloud includes unavailable resources and available resources. The unavailable resources are reliability guarantee resources, and the reliability guarantee resources are resources reserved for faults or operation and maintenance and cannot be used for cloud resource distribution; the available resources comprise normal available resources and warning available resources, and the normal available resources and the warning available resources are used for issuing resources of normal cloud resources. When the resource usage reaches the sales warning line, the management system issues warning available resources, the resource pool utilization rate is higher, a resource pool manager needs to consider resource capacity expansion planning, and the new cloud resource issuing speed is reduced before the new resources are subjected to capacity expansion; when the warning available resources are used up, the cloud resources are sold out.
In actual work, when the usage of the resource reaches the sales warning line, the resource pool manager can expand the capacity of the resource pool, so that the warning of available resources is in an idle state most of the time. Therefore, how to utilize the idle resources in the cloud resource pool, exert the value of the idle resources, and improve the utilization rate of the cloud resources is an urgent problem to be solved at present.
Disclosure of Invention
The embodiment of the application provides a cloud resource allocation method and related equipment.
In a first aspect, an embodiment of the present application provides a cloud resource allocation method, where the method includes:
obtaining at least one predicted value, wherein the at least one predicted value is the resource amount of cloud resources in a cloud resource pool occupied by a first product within a time T0 to a time T1, the time T0 is the current time, and the time T1 is a time after the time T0;
determining a first cloud resource according to the at least one predicted value, wherein the first cloud resource is an idle resource in the cloud resource pool from the time T0 to the time T1;
receiving a first request from a user side of a second product within the time T0 to the time T1, wherein the first request is used for requesting cloud resources of a first resource amount;
when the amount of unused resources in the first cloud resources is greater than the first resource amount, allocating the cloud resources of the first resource amount in the first cloud resources to the second product.
According to the method and the device, idle resources in the cloud resource pool within the time T0 to the time T1 are predicted, the idle resources are allocated to the second product for use, the idle problem of the resources in the cloud resource pool is solved, and the utilization rate of the cloud resources is improved.
With reference to the first aspect, in one possible implementation manner, the first product is a product of which the instance type is a normal instance; the normal instance indicates that the first product is available for all resources in the cloud resource pool;
the second product is a product whose instance type is a reuse instance that indicates that the first product is available with the first cloud resources in the cloud resource pool.
With reference to the first aspect, in a possible implementation manner, the method further includes:
receiving a second request from the user side of the first product within the time T0 to the time T1, wherein the second request is used for requesting cloud resources of a second resource amount;
when the amount of unused resources in the cloud resource pool is smaller than the second amount of resources, determining a third product from the second product, wherein the amount of resources of cloud resources occupied by the third product is not smaller than the second amount of resources;
and allocating the cloud resources occupied by the third product to the first product.
With reference to the first aspect, in a possible implementation manner, the determining, according to the at least one predicted value, a first cloud resource includes:
determining a predicted value with the largest resource amount in the at least one predicted value as a first predicted value;
and determining the first cloud resource according to the first predicted value.
With reference to the first aspect, in a possible implementation manner, the determining, according to the first predicted value, the first cloud resource includes:
and when the first predicted value is larger than an alert threshold value, removing the cloud resource of the first predicted value from the cloud resource pool to obtain the first cloud resource.
With reference to the first aspect, in a possible implementation manner, the determining, according to the first predicted value, the first cloud resource includes:
and when the first predicted value is smaller than the warning threshold value, taking warning available resources in the cloud resource pool as the first cloud resources.
With reference to the first aspect, in a possible implementation manner, the method further includes:
when the unused resource amount in the first cloud resource is smaller than the first resource amount, sending a first reply message to the user side of the second product, where the first reply message is used to refuse to allocate the cloud resource of the first resource amount to the second product.
With reference to the first aspect, in a possible implementation manner, the obtaining at least one predicted value includes:
and acquiring the at least one predicted value every preset time.
In a second aspect, an embodiment of the present application provides a management device, including:
an obtaining module, configured to obtain at least one predicted value, where the at least one predicted value is a resource amount of cloud resources in a cloud resource pool occupied by a first product within a time T0 to a time T1, the time T0 is a current time, and the time T1 is a time after the time T0;
a determining module, configured to determine, according to the at least one predicted value, a first cloud resource, where the first cloud resource is an idle resource in the cloud resource pool from the time T0 to the time T1;
a receiving module, configured to receive a first request from a user side of a second product within the time T0 to the time T1, where the first request is used to request cloud resources of a first resource amount;
an allocation module, configured to allocate, when an amount of unused resources in the first cloud resources is greater than the first resource amount, the cloud resources of the first resource amount in the first cloud resources to the second product.
With reference to the second aspect, in a possible implementation manner, the receiving module is further configured to receive a second request from the user side of the first product within the time T0 to the time T1, where the second request is used to request cloud resources of a second resource amount;
the determining module is further configured to determine a third product from the second product when the amount of the unused resources in the cloud resource pool is smaller than the second amount of resources, where the amount of the resources of the cloud resources occupied by the third product is not smaller than the second amount of resources;
the allocation module is further configured to allocate the cloud resources occupied by the third product to the first product.
With reference to the second aspect, in a possible implementation manner, the determining module is further configured to:
determining a predicted value with the largest resource amount in the at least one predicted value as a first predicted value;
and determining the first cloud resource according to the first predicted value.
With reference to the second aspect, in a possible implementation manner, the determining module is further configured to:
and when the first predicted value is larger than an alert threshold value, removing the cloud resource of the first predicted value from the cloud resource pool to obtain the first cloud resource.
With reference to the second aspect, in a possible implementation manner, the determining module is further configured to:
and when the first predicted value is smaller than the warning threshold value, taking warning available resources in the cloud resource pool as the first cloud resources.
In a third aspect, the present application provides a management device, where the management device includes a processor and a memory, where the memory is used to store program codes, and the processor is used to call the program codes in the memory to execute the first aspect and the method that is implemented in conjunction with any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program can implement the first aspect and the flow of the cloud resource allocation method provided in connection with any one implementation manner of the first aspect.
In a fifth aspect, the present application provides a computer program product, where the computer program product includes instructions that, when executed by a computer, enable the computer to perform the first aspect and the flow of the cloud resource allocation method provided in connection with any implementation manner of the first aspect.
Drawings
The drawings used in the embodiments of the present application are described below.
Fig. 1 is a schematic diagram of a cloud resource pool provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a resource allocation system according to an embodiment of the present application;
FIG. 3 is a functional diagram of a second manager provided in the present application;
fig. 4 is a schematic flowchart of a cloud resource allocation method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a predicted value provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a management device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another management device according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the description of the embodiments of the present application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in the embodiments of this application refers to and encompasses any and all possible combinations of one or more of the listed items.
First, a part of words and related technologies referred to in the present application will be explained with reference to the accompanying drawings so as to be easily understood by those skilled in the art.
Referring to fig. 1, fig. 1 is a schematic view of a cloud resource pool according to an embodiment of the present disclosure. As shown in fig. 1, the resources in the cloud resource pool include reliability guarantee resources, normally available resources, and alert available resources. Wherein:
the reliability guarantee resource is a resource reserved for faults or operation and maintenance, and cannot be used for cloud resource distribution and use.
And the normal available resource and the warning available resource are both available resources and are used for issuing normal cloud resources for use. As shown in fig. 1, the normally available resources and the alert available resources are distinguished by a sales fence, wherein the sales fence is a preset alert threshold. Cloud resources within the warning threshold are normally available resources, and cloud resources exceeding the warning threshold are warning available resources.
When the available resources are occupied in the warning, the utilization rate of the resource pool is high, a resource pool manager can carry out resource capacity expansion planning and reduce the distribution speed of new cloud resources before the capacity expansion of the new resources; when the warning available resources are used up, it means that the resources are sold out, and the line out in fig. 1 is the total amount of the resources of the cloud resources. In actual work, when the usage of the resource reaches the sales warning line, the resource pool manager will expand the capacity of the resource pool, so that the warning of the available resource is in an idle state for most of the time.
At present, the partition of the normal available resources and the alert available resources of the cloud resource pool basically depends on manual experience for proportional partition. In order to improve the resource utilization rate in the cloud resource pool, a resource pool manager usually reduces the warning available resources in the cloud resource pool by optimizing a sales warning line. Fig. 1 (a) shows the resource condition of the cloud resource pool when the sales warning line is not optimized, and fig. 1 (B) shows the resource condition of the cloud resource pool after the sales warning line is optimized.
Although the method reduces the idle resources, the warning available resources are still not fully utilized, and the warning available resources are still in an idle state in most of the time, so that the problem of resource idle in the cloud resource pool still exists.
It should be noted that, since the unavailable resource (i.e., the reliability guarantee resource) is not used for cloud resource distribution, the cloud resource allocation method of the present application allocates the available resource (i.e., the normal available resource and the alert available resource), and for convenience of description, the available resource is referred to as all resources in the cloud resource pool hereinafter.
The application provides a cloud resource allocation method and related equipment. The cloud resource allocation method comprises the following steps: obtaining at least one predicted value, wherein the at least one predicted value is the resource amount of cloud resources in a cloud resource pool occupied by a first product within a time period from T0 to T1, the time T0 is the current time, and the time T1 is a time after the time T0; determining a first cloud resource according to the at least one predicted value, wherein the first cloud resource is an idle resource in a cloud resource pool from time T0 to time T1; receiving a first request from a user side of a second product within a time period from T0 to T1, wherein the first request is used for requesting cloud resources of a first resource amount; and when the unused resource amount in the first cloud resource is larger than the first resource amount, allocating the cloud resource of the first resource amount in the first cloud resource to the second product. According to the method, the idle resources in the cloud resource pool within the time T0 to the time T1 of the cloud resource pool are predicted, and the idle resources are allocated to the second product for use, so that the problem of idle resources in the cloud resource pool is solved, and the utilization rate of the cloud resources is improved.
In the embodiment of the application, the instance types of the products are divided into the normal instance and the reuse instance, wherein the resources available to the products of the normal instance are all resources (namely all available resources) in the cloud resource pool, and the resources available to the products of the reuse instance are idle resources in the cloud resource pool. It should be noted that the product also contains parameter information such as demand, package cycle, bid price, and reservation.
The multiplexing instance is a new ECS product defined in the present application, and occupies an alert available resource. Specifically, the resource manager may issue a multiplexing instance for the tenant to use when the resource is idle, where the multiplexing instance occupies an alert available resource; when the normal instance requested by the tenant needs to use the part of resources, the resource manager can release the resources occupied by the multiplexing instance and allocate the resources to the normal instance for use. The main characteristics of the multiplexing example can include: 1. the product pricing is low; 2. product Service Level Agreement (SLA) low; 3. the method is suitable for short-time operation tasks or temporary elastic services of users, and can save cost. It should be noted that the resource manager may also dynamically predict the resource amount of the idle resource according to different time periods, and further dynamically adjust the number of the new instances issued. The method can provide low-price examples meeting the requirement of short-time use for tenants, and can give full play to the resource allocation rate of cloud computing providers.
In a scenario where a tenant requests a cloud service platform to provide cloud services, the tenant may request cloud resources through a user side. Specifically, when requesting resources, a tenant may select an instance type of a product at a user side, and accordingly, the user side generates a first request or a second request, where the first request is a resource request for requesting a second product, the second request is a resource request for requesting a first product, and the first product is a product whose instance type is a normal instance; the normal instance indicates that the first product has all resources in the cloud resource pool available; the second product is a product whose instance type is a reuse instance indicating that the first product has available idle resources in the cloud resource pool.
In order to better understand the cloud resource allocation method and the related device provided in the embodiment of the present application, a system architecture used in the embodiment of the present application is described first below.
Referring to fig. 2, fig. 2 is a schematic diagram of a resource allocation system according to an embodiment of the present disclosure. As shown in fig. 2, the resource allocation system 200 may include a prediction system 201 and a resource manager 202. Among other things, resource manager 202 may include a first manager and a second manager, which may also be referred to as a multiplex instance manager in some embodiments. Wherein:
the prediction system 201 may also be referred to as a normal instance usage prediction system, and the prediction system 201 may obtain, from the resource manager 202, usage of cloud resources occupied by the first product in a past period of time, and further predict usage of the first product in the future according to the past usage of the first product.
As shown in fig. 2, the resource manager 202 may receive a resource request from a user side, and further, the resource manager 202 may obtain a predicted value through the prediction system 201, determine whether to allocate the requested cloud resource to the tenant according to the resource request and the predicted value, and send a request reply to the user side.
In one implementation, the resource manager 202 includes a first manager and a second manager. The first manager is used for receiving a user request from a user side, wherein the user request is used for requesting resources of a first product or a second product; further, the first manager may send a resource request to the second manager; the second manager may determine whether to allocate the requested resource to the product based on the resource request sent by the prediction system 201 and the first manager; further, the second manager sends a reply to the first manager according to the determination result, and the first manager may allocate the resource in the cloud resource pool according to the reply of the second manager.
In some embodiments, the resource manager 202 obtains at least one predicted value through the prediction system 201, where the at least one predicted value is a resource amount of cloud resources in a cloud resource pool occupied by the first product in a time T0 to a time T1, the time T0 is a current time, and the time T1 is a time after the time T0; determining a first cloud resource according to the at least one predicted value, wherein the first cloud resource is an idle resource in a cloud resource pool from time T0 to time T1; receiving a first request from a user side of a second product within time T0 to time T1, wherein the first request is used for requesting cloud resources of a first resource amount; when the amount of the unused resources in the first cloud resources is larger than the first resource amount, that is, the amount of the unused resources in the first resources is larger than the first resource amount required by the second product, the cloud resources of the first resource amount in the first cloud resources are allocated to the second product.
In other embodiments, the resource manager 202 may receive a second request from the user side of the first product during time T0 to time T1, the second request requesting cloud resources of a second amount of resources; when the amount of the unused resources in the cloud resource pool is smaller than the second amount of resources, namely when the amount of the unused resources in the cloud resource pool is larger than the second amount of resources required by the first product, determining a third product from the second product, wherein the amount of the resources of the cloud resources occupied by the third product is not smaller than the second amount of resources; and allocating the cloud resources occupied by the third product to the first product.
Referring to fig. 3, fig. 3 is a functional diagram of a second manager according to the present application. As shown in fig. 3, the second manager may perform a timing task, specifically, the second manager may periodically read, from the normal instance usage prediction system (i.e., the prediction system 201), prediction data of the normal instance (i.e., the first product) at a number of time points in the future, may use a maximum value in the prediction data as a first prediction value, and further calculate an available resource (i.e., a first cloud resource) for "reuse instance" in a period of time in the future. The resource amount of the first cloud resource may be the resource amount obtained by removing the first predicted value from the total amount of the sellable resources (i.e., the total amount of resources in the cloud resource pool).
In a future period of time, the second manager may receive resource requests from the first manager, which may include "multiplex instance" requests (i.e., first requests) and "normal instance" requests (i.e., second requests). For example, after receiving the first request, the second manager requests cloud resources of a first resource amount, and when the amount of unused resources in the first cloud resources is greater than the first resource amount, that is, the amount of unused resources in the first resources is greater than the first resource amount required by the second product (also referred to as a multiplexing instance), the second manager sends a resource request reply to the first manager, where the resource request reply is used to instruct the first manager to allocate the cloud resources of the first resource amount in the first cloud resources to the second product. For another example, the second manager receives a second request from the first manager, the second request requesting cloud resources for a second amount of resources; when the amount of the unused resources in the cloud resource pool is less than the second amount of resources, that is, when the amount of the unused resources in the cloud resource pool is greater than the second amount of resources required by the first product (also referred to as a normal instance), the second manager may determine a third product from the second product, where the amount of the resources of the cloud resources occupied by the third product is not less than the second amount of resources; and sending a resource request reply to the first manager, wherein the resource request reply is used for instructing the first manager to allocate the cloud resources occupied by the third product to the first product.
When determining the resource allocation, the second manager may update the resource condition in the cloud resource pool according to the allocated resource, for example, when sending a resource request reply to the first manager, where the resource request reply is used to instruct the first manager to allocate the cloud resource of the first resource amount in the first cloud resource to the second product, the resource amount unused in the first cloud resource pool is updated to the resource amount obtained by subtracting the first resource amount from the resource amount unused in the first cloud resource pool before the allocation.
It should be noted that fig. 2 does not constitute a specific limitation on the resource allocation system according to the embodiment of the present application. In other embodiments of the present application, the resource allocation system may include more or fewer modules than shown, or combine certain modules, or split certain modules, or a different arrangement of modules.
Based on the above, the cloud resource allocation method and the related device provided by the embodiment of the present application are described below.
Referring to fig. 4, fig. 4 is a schematic flowchart of a cloud resource allocation method according to an embodiment of the present disclosure. The method may be applied to the system shown in fig. 2, and may be executed by the resource manager in fig. 2, as shown in fig. 4, where the method includes the following steps:
s401: and obtaining at least one predicted value, wherein the at least one predicted value is the resource amount of the cloud resources in the cloud resource pool occupied by the first product within the time T0 to the time T1, the time T0 is the current time, and the time T1 is the time after the time T0.
Specifically, the resource manager may obtain one or more predicted values, where the predicted values are resource amounts of cloud resources occupied by the first product in a future period of time, and this step may be specifically executed by the second manager. Wherein one predicted value may be used to indicate the resource amount of the cloud resource occupied by the first product at a future time.
Referring to fig. 5, fig. 5 is a schematic diagram of a predicted value provided in an embodiment of the present application. As shown in fig. 5, the curve in fig. 5 is a curve formed by predicted values in the time period from T0 to T10, where ten points on the curve represent resource amounts (which may also be referred to as resource demand amounts) of cloud resources occupied by the first product at ten times in the time period from T0 to T10, respectively. The sales warning line and the depleted line are exemplarily drawn, and it can be seen that a predicted value higher than the sales warning line exists in the ten predicted values, that is, the predicted value is greater than the warning threshold value; there is also a predicted value below the sales fence, i.e., the predicted value is less than the fence threshold.
In some embodiments, the resource manager may obtain one or more predicted values from the prediction system, the predicted values determined by the prediction system based on an amount of resources of cloud resources in a cloud resource pool occupied by the first product over a past period of time. The prediction system may be a neural network model or other models, which are not limited herein.
Alternatively, the resource manager may obtain at least one predicted value every preset time period.
S402: and determining a first cloud resource according to the at least one predicted value, wherein the first cloud resource is an idle resource in the cloud resource pool from time T0 to time T1.
In one implementation, the resource manager may obtain at least one predicted value at regular time, and then determine a first cloud resource according to the at least one predicted value, where the first cloud resource is an idle resource in the cloud resource pool from time T0 to time T1. It can be understood that the amount of resources occupied by the first product is dynamically changed, and the available resources of the second product (the product of the reuse instance) are also dynamically changed, so that the resource manager can calculate the amount of available resources of the first cloud resources, i.e., the second product, at regular time to control the dispensing amount of the second product.
In some embodiments, the resource manager may determine a predicted value with the largest resource amount among the at least one predicted value as a first predicted value, and further, when the first predicted value is greater than an alert threshold, take a resource in the cloud resource pool from which the cloud resource with the first predicted value is removed as the first cloud resource; and when the first predicted value is smaller than the warning threshold value, taking warning available resources in the cloud resource pool as first cloud resources. It can be understood that, because the amount of resources occupied by the first product in the cloud resource pool fluctuates from time T0 to time T1, the predicted value with the largest value is selected from the predicted values at multiple times from time T0 to time T1 to represent the predicted value of the time period, so that the normal use of the first product can be ensured, and the situation that the second product occupies the cloud resources of the first product is avoided.
For example, referring to the predicted data in the time period from T0 to T2 in fig. 5, if the predicted values in the time period from T0 to T2 are all smaller than the warning threshold, the resource manager may use the warning available resource as the first cloud resource. As can be appreciated, since the second cloud resources are to be used for the second product, the method can avoid the second product from occupying the cloud resources of the first product.
For another example, referring to the predicted data in the time period from T0 to T10 in fig. 5, the predicted value with the largest value among the predicted values in the time period from T0 to T2 is the predicted value at the time T5, and the management system may use the predicted value at the time T5 as the first predicted value; because the first predicted value is greater than the warning threshold value, the management system can remove the first predicted value from the total amount of the resources in the cloud resource pool to obtain the first cloud resources.
In other embodiments, the resource manager may further directly use the resource from which the cloud resource with the first predicted value is removed in the cloud resource pool as the first cloud resource. The first predicted value may also be an average value or a median of multiple predicted values, which is not limited herein.
S403: within a time period from T0 to T1, a first request from a user side of a second product is received, the first request being for requesting cloud resources of a first amount of resources.
The first request from the user side of the second product is a request for the tenant to select the product with the instance type of the multiplex instance, and the first request comprises the first resource amount.
For example, in the time T0 to the time T1, the tenant may select, through the user side, a product (i.e., a first product) whose instance type is a multiplexed instance, and the tenant may also select other parameters such as a resource amount and a price of the product, and then the user side sends, in response to the operation of the tenant, a first request to the resource manager, where the first request is used to request cloud resources of the first resource amount, and accordingly, the resource manager may receive the first request from the user side of the second product.
S404: and when the unused resource amount in the first cloud resource is larger than the first resource amount, allocating the cloud resource of the first resource amount in the first cloud resource to the second product.
Specifically, the resource manager compares the unused resource amount in the first cloud resource with the first resource amount according to the first request, and allocates the cloud resource of the first resource amount in the first cloud resource to the second product when the unused resource amount in the first cloud resource is greater than the first resource amount. That is, when the amount of unused resources in the first resource is greater than the first resource amount required by the second product, the cloud resources of the first resource amount in the first cloud resources are allocated to the second product.
In one implementation, a first manager receives a first request from a user side, and further sends a resource request to a second manager; when determining that the resource request is a resource requesting a second product, the second manager compares the unused resource amount in the first cloud resource with the first resource amount, and sends a request reply to the first manager when the unused resource amount in the first cloud resource is larger than the first resource amount; the first manager responds to the request reply by allocating cloud resources of the first amount of resources in the first cloud resources to the second product. When the amount of the unused resources in the first cloud resources is greater than the first amount of the resources, the second manager sends a request reply to the first manager, and then updates the amount of the unused resources in the first cloud resources recorded in the manager to the amount of the unused resources in the first cloud resources, which is the amount of the resources excluding the first amount of the resources.
In some embodiments, when determining that the amount of unused resources in the first cloud resource is less than the first resource amount, the resource manager may further compare prices of a second product currently occupying the first cloud resource with prices of a second product requesting the first resource amount, and if there is a second product currently occupying the first cloud resource whose price is lower than the second product requesting the first resource amount, the resource manager may release cloud resources of the second product occupying the first cloud resource and allocate the cloud resources to the second product requesting the first resource amount.
In other embodiments, the resource manager may send a first reply message to the user side of the second product when determining that the amount of unused resources in the first cloud resources is less than the first amount of resources, the first reply message being used to deny allocation of cloud resources of the first amount of resources to the second product.
S405: and receiving a second request from the user side of the first product within the time period from T0 to T1, wherein the second request is used for requesting cloud resources of a second resource amount.
The first request from the user side of the second product is a request for the tenant to select the product with the normal example type, and the second request comprises the second resource amount.
For example, in the time T0 to the time T1, the tenant may select, through the user side, a product (i.e., a second product) whose instance type is a normal instance, and the tenant may also select other parameters such as a resource amount and a price of the product, and then the user side sends, in response to the tenant selection, a second request to the resource manager, where the second request is used to request cloud resources of the second resource amount, and accordingly, the resource manager may receive the second request from the user side of the first product.
It should be noted that step S405 may be before step S403 or after step S403, and the execution order of the steps is not limited here.
S406: and when the unused resource amount in the cloud resource pool is smaller than the second resource amount, determining a third product from the second product, wherein the resource amount of the cloud resource occupied by the third product is not smaller than the second resource amount.
Specifically, after receiving the second request, the resource manager compares the amount of unused resources in the cloud resource pool with the second amount of resources when confirming that the request is for requesting the first product, and determines a third product from the second product when the amount of unused resources in the cloud resource pool is less than the second amount of resources, where the amount of resources of the cloud resources occupied by the third product is not less than the second amount of resources. The step may be specifically executed by the second manager, where after determining the third product to the first manager, the second manager may update an unused resource amount in the cloud resource pool recorded in the manager, update the unused resource amount in the cloud resource pool to an unused resource amount in the original cloud resource pool plus a resource amount of the third product, and remove the resource amount of the second resource amount.
In one implementation, the resource manager may determine a third product from the second product based on an amount of resources occupied by the product. For example, a first tenant purchases a first product, the purchased resource amount is a second resource amount, a second product is purchased by a second tenant and a third tenant at present, the resource amount occupied by the second product purchased by the second tenant is a first numerical value, the resource amount occupied by the second product purchased by the third tenant is a second numerical value, if the resource manager determines that the first numerical value is smaller than the second resource amount and the second numerical value is greater than the second resource amount, the resource manager may determine the second product purchased by the third tenant as a third product, and allocate cloud resources occupied by the second product purchased by the third tenant to the first product purchased by the first tenant.
In another implementation, the resource manager can determine a third product from the second product based on the price of the product. For example, a first tenant purchases a first product, the purchased resource amount is a second resource amount, a second tenant and a third tenant purchase a second product at present, the resource amounts occupied by the second product purchased by the second tenant and the third tenant are both greater than or equal to the second resource amount, the bid price paid by the second tenant for the second product is higher than the bid price paid by the third tenant for the second product, the resource manager may determine the second product purchased by the second tenant as a third product, and allocate cloud resources occupied by the second product purchased by the second tenant to the first product purchased by the first tenant.
In other implementations, the resource manager may also determine a third product from the second products according to the usage rate, the boot time, and the like, which is not limited herein.
S407: and allocating the cloud resources occupied by the third product to the first product.
And after determining the third product, the resource manager allocates the cloud resources occupied by the third product to the first product. This step may be specifically performed by the first manager.
In some embodiments, the second manager, upon determining the third product, generates a request reply that is sent to the first manager; and the first manager responds to the request reply, releases the cloud resources occupied by the third product, and then allocates the cloud resources occupied by the third product to the first product for use.
It should be noted that steps S403 to S404 may be executed before or after steps S405 to S407, and may also be executed simultaneously, which is not limited herein.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a management device according to an embodiment of the present application, where the management device may be a resource manager in the method embodiment described in fig. 4, and may execute a method and steps in which the resource manager is an execution subject in the cloud resource allocation method embodiment described in fig. 4. As shown in fig. 6, the management apparatus 600 includes an acquisition module 610, a determination module 620, a reception module 630, and an assignment module 640. Wherein,
an obtaining module 610, configured to obtain at least one predicted value, where the at least one predicted value is a resource amount of cloud resources in a cloud resource pool occupied by a first product within a time T0 to a time T1, the time T0 is a current time, and the time T1 is a time after the time T0;
a determining module 620, configured to determine, according to the at least one predicted value, a first cloud resource, where the first cloud resource is an idle resource in the cloud resource pool from the time T0 to the time T1;
a receiving module 630, configured to receive a first request from a user side of a second product within the time T0 to the time T1, where the first request is used to request cloud resources of a first resource amount;
an allocating module 640, configured to allocate, when the amount of unused resources in the first cloud resource is greater than the first resource amount, the cloud resources of the first resource amount in the first cloud resource to the second product.
In a possible embodiment, the receiving module 630 is further configured to receive a second request from the user side of the first product in the time period from T0 to T1, where the second request is for requesting cloud resources of a second resource amount;
the determining module 620 is further configured to determine a third product from the second product when the amount of unused resources in the cloud resource pool is less than the second amount of resources, where the amount of resources of cloud resources occupied by the third product is not less than the second amount of resources;
the allocating module 640 is further configured to allocate the cloud resource occupied by the third product to the first product.
In a possible implementation, the determining module 620 is further configured to:
determining a predicted value with the largest resource amount in the at least one predicted value as a first predicted value;
and determining the first cloud resource according to the first predicted value.
In a possible implementation, the determining module 620 is further configured to:
and when the first predicted value is larger than a warning threshold value, removing the cloud resource of the first predicted value from the cloud resource pool to obtain the first cloud resource.
In a possible implementation, the determining module 620 is further configured to:
and when the first predicted value is smaller than the warning threshold value, taking warning available resources in the cloud resource pool as the first cloud resources.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another management device provided in the embodiment of the present application. As shown in fig. 7, the management apparatus 700 includes: a processor 710, a communication interface 720 and a memory 730, said processor 710, communication interface 720 and memory 730 being interconnected by an internal bus 740. It is to be understood that the management device 700 may be a management device in cloud computing, or a management device in an edge environment.
The processor 710 may be formed of one or more general-purpose processors, such as a Central Processing Unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The bus 740 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 740 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 7, but not only one bus or type of bus.
Memory 730 may include volatile memory (volatile memory), such as Random Access Memory (RAM); the memory 730 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD), or a solid-state drive (SSD); memory 730 may also include combinations of the above.
It should be noted that the memory 730 of the management device 700 stores codes corresponding to the modules of the management device 600, and the processor 710 executes the codes to implement the functions of the units of the management device 600, that is, to execute the methods of S401 to S407.
The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program can implement part or all of the steps of any one of the above method embodiments.
Embodiments of the present invention also provide a computer program, which includes instructions that, when executed by a computer, enable the computer to perform some or all of the steps of any of the methods for allocating regional resources.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention should be considered as being included in the scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (15)

1. A cloud resource allocation method, the method comprising:
obtaining at least one predicted value, wherein the at least one predicted value is the resource amount of cloud resources in a cloud resource pool occupied by a first product within a time T0 to a time T1, the time T0 is the current time, and the time T1 is a time after the time T0;
determining a first cloud resource according to the at least one predicted value, wherein the first cloud resource is an idle resource in the cloud resource pool from the time T0 to the time T1;
receiving a first request from a user side of a second product within the time T0 to the time T1, wherein the first request is used for requesting cloud resources of a first resource amount;
when the amount of unused resources in the first cloud resources is greater than the first resource amount, allocating the cloud resources of the first resource amount in the first cloud resources to the second product.
2. The method of claim 1, wherein the first product is a product whose instance type is a normal instance; the normal instance indicates that the first product is available for all resources in the cloud resource pool;
the second product is a product whose instance type is a reuse instance that indicates that the first product is available with the first cloud resources in the cloud resource pool.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a second request from the user side of the first product within the time T0 to the time T1, wherein the second request is used for requesting cloud resources of a second resource amount;
when the amount of unused resources in the cloud resource pool is smaller than the second amount of resources, determining a third product from the second product, wherein the amount of resources of cloud resources occupied by the third product is not smaller than the second amount of resources;
and allocating the cloud resources occupied by the third product to the first product.
4. The method according to claims 1-3, wherein the determining the first cloud resource according to the at least one predicted value comprises:
determining a predicted value with the largest resource amount in the at least one predicted value as a first predicted value;
and determining the first cloud resource according to the first predicted value.
5. The method of claim 4, wherein determining the first cloud resource based on the first predicted value comprises:
and when the first predicted value is larger than an alert threshold value, removing the cloud resource of the first predicted value from the cloud resource pool to obtain the first cloud resource.
6. The method according to claim 4 or 5, wherein the determining the first cloud resource according to the first predicted value comprises:
and when the first predicted value is smaller than the warning threshold value, taking warning available resources in the cloud resource pool as the first cloud resources.
7. The method according to any one of claims 1-6, further comprising:
when the unused resource amount in the first cloud resource is smaller than the first resource amount, sending a first reply message to the user side of the second product, where the first reply message is used to refuse to allocate the cloud resource of the first resource amount to the second product.
8. The method according to any one of claims 1-7, wherein the obtaining at least one predicted value comprises:
and acquiring the at least one predicted value every preset time.
9. A management device, comprising:
an obtaining module, configured to obtain at least one predicted value, where the at least one predicted value is a resource amount of cloud resources in a cloud resource pool occupied by a first product within a time T0 to a time T1, the time T0 is a current time, and the time T1 is a time after the time T0;
a determining module, configured to determine, according to the at least one predicted value, a first cloud resource, where the first cloud resource is an idle resource in the cloud resource pool from the time T0 to the time T1;
a receiving module, configured to receive a first request from a user side of a second product within the time T0 to the time T1, where the first request is used to request cloud resources of a first resource amount;
an allocation module, configured to allocate, when an amount of unused resources in the first cloud resources is greater than the first resource amount, the cloud resources of the first resource amount in the first cloud resources to the second product.
10. The apparatus of claim 9, wherein the receiving module is further configured to receive a second request from a user side of the first product within the time T0 to the time T1, the second request requesting cloud resources of a second amount of resources;
the determining module is further configured to determine a third product from the second product when the amount of unused resources in the cloud resource pool is less than the second amount of resources, where the amount of resources of cloud resources occupied by the third product is not less than the second amount of resources;
the allocation module is further configured to allocate the cloud resources occupied by the third product to the first product.
11. The apparatus of claim 9 or 10, wherein the determining module is further configured to:
determining a predicted value with the largest resource amount in the at least one predicted value as a first predicted value;
and determining the first cloud resource according to the first predicted value.
12. The apparatus of claim 11, wherein the determining module is further configured to:
and when the first predicted value is larger than an alert threshold value, removing the cloud resource of the first predicted value from the cloud resource pool to obtain the first cloud resource.
13. The apparatus of claim 11 or 12, wherein the determining module is further configured to:
when the first predicted value is smaller than the warning threshold value, using warning available resources in the cloud resource pool as the first cloud resources.
14. A management device, comprising a memory and a processor that executes computer instructions stored by the memory to cause the management device to perform the method of any of claims 1-9.
15. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the method of any one of claims 1-8.
CN202110392814.4A 2021-04-13 2021-04-13 Cloud resource allocation method and related equipment Pending CN115202858A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110392814.4A CN115202858A (en) 2021-04-13 2021-04-13 Cloud resource allocation method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110392814.4A CN115202858A (en) 2021-04-13 2021-04-13 Cloud resource allocation method and related equipment

Publications (1)

Publication Number Publication Date
CN115202858A true CN115202858A (en) 2022-10-18

Family

ID=83571288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110392814.4A Pending CN115202858A (en) 2021-04-13 2021-04-13 Cloud resource allocation method and related equipment

Country Status (1)

Country Link
CN (1) CN115202858A (en)

Similar Documents

Publication Publication Date Title
US10772115B2 (en) Resource scheduling method and server
CN109684074B (en) Physical machine resource allocation method and terminal equipment
CN107301093B (en) Method and device for managing resources
CN111078369B (en) Virtual machine distribution method and device under cloud computer and server
CN112269641A (en) Scheduling method, scheduling device, electronic equipment and storage medium
CN108306874B (en) Service interface access current limiting method and device
CN109873910A (en) Processing method, device and the storage medium of session request
CN108241535B (en) Resource management method and device and server equipment
WO2023151268A1 (en) Service distribution method, apparatus and system
CN109614223A (en) Hardware resource dispatching method, device and hardware resource controlling equipment
CN104301257A (en) Resource distribution method, device and equipment
CN114844791B (en) Cloud service automatic management and distribution method and system based on big data and storage medium
KR20170014804A (en) Virtual machine provisioning system and method for cloud service
CN106686081B (en) Resource allocation method and device for database service system
CN117130761A (en) Resource management method and related device
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
US20240020168A1 (en) Resource Scheduling Method and Apparatus, Computer Device, System, and Storage Medium
CN111988388B (en) Flow distribution method, device, electronic equipment and storage medium
CN106411782B (en) A kind of bandwidth compensation method and device
CN114721810A (en) Edge cloud resource cooperative scheduling method, cloud management platform and edge cloud nodes
CN115202858A (en) Cloud resource allocation method and related equipment
WO2017133421A1 (en) Method and device for sharing resources among multiple tenants
CN115794306A (en) Resource allocation method and device based on preemption instance, electronic equipment and medium
CN114884900A (en) Resource allocation method, device, equipment and storage medium
CN115080253A (en) GPU task allocation method and device, electronic equipment and storage medium

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