Resource scheduling method and device based on cloud service platform

By obtaining virtual machine deployment attribute information and historical operation data on the cloud service platform, generating virtual machine portraits for scheduling, it solves the problem of resource competition caused by high load stacking in IaaS environment, improving resource utilization and reducing costs.

CN119065848AActive Publication Date: 2024-12-03BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
CN202411179676.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-03
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

In IaaS environment, high load stacking leads to resource competition and performance degradation. How to improve resource scheduling, improve resource utilization and reduce resource overhead costs, meet the resource needs of multi-tenant, and reduce resource competition.

Method used

By obtaining the virtual machine deployment attribute information of tenants on the cloud service platform, using historical operation data analysis in the virtual machine portrait to generate the target virtual machine portrait, and perform virtual machine scheduling based on resource consumption information to avoid scheduling high-resource-demand virtual machines to the same on the host, thereby optimizing resource allocation.

Benefits of technology

It improves resource utilization, reduces resource overhead costs, reduces the competition for multi-tenant resources, and meets the resource needs of multi-tenant.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065848A_ABST
    Figure CN119065848A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource scheduling method and device based on a cloud service platform. The method comprises the steps of obtaining deployment attribute information of a to-be-scheduled virtual machine applied to be deployed by a tenant on the cloud service platform; obtaining a target virtual machine portrait matched with the deployment attribute information of the to-be-scheduled virtual machine from a virtual machine portrait set of the cloud service platform; the virtual machine portrait is used for describing deployment attribute information and resource consumption information corresponding to the virtual machine, and the resource consumption information is used for describing expected consumption of at least one resource of the virtual machine matched with the deployment attribute information of the virtual machine; and scheduling the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait. The load peak shifting scheduling of the virtual machine can be realized, the balance of the global resource load upper limit is ensured, the global optimization is realized, the service requirements can be flexibly adapted, and the system resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtualization technology, and in particular to a resource scheduling method and device based on a cloud service platform. Background Art

[0002] Infrastructure as a Service (IaaS) is a cloud computing service model. In this model, cloud service providers provide users with infrastructure services such as servers, storage, and networks. Users can rent these resources as needed without having to purchase and maintain hardware equipment, which greatly saves costs and greatly improves flexibility.

[0003] In an IaaS environment, high-load stacking usually refers to multiple tenants or applications with high resource requirements running on the same physical resource (such as a server), resulting in resource contention and performance degradation. Therefore, how to improve resource scheduling, increase resource utilization and reduce resource overhead costs to meet the resource needs of multiple tenants while reducing multi-tenant resource contention. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a resource scheduling method and device based on a cloud service platform, which is used to improve resource scheduling, increase resource utilization and reduce resource overhead costs, so as to meet the resource needs of multiple tenants while reducing the competition for multi-tenant resources.

[0005] In order to achieve the above purpose, the embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a resource scheduling method based on a cloud service platform, including:

[0007] Obtaining deployment attribute information of a virtual machine to be scheduled that is applied for deployment by a tenant on the cloud service platform;

[0008] Acquire a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform; the virtual machine portrait set includes multiple virtual machine portraits generated based on historical operation data analysis of the virtual machines on the cloud service platform; the virtual machine portrait is used to describe the deployment attribute information and resource consumption information corresponding to the virtual machine, wherein the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machine that matches the deployment attribute information of the virtual machine;

[0009] The virtual machine to be scheduled is scheduled according to the resource consumption information in the target virtual machine portrait.

[0010] As an optional implementation of the embodiment of the present application, scheduling the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile includes:

[0011] Obtaining the expected resource consumption of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait;

[0012] Acquire a resource margin of each host machine in a host machine cluster of the cloud service platform, wherein the resource margin includes an amount of the at least one resource that is idle on the host machine;

[0013] The virtual machine to be scheduled is scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption.

[0014] As an optional implementation of the embodiment of the present application, after scheduling the virtual machine to be scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption, the method further includes:

[0015] The resource margin of the target host machine is updated according to the expected resource consumption.

[0016] As an optional implementation of the embodiment of the present application, the at least one resource includes: a virtual processor; the method further includes:

[0017] Acquire usage information of a virtual processor of a target virtual machine from the historical operation data; the target virtual machine is a virtual machine that matches the deployment attribute information of the virtual machine to be scheduled, and the usage information includes at least one indicator for describing the utilization rate of the virtual processor;

[0018] Acquire, according to the usage information of the virtual processor of the target virtual machine, the expected utilization rate of the virtual processor of the virtual machine matching the deployment attribute information of the virtual machine;

[0019] The target virtual machine profile is generated according to the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine.

[0020] As an optional implementation of the embodiment of the present application, the usage information includes: an average utilization rate, a first utilization rate, and a second utilization rate of the virtual processor, wherein the first utilization rate and the second utilization rate are respectively a first percentile and a second percentile of the utilization rate of the virtual processor of the target virtual machine; the first percentile is less than the second percentile; and obtaining, according to the usage information of the virtual processor of the target virtual machine, an expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine includes:

[0021] calculating a difference between the first utilization rate and the average utilization rate to obtain a first load amplitude;

[0022] calculating a difference between the second utilization rate and the average utilization rate to obtain a second load amplitude;

[0023] According to the first load amplitude and the second load amplitude, an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine is obtained based on the average utilization rate or the first utilization rate or the second utilization rate.

[0024] As an optional implementation manner of the embodiment of the present application, acquiring, according to the first load amplitude and the second load amplitude, an expected utilization of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine based on the average utilization or the first utilization or the second utilization, includes:

[0025] When the second load amplitude is less than or equal to a preset threshold, acquiring an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine based on the average utilization rate;

[0026] When the second load amplitude is greater than the preset threshold and the first load amplitude is less than or equal to the preset threshold, acquiring an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine based on the first utilization rate;

[0027] When the first load amplitude is greater than the preset threshold, an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine is obtained based on the second utilization rate.

[0028] As an optional implementation of the embodiment of the present application, obtaining the expected resource consumption of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile includes:

[0029] Obtaining the expected virtual processor utilization of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile;

[0030] The expected virtual processor consumption of the virtual machine to be scheduled is obtained according to the number of virtual processors of the virtual machine to be scheduled and the expected virtual processor utilization of the virtual machine to be scheduled.

[0031] As an optional implementation of the embodiment of the present application, the at least one resource includes: a virtual processor; before obtaining the resource margin of each host in the host cluster of the cloud service platform, the method further includes:

[0032] Obtaining the number of virtual processors of each host in the host cluster;

[0033] Obtaining the total amount of available virtual processors of each host machine in the host machine cluster according to the number of virtual processors of each host machine in the host machine cluster and the preset virtual processor utilization rate;

[0034] An initial value of a virtual processor margin of each host machine in the host machine cluster is obtained according to the total amount of available virtual processors of each host machine in the host machine cluster.

[0035] As an optional implementation of the embodiment of the present application, the step of acquiring a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform includes:

[0036] Obtaining a hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled;

[0037] Obtaining a hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set;

[0038] A virtual machine portrait in the virtual machine portrait set having the same hash value as the to-be-scheduled virtual machine is determined as the target virtual machine portrait.

[0039] As an optional implementation of the embodiment of the present application, the method further includes: before obtaining the hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled, performing fuzzy processing on the deployment attribute information of the virtual machine to be scheduled;

[0040] Before obtaining the hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set, the deployment attribute information of each virtual machine portrait in the virtual machine portrait set is fuzzified.

[0041] In a second aspect, an embodiment of the present application provides a resource scheduling device based on a cloud service platform, including:

[0042] An acquisition unit, used to acquire deployment attribute information of a virtual machine to be scheduled that is applied for deployment by a tenant on a cloud service platform;

[0043] A matching unit, configured to obtain a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from a virtual machine portrait set of the cloud service platform; the virtual machine portrait set includes a plurality of virtual machine portraits generated based on historical operation data analysis of the virtual machines on the cloud service platform; the virtual machine portrait is used to describe the deployment attribute information and resource consumption information corresponding to the virtual machine, wherein the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machine that matches the deployment attribute information of the virtual machine;

[0044] The scheduling unit is used to schedule the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait.

[0045] As an optional implementation of the embodiment of the present application, the scheduling unit is specifically used to obtain the expected resource consumption of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait; obtain the resource margin of each host machine in the host machine cluster of the cloud service platform, and the resource margin includes the amount of at least one resource that is idle on the host machine; and schedule the virtual machine to be scheduled to the target host machine in the host machine cluster where the resource margin is greater than or equal to the expected resource consumption.

[0046] As an optional implementation of the embodiment of the present application, the scheduling unit is also used to update the resource margin of the target host machine according to the expected resource consumption after scheduling the virtual machine to be scheduled to the target host machine in the host machine cluster where the resource margin is greater than or equal to the expected resource consumption.

[0047] As an optional implementation of the embodiment of the present application, the at least one resource includes: a virtual processor; the matching unit is further used to obtain usage information of the virtual processor of the target virtual machine from the historical operation data; obtain the expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine according to the usage information of the virtual processor of the target virtual machine; generate the target virtual machine profile according to the expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine;

[0048] The target virtual machine is a virtual machine that matches the deployment attribute information of the virtual machine to be scheduled, and the usage information includes at least one indicator for describing the utilization rate of the virtual processor.

[0049] As an optional implementation of the embodiment of the present application, the usage information includes: an average utilization rate, a first utilization rate, and a second utilization rate of the virtual processor, wherein the first utilization rate and the second utilization rate are respectively a first percentile and a second percentile of the utilization rate of the virtual processor of the target virtual machine; the first percentile is less than the second percentile;

[0050] The matching unit is specifically configured to calculate a difference between the first utilization and the average utilization to obtain a first load amplitude; calculate a difference between the second utilization and the average utilization to obtain a second load amplitude; and obtain, based on the first load amplitude and the second load amplitude, an expected utilization of a virtual processor of a virtual machine that matches the deployment attribute information of the virtual machine based on the average utilization or the first utilization or the second utilization.

[0051] As an optional implementation of the embodiment of the present application, the matching unit is specifically used to obtain the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the average utilization when the second load amplitude is less than or equal to a preset threshold; when the second load amplitude is greater than the preset threshold and the first load amplitude is less than or equal to the preset threshold, the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine is obtained based on the first utilization; when the first load amplitude is greater than the preset threshold, the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine is obtained based on the second utilization.

[0052] As an optional implementation of the embodiment of the present application, the scheduling unit is specifically used to obtain the expected virtual processor utilization of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait; and obtain the expected virtual processor consumption of the virtual machine to be scheduled based on the number of virtual processors of the virtual machine to be scheduled and the expected virtual processor utilization of the virtual machine to be scheduled.

[0053] As an optional implementation of an embodiment of the present application, the at least one resource includes: a virtual processor; the scheduling unit is further used to obtain the number of virtual processors of each host machine in the host machine cluster before obtaining the resource margin of each host machine in the host machine cluster of the cloud service platform; obtain the total amount of available virtual processors of each host machine in the host machine cluster according to the number of virtual processors of each host machine in the host machine cluster and the preset virtual processor utilization; obtain the initial value of the virtual processor margin of each host machine in the host machine cluster according to the total amount of available virtual processors of each host machine in the host machine cluster.

[0054] As an optional implementation of the embodiment of the present application, the matching unit is specifically used to obtain a hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled; obtain a hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set; and determine the virtual machine portrait in the virtual machine portrait set that has the same hash value as the virtual machine to be scheduled as the target virtual machine portrait.

[0055] As an optional implementation of the embodiment of the present application, the matching unit is further used to fuzzy the deployment attribute information of the virtual machine to be scheduled before obtaining the hash value of the virtual machine to be scheduled based on the deployment attribute information of the virtual machine to be scheduled, and to fuzzy the deployment attribute information of each virtual machine portrait in the virtual machine portrait set before obtaining the hash value of each virtual machine portrait in the virtual machine portrait set based on the deployment attribute information of each virtual machine portrait in the virtual machine portrait set.

[0056] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the resource scheduling method based on the cloud service platform described in any of the above-mentioned embodiments when executing the computer program.

[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when the computer program is executed by a computing device, enables the computing device to implement any of the above-mentioned resource scheduling methods based on the cloud service platform.

[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to implement any of the above-mentioned resource scheduling methods based on a cloud service platform.

[0059] The resource scheduling method based on the cloud service platform provided in the embodiment of the present application first obtains the deployment attribute information of the virtual machine to be scheduled applied for deployment by the tenant on the cloud service platform, then obtains the target virtual machine portrait matching the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform, and schedules the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait. Since the embodiment of the present application can generate multiple virtual machine portraits based on the historical operation data analysis of the virtual machine on the cloud service platform, and the virtual machine portrait is used to describe the deployment attribute information and resource consumption information corresponding to the virtual machine, and the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machine matching the deployment attribute information of the virtual machine, the present application can obtain the expected resource consumption of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait, and schedule the virtual machine to be scheduled according to the expected resource consumption of the virtual machine to be scheduled, so the embodiment of the present application can avoid scheduling virtual machines with high resource requirements to the same host machine, thereby improving resource scheduling, improving resource utilization and reducing resource overhead costs, so as to meet the resource requirements of multiple tenants while reducing multi-tenant resource contention. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0062] Figure 1 One of the step flow charts of the resource scheduling method based on the cloud service platform provided in the embodiment of the present application;

[0063] Figure 2 A schematic diagram of a virtual machine image production link provided in an embodiment of the present application;

[0064] Figure 3 The second step flow chart of the resource scheduling method based on the cloud service platform provided in the embodiment of the present application;

[0065] Figure 4 A schematic diagram of the structure of a resource scheduling device based on a cloud service platform provided in an embodiment of the present application;

[0066] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0068] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.

[0069] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.

[0070] The present application embodiment provides a resource scheduling method based on a cloud service platform, referring to Figure 1 As shown, the resource scheduling method based on the cloud service platform includes the following steps:

[0071] S11. Obtain deployment attribute information of the virtual machine to be scheduled.

[0072] In the embodiment of the present application, the deployment attribute information of the virtual machine to be scheduled is information used to define the deployment characteristics of the virtual machine to be scheduled, and may include deployment attribute information of multiple dimensions.

[0073] In some embodiments, the deployment attribute information of the virtual machine to be scheduled may include: the region (Region) of the virtual machine to be scheduled, the availability zone (Availability Zone, AZ) of the virtual machine to be scheduled, the instance identification code (Instance ID) of the virtual machine to be scheduled, the instance type (Instance Type) of the virtual machine to be scheduled, the account identification code (Account ID) of the virtual machine to be scheduled, the specification family of the virtual machine to be scheduled, the specifications of the virtual machine to be scheduled, etc. One or more of the following.

[0074] S12: Acquire a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform.

[0075] Among them, the virtual machine portrait set includes multiple virtual machine portraits generated based on the historical operation data analysis of the virtual machines on the cloud service platform; the virtual machine portraits are used to describe the deployment attribute information and resource consumption information corresponding to the virtual machine, wherein the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machine that matches the deployment attribute information of the virtual machine.

[0076] Exemplarily, a virtual machine portrait in the virtual machine portrait set may be shown in the following Table 1:

[0077] Table 1 Virtual machine image

[0078]

[0079] According to the classification column content in Table 1 above, it can be determined whether the information of the virtual machine portrait belongs to deployment attribute information or resource consumption information. The hierarchical column content is used to provide a method for obtaining information. Among them, raw data refers to data directly read from the historical operation data of the virtual machine without data processing and aggregation; real-time data refers to objective fact results determined by statistics and analysis of the historical operation data of the virtual machine; model data indicates indicators obtained by analysis and modeling analysis based on the content of business scenarios; predicted data refers to indicators obtained by inference and prediction based on model data, which is an important basis for the virtual machine portrait to divide the description object.

[0080] It should be noted that, in the above-mentioned embodiment, the resource consumption information of the virtual machine portrait is used to describe the expected utilization of the CPU, and the expected utilization of the CPU is expressed as an example in the form of the expected level of CPU load, but the embodiments of the present application are not limited to this. The resource consumption information of the virtual machine portrait can also indicate the expected consumption of resources such as the graphics processing unit (GPU), memory, and network transmission bandwidth, and the expected consumption can also be expressed in other forms, which is not limited to the embodiments of the present application.

[0081] In some embodiments, the resource scheduling method based on the cloud service platform provided in the above embodiments further includes: generating the target virtual machine portrait, and adding the target virtual machine portrait to the virtual machine portrait set of the cloud service platform.

[0082] In some embodiments, the at least one resource includes: a virtual processor. That is, the resource consumption information is used to describe the virtual processor usage of the virtual machine that matches the deployment attribute information of the virtual machine. Exemplarily, the virtual processor can be a virtual central processing unit (Virtual Central Processing Unit, VCPU), a virtual graphics processing unit (Virtual Graphics Processing Unit, GPU), etc.

[0083] When the at least one resource includes a virtual processor, generating the target virtual machine profile includes the following steps a to c:

[0084] Step a: obtaining usage information of the virtual processor of the target virtual machine from the historical operation data.

[0085] The target virtual machine is a virtual machine that matches the deployment attribute information of the virtual machine to be scheduled, and the usage information includes at least one indicator for describing the utilization rate of the virtual processor.

[0086] Exemplarily, the usage information of the virtual processor of the target virtual machine may include: one or more of: the average usage rate of the virtual processor of the target virtual machine, the P50 (fiftieth percentile) of the usage rate of the virtual processor of the target virtual machine, the P90 (ninety-ninth percentile) of the usage rate of the virtual processor of the target virtual machine, the P99 (ninety-ninth percentile) of the usage rate of the virtual processor of the target virtual machine, and the like.

[0087] Step b: acquiring, based on the usage information of the virtual processor of the target virtual machine, an expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine.

[0088] In some embodiments, the usage information includes a usage indicator, for example: the average usage rate of the virtual processor of the target virtual machine or P50 of the usage rate of the virtual processor of the target virtual machine or P90 of the usage rate of the virtual processor of the target virtual machine, and obtaining the expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the usage information of the virtual processor of the target virtual machine includes: determining the indicator for describing the utilization rate of the virtual processor in the usage information as the expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine.

[0089] In some embodiments, the usage information includes: an average utilization rate, a first utilization rate, and a second utilization rate of the virtual processor.

[0090] The first utilization rate and the second utilization rate are respectively the first percentile and the second percentile of the utilization rate of the virtual processor of the target virtual machine; and the first percentile is smaller than the second percentile.

[0091] Percentile is an indicator used to count and describe the distribution of data. Specifically, a set of data is sorted from small to large and the value at a certain percentage position is determined. For example, the 25th percentile (P25) means that 25% of the data is less than or equal to this value; the 75th percentile (P75) means that 75% of the data is less than or equal to this value.

[0092] In some embodiments, the first percentile and the second percentile are P90 (90th percentile) and P99 (99th percentile), respectively.

[0093] When the usage information includes: the average utilization rate, the first utilization rate, and the second utilization rate of the virtual processor, obtaining the expected utilization rate of the virtual processor of the virtual machine matching the deployment attribute information of the virtual machine according to the usage information of the virtual processor of the target virtual machine includes the following steps b1 to b3:

[0094] Step b1: Calculate the difference between the first utilization rate and the average utilization rate to obtain a first load amplitude.

[0095] Exemplarily, the first percentile is 80%, the average utilization is 43%, and the first load amplitude is 37%.

[0096] Step b2: Calculate the difference between the second utilization rate and the average utilization rate to obtain a second load amplitude.

[0097] Exemplarily, the first percentile is 87%, the average utilization is 43%, and the second load amplitude is 44%.

[0098] Step b3: According to the first load amplitude and the second load amplitude, based on the average utilization or the first utilization or the second utilization, obtain the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine.

[0099] In some embodiments, according to the first load amplitude and the second load amplitude, obtaining the expected utilization of the virtual processor of the virtual machine matching the deployment attribute information of the virtual machine based on the average utilization or the first utilization or the second utilization includes the following steps b31 to b33:

[0100] Step b31: When the second load amplitude is less than or equal to a preset threshold, obtaining an expected utilization rate of a virtual processor of a virtual machine that matches the deployment attribute information of the virtual machine based on the first utilization rate.

[0101] Step b32: When the second load amplitude is greater than the preset threshold and the first load amplitude is less than or equal to the preset threshold, the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine is obtained based on the first utilization.

[0102] Step b33: When the first load amplitude is greater than the preset threshold, obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the second utilization.

[0103] Since the first percentile is smaller than the second percentile, the first load amplitude and the second amplitude are respectively the differences between the first percentile and the second percentile and the average utilization rate, and therefore the second load amplitude is greater than the first load amplitude. If the second load amplitude is less than or equal to a preset threshold, the first load amplitude is less than the preset threshold; if the first load amplitude is greater than the preset threshold, both the first load amplitude and the second load amplitude are greater than the preset threshold.

[0104] When the load fluctuation of the virtual processor conforms to the Gaussian distribution, the load fluctuation of the virtual processor should meet the expectation that μ is the average utilization and the variance is σ 2 The normal distribution is denoted by N(μ, σ 2 ), the preset threshold can be determined according to the standard deviation σ.

[0105] For example, if the load of the virtual processors of all virtual machines is counted and 1 standard deviation is 0.093 and 2 standard deviations are 0.247, the preset threshold may be set to 0.093 or 0.247.

[0106] In other embodiments, in order to facilitate subsequent calculations, the standard deviation σ may be rounded to a preset number of digits to obtain the preset threshold. For example, if 1 standard deviation is 0.093 and 2 standard deviations are 0.247, the preset threshold may be set to 0.1 or 0.25.

[0107] In some embodiments, obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the average utilization includes: determining the average utilization as the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine; obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the first utilization includes: determining the first utilization as the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine; obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the second utilization includes: determining the second utilization as the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine. That is, the first load amplitude is represented as Amplitude1, the second load amplitude is represented as Amplitude2, the average utilization is represented as Pavg, the first utilization is represented as Pm, the average utilization is represented as Pn, the preset threshold is represented as σ, and the expected utilization is represented as Pexpect, then:

[0108]

[0109] In some embodiments, obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the average utilization includes: rounding the average utilization to one decimal place to obtain the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine; obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the first utilization includes: rounding the first utilization to one decimal place to obtain the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine; obtaining the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the second utilization includes: rounding the second utilization to one decimal place to obtain the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine.

[0110] For example: the average utilization is 43%, the first utilization is 80%, and the second utilization is 87%. When the second load amplitude is less than or equal to the preset threshold, the expected utilization is determined to be 50%; when the second load amplitude is greater than the preset threshold and the first load amplitude is less than or equal to the preset threshold, the expected utilization is determined to be 80%; when the first load amplitude is greater than the preset threshold, the expected utilization is determined to be 90%.

[0111] Reference Figure 2 As shown, Figure 2 A schematic diagram of a production link for virtual machine portraits in some embodiments. Figure 2 As shown, the production link of virtual machine portrait includes: offline data warehouse 21, portrait management service 22, asynchronous work component 23, management and control service 24 and online scheduler 25. Among them, the functions of offline data warehouse 21 include: 1. Obtain the historical operation data of virtual machines on the cloud service platform, and obtain the deployment attribute information and resource consumption information corresponding to the virtual machine according to the historical operation data, and write the deployment attribute information and resource consumption information corresponding to the virtual machine into the message queue. 2. Perform pre-processing operations such as data cleaning and aggregation on the deployment attribute information and resource consumption information corresponding to the virtual machine stored in the message queue, and write the data after pre-processing operations into the offline data table. 3. Write the deployment attribute information and resource consumption information corresponding to the pre-processed virtual machine into the acceleration read-only library. The functions of portrait management service 22 include: 1. Read the portrait data for the birth of virtual machine portrait from offline data warehouse 21 through asynchronous application programming interface (Application Programming Interface, API). 2. Generate virtual machine portraits in units of available zones distributed by online schedulers, and start the portrait reflow subtask with available zones as the granularity. 3. Persist virtual machine portraits in the database. The functions of the asynchronous work component 23 include: 1. Obtaining the corresponding portrait data from the accelerated read-only library for each portrait return subtask; 2. Calling the scheduler's operation and maintenance interface (OpsAPI) to return the latest virtual machine portrait to the scheduler's cache for use by the scheduler. 3. Updating the virtual machine portrait in the database based on the statistical summary of the virtual machine portrait results. The functions of the management and control service 24 include: 1. Calling the virtual machine portrait from the asynchronous work component 23 through the operation and maintenance interface for use by the scheduler. 2. Performing data persistence processing on the virtual machine portrait. The main functions of the online scheduler 25 include: 1. Refreshing the cached virtual machine portrait, and scheduling the virtual machine according to the virtual machine portrait. 2. Updating the load margin of the host machine.

[0112] S13: Scheduling the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile.

[0113] In some embodiments, scheduling the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile includes the following steps 1 to 3:

[0114] Step 1: According to the resource consumption information in the target virtual machine portrait, the expected resource consumption of the virtual machine to be scheduled is obtained.

[0115] That is, the resource consumption information of the target virtual machine portrait is used as the resource consumption information of the virtual machine to be scheduled, and the expected resource consumption of the virtual machine to be scheduled is calculated based on the resource consumption information of the virtual machine to be scheduled.

[0116] In some embodiments, the at least one resource includes: a virtual processor, and obtaining the expected resource consumption of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait includes: obtaining the expected virtual processor utilization of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait; obtaining the expected virtual processor consumption of the virtual machine to be scheduled based on the number of virtual processors of the virtual machine to be scheduled and the expected virtual processor utilization of the virtual machine to be scheduled.

[0117] For example, when the number of virtual processors of a virtual machine is 4 and the expected virtual processor utilization of the virtual machine to be scheduled is 80% according to the resource consumption information in the target virtual machine portrait, the virtual processor consumption of the virtual machine to be scheduled is: 4*80%=3.2.

[0118] Step 2: Obtain the resource margin of each host in the host cluster of the cloud service platform.

[0119] The resource margin includes the amount of the at least one resource that is idle on the host machine.

[0120] Step 3: Schedule the virtual machine to be scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption.

[0121] The resource scheduling method based on the cloud service platform provided in the embodiment of the present application first obtains the deployment attribute information of the virtual machine to be scheduled applied for deployment by the tenant on the cloud service platform, then obtains the target virtual machine portrait matching the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform, and schedules the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait. Since the embodiment of the present application can generate multiple virtual machine portraits based on the historical operation data analysis of the virtual machine on the cloud service platform, and the virtual machine portrait is used to describe the deployment attribute information and resource consumption information corresponding to the virtual machine, and the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machine matching the deployment attribute information of the virtual machine, the present application can obtain the expected resource consumption of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait, and schedule the virtual machine to be scheduled according to the expected resource consumption of the virtual machine to be scheduled, so the embodiment of the present application can avoid scheduling virtual machines with high resource requirements to the same host machine, thereby improving resource scheduling, improving resource utilization and reducing resource overhead costs, so as to meet the resource requirements of multiple tenants while reducing multi-tenant resource contention.

[0122] As an extension and refinement of the above embodiment, the present application embodiment provides another resource scheduling method based on a cloud service platform, referring to Figure 3 As shown, the resource scheduling method based on the cloud service platform includes the following steps:

[0123] S301: Obtain deployment attribute information of a virtual machine to be scheduled that is applied for deployment by a tenant on a cloud service platform.

[0124] Exemplarily, the deployment attribute information of the virtual machine to be scheduled may be as follows:

[0125] "Instance ID": "i-yctes8xkw0cva4f6rm15",

[0126] "Region": "AA-BB",

[0127] "Availability Zone": "AA-BB-CC",

[0128] "Instance type": "ecs.g1ie.21xlarge",

[0129] "Account ID": "2100325045",

[0130] "Instance Name": "render-84-bj".

[0131] S302: Obtain a hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled.

[0132] Assume that the hash value of the virtual machine to be scheduled is CubeHash, then:

[0133] CubeHash=Hash(AA-BB-CC+2100325045

[0134] +ecs.g1ie.21xlarge+render-84-bj)

[0135] In some embodiments, before obtaining the hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled, the resource scheduling method based on the cloud service platform further includes: performing fuzzy processing on the deployment attribute information of the virtual machine to be scheduled.

[0136] In some embodiments, the deployment attribute information of the virtual machine to be scheduled is fuzzified, including: extracting features of the deployment attribute information of each dimension based on a regular expression corresponding to the deployment attribute information of each dimension.

[0137] For example, the feature of the instance name can be extracted by using a regular expression corresponding to the instance name, so that the feature item corresponding to the instance name is "render-%-bj".

[0138] The above embodiment also performs fuzzy processing on the deployment attribute information of the virtual machine to be scheduled before obtaining the hash value of the virtual machine to be scheduled based on the deployment attribute information of the virtual machine to be scheduled. Therefore, the above embodiment can avoid the situation where slight differences in the deployment attribute information lead to the inability to match virtual machines and virtual machine portraits with very similar deployment attribute information.

[0139] S303: Obtain a hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set.

[0140] In some embodiments, the hash value of each virtual machine portrait can be calculated and saved in advance according to the deployment attribute information of each virtual machine portrait. When the hash value of each virtual machine portrait needs to be obtained, the pre-saved hash value of each virtual machine portrait is directly read.

[0141] The implementation method of calculating the hash value of each virtual machine portrait based on the deployment attribute information of each virtual machine portrait can refer to the implementation method of obtaining the hash value of the virtual machine to be scheduled based on the deployment attribute information of the virtual machine to be scheduled. To avoid redundancy, it will not be described in detail here.

[0142] Similarly, before obtaining the hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled, the resource scheduling method based on the cloud service platform also includes: fuzzifying the deployment attribute information of the virtual machine portrait.

[0143] S304: Determine a virtual machine portrait in the virtual machine portrait set that has the same hash value as the virtual machine to be scheduled as the target virtual machine portrait.

[0144] That is, it is determined whether there is a virtual machine portrait with a hash value identical to the hash value of the virtual machine to be scheduled, and if so, the virtual machine portrait with a hash value identical to the hash value of the virtual machine to be scheduled is determined as the target virtual machine portrait.

[0145] S305: Obtain the expected resource consumption of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait.

[0146] In some embodiments, the at least one resource includes: a virtual processor, and the obtaining of the expected resource consumption of the virtual machine to be scheduled based on the resource consumption information of the target virtual machine portrait includes: obtaining the expected virtual processor utilization of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait; obtaining the expected virtual processor consumption of the virtual machine to be scheduled based on the number of virtual processors of the virtual machine to be scheduled and the expected virtual processor utilization of the virtual machine to be scheduled.

[0147] For example, if the expected virtual processor utilization of the virtual machine to be scheduled is 50%, and the number of virtual processors of the virtual machine to be scheduled is 6, then the expected virtual processor consumption of the virtual machine to be scheduled is 50%*6=3.

[0148] S306: Obtain the resource margin of each host machine in the host machine cluster of the cloud service platform.

[0149] The resource margin includes the amount of the at least one resource that is idle on the host machine.

[0150] In some embodiments, when the at least one resource includes: a virtual processor; before obtaining the resource margin of each host machine in the host machine cluster of the cloud service platform, the resource scheduling device based on the cloud service platform also includes: obtaining the total amount of available virtual processor load of each host machine in the host machine cluster, obtaining the total amount of available virtual processors of each host machine in the host machine cluster according to the number of virtual processors of each host machine in the host machine cluster and the preset virtual processor utilization rate, and obtaining the initial value of the virtual processor margin of each host machine in the host machine cluster according to the total amount of available virtual processors of each host machine in the host machine cluster.

[0151] In the scenario of load staggered calls, if there are two virtual processors on the host machine, and the utilization rate of one virtual processor is n%, it is hoped that the utilization rate of the other virtual processor does not exceed 100%-n%, so that the two virtual processors can be load staggered calls to avoid all virtual processors being in high load mode, thereby causing the risk of failure. Therefore, the average utilization rate of the virtual processors of the host machine can be set to no more than 55%, so the embodiment of the present application can set the preset virtual processor utilization rate to 55%, and the calculation formula for the total amount of available virtual processor load of the host machine can be:

[0152]

[0153] Among them, CPU_load host The total amount of available virtual processor load on the host, vcpu_count host is the number of virtual processors of the host machine, and A is the adjustment coefficient. In actual use, the value of A can be adjusted according to the scenario to adjust the total amount of available virtual processor load of the host machine.

[0154] For example, the following uses the number of virtual processors vcpu_count of the host machine. host =64, adjustment coefficient A=1, and three virtual machines have been deployed on the host machine. The number of virtual processors of the first virtual machine is 32, and the expected virtual processor utilization is 80%. The number of virtual processors of the second virtual machine is 16, and the expected virtual processor utilization is 30%. The number of virtual processors of the third virtual machine is 8, and the expected virtual processor utilization is 20%. The calculation process of the resource margin of the host machine is described by taking this as an example.

[0155] First, the total amount of available virtual processor load of the host machine is calculated according to the number of virtual processors of the host machine and the adjustment coefficient.

[0156] vcpu_count host =64, A=1 Substituting into the total amount of available virtual processor load of the host machine, we can get CPU_load host =35.2.

[0157] Secondly, the virtual processor consumption of the three virtual machines is calculated according to the number of virtual processors and the expected virtual processor utilization of the three virtual machines respectively.

[0158] According to the number of virtual processors 32 and the expected virtual processor utilization rate of 80%, the virtual processor consumption of the first virtual machine is 32*0.8=25.6.

[0159] According to the number of virtual processors 16 and the expected virtual processor utilization rate 30%, the virtual processor consumption of the second virtual machine is 16*0.3=4.8.

[0160] According to the number of virtual processors 8 and the expected virtual processor utilization rate of 20%, the virtual processor consumption of the third virtual machine is 8*0.2=1.6.

[0161] Finally, the virtual processor margin of the host machine is obtained by subtracting the virtual processor consumption of the virtual machines deployed on the host machine from the total amount of the available virtual processor load of the host machine.

[0162] The total available virtual processor load of the host machine is 35.2, and the virtual processor consumption of the three virtual machines deployed on the host machine is 25.6, 4.8, and 1.6 respectively. Therefore, the virtual processor margin of the host machine is 35.2-25.6-4.8-1.6=3.2.

[0163] S307: Schedule the virtual machine to be scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption.

[0164] In some embodiments, scheduling the virtual machine to be scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption includes:

[0165] The virtual machine to be scheduled is scheduled to a host machine whose resource margin is greater than or equal to the expected resource consumption and whose resource margin is closest to the expected resource consumption of the virtual machine to be scheduled.

[0166] In some embodiments, scheduling the virtual machine to be scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption includes: scheduling the virtual machine to be scheduled to a host machine with the largest resource margin in the host machine cluster.

[0167] S308: Update the resource margin of the target host machine according to the expected resource consumption.

[0168] In some embodiments, updating the resource margin of the target host machine according to the expected resource consumption includes: updating the resource margin of the target host machine to a difference between the resource margin of the target host machine and the expected resource consumption.

[0169] For example, if the virtual processor margin of the target host machine is 16.8 and the expected virtual processor consumption of the virtual machine to be scheduled is 4.6, the virtual processor margin of the target host machine is updated to 16.8-4.6=12.2.

[0170] Each time a virtual machine is scheduled to a host machine, the resource margin of the target host machine is updated according to the expected resource consumption of the virtual machine. The resource margin of the host machine can be directly read when it is needed, without having to calculate the resource margin of the host machine based on the total available resources of the host machine and the resource consumption of the virtual machines deployed on the host machine, thereby improving the efficiency of obtaining the resource margin of the host machine.

[0171] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides a resource scheduling device based on a cloud service platform. This embodiment corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the resource scheduling device based on a cloud service platform in this embodiment can correspond to all the contents of the aforementioned method embodiment.

[0172] The embodiment of the present application provides a resource scheduling device based on a cloud service platform, Figure 4 is a schematic diagram of the structure of the resource scheduling device based on the cloud service platform, such as Figure 4 As shown, the resource scheduling device 400 based on the cloud service platform includes:

[0173] An acquisition unit 41 is used to acquire deployment attribute information of a virtual machine to be scheduled that is applied for deployment by a tenant on a cloud service platform;

[0174] A matching unit 42 is used to obtain a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform; the virtual machine portrait set includes multiple virtual machine portraits generated based on the historical operation data analysis of the virtual machines on the cloud service platform; the virtual machine portrait is used to describe the deployment attribute information and resource consumption information corresponding to the virtual machine, wherein the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machine that matches the deployment attribute information of the virtual machine;

[0175] The scheduling unit 43 is used to schedule the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile.

[0176] As an optional implementation of the embodiment of the present application, the scheduling unit 43 is specifically used to obtain the expected resource consumption of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait; obtain the resource margin of each host machine in the host machine cluster of the cloud service platform, and the resource margin includes the amount of at least one resource that is idle on the host machine; and schedule the virtual machine to be scheduled to the target host machine in the host machine cluster where the resource margin is greater than or equal to the expected resource consumption.

[0177] As an optional implementation of the embodiment of the present application, the scheduling unit 43 is also used to update the resource margin of the target host machine according to the expected resource consumption after scheduling the virtual machine to be scheduled to the target host machine in the host machine cluster where the resource margin is greater than or equal to the expected resource consumption.

[0178] As an optional implementation of the embodiment of the present application, the at least one resource includes: a virtual processor; the matching unit 42 is further used to obtain usage information of the virtual processor of the target virtual machine from the historical operation data; obtain the expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine according to the usage information of the virtual processor of the target virtual machine; generate the target virtual machine profile according to the expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine;

[0179] The target virtual machine is a virtual machine that matches the deployment attribute information of the virtual machine to be scheduled, and the usage information includes at least one indicator for describing the utilization rate of the virtual processor.

[0180] As an optional implementation of the embodiment of the present application, the usage information includes: an average utilization rate, a first utilization rate, and a second utilization rate of the virtual processor, wherein the first utilization rate and the second utilization rate are respectively a first percentile and a second percentile of the utilization rate of the virtual processor of the target virtual machine; the first percentile is less than the second percentile;

[0181] The matching unit 42 is specifically used to calculate the difference between the first utilization and the average utilization to obtain a first load amplitude; calculate the difference between the second utilization and the average utilization to obtain a second load amplitude; and obtain, according to the first load amplitude and the second load amplitude, an expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the average utilization or the first utilization or the second utilization.

[0182] As an optional implementation of the embodiment of the present application, the matching unit 42 is specifically used to obtain the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine based on the average utilization when the second load amplitude is less than or equal to the preset threshold; when the second load amplitude is greater than the preset threshold, and the first load amplitude is less than or equal to the preset threshold, the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine is obtained based on the first utilization; when the first load amplitude is greater than the preset threshold, the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine is obtained based on the second utilization.

[0183] As an optional implementation of the embodiment of the present application, the scheduling unit 43 is specifically used to obtain the expected virtual processor utilization of the virtual machine to be scheduled based on the resource consumption information in the target virtual machine portrait; and obtain the expected virtual processor consumption of the virtual machine to be scheduled based on the number of virtual processors of the virtual machine to be scheduled and the expected virtual processor utilization of the virtual machine to be scheduled.

[0184] As an optional implementation of an embodiment of the present application, the at least one resource includes: a virtual processor; the scheduling unit 43 is also used to obtain the number of virtual processors of each host machine in the host machine cluster of the cloud service platform before obtaining the resource margin of each host machine in the host machine cluster; obtain the total amount of available virtual processors of each host machine in the host machine cluster according to the number of virtual processors of each host machine in the host machine cluster and the preset virtual processor utilization; obtain the initial value of the virtual processor margin of each host machine in the host machine cluster according to the total amount of available virtual processors of each host machine in the host machine cluster.

[0185] As an optional implementation of the embodiment of the present application, the matching unit 42 is specifically used to obtain the hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled; obtain the hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set; and determine the virtual machine portrait in the virtual machine portrait set that has the same hash value as the virtual machine to be scheduled as the target virtual machine portrait.

[0186] As an optional implementation of the embodiment of the present application, the matching unit 42 is further used to fuzzy the deployment attribute information of the virtual machine to be scheduled before obtaining the hash value of the virtual machine to be scheduled based on the deployment attribute information of the virtual machine to be scheduled, and to fuzzy the deployment attribute information of each virtual machine portrait in the virtual machine portrait set before obtaining the hash value of each virtual machine portrait in the virtual machine portrait set based on the deployment attribute information of each virtual machine portrait in the virtual machine portrait set.

[0187] The resource scheduling device based on the cloud service platform provided in the embodiment of the present application can execute the resource scheduling method based on the cloud service platform provided in any of the above embodiments, and its implementation principle and technical effect are similar, which will not be repeated here.

[0188] Based on the same inventive concept, an embodiment of the present application also provides an electronic device. Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device provided in this embodiment includes: a memory 501 and a processor 502, wherein the memory 501 is used to store a computer program, and the processor 502 is used to execute any of the resource scheduling methods based on the cloud service platform provided in the above embodiments when executing the computer program.

[0189] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device implements any of the cloud service platform-based resource scheduling methods provided in the above embodiments.

[0190] Based on the same inventive concept, an embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computing device implements any of the cloud service platform-based resource scheduling methods provided in the above embodiments.

[0191] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.

[0192] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0193] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0194] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A resource scheduling method based on a cloud service platform, characterized in that: include: Obtaining deployment attribute information of a virtual machine to be scheduled that is applied for deployment by a tenant on the cloud service platform; Acquire a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform; The virtual machine portrait set includes a plurality of virtual machine portraits generated based on the historical operation data analysis of the virtual machines on the cloud service platform; the virtual machine portraits are used to describe the deployment attribute information and resource consumption information corresponding to the virtual machines, wherein the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machines matching the deployment attribute information of the virtual machines; The virtual machine to be scheduled is scheduled according to the resource consumption information in the target virtual machine portrait.

2. The method according to claim 1, characterized in that The scheduling of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile includes: Obtaining the expected resource consumption of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait; Acquire a resource margin of each host machine in a host machine cluster of the cloud service platform, wherein the resource margin includes an amount of the at least one resource that is idle on the host machine; The virtual machine to be scheduled is scheduled to a target host machine in the host machine cluster whose resource margin is greater than or equal to the expected resource consumption.

3. The method according to claim 2, characterized in that After scheduling the virtual machine to be scheduled to a target host machine in the host machine cluster where the resource margin is greater than or equal to the expected resource consumption, the method further includes: The resource margin of the target host machine is updated according to the expected resource consumption.

4. The method according to claim 1, characterized in that: The at least one resource includes: a virtual processor; the method further includes: Acquire usage information of a virtual processor of a target virtual machine from the historical operation data; the target virtual machine is a virtual machine that matches the deployment attribute information of the virtual machine to be scheduled, and the usage information includes at least one indicator for describing the utilization rate of the virtual processor; Acquire, according to the usage information of the virtual processor of the target virtual machine, the expected utilization rate of the virtual processor of the virtual machine matching the deployment attribute information of the virtual machine; The target virtual machine profile is generated according to the expected utilization of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine.

5. The method according to claim 4, characterized in that The usage information includes: an average utilization rate, a first utilization rate, and a second utilization rate of the virtual processor, wherein the first utilization rate and the second utilization rate are respectively a first percentile and a second percentile of the utilization rate of the virtual processor of the target virtual machine; the first percentile is less than the second percentile; and obtaining, according to the usage information of the virtual processor of the target virtual machine, an expected utilization rate of the virtual processor of the virtual machine that matches the deployment attribute information of the virtual machine, includes: calculating a difference between the first utilization rate and the average utilization rate to obtain a first load amplitude; calculating a difference between the second utilization rate and the average utilization rate to obtain a second load amplitude; According to the first load amplitude and the second load amplitude, an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine is obtained based on the average utilization rate or the first utilization rate or the second utilization rate.

6. The method according to claim 5, characterized in that The acquiring, according to the first load amplitude and the second load amplitude, an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine based on the average utilization rate or the first utilization rate or the second utilization rate, comprises: When the second load amplitude is less than or equal to a preset threshold, acquiring an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine based on the average utilization rate; When the second load amplitude is greater than the preset threshold and the first load amplitude is less than or equal to the preset threshold, acquiring an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine based on the first utilization rate; When the first load amplitude is greater than the preset threshold, an expected utilization rate of a virtual processor of a virtual machine matching the deployment attribute information of the virtual machine is obtained based on the second utilization rate.

7. The method according to claim 2, characterized in that The acquiring, according to the resource consumption information in the target virtual machine portrait, the expected resource consumption of the virtual machine to be scheduled includes: Obtaining the expected virtual processor utilization of the virtual machine to be scheduled according to the resource consumption information in the target virtual machine profile; The expected virtual processor consumption of the virtual machine to be scheduled is obtained according to the number of virtual processors of the virtual machine to be scheduled and the expected virtual processor utilization of the virtual machine to be scheduled.

8. The method according to claim 3, characterized in that The at least one resource includes: a virtual processor; before obtaining the resource margin of each host in the host cluster of the cloud service platform, the method further includes: Obtaining the number of virtual processors of each host in the host cluster; Obtaining the total amount of available virtual processors of each host machine in the host machine cluster according to the number of virtual processors of each host machine in the host machine cluster and the preset virtual processor utilization rate; An initial value of a virtual processor margin of each host machine in the host machine cluster is obtained according to the total amount of available virtual processors of each host machine in the host machine cluster.

9. The method according to claim 1, characterized in that: The step of acquiring a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from the virtual machine portrait set of the cloud service platform includes: Obtaining a hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled; Obtaining a hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set; A virtual machine portrait in the virtual machine portrait set having the same hash value as the to-be-scheduled virtual machine is determined as the target virtual machine portrait.

10. The method according to claim 9, characterized in that The method further comprises: before obtaining the hash value of the virtual machine to be scheduled according to the deployment attribute information of the virtual machine to be scheduled, performing fuzzy processing on the deployment attribute information of the virtual machine to be scheduled; Before obtaining the hash value of each virtual machine portrait in the virtual machine portrait set according to the deployment attribute information of each virtual machine portrait in the virtual machine portrait set, the deployment attribute information of each virtual machine portrait in the virtual machine portrait set is fuzzified.

11. A resource scheduling device based on a cloud service platform, characterized in that: include: An acquisition unit, used to acquire deployment attribute information of a virtual machine to be scheduled that is applied for deployment by a tenant on a cloud service platform; A matching unit, configured to obtain a target virtual machine portrait that matches the deployment attribute information of the virtual machine to be scheduled from a virtual machine portrait set of the cloud service platform; The virtual machine portrait set includes a plurality of virtual machine portraits generated based on the historical operation data analysis of the virtual machines on the cloud service platform; the virtual machine portraits are used to describe the deployment attribute information and resource consumption information corresponding to the virtual machines, wherein the resource consumption information is used to describe the expected consumption of at least one resource of the virtual machines matching the deployment attribute information of the virtual machines; The scheduling unit is used to schedule the virtual machine to be scheduled according to the resource consumption information in the target virtual machine portrait.

12. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the resource scheduling method based on the cloud service platform as described in any one of claims 1-10 when executing the computer program.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the resource scheduling method based on the cloud service platform as described in any one of claims 1-10.

14. A computer program product, characterized in that When the computer program product runs on a computer, the computer implements the resource scheduling method based on the cloud service platform as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Virtual machine creation method and device, management equipment and terminal equipment

    CN108762885A

  • Virtual machine scheduling method and device

    CN114546602A

  • Instance scheduling method and device, electronic equipment and computer readable storage medium

    CN116820664A

  • Resource scheduling method and device, computer equipment, storage medium and program product

    CN117539587A

  • Virtual machine memory adjustment method and device, equipment and medium

    CN118227270A

Cited By

  • Resource planning method, resource scheduling method, device, storage medium and product

    CN119357005A