CN114443258B - Resource scheduling method, device, equipment and storage medium for virtual machine - Google Patents

Resource scheduling method, device, equipment and storage medium for virtual machine Download PDF

Info

Publication number
CN114443258B
CN114443258B CN202011189844.7A CN202011189844A CN114443258B CN 114443258 B CN114443258 B CN 114443258B CN 202011189844 A CN202011189844 A CN 202011189844A CN 114443258 B CN114443258 B CN 114443258B
Authority
CN
China
Prior art keywords
resource
sequence
idle
virtual machine
initial
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
CN202011189844.7A
Other languages
Chinese (zh)
Other versions
CN114443258A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang 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 China Mobile Communications Group Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011189844.7A priority Critical patent/CN114443258B/en
Publication of CN114443258A publication Critical patent/CN114443258A/en
Application granted granted Critical
Publication of CN114443258B publication Critical patent/CN114443258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the technical field of virtual machine resource management, and discloses a resource scheduling method for a virtual machine, which comprises the following steps: acquiring a resource configuration request sent by at least one virtual machine to be configured, and respectively determining at least one resource requirement packet according to the resource configuration request; acquiring idle resource information, and determining at least one idle resource cluster according to the idle resource information; matching the idle resource cluster with a resource requirement packet, and randomly generating a plurality of initial packet cluster mapping sequences; determining an initial population according to the plurality of initial packet cluster mapping sequences; carrying out gene crossing on gene segments in each chromosome in the initial population according to a preset genetic algorithm to obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence; and respectively allocating idle resources to at least one virtual machine to be configured according to the target packet cluster mapping sequence. Through the mode, the embodiment of the invention improves the resource utilization rate and the scheduling efficiency of the virtual machine.

Description

Resource scheduling method, device, equipment and storage medium for virtual machine
Technical Field
The embodiment of the invention relates to the technical field of virtual machine resource management, in particular to a resource scheduling method, a resource scheduling device, resource scheduling equipment and a storage medium for a virtual machine.
Background
With the development of the internet, cloud computing is more and more widely applied. Currently, mainstream cloud computing resource management is completed on a virtual machine level, that is, a cloud user submits the number of virtual machines required by a task and an application for specific physical resource requirements of a CPU, a RAM, a bandwidth and the like of each virtual machine. And the resource scheduling center correspondingly allocates and schedules according to the requirements of the users.
Such problems are: on one hand, resource scheduling according to the application of a single user needs a resource scheduling center to maintain a large number of demand parameter variables along with the increase of the number of the users, so that the complexity of resource management of the resource scheduling center is greatly increased, and the efficiency of resource scheduling for virtual machines in cloud computing is influenced. On the other hand, the virtual machine resources allocated to the users are all fixed and unchangeable before the users make new resource requests, the overall resource utilization rate is continuously and dynamically changed along with the resource calling and releasing operations of each user, and the resources in the whole system cannot be automatically and dynamically scheduled in time according to the resource use condition of each user, so that the virtual machine resource utilization rate in the cloud computing is low.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide a resource scheduling method for a virtual machine, so as to solve the problems in the prior art that the efficiency of resource scheduling for the virtual machine is low and the resource utilization rate is not high.
According to an aspect of the embodiments of the present invention, there is provided a resource scheduling method for a virtual machine, the method including:
acquiring a resource configuration request sent by at least one virtual machine to be configured, and respectively determining at least one resource requirement packet according to the resource configuration request, wherein each resource requirement packet comprises at least one target requirement resource corresponding to each virtual machine to be configured;
acquiring idle resource information, and determining at least one idle resource cluster according to the idle resource information, wherein each idle resource cluster comprises at least one idle resource on each available physical machine;
matching the idle resource clusters with the resource requirement packets to ensure that the total target required resource number of each resource requirement is less than or equal to the total idle resource number of the resource type in the idle resource clusters, and randomly generating a plurality of initial packet cluster mapping sequences, wherein each initial packet cluster mapping sequence comprises initial packet cluster mapping pairs corresponding to all the resource requirement packets;
determining an initial population according to the plurality of initial packet cluster mapping sequences;
taking each idle resource as a gene locus, taking each initial packet cluster mapping pair as a gene segment, and performing gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm to obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence;
and respectively allocating idle resources to the at least one virtual machine to be configured according to the target packet cluster mapping sequence.
In an optional manner, the method further comprises:
respectively determining the resource utilization rate of each idle resource cluster in each initial packet cluster mapping sequence;
respectively determining the total number of idle resource clusters contained in each initial packet cluster mapping sequence;
respectively determining the fitness of each initial packet cluster mapping sequence according to the resource utilization rate of each idle resource cluster and the total number of the idle resource clusters;
and arranging the plurality of initial packet cluster mapping sequences according to a fitness descending order, and acquiring K initial packet cluster mapping sequences before arrangement as corresponding K chromosomes to form the initial population, wherein K is a positive integer.
In an optional manner, the method further comprises:
randomly selecting two chromosomes from the initial population as a first father individual and a second father individual as a first generation father individual respectively;
determining a first inserted gene according to the first father individual, determining a first intersection point by the second father individual, inserting the first inserted gene into the first intersection point, and deleting the gene position corresponding to the repeated target requirement packet to obtain a first child individual;
carrying out second round crossing on the remaining chromosome of the first father individual after the first inserted gene is deleted and the first child individual to obtain a third child individual and a fourth child individual;
taking the third sub-individual and the fourth sub-individual as second generation father individuals, and carrying out crossing according to the gene crossing mode of the first generation father individuals;
circulating until the fitness of the child package cluster mapping sequence does not change any more, and deleting repeated packages and vacant clusters in the child package cluster mapping sequence;
and acquiring the child packet cluster mapping sequence as the target packet cluster mapping sequence.
In an optional manner, the method further comprises:
acquiring historical resource utilization data in a historical time interval with preset duration;
determining a historical resource utilization rate time sequence according to the historical resource utilization data;
preprocessing the historical resource utilization rate time sequence to obtain an original resource utilization rate time sequence;
determining an initial prediction sequence of the resource utilization rate through a preset ARIMA model according to the time sequence of the original resource utilization rate;
and adjusting the idle resources distributed on each virtual machine to be configured according to the initial prediction sequence of the resource utilization rate.
In an optional manner, the method further comprises:
determining whether the preprocessed time sequence of the original resource utilization rate is a stable sequence;
when the original resource utilization rate time sequence is a stable sequence, calculating autocorrelation parameters and partial autocorrelation coefficients of the original resource utilization rate time sequence;
according to the autocorrelation parameters and the partial autocorrelation coefficients, identifying and scaling the ARIMA model according to an AIC criterion;
estimating parameters of the ARIMA model according to a maximum likelihood method;
calculating a difference value between the historical resource utilization rate time sequence and the initial prediction sequence to serve as a prediction residual sequence;
and judging whether the predicted residual sequence is white noise, and determining that the ARIMA model is constructed when the predicted residual sequence is white noise.
In an optional manner, the method further comprises:
calculating a difference value between the historical resource utilization rate time sequence and the initial prediction sequence to serve as a prediction residual sequence;
inputting the predicted residual sequence into a preset BP neural network model, and acquiring a residual correction value output by the BP neural network model;
determining a target prediction sequence of the resource utilization rate according to the initial prediction sequence and the residual correction value;
and adjusting the idle resources distributed on each virtual machine to be configured according to the target prediction sequence of the resource utilization rate.
In an optional manner, the method further comprises:
carrying out stabilization processing on the historical resource utilization rate time sequence;
and performing BOX-COX conversion, logarithmic conversion and differential operation on the time sequence of the historical resource utilization rate after the smoothing processing to obtain the time sequence of the original resource utilization rate.
According to another aspect of the embodiments of the present invention, there is provided a resource scheduling apparatus for a virtual machine, including:
the system comprises a first acquisition module, a second acquisition module and a first processing module, wherein the first acquisition module is used for acquiring a resource configuration request sent by at least one virtual machine to be configured, and respectively determining at least one resource requirement packet according to the resource configuration request, and each resource requirement packet comprises at least one target requirement resource corresponding to each virtual machine to be configured;
a second obtaining module, configured to obtain idle resource information, and determine at least one idle resource cluster according to the idle resource information, where each idle resource cluster includes at least one idle resource on each available physical machine;
a matching module, configured to match the idle resource clusters with the resource requirement packets, so that a total number of target required resources of each resource requirement is less than or equal to a total number of idle resources in the idle resource cluster in the resource type, and randomly generate a plurality of initial packet cluster mapping sequences, where each initial packet cluster mapping sequence includes initial packet cluster mapping pairs corresponding to all the resource requirement packets;
a first determining module, configured to determine an initial population according to the plurality of initial packet cluster mapping sequences;
a second determining module, configured to use each idle resource as a gene locus, use each initial packet cluster mapping pair as a gene segment, perform gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm, and obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence;
and the resource allocation module is used for respectively allocating idle resources to the at least one virtual machine to be configured according to the target packet cluster mapping sequence.
According to another aspect of the embodiments of the present invention, there is provided a resource scheduling apparatus for a virtual machine, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation of the resource scheduling method for the virtual machine according to any one of the preceding embodiments.
According to a further aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, in which at least one executable instruction is stored, and when the executable instruction is executed on a resource scheduling apparatus/device for a virtual machine, the resource scheduling apparatus/device for the virtual machine is caused to perform the operations of the resource scheduling method for the virtual machine according to any one of the foregoing embodiments.
The method comprises the steps of obtaining a resource allocation request sent by at least one virtual machine to be configured, and respectively determining at least one resource requirement packet according to the resource allocation request, wherein each resource requirement packet comprises at least one target requirement resource corresponding to each virtual machine to be configured; acquiring idle resource information, and determining at least one idle resource cluster according to the idle resource information, wherein each idle resource cluster respectively comprises at least one idle resource on each available physical machine; matching the idle resource clusters with the resource requirement packets to ensure that the total target required resource number of each resource requirement is less than or equal to the total idle resource number of the resource type in the idle resource clusters, and randomly generating a plurality of initial packet cluster mapping sequences, wherein each initial packet cluster mapping sequence comprises initial packet cluster mapping pairs corresponding to all the resource requirement packets; determining an initial population according to the plurality of initial packet cluster mapping sequences; taking each idle resource type as a gene position, taking an initial packet cluster mapping pair as a gene segment, and performing gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm to obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence; and finally, respectively carrying out idle resource allocation on the at least one virtual machine to be configured according to the target packet cluster mapping sequence.
The method and the device for allocating and scheduling the virtual machine resources solve the problems that in the prior art, when the virtual machine is subjected to resource allocation, the request of a single virtual machine is used as the minimum unit, and the resource allocation efficiency for the virtual machine is low and the resource utilization rate of the virtual machine is low, which are caused by the fact that real-time and integral scheduling cannot be performed according to the resource utilization condition of each virtual machine, in the embodiment of the invention, the resource demand of the virtual machine and the idle resources of a physical machine are converted into virtual codes of corresponding idle resource clusters and resource demand packets, and then the virtual codes are crossed according to a genetic algorithm to obtain a packet cluster mapping sequence with the maximum fitness, so that the corresponding relation between the idle resources and the virtual machine to be allocated is obtained, and the allocation and scheduling of the virtual machine resources are performed, and therefore the scheduling efficiency of the virtual machine resources and the resource utilization rate of the virtual machine are improved.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
The drawings are only for purposes of illustrating embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a resource scheduling method for a virtual machine according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram illustrating a resource scheduling apparatus for a virtual machine according to an embodiment of the present invention;
fig. 3 shows a schematic structural diagram of a resource scheduling device for a virtual machine according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein.
FIG. 1 is a flow diagram illustrating an embodiment of a method for resource scheduling for virtual machines, performed by a computer processing device, according to the present invention. The computer processing equipment can comprise a mobile phone and a notebook computer. The resource scheduling method for the virtual machine can be applied to the virtual machine in cloud computing. As shown in fig. 1, the method comprises the steps of:
step 110: the method comprises the steps of obtaining a resource configuration request sent by at least one virtual machine to be configured, and respectively determining at least one resource requirement packet according to the resource configuration request, wherein each resource requirement packet comprises at least one target requirement resource corresponding to each virtual machine to be configured.
In the cloud computing service, one or more virtual machines are configured on one physical machine, so that the plurality of virtual machines can respectively use the allocated resources on the physical machine, and thus resource sharing is realized.
The specific resource allocation request includes a virtual machine identifier for sending the resource allocation request, virtual machine setting information, a required resource type, a required resource amount, and the like. The specific virtual machine setting information may be, for example, system information of the virtual machine, and the target demand resource may include demand resource types such as a CPU, a memory, and a bandwidth.
The purpose of determining the resource requirement packet is to virtualize each resource allocation request, so that each virtual machine to be configured corresponds to a resource requirement minimum unit containing the required resource type and the resource quantity, and the mapping from the resource requirement packet of each virtual machine to be configured to an idle resource cluster of the cloud computing resource scheduling center is determined by adopting the calculation of a genetic algorithm in the subsequent step.
Step 120: obtaining idle resource information, and determining at least one idle resource cluster according to the idle resource information, wherein each idle resource cluster respectively comprises at least one idle resource on each available physical machine.
The idle resource information refers to resources of various idle resource types on a currently schedulable physical machine, and if two available physical machines containing idle resources exist, the available physical machines are respectively marked as an available physical machine a and an available physical machine B, the available physical machine a contains three idle resources, namely a CPU, a memory and a bandwidth, the corresponding idle resource numbers are respectively 4, 10 and 100, the available physical machine B contains two idle resources, namely a CPU and a memory, and the corresponding idle resource numbers are respectively 3 and 15. Thereby determining two free resource clusters which are respectively marked as a free resource cluster A and a free resource cluster B.
The purpose of determining the free resource cluster is to, in combination with practical application, configure one or more virtual machines to one physical machine, commonly use various types of resources on the physical machine, virtualize the configuration relationship into a mapping relationship between the free resource cluster and a resource requirement packet, where each free resource cluster corresponds to one or more resources on one available physical machine that can be respectively occupied by one or more virtual machines configured to the available physical machine.
Step 130: and matching the idle resource clusters with the resource requirement packets to ensure that the total target required resource number of each resource requirement is less than or equal to the total idle resource number of the resource type in the idle resource clusters, and randomly generating a plurality of initial packet cluster mapping sequences, wherein each initial packet cluster mapping sequence comprises initial packet cluster mapping pairs corresponding to all the resource requirement packets.
Determining the initial packet cluster mapping sequence refers to allocating randomly under the condition that the current packet cluster mapping allocation can meet the resource requirement of each virtual machine to be configured, that is, the number of occupied idle resource clusters (i.e., available physical machines) and the resource utilization rate of each virtual machine to be configured are not considered.
In order to perform gene crossing of chromosomes in a certain number of individuals in the subsequent steps and obtain offspring individuals with the best fitness, multiple times of random allocation are required to obtain a plurality of initial packet cluster mapping sequences as each individual in the initial population of the genetic algorithm.
In an embodiment of the present invention, a first-time adaptive algorithm may also be adopted, that is, each virtual machine to be configured is sequentially matched with an available physical machine, and is allocated to the available physical machine successfully matched for the first time, so as to obtain an initial packet cluster mapping pair, and an idle resource cluster corresponding to the available physical machine is formed into the initial packet cluster mapping pair.
Step 140: and determining an initial population according to the plurality of initial packet cluster mapping sequences.
The initial population is a set of initially given solutions, which is a subset of the problem solution space and is also the basis for the crossover of genetic algorithms. In order to increase the speed of the offspring individuals with the fitness meeting the condition, the initial packet cluster mapping sequence can be screened first, the initial packet cluster mapping power with higher fitness is selected as a parent containing excellent genes, and one gene refers to the mapping relation between one resource requirement packet and one idle resource cluster, namely the resource allocation mode of the virtual machine to be configured.
Thus, step 140 also includes steps 1401-1404:
step 1401: and respectively determining the resource utilization rate of each idle resource cluster in each initial packet cluster mapping sequence.
The acquisition of resource utilization may be collected by a monitor on the server in the foregoing step 110.
Step 1402: and respectively determining the total number of idle resource clusters contained in each initial packet cluster mapping sequence.
Under the condition of the same fitness, the smaller the number of occupied idle resource clusters, that is, the smaller the number of required available physical machines, the lower the cost of resource scheduling, and therefore, the number of idle resource clusters plays an important role in the fitness.
Step 1403: and respectively determining the fitness of each initial packet cluster mapping sequence according to the resource utilization rate of each idle resource cluster and the total number of the idle resource clusters.
And calculating a weight coefficient according to the resource utilization rate of the preset idle resource cluster and the fitness corresponding to the total number of the idle resource clusters, and calculating the fitness according to a preset fitness calculation function. The fitness refers to an individual, and in the embodiment of the present invention, the overall resource utilization of each station in the entire system is considered, that is, the fitness is the maximum when the number of physical machines used at the same time is the minimum while the resource utilization is the maximum.
Step 1404: and arranging the plurality of initial packet cluster mapping sequences according to a fitness descending order, and acquiring K initial packet cluster mapping sequences before arrangement as K chromosomes to form an initial population, wherein K is a positive integer.
Step 150: and taking each idle resource type as a gene locus, taking an packet cluster mapping pair as a gene segment, and performing gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm to obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence.
For example, one packet cluster mapping sequence includes an idle resource cluster a, an idle resource cluster B, and an idle resource cluster C, where the idle resource cluster a corresponds to three resource requirement packets, which are a resource requirement packet a, a resource requirement packet B, and a resource requirement packet C. In the crossing process, three gene positions ofbase:Sub>A packet cluster mapping pair A-A,base:Sub>A packet cluster mapping pair A-B andbase:Sub>A packet cluster mapping pair A-C exist in the gene segment corresponding to the idle resource cluster A.
The predetermined genetic algorithm may be, for example, a multi-objective optimization genetic algorithm.
The gene crossing process in one embodiment of the present invention may include steps 1501 to 1506:
step 1501: and randomly selecting two chromosomes from the initial population as a first father individual and a second father individual as a first generation father individual respectively.
Step 1502: and determining a first inserted gene according to the first father, determining a first intersection point of the second father, inserting the first inserted gene into the first intersection point, and deleting the gene position corresponding to the repeated target requirement packet to obtain a first child individual.
A gene fragment containing at least one locus is randomly selected as a first inserted gene in the first parent, and a cross point is randomly determined as a first cross point between the loci of the chromosome in the second parent.
Inserting the first inserted gene into the first intersection point, and deleting the gene position corresponding to the repeated target requirement packet after the first inserted gene is inserted in the second father individual to obtain a first son individual.
Step 1503: and carrying out second round crossing on the remaining chromosome of the first father individual after the first inserted gene is deleted and the first child individual to obtain a third child individual and a fourth child individual.
Specifically, the remaining chromosome of the first parent individual from which the first inserted gene is deleted is subjected to a second round of crossing with the first child individual by using a gene fragment containing one gene locus as a crossing unit, so as to obtain a third child individual and a fourth child individual.
Step 1504: and taking the third sub-individual and the fourth sub-individual as second generation father individuals, and carrying out crossing according to the gene crossing mode of the first generation father individuals.
Randomly selecting a gene corresponding to a gene position in a gene fragment in the chromosome of the third sub-individual as a second inserted gene, and randomly determining a cross point between the gene positions of the chromosome in the fourth sub-individual as a second cross point.
And after the second inserted gene is inserted into the second cross point, deleting the gene position corresponding to the repeated target requirement packet in the fourth sub-individual to obtain a fifth sub-individual, and determining a progeny packet cluster mapping sequence according to the fifth sub-individual and the third sub-individual.
And deleting the first father individual and the second father individual from the initial population, randomly selecting two father individuals from the initial population to be crossed according to the steps, and adding the generated child individuals into child package cluster mapping sequences.
Step 1505: and circulating until the fitness of the child packet cluster mapping sequence is not changed any more, and deleting the repeated demand resource packets and the empty idle resource clusters in the child packet cluster mapping sequence.
Step 1506: and acquiring the child packet cluster mapping sequence as the target packet cluster mapping sequence.
In alternative embodiments, genetic variations such as a base mutation may also be performed after crossing: and carrying out mutation operation on the value of one or more randomly assigned gene positions according to the mutation probability in the individual code strings. Respectively using random numbers which are uniformly distributed inbase:Sub>A certain range, and replacing original gene values on each gene position in the individual code string withbase:Sub>A certain smaller probability (for example, replacing A-A with B-A or A-C), thereby obtaining the individual with the maximum fitness.
Step 160: and respectively allocating idle resources to the at least one virtual machine to be configured according to the target packet cluster mapping sequence.
In an embodiment of the present invention, the virtual machine to be configured corresponding to the required resource packet in the target packet cluster mapping sequence is configured to the idle physical machine corresponding to the target resource cluster to which the required resource packet is mapped according to the target packet cluster mapping sequence.
Besides the comprehensive scheduling of the idle resources by comprehensively considering the resource utilization conditions of the plurality of virtual machines, the prediction of the future resource utilization condition can be carried out according to the resource utilization condition within a period of time after the resource scheduling, so that the resource allocation is dynamically adjusted again.
An embodiment of the present invention may also include steps 1701-1703.
Step 1701: and acquiring historical resource utilization data in a historical time interval with preset duration.
The historical resource utilization data includes the use condition of physical machine resources of each virtual machine to be configured in historical time, such as the use efficiency of resources such as a CPU and a memory.
The collection process of the historical resource utilization data may be: the method comprises the steps of collecting preset performance indexes of each virtual machine configured on each physical machine on a server at intervals of preset time by a performance monitor deployed on a target server where an idle physical machine is located, wherein the preset performance indexes include the number of occupied CPUs, the utilization rate of the CPUs, the use number of memory resources, the utilization rate of memories and the like.
Step 1702: and determining a historical resource utilization rate time sequence according to the historical resource utilization data.
The historical resource utilization rate time sequence is a sequence formed by arranging the numerical values of the resource utilization rate of each virtual machine to be configured in sequence according to the occurrence time, the sequence comprises a plurality of numerical values of the resource utilization rate, and each numerical value of the resource utilization rate corresponds to an acquisition time point of historical resource utilization data.
The historical resource utilization rate of the virtual machine in the past time period is determined according to the resource utilization conditions in the historical resource utilization data. The specific historical resource utilization rate can be determined according to different resource types, such as a plurality of historical resource utilization rate time sequences under the resource type, for example, a historical CPU utilization rate time sequence and a historical memory utilization rate time sequence.
In an embodiment of the present invention, the historical resource utilization rate may also be a comprehensive resource utilization rate determined according to the weight of each resource, for example, the weight of the historical CPU utilization rate in the comprehensive resource utilization rate is 0.6, and the weight of the historical memory utilization rate in the comprehensive resource utilization rate is 0.4.
Because the collected historical resource use data may have loss or errors, the historical resource use data can be preprocessed before the historical resource use time sequence is determined, for example, a mean filling method is adopted to fill up the loss data, singular points are removed, and bad data are processed by an adjacent point averaging method, so that the authenticity and the reliability of the historical resource use time sequence are ensured.
Step 1703: and preprocessing the historical resource utilization rate time sequence to obtain an original resource utilization rate time sequence.
In order to avoid the predicted time sequence of the resource utilization rate from having good indexes such as goodness of fit, significance level and the like, but because the residual sequence is a non-stationary sequence, the regression relationship cannot truly reflect the equilibrium relationship existing between the dependent variable and the explained variable, and is only a numerically coincided false regression problem, the original time sequence of the resource utilization rate as an input needs to be preprocessed before the ARIMA model is established, so that the residual sequence of the prediction result is a stationary sequence and does not have false regression.
Step 1703 may include steps 17031-17032.
Step 17031: and carrying out stabilization processing on the historical resource utilization rate time sequence.
The purpose of the smoothing process is to allow the fitted curve obtained via the historical resource utilization time series to continue inertially following the existing morphology for a future period of time. After the smoothing process, the mean and variance of the time series of historical resource utilization do not change significantly.
Step 17032: and performing BOX-COX conversion, logarithmic conversion and differential operation on the time sequence of the historical resource utilization rate after the smoothing processing to obtain the time sequence of the original resource utilization rate.
And the BOX-COX conversion is adopted, so that the excessive correction generated on the time sequence of the utilization rate of the historical resources in the smoothing processing is corrected.
If the historical resource utilization rate time series contains exponential trends, the exponential trends can be converted into linear trends by taking logarithms, and then the linear trends are eliminated by difference, so that the average value of the non-stationary historical resource utilization rate time series is stabilized.
Step 1704: and determining an initial prediction sequence of the resource utilization rate through a preset ARIMA model according to the time sequence of the original resource utilization rate.
The ARIMA model is a differential autoregressive moving average model, and the ARIMA (p, d, q) can be obtained by combining the autoregressive model, the moving average model and a differential method, wherein d is the order of data to be differentiated, and p and q are used for selectively intercepting in a tailing sequence and a truncation sequence to obtain the final prediction result.
Step 1705: and adjusting the idle resources distributed on each virtual machine to be configured according to the initial prediction sequence of the resource utilization rate.
The fitness of each virtual machine to be configured at present may be recalculated according to the resource utilization predicted in the initial prediction sequence of the resource utilization according to the fitness calculation method in step 1403, and then the virtual machine resources are rescheduled according to the foregoing steps 130 to 160.
Before step 1704, further comprising step 170401-step 170406:
step 170401: and determining whether the preprocessed time sequence of the original resource utilization rate is a stable sequence.
The time sequence of the original resource utilization rate is processed into a stable sequence, so that false regression of a prediction result can be avoided.
Step 170402: and when the original resource utilization rate time sequence is a stable sequence, calculating the autocorrelation parameters and the partial autocorrelation coefficients of the original resource utilization rate time sequence.
The autocorrelation function characterizes a linear correlation between a time series of observations and their past observations. The partial autocorrelation function characterizes a linear correlation between the time series observations expected over the past given the intermediate observations. The autocorrelation function coefficients and the partial autocorrelation coefficients are used to determine when the time series enters the tail state and the truncated state. Here, tail-off means that the prediction sequence monotonically decreases at an exponential rate or oscillates and tail-off means that the prediction sequence becomes very small from a certain time point.
According to different situations of truncation and tailing, model parameters p, d and q of the ARIMA model can be determined.
Step 170403: and identifying and determining the order of the ARIMA model according to the autocorrelation parameters and the partial autocorrelation coefficients and the AIC criterion.
In one embodiment of the invention ARIMA (1, 1) is chosen, i.e. p, d and q all take 1.
In another embodiment of the present invention, BIC criteria may also be used for scaling.
Step 170404: and estimating parameters of the ARIMA model according to a maximum likelihood method.
Step 170405: and calculating the difference value of the historical resource utilization time sequence and the initial prediction sequence as a prediction residual sequence.
Step 170406: and judging whether the predicted residual sequence is white noise, and determining that the ARIMA model is constructed when the predicted residual sequence is white noise.
In another embodiment of the present invention, after determining the initial prediction sequence of the resource utilization by the predetermined ARIMA model according to the original resource utilization time sequence, further comprising steps 170410-170410:
step 170410: and calculating the difference value of the historical resource utilization time sequence and the initial prediction sequence as a prediction residual sequence.
Step 170411: and inputting the predicted residual sequence into a preset BP neural network model, and obtaining a residual correction value output by the BP neural network model.
Step 170412: and determining a target prediction sequence of the resource utilization rate according to the initial prediction sequence and the residual correction value.
And taking the sum of the initial prediction sequence and the residual error correction value as a resource utilization rate prediction sequence.
Step 170413: and adjusting the idle resources distributed on each virtual machine to be configured according to the target prediction sequence of the resource utilization rate.
Similar to the operation in step 1705, the prediction sequence of the resource utilization rate after residual error correction is closer to the real situation, and therefore, the resource utilization rate of the resource scheduling performed thereby is higher.
Fig. 2 shows a schematic structural diagram of a resource scheduling apparatus for a virtual machine in an embodiment of the present invention. As shown in fig. 2, the apparatus 200 includes: a first obtaining module 210, a second obtaining module 220, a matching module 230, a first determining module 240, a second determining module 250, and a resource allocating module 260.
A first obtaining module 210, configured to obtain a resource configuration request sent by at least one virtual machine to be configured, and respectively determine at least one resource requirement packet according to the resource configuration request, where each resource requirement packet includes at least one target requirement resource corresponding to each virtual machine to be configured;
a second obtaining module 220, configured to obtain idle resource information, and determine at least one idle resource cluster according to the idle resource information, where each idle resource cluster includes at least one idle resource on each available physical machine;
a matching module 230, configured to match the idle resource clusters with the resource requirement packets, so that the total target required resource count of each resource requirement is less than or equal to the total idle resource count of the resource type in the idle resource cluster, and randomly generate a plurality of initial packet cluster mapping sequences, where each initial packet cluster mapping sequence includes initial packet cluster mapping pairs corresponding to all the resource requirement packets;
a first determining module 240, configured to determine an initial population according to the plurality of initial packet cluster mapping sequences;
a second determining module 250, configured to use each idle resource as a gene locus, use each initial packet cluster mapping pair as a gene segment, perform gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm, and obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence;
and the resource allocation module 260 is configured to allocate idle resources to the at least one to-be-configured virtual machine according to the target packet cluster mapping sequence.
In an embodiment of the present invention, the first determining module 240 is further configured to:
respectively determining the resource utilization rate of each idle resource cluster in each initial packet cluster mapping sequence;
respectively determining the total number of idle resource clusters contained in each initial packet cluster mapping sequence;
respectively determining the fitness of each initial packet cluster mapping sequence according to the resource utilization rate of each idle resource cluster and the total number of the idle resource clusters;
and arranging the plurality of initial packet cluster mapping sequences according to a fitness descending order, and acquiring K initial packet cluster mapping sequences before arrangement as corresponding K chromosomes to form the initial population, wherein K is a positive integer.
In an embodiment of the present invention, the second determining module 250 is further configured to:
randomly selecting two chromosomes from the initial population as a first father individual and a second father individual as a first generation father individual respectively;
determining a first inserted gene according to the first father individual, determining a first intersection point by the second father individual, inserting the first inserted gene into the first intersection point, and deleting the gene position corresponding to the repeated target requirement packet to obtain a first child individual;
carrying out second round of crossing on the remaining chromosome of the first father individual after the first inserted gene is deleted and the first child individual to obtain a third child individual and a fourth child individual;
taking the third sub-individual and the fourth sub-individual as second generation father individuals, and carrying out crossing according to the gene crossing mode of the first generation father individuals;
circulating until the fitness of the child package cluster mapping sequence does not change any more, and deleting repeated packages and vacant clusters in the child package cluster mapping sequence;
and acquiring the child packet cluster mapping sequence as the target packet cluster mapping sequence.
In an embodiment of the present invention, the resource allocation module 260 is further configured to:
acquiring historical resource utilization data in a historical time interval with preset duration;
determining a historical resource utilization rate time sequence according to the historical resource utilization data;
preprocessing the historical resource utilization rate time sequence to obtain an original resource utilization rate time sequence;
determining an initial prediction sequence of the resource utilization rate through a preset ARIMA model according to the time sequence of the original resource utilization rate;
and adjusting the idle resources distributed on each virtual machine to be configured according to the initial prediction sequence of the resource utilization rate.
In an embodiment of the present invention, the resource allocation module 260 is further configured to:
determining whether the preprocessed time sequence of the original resource utilization rate is a stable sequence;
when the original resource utilization rate time sequence is a stable sequence, calculating autocorrelation parameters and partial autocorrelation coefficients of the original resource utilization rate time sequence;
according to the autocorrelation parameters and the partial autocorrelation coefficients, identifying and scaling the ARIMA model according to an AIC criterion;
estimating parameters of the ARIMA model according to a maximum likelihood method;
calculating a difference value between the historical resource utilization rate time sequence and the initial prediction sequence to serve as a prediction residual sequence;
and judging whether the predicted residual sequence is white noise, and determining that the ARIMA model is constructed when the predicted residual sequence is white noise.
In an embodiment of the present invention, the resource allocation module 260 is further configured to:
calculating a difference value between the historical resource utilization rate time sequence and the initial prediction sequence to serve as a prediction residual sequence;
inputting the predicted residual sequence into a preset BP neural network model to obtain a residual correction value output by the BP neural network model;
determining a target prediction sequence of the resource utilization rate according to the initial prediction sequence and the residual correction value;
and adjusting the idle resources distributed on each virtual machine to be configured according to the target prediction sequence of the resource utilization rate.
In an embodiment of the present invention, the resource allocation module 260 is further configured to: carrying out stabilization processing on the historical resource utilization rate time sequence;
and performing BOX-COX conversion, logarithmic conversion and differential operation on the time sequence of the historical resource utilization rate after the smoothing processing to obtain the time sequence of the original resource utilization rate.
The resource scheduling device for the virtual machine converts the resource requirements of the virtual machine and the idle resources of the physical machine into the virtual codes of the corresponding idle resource clusters and resource requirement packets, and then performs intersection according to the genetic algorithm to obtain the packet cluster mapping sequence with the maximum fitness, so that the corresponding relation between the idle resources and the virtual machine to be configured is obtained, the virtual machine resources are distributed and scheduled, and the resource utilization rate and the scheduling efficiency of the virtual machine resources are improved.
The implementation of the resource scheduling apparatus for a virtual machine according to the embodiment of the present invention is the same as the process of the resource scheduling method for a virtual machine in the foregoing embodiment, and is not described again.
Fig. 3 is a schematic structural diagram illustrating a resource scheduling device for a virtual machine in the embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the resource scheduling device for the virtual machine.
As shown in fig. 3, the resource scheduling apparatus for a virtual machine may include: a processor (processor) 402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein: the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408. A communication interface 404 for communicating with network elements of other devices, such as clients or other servers. The processor 402 is configured to execute the program 410, and may specifically execute relevant steps in the foregoing resource scheduling method embodiment for a virtual machine.
In particular, program 410 may include program code comprising computer-executable instructions.
The processor 402 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement an embodiment of the present invention. The resource scheduling device for the virtual machine comprises one or more processors, which can be processors of the same type, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
A memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may be specifically invoked by the processor 402 to enable the resource scheduling apparatus of the virtual machine to perform all operations of the resource scheduling method for the virtual machine in the foregoing embodiments, which are not described herein again.
The resource scheduling equipment for the virtual machine converts the resource requirements of the virtual machine and the idle resources of the physical machine into the virtual codes of the corresponding idle resource clusters and resource requirement packets, and then performs intersection according to the genetic algorithm to obtain the packet cluster mapping sequence with the maximum fitness, so that the corresponding relation between the idle resources and the virtual machine to be configured is obtained, the virtual machine resources are distributed and scheduled, and the resource utilization rate and the scheduling efficiency of the virtual machine resources are improved.
An embodiment of the present invention provides a computer-readable storage medium, where the storage medium stores at least one executable instruction, and when the executable instruction runs on a resource scheduling apparatus/device for a virtual machine, the resource scheduling apparatus/device for the virtual machine is caused to perform a resource scheduling method for the virtual machine in any method embodiment described above.
The executable instruction may be specifically configured to enable the resource scheduling apparatus/device for a virtual machine to perform all operations of the resource scheduling method for a virtual machine in the foregoing embodiments, which are not described herein again.
The computer readable storage medium of the embodiment of the invention converts the resource demand of the virtual machine and the idle resource of the physical machine into the virtual codes of the corresponding idle resource cluster and resource demand packet, and then performs intersection according to the genetic algorithm to obtain the packet cluster mapping sequence with the maximum fitness, so as to obtain the corresponding relation between the idle resource and the virtual machine to be configured, thereby performing the allocation and scheduling of the virtual machine resource, and improving the resource utilization rate and scheduling efficiency of the virtual machine resource.
The implementation manner of the readable medium for resource scheduling of a virtual machine in the embodiment of the present invention is the same as the process of the resource scheduling method for a virtual machine in the foregoing embodiment, and is not described again.
Embodiments of the present invention provide a computer program, which can be called by a processor to enable a resource scheduling device of a virtual machine to execute a resource scheduling method for the virtual machine in any method embodiment described above.
Embodiments of the present invention provide a computer program product, which includes a computer program stored on a computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are run on a computer, the computer is caused to execute the resource scheduling method for a virtual machine in any of the above method embodiments.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limited to the order of execution unless otherwise specified.

Claims (10)

1. A resource scheduling method for a virtual machine, the method comprising:
acquiring a resource configuration request sent by at least one virtual machine to be configured, and respectively determining at least one resource requirement packet according to the resource configuration request, wherein each resource requirement packet comprises at least one target requirement resource corresponding to each virtual machine to be configured;
acquiring idle resource information, and determining at least one idle resource cluster according to the idle resource information, wherein each idle resource cluster comprises at least one idle resource on each available physical machine;
matching the idle resource clusters with the resource requirement packets to ensure that the total target required resource number of each resource requirement is less than or equal to the total idle resource number of the resource type in the idle resource clusters, and randomly generating a plurality of initial packet cluster mapping sequences, wherein each initial packet cluster mapping sequence comprises initial packet cluster mapping pairs corresponding to all the resource requirement packets;
determining an initial population according to the plurality of initial packet cluster mapping sequences;
taking each idle resource as a gene position, taking each initial packet cluster mapping pair as a gene segment, and performing gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm to obtain a crossing result with the maximum fitness as a target packet cluster mapping sequence;
and respectively allocating idle resources to the at least one virtual machine to be configured according to the target packet cluster mapping sequence.
2. The method of claim 1, wherein determining an initial population based on the plurality of initial packet cluster mapping sequences further comprises:
respectively determining the resource utilization rate of each idle resource cluster in each initial packet cluster mapping sequence;
respectively determining the total number of idle resource clusters contained in each initial packet cluster mapping sequence;
respectively determining the fitness of each initial packet cluster mapping sequence according to the resource utilization rate of each idle resource cluster and the total number of the idle resource clusters;
and arranging the plurality of initial packet cluster mapping sequences according to a fitness descending order, and acquiring K initial packet cluster mapping sequences before arrangement as corresponding K chromosomes to form the initial population, wherein K is a positive integer.
3. The method of claim 1, wherein the gene segments in each chromosome in the initial population are crossed according to a preset genetic algorithm to obtain a crossing result with the maximum fitness as a target package mapping sequence, and further comprising:
randomly selecting two chromosomes from the initial population as a first father individual and a second father individual as a first generation father individual respectively;
determining a first inserted gene according to the first father individual, determining a first intersection point by the second father individual, inserting the first inserted gene into the first intersection point, and deleting the gene position corresponding to the repeated target requirement packet to obtain a first child individual;
carrying out second round of crossing on the remaining chromosome of the first father individual after the first inserted gene is deleted and the first child individual to obtain a third child individual and a fourth child individual;
taking the third sub-individual and the fourth sub-individual as second generation father individuals, and carrying out crossing according to the gene crossing mode of the first generation father individuals;
circulating until the fitness of the child packet cluster mapping sequence does not change any more, and deleting repeated packets and vacant clusters in the child packet cluster mapping sequence;
and acquiring the child packet cluster mapping sequence as the target packet cluster mapping sequence.
4. The method according to claim 1, wherein after the allocating idle resources to the at least one virtual machine to be configured according to the target packet cluster mapping sequence, further comprises:
acquiring historical resource utilization data in a historical time interval with preset duration;
determining a historical resource utilization rate time sequence according to the historical resource utilization data;
preprocessing the historical resource utilization rate time sequence to obtain an original resource utilization rate time sequence;
determining an initial prediction sequence of the resource utilization rate through a preset ARIMA model according to the time sequence of the original resource utilization rate;
and adjusting the idle resources distributed on each virtual machine to be configured according to the initial prediction sequence of the resource utilization rate.
5. The method as claimed in claim 4, wherein before determining an initial prediction sequence of resource utilization by a pre-defined ARIMA model from the original resource utilization time sequence, further comprising:
determining whether the preprocessed time sequence of the original resource utilization rate is a stable sequence;
when the original resource utilization rate time sequence is a stable sequence, calculating autocorrelation parameters and partial autocorrelation coefficients of the original resource utilization rate time sequence;
according to the autocorrelation parameters and the partial autocorrelation coefficients, identifying and determining the ARIMA model according to an AIC criterion;
estimating parameters of the ARIMA model according to a maximum likelihood method;
calculating the difference value between the historical resource utilization rate time sequence and the initial prediction sequence to be used as a prediction residual sequence;
and judging whether the predicted residual sequence is white noise, and determining that the ARIMA model is constructed when the predicted residual sequence is white noise.
6. The method as claimed in claim 4, wherein after determining an initial prediction sequence of resource utilization by a pre-defined ARIMA model according to the original resource utilization time sequence, further comprising:
calculating the difference value between the historical resource utilization rate time sequence and the initial prediction sequence to be used as a prediction residual sequence;
inputting the predicted residual sequence into a preset BP neural network model to obtain a residual correction value output by the BP neural network model;
determining a target prediction sequence of the resource utilization rate according to the initial prediction sequence and the residual correction value;
and adjusting the idle resources distributed on each virtual machine to be configured according to the target prediction sequence of the resource utilization rate.
7. The method of claim 4, wherein the preprocessing the historical resource utilization time-series to obtain an original resource utilization time-series, further comprises:
carrying out stabilization processing on the historical resource utilization rate time sequence;
and performing BOX-COX conversion, logarithmic conversion and differential operation on the time sequence of the historical resource utilization rate after the smoothing processing to obtain the time sequence of the original resource utilization rate.
8. An apparatus for resource scheduling for a virtual machine, the apparatus comprising:
a first obtaining module, configured to obtain a resource configuration request sent by at least one virtual machine to be configured, and determine at least one resource requirement packet according to the resource configuration request, where each resource requirement packet includes at least one target requirement resource corresponding to each virtual machine to be configured;
a second obtaining module, configured to obtain idle resource information, and determine at least one idle resource cluster according to the idle resource information, where each idle resource cluster includes at least one idle resource on each available physical machine;
a matching module, configured to match the idle resource clusters with the resource requirement packets, so that a total number of target required resources of each resource requirement is less than or equal to a total number of idle resources in the idle resource cluster in the resource type, and randomly generate a plurality of initial packet cluster mapping sequences, where each initial packet cluster mapping sequence includes initial packet cluster mapping pairs corresponding to all the resource requirement packets;
a first determining module, configured to determine an initial population according to the plurality of initial packet cluster mapping sequences;
a second determining module, configured to use each idle resource as a gene locus, use each initial packet cluster mapping pair as a gene segment, perform gene crossing on the gene segments in each chromosome in the initial population according to a preset genetic algorithm, and obtain a crossing result with the largest fitness as a target packet cluster mapping sequence;
and the resource allocation module is used for respectively allocating idle resources to the at least one virtual machine to be configured according to the target packet cluster mapping sequence.
9. A resource scheduling apparatus for a virtual machine, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation of the resource scheduling method for the virtual machine according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein the storage medium has stored therein at least one executable instruction, which when executed on a resource scheduling apparatus/device for a virtual machine, causes the resource scheduling apparatus/device for a virtual machine to perform the operations of the resource scheduling method for a virtual machine according to any one of claims 1 to 7.
CN202011189844.7A 2020-10-30 2020-10-30 Resource scheduling method, device, equipment and storage medium for virtual machine Active CN114443258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011189844.7A CN114443258B (en) 2020-10-30 2020-10-30 Resource scheduling method, device, equipment and storage medium for virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011189844.7A CN114443258B (en) 2020-10-30 2020-10-30 Resource scheduling method, device, equipment and storage medium for virtual machine

Publications (2)

Publication Number Publication Date
CN114443258A CN114443258A (en) 2022-05-06
CN114443258B true CN114443258B (en) 2023-02-28

Family

ID=81357757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011189844.7A Active CN114443258B (en) 2020-10-30 2020-10-30 Resource scheduling method, device, equipment and storage medium for virtual machine

Country Status (1)

Country Link
CN (1) CN114443258B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016165392A1 (en) * 2015-04-17 2016-10-20 华南理工大学 Genetic algorithm-based cloud computing resource scheduling method
CN109101315A (en) * 2018-07-04 2018-12-28 上海理工大学 Cloud data center resource allocation algorithm based on packet cluster frame

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7668788B2 (en) * 2005-06-06 2010-02-23 Wren William E Resource assignment optimization using direct encoding and genetic algorithms

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016165392A1 (en) * 2015-04-17 2016-10-20 华南理工大学 Genetic algorithm-based cloud computing resource scheduling method
CN109101315A (en) * 2018-07-04 2018-12-28 上海理工大学 Cloud data center resource allocation algorithm based on packet cluster frame

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
包簇框架云资源分配规划;朱兵伟等;《计算机应用与软件》;20180912(第09期);全文 *
基于包簇映射的云计算资源分配框架;卢浩洋等;《计算机应用》;20161010(第10期);全文 *

Also Published As

Publication number Publication date
CN114443258A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN108345501B (en) Distributed resource scheduling method and system
CN106020941B (en) The method for selecting resource allocation policy and solving resource contention
Jiang et al. Optimal cloud resource auto-scaling for web applications
CN108287666B (en) Data storage method and device for cloud storage environment
CN113037877B (en) Optimization method for time-space data and resource scheduling under cloud edge architecture
CN113163498B (en) Virtual network resource allocation method and device based on genetic algorithm under 5G network slice
CN108270805B (en) Resource allocation method and device for data processing
CN109976901B (en) Resource scheduling method, device, server and readable storage medium
CN111614754B (en) Fog-calculation-oriented cost-efficiency optimized dynamic self-adaptive task scheduling method
CN112685153A (en) Micro-service scheduling method and device and electronic equipment
CN110502321A (en) A kind of resource regulating method and system
CN108427602B (en) Distributed computing task cooperative scheduling method and device
CN113821318A (en) Internet of things cross-domain subtask combined collaborative computing method and system
CN111176840A (en) Distributed task allocation optimization method and device, storage medium and electronic device
CN116467082A (en) Big data-based resource allocation method and system
CN112559147A (en) Dynamic matching algorithm, system and equipment based on GPU resource occupation characteristics
CN113568759B (en) Cloud computing-based big data processing method and system
CN109783236B (en) Method and apparatus for outputting information
CN114443258B (en) Resource scheduling method, device, equipment and storage medium for virtual machine
CN113419863B (en) Data distribution processing method and device based on node capacity
CN115794358A (en) Cloud workflow task scheduling method and device, electronic equipment and storage medium
CN115981843A (en) Task scheduling method and device in cloud-edge cooperative power system and computer equipment
CN113886086A (en) Cloud platform computing resource allocation method, system, terminal and storage medium
CN115002049A (en) Resource allocation method and device
CN114327925A (en) Power data real-time calculation scheduling optimization method and system

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