CN114221962B - Cloud resource reallocation method and system based on peak utilization rate - Google Patents

Cloud resource reallocation method and system based on peak utilization rate Download PDF

Info

Publication number
CN114221962B
CN114221962B CN202111501404.5A CN202111501404A CN114221962B CN 114221962 B CN114221962 B CN 114221962B CN 202111501404 A CN202111501404 A CN 202111501404A CN 114221962 B CN114221962 B CN 114221962B
Authority
CN
China
Prior art keywords
virtual machine
cpu
value
resource
utilization rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111501404.5A
Other languages
Chinese (zh)
Other versions
CN114221962A (en
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.)
Industrial Bank Co Ltd
Original Assignee
Industrial Bank 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 Industrial Bank Co Ltd filed Critical Industrial Bank Co Ltd
Priority to CN202111501404.5A priority Critical patent/CN114221962B/en
Publication of CN114221962A publication Critical patent/CN114221962A/en
Application granted granted Critical
Publication of CN114221962B publication Critical patent/CN114221962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms

Abstract

The invention provides a cloud resource reallocation method and a cloud resource reallocation system based on peak utilization rate, wherein the cloud resource reallocation method and the cloud resource reallocation system based on peak utilization rate comprise the following steps: EC recommended value obtaining step: obtaining an EC recommended value of the virtual machine based on the peak value utilization rate; judging: based on the obtained EC recommended value of the virtual machine, judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system. According to the invention, through the high-performance high-availability small-sized cloud resource redistribution, based on the peak utilization rate of the past year, the contradiction between the large demand of system online resources and the fact that the distributed resources are not fully utilized is solved from the aspect of resource proportioning, so that the optimization of the whole bearing capacity of a resource pool is realized; from the perspective of resource distribution, the contradiction of unbalanced distribution of each virtual machine among physical servers of a resource pool is solved, and therefore, the maximization of performance and high availability is ensured.

Description

Cloud resource reallocation method and system based on peak utilization rate
Technical Field
The invention relates to the technical field of cloud resource reallocation, in particular to a cloud resource reallocation method and system based on peak utilization rate, and especially relates to a small-sized cloud resource reallocation method based on peak utilization rate.
Background
In the data center of the financial industry, the small-sized machine still bears the responsibility of guaranteeing the safe and stable operation of the important information system by virtue of strong high reliability and strong performance advantages. With development of resource pool cloud work, namely, a traditional architecture of a single small machine is converted into a cloud architecture formed by connecting a plurality of small machines into a cluster, so that the computing power of an information system is improved, and the capacity of resource optimization configuration is realized.
The Chinese patent document with publication number CN106293947A discloses a GPU-CPU mixed resource distribution system and method under a virtualized cloud environment, wherein the system and method comprise an injection module and a distributor; the injection module is responsible for setting hooks and limiting the process to occupy resources in a sleep mode; the distributor is responsible for calling a resource distribution algorithm to obtain a resource distribution target value and sending the resource distribution target value to the injection module. The invention provides an FEA algorithm and a resource allocation framework, which are used for efficiently carrying out dynamic resource allocation of multiple heterogeneous mixed resources. Through the operation of the resource allocation, the fairness of the resource allocation is improved, and the efficiency of the resource allocation is ensured.
With respect to the related art described above, the inventors consider that in terms of resource optimization configuration, it is common practice in the industry to set the ratio of the number of physical CPU cores (abbreviated as EC, entitled Capacity) to the number of virtual machine CPU cores (abbreviated as VP, virtual Processor) to 1:2 or 1:4. In practice, however, we have found that this cut-off approach often brings the conflict of "system on-line resource demand is large" and "actually not fully utilizing the allocated resources". In addition, as the scale of the resource pool is enlarged, the contradiction of unbalanced distribution of each virtual machine among physical servers of the resource pool is more and more prominent, so that the performance of computing power of an information system is influenced to be maximized, and the high availability of cloud resources is weakened to a certain extent. Currently, there is no efficient reassignment method in the industry that addresses the two contradictions described above.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a cloud resource reallocation method and system based on peak utilization rate.
The cloud resource reallocation method based on the peak value utilization rate provided by the invention comprises the following steps:
EC recommended value obtaining step: obtaining an EC recommended value of the virtual machine based on the peak value utilization rate;
judging: based on the obtained EC recommended value of the virtual machine, judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system.
Preferably, the EC recommended value obtaining step includes the steps of:
step S1: CPU performance data of preset time is obtained and stored and is used as a performance data set for analysis decision;
step S2: calculating the peak utilization rate of CPU resources of each virtual machine for a preset time by taking the virtual machine as a unit based on the performance data set in the step S1;
step S3: aiming at various virtual machine scenes, correspondingly dividing the CPU resource peak value use ratio performance data obtained in the step S2 by taking the virtual machine as a unit;
step S4: respectively calculating the reassigned EC recommended values of the virtual machines based on the multiple virtual machine scenes and the CPU resource peak value utilization rate correspondingly divided in the step S3;
step S5: limiting the EC recommended value of the virtual machine obtained based on the step S4;
the judging step comprises the following steps: and (3) judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system based on the EC recommended value of the virtual machine obtained in the step (S5).
Preferably, the step S2 includes the steps of:
step S2.1: the peak value of the actual use core number of the physical CPU of each virtual machine for a preset time is calculated, and the formula is as follows:
CPU MAX =MAX{CPU 1 ,CPU 2 ,...,CPU N } (1)
wherein the CPU MAX A peak value representing the number of cores actually used by the physical CPU for a predetermined time of the virtual machine; CPU (Central processing Unit) N A peak value representing the actual number of cores used by the physical CPU of each natural day of the virtual machine; n represents the number of days of nature;
step S2.2: the peak utilization rate of CPU resources of each virtual machine for a preset time is calculated, and the formula is as follows:
wherein U is MAX Peak usage of CPU resources representing a predetermined time of the virtual machine; EC represents the number of physical CPU cores currently allocated to the virtual machine.
Preferably, the step S3 includes the steps of:
the preparation step of the remote disaster comprises the following steps: aiming at the virtual machine scene of the remote disaster recovery, taking the CPU resource peak value utilization rate of the production end as a measurement standard; if the production end and the disaster recovery end are switched in the preset time period, taking a larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end as a measurement standard;
database high availability step: aiming at a virtual machine scene with high availability of a database, taking the CPU resource peak value utilization rate of a high availability master node as a measurement standard; if the high-availability master node and the standby node are switched in a preset time period, taking a larger value of CPU resource peak value utilization rate of the high-availability master node and the standby node as a measurement standard;
and (3) applying load balancing: aiming at the virtual machine scene of the application load balancing, taking the maximum value of the CPU resource peak value utilization rate of each node of the application load balancing as a measurement standard.
Preferably, the step S4 includes the steps of:
step S4.1: judging whether the CPU resource peak value utilization rate of the virtual machine is lower than a preset value or not; if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, entering step S4.2; if the CPU resource peak value utilization rate of the virtual machine is not lower than a preset value, entering step S4.3;
step S4.2: if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp{EC′ NEW } (4)
wherein, EC' NEW Represents when U MAX A recommended value of EC when the predetermined value is reached; EC (EC) NEW Is EC'. NEW Taking the recommended value obtained by the upward value of the preset granularity; the RoundUp { } function is expressed as a value taken upward at a predetermined granularity;
step S4.3: if the CPU resource peak value utilization rate of the virtual machine is higher than the specified value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp(EC′ NEW ) (6)
wherein, EC' NEW Represents when U MAX The recommended value of EC when the selected value is reached.
The invention provides a cloud resource redistribution system based on peak use rate, which comprises the following modules:
the EC recommendation value obtaining module: obtaining an EC recommended value of the virtual machine based on the peak value utilization rate;
and a judging module: based on the obtained EC recommended value of the virtual machine, judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system.
Preferably, the EC recommended value obtaining module includes the following modules:
module M1: CPU performance data of preset time is obtained and stored and is used as a performance data set for analysis decision;
module M2: calculating the peak utilization rate of CPU resources of each virtual machine for a preset time by taking the virtual machine as a unit based on the performance data set of the module M1;
module M3: aiming at various virtual machine scenes, correspondingly dividing CPU resource peak value use ratio performance data obtained by the module M2 by taking a virtual machine as a unit;
module M4: respectively calculating the reassigned EC recommended values of the virtual machines based on the multiple virtual machine scenes of the module M3 and the correspondingly divided CPU resource peak value utilization rates;
module M5: limiting the EC recommended value of the virtual machine obtained based on the module M4;
the judging module is used for: based on the EC recommended value of the virtual machine obtained by the module M5, judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system.
Preferably, the module M2 includes the following modules:
module M2.1: the peak value of the actual use core number of the physical CPU of each virtual machine for a preset time is calculated, and the formula is as follows:
CPU MAX =MAX{CPU 1 ,CPU 2 ,...,CPU N } (1)
wherein the CPU MAX A peak value representing the number of cores actually used by the physical CPU for a predetermined time of the virtual machine; CPU (Central processing Unit) N A peak value representing the actual number of cores used by the physical CPU of each natural day of the virtual machine; n represents the number of days of nature;
module M2.2: the peak utilization rate of CPU resources of each virtual machine for a preset time is calculated, and the formula is as follows:
wherein U is MAX Peak usage of CPU resources representing a predetermined time of the virtual machine; EC represents the number of physical CPU cores currently allocated to the virtual machine.
Preferably, the module M3 includes the following modules:
the remote disaster recovery module: aiming at the virtual machine scene of the remote disaster recovery, taking the CPU resource peak value utilization rate of the production end as a measurement standard; if the production end and the disaster recovery end are switched in the preset time period, taking a larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end as a measurement standard;
database high availability module: aiming at a virtual machine scene with high availability of a database, taking the CPU resource peak value utilization rate of a high availability master node as a measurement standard; if the high-availability master node and the standby node are switched in a preset time period, taking a larger value of CPU resource peak value utilization rate of the high-availability master node and the standby node as a measurement standard;
and (3) applying a load balancing module: aiming at the virtual machine scene of the application load balancing, taking the maximum value of the CPU resource peak value utilization rate of each node of the application load balancing as a measurement standard.
Preferably, the module M4 includes the following modules:
module M4.1: judging whether the CPU resource peak value utilization rate of the virtual machine is lower than a preset value or not; if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, entering a module M4.2; if the CPU resource peak value utilization rate of the virtual machine is not lower than a preset value, entering a module M4.3;
module M4.2: if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp{EC′ NEW } (4)
wherein, EC' NEW Represents when U MAX A recommended value of EC when the predetermined value is reached; EC (EC) NEW Is EC'. NEW Taking the recommended value obtained by the upward value of the preset granularity; the RoundUp { } function is expressed as a value taken upward at a predetermined granularity;
module M4.3: if the CPU resource peak value utilization rate of the virtual machine is higher than the specified value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp(EC′ NEW ) (6)
wherein, EC' NEW Represents when U MAX The recommended value of EC when the selected value is reached.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the invention, through the high-performance high-availability small-sized machine cloud resource reallocation, the contradiction between large system online resource demand and insufficient actual utilization of allocated resources is solved from the aspect of resource proportioning based on the peak utilization rate of the past year aiming at three virtual machine scenes of remote disaster recovery, high availability of a database and application load balancing, so that the optimization of the whole bearing capacity of a resource pool is realized;
2. the invention solves the contradiction of unbalanced distribution of each virtual machine among physical servers of a resource pool from the perspective of resource distribution, thereby ensuring the maximization of performance and high availability;
3. the invention changes from the passive operation and maintenance in the past to the active operation and maintenance based on data statistics analysis, provides the overall display of the resource utilization rate and the resource distribution of the cloud resource pool, provides decision data for capacity management and purchasing budget, and improves the operation and maintenance capability of the data center in the 'new construction' stage.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a block diagram of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present invention.
The embodiment of the invention discloses a method for reallocating cloud resources of a small machine based on peak utilization rate, which is shown in figure 1 and comprises the following steps: EC recommended value obtaining step: and obtaining the EC recommended value of the virtual machine based on the peak value use ratio.
The EC recommended value obtaining step includes the steps of: step S1: CPU performance data for a predetermined time is acquired and stored as a performance data set for analysis decisions. CPU performance data for the past year is obtained and saved from the hardware management console (HMC, hardware Management Console) or the operating system of each virtual machine as a data set for analysis decisions.
Step S2: based on the performance data set in the step S1, the peak usage of the CPU resource of each virtual machine for a predetermined time is calculated in units of virtual machines, that is, the peak usage of the CPU resource of each virtual machine for the last year is calculated.
Step S2 includes the steps of: step S2.1: the peak value of the actual use core number of the physical CPU in the preset time of each virtual machine is calculated, namely the peak value of the actual use core number of the physical CPU in the last year of each virtual machine is calculated, and the formula is as follows:
CPU MAX =MAX{CPU 1 ,CPU 2 ,...,CPU N } (1)
wherein the CPU MAX A peak value representing the number of cores actually used by the physical CPU for a predetermined time of the virtual machine, the predetermined time including the past year; CPU (Central processing Unit) N A peak value representing the actual number of cores used by the physical CPU of each natural day of the virtual machine; n represents the number of days of nature, e.g., if the last year is calculated, then n=365.
Step S2.2: the peak utilization rate of CPU resources of each virtual machine in the past year is calculated, and the formula is as follows:
wherein U is MAX Peak usage of CPU resources representing the last year of the virtual machine; EC represents the number of physical CPU cores currently allocated to the virtual machine.
Step S3: and (2) correspondingly dividing the CPU resource peak value use rate performance data obtained in the step (S2) by taking the virtual machine as a unit aiming at various virtual machine scenes. Relevant information of each virtual machine is derived from a configuration management database (CMDB, configuration Management Database), including the affiliated application system, deployment site, high availability mode, importance level, whether database, etc. Aiming at three virtual machine scenes of disaster recovery in different places, high availability of databases and application load balancing, the performance data such as the CPU resource peak value utilization rate obtained in the step S2 are divided into three types by taking the virtual machine as a unit.
Step S3 includes the steps of: the preparation step of the remote disaster comprises the following steps: aiming at the virtual machine scene of the remote disaster recovery, taking the CPU resource peak value utilization rate of the production end as a measurement standard; if the production end and the disaster recovery end are switched in the preset time period, the larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end is used as a measurement standard. Aiming at the virtual machine scene of the disaster recovery, the CPU resource peak value utilization rate of the disaster recovery end is ignored by taking the CPU resource peak value utilization rate of the production end as a measurement standard. If the production end and the disaster recovery end are switched over in the past year, the larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end is used as a measurement standard.
Database high availability step: aiming at a virtual machine scene with high availability of a database, taking the CPU resource peak value utilization rate of a high availability master node as a measurement standard; if the high availability master node and the standby node are switched over during the predetermined time period, a larger value of CPU resource peak utilization of the high availability master node and the standby node is used as a measurement standard. And aiming at the virtual machine scene with high availability of the database, taking the CPU resource peak value utilization rate of the high availability master node as a measurement standard, and neglecting the CPU resource peak value utilization rate of the high availability standby node. If the high availability master and standby nodes have been handed over during the past year, the larger value of the peak CPU resource usage of both is used as a measure.
And (3) applying load balancing: aiming at the virtual machine scene of application load balancing, taking the maximum value of the CPU resource peak value utilization rate of each node of application load balancing as a measurement standard, and neglecting the CPU resource peak value utilization rate of other nodes.
Step S4: and (3) respectively calculating the reassigned EC recommended values of the virtual machines based on the multiple virtual machine scenes and the CPU resource peak value utilization rate correspondingly divided in the step (S3). And (3) respectively calculating the reassigned EC recommended values of the virtual machines based on the three types of virtual machine scenes in the step (S3).
Step S4 includes the steps of: step S4.1: judging whether the CPU resource peak value utilization rate of the virtual machine is lower than a preset value or not; if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, entering step S4.2; if the CPU resource peak utilization rate of the virtual machine is not lower than the preset value, the step S4.3 is entered. The predetermined value includes 30%. Judging whether the CPU resource peak value utilization rate of the virtual machine is lower than 30%; if yes, go to step S4.2; if not, the process proceeds to step S4.3.
Step S4.2: if the CPU resource peak utilization rate of the virtual machine is lower than a preset value, calculating a reassigned EC recommended value, namely if the CPU resource peak utilization rate of the virtual machine is lower than 30%, and calculating the reassigned EC recommended value according to the following formula:
EC NEW =RoundUp{EC′ NEW } (4)
wherein EC'. NEW Represents when U MAX Recommended value of EC when reaching a predetermined value (30%); EC (EC) NEW Is EC'. NEW Taking up the recommended value obtained at a predetermined granularity, i.e. EC NEW Is EC'. NEW Taking 0.5 as a recommended value obtained by taking the granularity as an upward value; the RoundUp { } function is expressed as a value taken upward at a predetermined granularity; the round up function generally represents rounding up with 1 as granularity, and the present invention defines the round up function as "take up value with 0.5 as granularity" in order to obtain higher accuracy.
Step S4.3: if the CPU resource peak value utilization rate of the virtual machine is higher than the appointed value, calculating the reassigned EC recommended value, wherein the appointed value comprises 100%. I.e. if higher than 100%, the reassigned EC recommendation is calculated as follows:
EC NEW =RoundUp(EC′ NEW ) (6)
wherein EC'. NEW Represents when U MAX Recommended value of EC at the time of reaching the selected value (selected value includes 50%), EC NEW Is EC'. NEW Taking 0.5 as the granularity to take the recommended value obtained by upward value.
Step S5: and limiting the EC recommended value of the virtual machine obtained based on the step S4. On the one hand, the information systems have important level differences, namely, the importance degree of the important information systems is higher than that of the general information systems, and on the other hand, the importance degree of the database server is higher than that of the application server, so that the EC recommendation value of the virtual machine obtained in the step S4 is limited.
Step S5 includes the steps of: step S5.1: aiming at the virtual machine of the important information system, the reassigned EC recommendation value is at least 1 kernel, and the formula is as follows:
EC NEW =MAX{EC NEW ,1} (7)。
step S5.2: aiming at the virtual machine of the database server, the reassigned EC recommendation value is at least 2 cores, and the formula is as follows:
EC NEW =MAX{EC NEW ,2} (8)。
judging: and (3) judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system based on the EC recommended value of the virtual machine obtained in the step (S5).
Step S6 includes the steps of: step S6.1: and calculating the EC assigned value of each physical server after reassignment by taking each physical server as a unit. If the total amount of CPU resources of the physical server is exceeded, the prompt is that the physical server resources are distributed too intensively, and the redistribution of the virtual machines by online migration inside the resource pool cluster is suggested.
Step S6.2: aiming at virtual machine scenes of application load balancing, CPU of each node of the same application system is calculated MAX Standard deviation of (2). If the standard deviation exceeds 0.5, indicating that the load of the resources of each node is unbalanced, prompting that the load of the application system is balanced, and suggesting further analysis of reasons.
Step S6.3: and calculating the drop points of the virtual machines after reassignment by taking each set of application systems as a unit. If 2 or more virtual machines appear to be distributed on the same physical server, the application system resource distribution is prompted to be too centralized, and the virtual machines are suggested to be redistributed by online migration inside the resource pool cluster.
The main functional module for efficient allocation of the cloud resources of the small machine based on the peak utilization rate is shown in the figure 1, and the cloud resources of the small machine with high performance and high availability are reallocated based on the peak utilization rate of the past year aiming at three virtual machine scenes of disaster recovery, high availability of a database and application load balancing, so that on one hand, the ratio of the physical CPU core number to the virtual CPU core number is reasonably regulated from the aspect of resource proportioning, and the optimization of the whole bearing capacity of a resource pool is realized; on the other hand, the falling points of the virtual machines are reasonably balanced from the perspective of resource distribution, and most of virtual machines on cloud resources are not concentrated on a certain physical server, and the load balancing of the same application system or the high-availability virtual machines are scattered on different physical servers.
The embodiment of the invention also discloses a cloud resource redistribution system based on the peak value utilization rate, which comprises the following modules: the EC recommendation value obtaining module: and obtaining the EC recommended value of the virtual machine based on the peak value use ratio.
The EC recommendation value obtaining module comprises the following modules: module M1: CPU performance data for a predetermined time is acquired and stored as a performance data set for analysis decisions. Module M2: based on the performance data set of the module M1, calculating the peak utilization rate of CPU resources of each virtual machine for a preset time by taking the virtual machine as a unit.
The module M2 includes the following modules: module M2.1: the peak value of the actual use core number of the physical CPU of each virtual machine for a preset time is calculated, and the formula is as follows:
CPU MAX =MAX{CPU 1 ,CPU 2 ,...,CPU N } (1)
wherein the CPU MAX A peak value representing the number of cores actually used by the physical CPU for a predetermined time of the virtual machine; CPU (Central processing Unit) N A peak value representing the actual number of cores used by the physical CPU of each natural day of the virtual machine; n represents the number of days of nature.
Module M2.2: the peak utilization rate of CPU resources of each virtual machine in the past year is calculated, and the formula is as follows:
wherein the method comprises the steps of,U MAX Peak usage of CPU resources representing the last year of the virtual machine; EC represents the number of physical CPU cores currently allocated to the virtual machine.
Module M3: and aiming at various virtual machine scenes, correspondingly dividing CPU resource peak value use rate performance data obtained by the module M2 by taking the virtual machine as a unit.
The module M3 includes the following modules: the remote disaster recovery module: aiming at the virtual machine scene of the remote disaster recovery, taking the CPU resource peak value utilization rate of the production end as a measurement standard; if the production end and the disaster recovery end are switched in the preset time period, the larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end is used as a measurement standard.
Database high availability module: aiming at a virtual machine scene with high availability of a database, taking the CPU resource peak value utilization rate of a high availability master node as a measurement standard; if the high availability master node and the standby node are switched over during the predetermined time period, a larger value of CPU resource peak utilization of the high availability master node and the standby node is used as a measurement standard.
And (3) applying a load balancing module: aiming at the virtual machine scene of the application load balancing, taking the maximum value of the CPU resource peak value utilization rate of each node of the application load balancing as a measurement standard.
Module M4: and respectively calculating the reassigned EC recommended values of the virtual machines based on the multi-class virtual machine scenes of the module M3 and the correspondingly divided CPU resource peak value utilization rates.
The module M4 includes the following modules: module M4.1: judging whether the CPU resource peak value utilization rate of the virtual machine is lower than a preset value or not; if the value is lower than the preset value, entering a module M4.2; if not, the module M4.3 is entered.
Module M4.2: if the EC recommendation value is lower than the preset value, calculating a reassigned EC recommendation value according to the following formula:
EC NEW =RoundUp{EC′ NEW } (4)
wherein, EC' NEW Represents when U MAX Recommended value of EC when reaching a predetermined value (30%); EC (EC) NEW Is EC'. NEW Taking the recommended value obtained by the upward value of the preset granularity; the RoundUp { } function is expressed as a value that is taken upward at a predetermined granularity.
Module M4.3: if the EC value is higher than the specified value (100%), the reassigned EC recommended value is calculated as follows:
EC NEW =RoundUp(EC′ NEW ) (6)
wherein, EC' NEW Represents when U MAX The recommended value of EC when the selected value (50%) is reached.
Module M5: and limiting the EC recommended value of the virtual machine obtained based on the module M4.
And a judging module: based on the EC recommended value of the virtual machine obtained by the module M5, judging the resource distribution condition of the physical server of the resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system.
Those skilled in the art will appreciate that the invention provides a system and its individual devices, modules, units, etc. that can be implemented entirely by logic programming of method steps, in addition to being implemented as pure computer readable program code, in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units for realizing various functions included in the system can also be regarded as structures in the hardware component; means, modules, and units for implementing the various functions may also be considered as either software modules for implementing the methods or structures within hardware components.
The foregoing describes specific embodiments of the present invention. It is to be understood that the invention is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the invention. The embodiments of the present application and features in the embodiments may be combined with each other arbitrarily without conflict.

Claims (6)

1. The cloud resource reallocation method based on the peak value utilization rate is characterized by comprising the following steps of:
EC recommended value obtaining step: obtaining an EC recommended value of the virtual machine based on the peak value utilization rate;
judging: based on the obtained EC recommended value of the virtual machine, judging the resource distribution condition of a physical server of a resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system;
the EC recommended value obtaining step includes the steps of:
step S1: CPU performance data of preset time is obtained and stored and is used as a performance data set for analysis decision;
step S2: calculating the peak utilization rate of CPU resources of each virtual machine for a preset time by taking the virtual machine as a unit based on the performance data set in the step S1;
step S3: aiming at various virtual machine scenes, correspondingly dividing the CPU resource peak value use ratio performance data obtained in the step S2 by taking the virtual machine as a unit;
step S4: respectively calculating the reassigned EC recommended values of the virtual machines based on the multiple virtual machine scenes and the CPU resource peak value utilization rate correspondingly divided in the step S3;
step S5: limiting the EC recommended value of the virtual machine obtained based on the step S4;
the judging step comprises the following steps: based on the EC recommended value of the virtual machine obtained in the step S5, judging the resource distribution condition of a physical server of a resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system;
the step S3 includes the steps of:
the preparation step of the remote disaster comprises the following steps: aiming at the virtual machine scene of the remote disaster recovery, taking the CPU resource peak value utilization rate of the production end as a measurement standard; if the production end and the disaster recovery end are switched in the preset time period, taking a larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end as a measurement standard;
database high availability step: aiming at a virtual machine scene with high availability of a database, taking the CPU resource peak value utilization rate of a high availability master node as a measurement standard; if the high-availability master node and the standby node are switched in a preset time period, taking a larger value of CPU resource peak value utilization rate of the high-availability master node and the standby node as a measurement standard;
and (3) applying load balancing: aiming at the virtual machine scene of the application load balancing, taking the maximum value of the CPU resource peak value utilization rate of each node of the application load balancing as a measurement standard.
2. The cloud resource reallocation method based on the peak usage rate according to claim 1, wherein the step S2 includes the steps of:
step S2.1: the peak value of the actual use core number of the physical CPU of each virtual machine for a preset time is calculated, and the formula is as follows:
CPU MAX =MAX{CPU 1 ,CPU 2 ,...,CPU N } (1)
wherein the CPU MAX A peak value representing the number of cores actually used by the physical CPU for a predetermined time of the virtual machine; CPU (Central processing Unit) N A peak value representing the actual number of cores used by the physical CPU of each natural day of the virtual machine; n represents the number of days of nature;
step S2.2: the peak utilization rate of CPU resources of each virtual machine for a preset time is calculated, and the formula is as follows:
wherein U is MAX Peak value of CPU resource representing preset time of virtual machineThe utilization rate; EC represents the number of physical CPU cores currently allocated to the virtual machine.
3. The cloud resource reallocation method based on the peak usage rate according to claim 1, wherein the step S4 includes the steps of:
step S4.1: judging whether the CPU resource peak value utilization rate of the virtual machine is lower than a preset value or not; if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, entering step S4.2; if the CPU resource peak value utilization rate of the virtual machine is not lower than a preset value, entering step S4.3;
step S4.2: if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RouadUp{EC′ NEW } (4)
wherein, EC' NEW Represents when U MAX A recommended value of EC when the predetermined value is reached; EC (EC) NEW Is EC'. NEW Taking the recommended value obtained by the upward value of the preset granularity; the RoundUp { } function is expressed as a value taken upward at a predetermined granularity;
step S4.3: if the CPU resource peak value utilization rate of the virtual machine is higher than the specified value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp(EC′ NEW ) (6)
wherein, EC' NEW Represents when U MAX The recommended value of EC when the selected value is reached.
4. The cloud resource redistribution system based on the peak utilization rate is characterized by comprising the following modules:
the EC recommendation value obtaining module: obtaining an EC recommended value of the virtual machine based on the peak value utilization rate;
and a judging module: based on the obtained EC recommended value of the virtual machine, judging the resource distribution condition of a physical server of a resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system;
the EC recommendation value obtaining module comprises the following modules:
module M1: CPU performance data of preset time is obtained and stored and is used as a performance data set for analysis decision;
module M2: calculating the peak utilization rate of CPU resources of each virtual machine for a preset time by taking the virtual machine as a unit based on the performance data set of the module M1;
module M3: aiming at various virtual machine scenes, correspondingly dividing CPU resource peak value use ratio performance data obtained by the module M2 by taking a virtual machine as a unit;
module M4: respectively calculating the reassigned EC recommended values of the virtual machines based on the multiple virtual machine scenes of the module M3 and the correspondingly divided CPU resource peak value utilization rates;
module M5: limiting the EC recommended value of the virtual machine obtained based on the module M4;
the judging module is used for: based on the EC recommended value of the virtual machine obtained by the module M5, judging the resource distribution condition of a physical server of a resource pool, the resource distribution condition of each node of application load balancing and the resource distribution condition of each virtual machine of the same application system;
the module M3 comprises the following modules:
the remote disaster recovery module: aiming at the virtual machine scene of the remote disaster recovery, taking the CPU resource peak value utilization rate of the production end as a measurement standard; if the production end and the disaster recovery end are switched in the preset time period, taking a larger value of the CPU resource peak value utilization rate of the production end and the disaster recovery end as a measurement standard;
database high availability module: aiming at a virtual machine scene with high availability of a database, taking the CPU resource peak value utilization rate of a high availability master node as a measurement standard; if the high-availability master node and the standby node are switched in a preset time period, taking a larger value of CPU resource peak value utilization rate of the high-availability master node and the standby node as a measurement standard;
and (3) applying a load balancing module: aiming at the virtual machine scene of the application load balancing, taking the maximum value of the CPU resource peak value utilization rate of each node of the application load balancing as a measurement standard.
5. The peak usage based clouding resource redistribution system of claim 4, wherein the module M2 comprises the following modules:
module M2.1: the peak value of the actual use core number of the physical CPU of each virtual machine for a preset time is calculated, and the formula is as follows:
CPU MAX =MAX{CPU 1 ,CPU 2 ,...,CPU N } (1)
wherein the CPU MAX A peak value representing the number of cores actually used by the physical CPU for a predetermined time of the virtual machine; CPU (Central processing Unit) N A peak value representing the actual number of cores used by the physical CPU of each natural day of the virtual machine; n represents the number of days of nature;
module M2.2: the peak utilization rate of CPU resources of each virtual machine for a preset time is calculated, and the formula is as follows:
wherein U is MAX Peak usage of CPU resources representing a predetermined time of the virtual machine; EC represents the number of physical CPU cores currently allocated to the virtual machine.
6. The peak usage based clouding resource redistribution system of claim 4, wherein the module M4 comprises the following modules:
module M4.1: judging whether the CPU resource peak value utilization rate of the virtual machine is lower than a preset value or not; if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, entering a module M4.2; if the CPU resource peak value utilization rate of the virtual machine is not lower than a preset value, entering a module M4.3;
module M4.2: if the CPU resource peak value utilization rate of the virtual machine is lower than a preset value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp{EC′ NEW } (4)
wherein, EC' NEW Represents when U MAX A recommended value of EC when the predetermined value is reached; EC (EC) NEW Is EC'. NEW Taking the recommended value obtained by the upward value of the preset granularity; the RoundUp { } function is expressed as a value taken upward at a predetermined granularity;
module M4.3: if the CPU resource peak value utilization rate of the virtual machine is higher than the specified value, calculating a reassigned EC recommended value, wherein the formula is as follows:
EC NEW =RoundUp(EC′ NEW ) (6)
wherein, EC' NEW Represents when U MAX The recommended value of EC when the selected value is reached.
CN202111501404.5A 2021-12-09 2021-12-09 Cloud resource reallocation method and system based on peak utilization rate Active CN114221962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111501404.5A CN114221962B (en) 2021-12-09 2021-12-09 Cloud resource reallocation method and system based on peak utilization rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111501404.5A CN114221962B (en) 2021-12-09 2021-12-09 Cloud resource reallocation method and system based on peak utilization rate

Publications (2)

Publication Number Publication Date
CN114221962A CN114221962A (en) 2022-03-22
CN114221962B true CN114221962B (en) 2024-02-13

Family

ID=80700618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111501404.5A Active CN114221962B (en) 2021-12-09 2021-12-09 Cloud resource reallocation method and system based on peak utilization rate

Country Status (1)

Country Link
CN (1) CN114221962B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102937912A (en) * 2012-11-28 2013-02-20 华为技术有限公司 Method and equipment for scheduling virtual machine
KR20140080795A (en) * 2012-12-18 2014-07-01 서강대학교산학협력단 Load balancing method and system for hadoop MapReduce in the virtual environment
CN106254166A (en) * 2016-09-30 2016-12-21 中国银联股份有限公司 A kind of cloud platform resource allocation method based on Disaster Preparation Center and system
CN106681839A (en) * 2016-12-31 2017-05-17 云宏信息科技股份有限公司 Elasticity calculation dynamic allocation method
CN107346264A (en) * 2016-05-05 2017-11-14 北京金山云网络技术有限公司 A kind of method, apparatus and server apparatus of virtual machine load balance scheduling
CN108958934A (en) * 2018-06-28 2018-12-07 郑州云海信息技术有限公司 A kind of cpu resource method for obligating and device
CN110209469A (en) * 2019-05-29 2019-09-06 深圳前海微众银行股份有限公司 DCN architecture resources detection method, device, equipment and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102937912A (en) * 2012-11-28 2013-02-20 华为技术有限公司 Method and equipment for scheduling virtual machine
KR20140080795A (en) * 2012-12-18 2014-07-01 서강대학교산학협력단 Load balancing method and system for hadoop MapReduce in the virtual environment
CN107346264A (en) * 2016-05-05 2017-11-14 北京金山云网络技术有限公司 A kind of method, apparatus and server apparatus of virtual machine load balance scheduling
CN106254166A (en) * 2016-09-30 2016-12-21 中国银联股份有限公司 A kind of cloud platform resource allocation method based on Disaster Preparation Center and system
CN106681839A (en) * 2016-12-31 2017-05-17 云宏信息科技股份有限公司 Elasticity calculation dynamic allocation method
CN108958934A (en) * 2018-06-28 2018-12-07 郑州云海信息技术有限公司 A kind of cpu resource method for obligating and device
CN110209469A (en) * 2019-05-29 2019-09-06 深圳前海微众银行股份有限公司 DCN architecture resources detection method, device, equipment and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《云数据中心中基于虚拟机迁移的负载均衡算法研究》;吉新华;中国优秀硕士学位论文全文库(第03期);正文第11页 *

Also Published As

Publication number Publication date
CN114221962A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
EP3525096A1 (en) Resource load balancing control method and cluster scheduler
CN102611622B (en) Dispatching method for working load of elastic cloud computing platform
CN104881325A (en) Resource scheduling method and resource scheduling system
CN110597639B (en) CPU distribution control method, device, server and storage medium
CN105677486A (en) Data parallel processing method and system
Soualhia et al. Predicting scheduling failures in the cloud: A case study with google clusters and hadoop on amazon EMR
CN108810115B (en) Load balancing method and device suitable for distributed database and server
CN108845874A (en) The dynamic allocation method and server of resource
US11496413B2 (en) Allocating cloud computing resources in a cloud computing environment based on user predictability
CN111708627B (en) Task scheduling method and device based on distributed scheduling framework
Varghese et al. Cloud benchmarking for maximising performance of scientific applications
CN111160873A (en) Batch processing device and method based on distributed architecture
CN108595368A (en) Concurrent computational system and method based on production domesticization computer cluster
Liu et al. Service reliability in an HC: Considering from the perspective of scheduling with load-dependent machine reliability
CN111724037A (en) Operation resource allocation method and device, computer equipment and readable storage medium
US7386537B2 (en) Method and system for determining size of a data center
WO2022134809A1 (en) Model training processing method and apparatus, computer device, and medium
CN104281636A (en) Concurrent distributed processing method for mass report data
CN114221962B (en) Cloud resource reallocation method and system based on peak utilization rate
CN115168058B (en) Thread load balancing method, device, equipment and storage medium
CN111277626A (en) Server upgrading method and device, electronic equipment and medium
CN105471986A (en) Data center construction scale assessment method and apparatus
CN111124681B (en) Cluster load distribution method and device
CN110297693B (en) Distributed software task allocation method and system
CN109558214B (en) Host machine resource management method and device in heterogeneous environment 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
GR01 Patent grant
GR01 Patent grant