[go: up one dir, main page]

CN115509678A - Virtual machine scheduling method, device, equipment and computer readable storage medium - Google Patents

Virtual machine scheduling method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115509678A
CN115509678A CN202110700465.8A CN202110700465A CN115509678A CN 115509678 A CN115509678 A CN 115509678A CN 202110700465 A CN202110700465 A CN 202110700465A CN 115509678 A CN115509678 A CN 115509678A
Authority
CN
China
Prior art keywords
resource
server
resources
comparison result
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110700465.8A
Other languages
Chinese (zh)
Inventor
李德方
陈晓帆
朱林杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202110700465.8A priority Critical patent/CN115509678A/en
Publication of CN115509678A publication Critical patent/CN115509678A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a method, a device, equipment and a medium for scheduling a virtual machine, wherein various resources in the resource requirements of the virtual machine are compared according to a set hierarchical analysis rule to obtain a resource requirement comparison result; the resource requirement comparison result reflects the requirement condition of the virtual machine on various resources. And comparing the residual resources of the same type of the plurality of servers to obtain server resource comparison results corresponding to various types of resources. Each type of resource has a corresponding server resource comparison result, and the server resource comparison result reflects the proportional relationship of the residual resources among different servers. And determining a server matched with the virtual machine based on the resource demand comparison result and the server resource comparison results corresponding to various resources. By comprehensively evaluating the resource requirements of the virtual machine and the residual resources of various resources on the server, the scheduling scheme of the virtual machine is more reasonable.

Description

Virtual machine scheduling method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of resource allocation technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for scheduling a virtual machine.
Background
Virtual machine scheduling refers to the process of reselecting the physical server on which the virtual machine resides. The current scheduling scheme of the virtual machine mainly considers computing resources of a physical server, i.e., central Processing Unit (CPU) resources and memory resources. And according to the fixed weight coefficient, carrying out weighted summation on the current residual CPU resource and the current residual memory resource of the physical server to obtain a weight. Generally, the larger the weight, the higher the priority with which the physical server is selected as the scheduling node.
However, at present, simple weighted summation is performed based on computing resources, and the condition of the requirement of the virtual machine service on the resources cannot be reflected in a scheduling scheme, so that the selected physical server often does not conform to the actual service requirement of the virtual machine, and the user acceptance degree is low.
Therefore, how to rationalize the virtual machine scheduling scheme is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application aims to provide a virtual machine scheduling method, a virtual machine scheduling device, virtual machine scheduling equipment and a computer readable storage medium, so that a virtual machine scheduling scheme can be more rationalized.
In order to solve the foregoing technical problem, an embodiment of the present application provides a virtual machine scheduling method, including:
comparing various resources in the resource requirements of the virtual machine according to a set hierarchical analysis rule to obtain a resource requirement comparison result;
comparing the same type of residual resources of the plurality of servers to obtain server resource comparison results corresponding to various types of resources;
and determining a server matched with the virtual machine based on the resource demand comparison result and the server resource comparison result.
Optionally, the hierarchical analysis rule is a hierarchical analysis scale list including a correspondence between the resource comparison value and the scale value; correspondingly, the comparing various resources in the resource requirements of the virtual machine according to the set hierarchical analysis rule to obtain a resource requirement comparison result includes:
comparing every two resources in the resource requirements of the virtual machine to obtain a resource comparison value;
and inquiring the scale value corresponding to each resource comparison value from a set hierarchical analysis scale list, and constructing a resource demand comparison result based on the scale values.
Optionally, the determining, based on the resource requirement comparison result and the server resource comparison result, a server matched with the virtual machine includes:
and if the resource requirement comparison result and the server resource comparison result do not meet the dimension requirement, determining a server matched with the virtual machine based on the normalized resource requirement comparison result and the normalized server resource comparison result.
Optionally, the determining, based on the normalized resource demand comparison result and the normalized server resource comparison result, a server matched with the virtual machine includes:
performing column vector normalization processing on the resource demand comparison result to obtain a resource characteristic vector;
performing column vector normalization processing on the server resource comparison results corresponding to the various resources to obtain server characteristic vectors corresponding to the various resources;
fusing the resource characteristic vector and server characteristic vectors corresponding to various resources to determine a weight corresponding to each server;
and selecting a target weight meeting a preset requirement, and taking a server corresponding to the target weight as a server matched with the virtual machine.
Optionally, before the fusing the resource feature vector and the server feature vectors corresponding to the various types of resources and determining the weight corresponding to each server, the method further includes:
calculating the maximum characteristic value of the resource demand comparison result and the maximum characteristic values of the server resource comparison results corresponding to various resources;
determining consistency parameters based on the maximum characteristic value, the dimensionality of the resource demand comparison result and the dimensionality of the server resource comparison result corresponding to each resource;
and if the consistency parameters meet the consistency requirement of the hierarchical analysis, executing the step of fusing the resource characteristic vectors and the server characteristic vectors corresponding to various resources to determine the weight corresponding to each server.
Optionally, the method further comprises:
and if the consistency parameter does not meet the consistency requirement of the hierarchical analysis, adjusting the resource requirement comparison result until the consistency parameter does not meet the consistency requirement of the hierarchical analysis.
Optionally, before comparing the remaining resources of the same type of the plurality of servers to obtain the server resource comparison result corresponding to each type of resource, the method further includes:
and deleting the servers which do not meet the resource requirements according to the resource requirements of the virtual machines and the current residual resources of the servers.
Optionally, the resources include computing resources and network resources.
The embodiment of the application also provides a virtual machine scheduling device, which comprises a first comparison unit, a second comparison unit and a determination unit;
the first comparing unit is used for comparing various resources in the resource requirements of the virtual machine according to a set hierarchical analysis rule to obtain a resource requirement comparison result;
the second comparing unit is used for comparing the residual resources of the same type of the plurality of servers to obtain server resource comparison results corresponding to various types of resources;
and the determining unit is used for determining a server matched with the virtual machine based on the resource requirement comparison result and the server resource comparison result.
Optionally, the hierarchical analysis rule is a hierarchical analysis scale list including a correspondence between the resource comparison value and the scale value; the first comparison unit is used for comparing every two resources in the resource requirements of the virtual machine to obtain a resource comparison value; and inquiring the scale value corresponding to each resource comparison value from a set hierarchical analysis scale list, and constructing a resource demand comparison result based on the scale values.
Optionally, the determining unit is configured to determine, if the resource requirement comparison result and the server resource comparison result do not meet the dimension requirement, a server matched with the virtual machine based on the normalized resource requirement comparison result and the normalized server resource comparison result.
Optionally, the determining unit includes a normalizing subunit, a fusing subunit and a selecting subunit;
the normalization subunit is configured to perform column vector normalization processing on the resource demand comparison result to obtain a resource feature vector; performing column vector normalization processing on the server resource comparison results corresponding to the various resources to obtain server characteristic vectors corresponding to the various resources;
the fusion subunit is configured to fuse the resource feature vector and server feature vectors corresponding to various resources, and determine a weight corresponding to each server;
and the selecting subunit is used for selecting a target weight meeting preset requirements, and taking a server corresponding to the target weight as a server matched with the virtual machine.
Optionally, the system further comprises a calculation unit and a parameter determination unit;
the computing unit is used for computing the maximum characteristic value of the resource demand comparison result and the maximum characteristic values of the server resource comparison results corresponding to various resources;
the parameter determining unit is configured to determine a consistency parameter based on the maximum feature value, the dimension of the resource demand comparison result, and the dimension of the server resource comparison result corresponding to each resource; and if the consistency parameters meet the consistency requirement of the hierarchical analysis, triggering the fusion subunit to perform the step of fusing the resource characteristic vectors and the server characteristic vectors corresponding to the various resources and determining the weight corresponding to each server.
Optionally, an adjusting unit is further included;
and the adjusting unit is used for adjusting the resource requirement comparison result until the consistency parameter does not meet the consistency requirement of the hierarchical analysis if the consistency parameter does not meet the consistency requirement of the hierarchical analysis.
Optionally, a deleting unit is further included;
and the deleting unit is used for deleting the servers which do not meet the resource requirements according to the resource requirements of the virtual machine and the current residual resources of the servers before the residual resources of the same type of the plurality of servers are compared to obtain the server resource comparison results corresponding to the various types of resources.
Optionally, the resources include computing resources and network resources.
The embodiment of the present application further provides a virtual machine scheduling apparatus, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the virtual machine scheduling method as in any one of the above.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the virtual machine scheduling method according to any one of the above-mentioned items are implemented.
According to the technical scheme, various resources in the resource requirements of the virtual machine are compared according to the set hierarchical analysis rule to obtain a resource requirement comparison result; the resource requirement comparison result reflects the requirement condition of the virtual machine on various resources. And comparing the same type of residual resources of the plurality of servers to obtain server resource comparison results corresponding to various types of resources. Each type of resource has a corresponding server resource comparison result, and the server resource comparison result reflects the proportional relationship of the residual resources among different servers. The server matched with the virtual machine can be determined based on the resource demand comparison result and the server resource comparison results corresponding to various resources. In the technical scheme, the resource requirements of the virtual machine and the residual resources of various resources on the server are comprehensively evaluated, so that the scheduling scheme of the virtual machine is more reasonable, and the selected server is more suitable for the actual service requirements of the virtual machine.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a schematic view of a virtual machine scheduling scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of a virtual machine scheduling method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a virtual machine scheduling apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a virtual machine scheduling device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
At present, in order to implement scheduling of a virtual machine, the remaining computing resources of a server are often weighted according to a set weight coefficient, a weight of the server is determined, and the server with the largest weight is selected as a server to which the virtual machine belongs.
However, simple weighted summation is performed based on computing resources, and the requirement condition of the virtual machine service on the resources cannot be reflected in the scheduling scheme, so that the selected physical server often does not conform to the actual service requirement of the virtual machine, and the user acceptance degree is low.
Therefore, the embodiment of the application provides a virtual machine scheduling method, a virtual machine scheduling device, a virtual machine scheduling equipment and a computer readable storage medium, which are used for comprehensively evaluating resource requirements of a virtual machine and residual resources of various resources on a server and determining the server matched with the virtual machine, so that a virtual machine scheduling scheme is more reasonable.
Fig. 1 is a scene schematic diagram of virtual machine scheduling provided in an embodiment of the present application, where M servers are taken as an example in fig. 1, and after a server management platform obtains a resource demand of a virtual machine, the server management platform may compare various resources in the resource demand based on a set hierarchical analysis rule, so as to obtain a resource demand comparison result. The server management platform may obtain respective remaining resources of the M servers. The remaining resources include various resource types, and in the embodiment of the present application, the same type of remaining resources of the M servers may be compared to obtain a server resource comparison result corresponding to each type of resource. The resource requirement comparison result reflects the requirement condition of the virtual machine on various resources. The server resource comparison result reflects the proportional relationship of the remaining resources between different servers. The resource requirements of the virtual machines and the residual resources of various resources on the servers are comprehensively evaluated, and the servers matched with the virtual machines can be determined.
Next, a virtual machine scheduling method provided in an embodiment of the present application is described in detail. Fig. 2 is a flowchart of a virtual machine scheduling method provided in an embodiment of the present application, where the method includes:
s201: and comparing various resources in the resource requirements of the virtual machine according to a set hierarchical analysis rule to obtain a resource requirement comparison result.
In consideration of the fact that in practical applications, besides the computing resources, the network resources of the server are also important factors affecting the scheduling of the virtual machine, in this embodiment of the present application, the various resources may include the computing resources and the network resources. The computing resources may include CPU resources and memory resources. The network resources may include bandwidth resources of a server portal.
The resource requirement of the virtual machine is used for indicating the degree of the requirement on various resources when the virtual machine realizes the service. For example, the resource requirements of the virtual machine are sequentially CPU resources, bandwidth resources, and memory resources in order from high to low.
In the embodiment of the application, a hierarchical analysis rule can be set to quantitatively evaluate the resource requirements of the virtual machine, so as to obtain a resource requirement comparison result. The resource requirement comparison result can reflect the requirement condition of the virtual machine on various resources.
The hierarchical analysis rule can comprise a hierarchical analysis scale list of scale values and scale meanings corresponding to the scale values, in the concrete implementation, every two resources in the resource demand can be compared according to the importance degree of each resource in the resource demand, the scale values matched with the comparison result in the hierarchical analysis scale list are found, and the resource demand comparison result is constructed based on the scale values.
The hierarchical analysis rule may also include a hierarchical analysis scale list of the correspondence between the resource comparison value and the scale value. In a specific implementation, every two resources in the resource requirements of the virtual machine can be compared to obtain a resource comparison value; and querying a scale value corresponding to each resource comparison value from the set hierarchical analysis scale list, and constructing a resource demand comparison result based on the scale values.
In the embodiment of the present application, the resource requirement comparison result may be presented in a matrix form. Taking various resources in the resource demand as CPU resources, memory resources, and bandwidth resources as an example, the scale value after comparing any two types of resources can be recorded in the form of the following matrix.
Figure BDA0003129583070000071
Wherein A represents the resource requirement comparison result, and the first row data in the matrix represents the importance of CPU resource relative to other resourcesScaling, the second row of data in the matrix representing the importance scale of memory (men) resources relative to other resources, the third row of data in the matrix representing the importance scale of bandwidth (band) resources relative to other resources, a 11 、a 22 And a 33 The value of (a) is 1,
Figure BDA0003129583070000081
a 12 representing the scalar value of CPU resources compared to memory resources, a 13 Representing the scalar value of CPU resources compared to bandwidth resources, a 21 Representing the scalar value of memory resources compared to CPU resources, a 23 Representing the scalar value of memory resources compared to bandwidth resources, a 31 Representing the scalar value of the bandwidth resource compared to the CPU resource, a 32 Representing the scalar value of bandwidth resources compared to memory resources.
S202: and comparing the residual resources of the same type of the plurality of servers to obtain server resource comparison results corresponding to various types of resources.
The number of the servers managed and controlled by the server management platform is often large, and in order to select the servers matched with the virtual machines more reasonably, in the embodiment of the application, the residual resources of the servers can be compared.
The remaining resources include a plurality of resource types, and in the embodiment of the present application, the same type of remaining resources of a plurality of servers may be compared, and a server resource comparison result may be obtained for each type of resource.
In the embodiment of the present application, the server resource comparison result may be presented in a matrix form. Taking the remaining resources of the M servers as an example, the remaining resources may include CPU resources, memory resources, and bandwidth resources, and the server resource comparison result of the remaining resources of the same type of the M servers may be recorded in the form of the following matrix.
Taking the CPU resource as an example, the comparison result of the remaining CPU resources of M servers is as follows,
Figure BDA0003129583070000082
wherein, B cpu The comparison results of the residual CPU resources of the M servers are shown, the data in the first row in the matrix shows the ratio of the residual CPU resource of the first server to the residual CPU resources of other servers, the data in the second row in the matrix shows the ratio of the residual CPU resource of the second server to the residual CPU resources of other servers, and so on, the data in the Mth row in the matrix shows the ratio of the residual CPU resource of the Mth server to the residual CPU resources of other servers,
Figure BDA0003129583070000091
i=1,2,…,M,j=1,2,…,M。
taking the memory resources as an example, the comparison result of the remaining memory resources of the M servers is as follows,
Figure BDA0003129583070000092
wherein, B men Showing the comparison result of the residual memory resources of the M servers, wherein the first row of data in the matrix shows the ratio of the residual memory resources of the first server to the residual memory resources of other servers, the second row of data in the matrix shows the ratio of the residual memory resources of the second server to the residual memory resources of other servers, and so on, the Mth row of data in the matrix shows the ratio of the residual memory resources of the Mth server to the residual memory resources of other servers,
Figure BDA0003129583070000093
i=1,2,…,M,j=1,2,…,M。
taking bandwidth resources as an example, the comparison result of the remaining bandwidth resources of M servers is as follows,
Figure BDA0003129583070000094
wherein, B band Comparison of remaining bandwidth resources representing M serversAs a result, the first row of data in the matrix represents the ratio of the remaining bandwidth resources of the first server to the remaining bandwidth resources of the other servers, the second row of data in the matrix represents the ratio of the remaining bandwidth resources of the second server to the remaining bandwidth resources of the other servers, and so on, the M-th row of data in the matrix represents the ratio of the remaining bandwidth resources of the M-th server to the remaining bandwidth resources of the other servers,
Figure BDA0003129583070000101
i=1,2,…,M,j=1,2,…,M。
s203: and determining a server matched with the virtual machine based on the resource demand comparison result and the server resource comparison result.
In the embodiment of the invention, the resource requirement comparison result and the server resource comparison result need to be comprehensively analyzed, so that the server matched with the virtual machine is determined.
In combination with the above description, the resource requirement comparison result and the server resource comparison result may be both presented in the form of a matrix. For two matrices, when the number of columns of the first matrix is the same as the number of rows of the second matrix, the two matrices can perform multiplication, and thus, in the embodiment of the present application, it may be determined whether the resource requirement comparison result and the server resource comparison result meet the dimension requirement.
And if the resource requirement comparison result and the server resource comparison result meet the dimensional requirement, directly performing multiplication operation on the resource requirement comparison result and the server resource comparison result to obtain a result, namely the weight corresponding to each server.
If the resource requirement comparison result and the server resource comparison result do not meet the dimension requirement, a server matched with the virtual machine can be determined based on the normalized resource requirement comparison result and the normalized server resource comparison result.
According to the technical scheme, various resources in the resource requirements of the virtual machine are compared according to the set hierarchical analysis rule to obtain a resource requirement comparison result; the resource requirement comparison result reflects the requirement condition of the virtual machine on various resources. And comparing the residual resources of the same type of the plurality of servers to obtain server resource comparison results corresponding to various types of resources. Each type of resource has a corresponding server resource comparison result, and the server resource comparison result reflects the proportional relationship of the residual resources among different servers. The server matched with the virtual machine can be determined based on the resource demand comparison result and the server resource comparison results corresponding to various resources. In the technical scheme, the resource requirements of the virtual machine and the residual resources of various resources on the server are comprehensively evaluated, so that the scheduling scheme of the virtual machine is more reasonable, and the selected server is more suitable for the actual service requirements of the virtual machine.
In the embodiment of the application, a column vector normalization processing mode can be adopted to extract the resource feature vector of the resource demand comparison result and extract the server feature vector of the server resource comparison result, so that the resource feature vector and the server feature vector meet the dimensional requirement.
In specific implementation, column vector normalization processing can be performed on the resource demand comparison result to obtain a resource feature vector; performing column vector normalization processing on the server resource comparison results corresponding to the various resources to obtain server characteristic vectors corresponding to the various resources; fusing the resource characteristic vector and server characteristic vectors corresponding to various resources to determine a weight corresponding to each server; and selecting a target weight meeting the preset requirement, and taking a server corresponding to the target weight as a server matched with the virtual machine.
The resource requirement comparison result A and the comparison result B of the residual CPU resources of the M servers are used as the comparison result A cpu Comparison result B of remaining memory resources of M servers men Comparison result B of remaining bandwidth resources of M servers band For example, the resource requirement comparison result a is normalized by a column vector to obtain a resource feature vector
Figure BDA0003129583070000111
Of remaining CPU resources of M serversComparison result B cpu The server characteristic vector corresponding to the CPU resource can be obtained by carrying out column vector normalization processing
Figure BDA0003129583070000112
Comparison result B of residual memory resources of M servers men The server characteristic vector corresponding to the memory resource can be obtained by carrying out column vector normalization processing
Figure BDA0003129583070000113
Comparison result B of residual bandwidth resources of M servers band The column vector normalization processing is carried out, and the characteristic vector of the server corresponding to the bandwidth resource can be obtained
Figure BDA0003129583070000114
Through column vector normalization processing, resource feature vector omega A The vector element of (1) is 3 x 1, the server characteristic vector omega corresponding to the CPU resource cpu The vector element of (2) is M1, and the server characteristic vector omega corresponding to the memory resource men The vector element of (1) is M x 1, and the server characteristic vector omega corresponding to the bandwidth resource band The vector element of (c) is M x 1. To determine the weight of the server, ω can be determined cpu 、ω men And ω band Merging, merged omega cpu ω mem ω band ) The vector element of (c) is M x 3, in which case (ω) may be calculated cpu ω men ω band ) And ω A And performing multiplication operation to obtain a weight matrix with dimension M x 1.ω = (ω =) cpu ω mem ω band )·ω A =[ω 1 ω 2 …ω M ] T Each element in the weight matrix is a weight corresponding to one server.
By adopting a column vector normalization processing mode, the resource requirement comparison result and the server resource comparison result can be converted into the resource characteristic vector and the server characteristic vector meeting the dimension requirement, so that the resource characteristic vector and the server characteristic vector can be conveniently fused to determine the weight of each server.
In the embodiment of the application, based on the principle of an Analytic Hierarchy Process (AHP), the resource demand of the virtual machine and the remaining resources of various resources on the server are comprehensively evaluated, and in order to improve the scheduling accuracy of the virtual machine, it is required to ensure that both the resource demand comparison result and the server resource comparison result meet the requirement of consistency.
In practical application, the maximum characteristic value of the resource demand comparison result and the maximum characteristic value of the server resource comparison result corresponding to each resource can be calculated before the resource characteristic vector and the server characteristic vectors corresponding to each resource are fused to determine the weight corresponding to each server; determining consistency parameters based on the maximum characteristic value, the dimensionality of the resource requirement comparison result and the dimensionality of the server resource comparison result corresponding to each resource; and if the consistency parameters meet the consistency requirements of the hierarchical analysis, fusing the resource characteristic vectors and the server characteristic vectors corresponding to various resources, and determining the weight corresponding to each server.
The maximum characteristic value of the resource requirement comparison result and the maximum characteristic value of the server resource comparison result corresponding to each resource may be calculated in the prior art, and details are not repeated here.
The consistency parameters may include a consistency index CI and a random consistency index RI, and in the embodiment of the present application, the consistency index CI may be calculated according to the following formula,
Figure BDA0003129583070000121
taking the test of the consistency requirement of the resource demand comparison result as an example, λ represents the maximum characteristic value of the resource demand comparison result, n represents the dimension of the resource demand comparison result, and taking the demand resources including CPU resources, memory resources and bandwidth resources as an example, the value of n is 3.
Taking the test of the consistency requirement of the server resource comparison results corresponding to various resources as an example, λ represents the maximum characteristic value of the server resource comparison results corresponding to various resources, n represents the dimension of the server resource comparison results, and taking M servers as an example, the value of n is M.
The random consistency index RI can be obtained by referring to table 1.
TABLE 1
n 1 2 3 4 5 6 7 8 9 10 11
RI 0.00 0.00 0.58 0.90 1.12 1.24 1.32 1.41 1.45 1.49 1.51
After the consistency index CI and the random consistency index RI are determined, the ratio of CI to RI may be used as the consistency ratio. And when the consistency ratio is smaller than a set threshold, indicating that the consistency parameters meet the consistency requirement of the hierarchical analysis, and performing the step of fusing the resource characteristic vectors and the server characteristic vectors corresponding to various resources to determine the weight corresponding to each server. When the consistency ratio is not less than the set threshold, the consistency parameter does not meet the consistency requirement of the hierarchical analysis, and at the moment, the resource requirement comparison result can be adjusted until the consistency parameter does not meet the consistency requirement of the hierarchical analysis.
In the embodiment of the present application, a manner of adjusting the resource requirement comparison result is not limited, and for example, values of two associated elements may be adjusted each time.
By carrying out consistency check on the resource demand comparison result and the server resource comparison result, the resource demand comparison result and the server resource comparison result can be ensured to meet the consistency requirement of the analytic hierarchy process, so that the weight of each server is determined to be more accurate based on the resource characteristic vector and the server characteristic vectors corresponding to various resources.
In the embodiment of the application, servers which do not meet the resource requirements can be deleted according to the resource requirements of the virtual machines and the current remaining resources of the servers before the same type of remaining resources of the servers are compared to obtain the server resource comparison results corresponding to various types of resources.
Taking the resource types as CPU resources, memory resources, and bandwidth resources as an example, the requirement for CPU resources in the resource requirements of the virtual machine may be compared with the current remaining CPU resources of each server, and if there is a target server whose current remaining CPU resources are smaller than the requirement for CPU resources in the resource requirements of the virtual machine, the target server is deleted.
Similarly, for the memory resources, the demand for the memory resources in the resource demand of the virtual machine may be compared with the current remaining memory resources of each server, and if there is a target server whose current remaining memory resources are smaller than the demand for the memory resources in the resource demand of the virtual machine, the target server is deleted. For bandwidth resources, the requirement for bandwidth resources in the resource requirements of the virtual machine may be compared with the current remaining bandwidth resources of each server, and if a target server exists, for which the current remaining bandwidth resources are smaller than the requirement for bandwidth resources in the resource requirements of the virtual machine, the target server is deleted.
By comparing the resource requirement of the virtual machine with the current residual resources of each server, the servers which do not conform to the resource requirement can be deleted, the calculation amount of the servers which are subsequently determined to be matched with the virtual machine is reduced, and the execution efficiency of virtual machine scheduling is improved.
Fig. 3 is a schematic structural diagram of a virtual machine scheduling apparatus according to an embodiment of the present application, including a first comparing unit 31, a second comparing unit 32, and a determining unit 33;
the first comparing unit 31 is configured to compare various resources in the resource requirements of the virtual machine according to a set hierarchical analysis rule to obtain a resource requirement comparison result;
the second comparing unit 32 is configured to compare the remaining resources of the same type of the servers to obtain a server resource comparison result corresponding to each type of resource;
the determining unit 33 is configured to determine a server matched with the virtual machine based on the normalized resource demand comparison result and the normalized server resource comparison results corresponding to the various resources.
Optionally, the hierarchical analysis rule is a hierarchical analysis scale list including a correspondence between the resource comparison value and the scale value; the first comparison unit is used for comparing every two resources in the resource requirements of the virtual machine to obtain a resource comparison value; and inquiring the scale value corresponding to each resource comparison value from the set hierarchical analysis scale list, and constructing a resource demand comparison result based on the scale values.
Optionally, the determining unit is configured to determine, if the resource requirement comparison result and the server resource comparison result do not meet the dimension requirement, a server matched with the virtual machine based on the normalized resource requirement comparison result and the normalized server resource comparison result.
Optionally, the determining unit includes a normalizing subunit, a fusing subunit and a selecting subunit;
the normalization subunit is used for carrying out column vector normalization processing on the resource demand comparison result to obtain a resource characteristic vector; performing column vector normalization processing on the server resource comparison results corresponding to the various resources to obtain server characteristic vectors corresponding to the various resources;
the fusion subunit is used for fusing the resource characteristic vectors and the server characteristic vectors corresponding to the various resources to determine a weight corresponding to each server;
and the selecting subunit is used for selecting a target weight meeting the preset requirement, and taking a server corresponding to the target weight as a server matched with the virtual machine.
Optionally, the system further comprises a calculation unit and a parameter determination unit;
the computing unit is used for computing the maximum characteristic value of the resource demand comparison result and the maximum characteristic value of the server resource comparison result corresponding to each resource;
the parameter determining unit is used for determining consistency parameters based on the maximum characteristic value, the dimensionality of the resource requirement comparison result and the dimensionality of the server resource comparison result corresponding to each resource; and if the consistency parameters meet the consistency requirement of the hierarchical analysis, triggering a fusion subunit to perform fusion of the resource characteristic vectors and the server characteristic vectors corresponding to the various resources, and determining the weight corresponding to each server.
Optionally, an adjusting unit is further included;
and the adjusting unit is used for adjusting the resource requirement comparison result until the consistency parameter does not meet the consistency requirement of the hierarchical analysis if the consistency parameter does not meet the consistency requirement of the hierarchical analysis.
Optionally, a deleting unit is further included;
and the deleting unit is used for deleting the servers which do not meet the resource requirements according to the resource requirements of the virtual machines and the current residual resources of the servers before comparing the residual resources of the same type of the plurality of servers to obtain the server resource comparison results corresponding to the various types of resources.
Optionally, the resources include computing resources and network resources.
The description of the features in the embodiment corresponding to fig. 3 may refer to the related description of the embodiment corresponding to fig. 2, and is not repeated here.
According to the technical scheme, various resources in the resource requirements of the virtual machine are compared according to the set hierarchical analysis rule to obtain a resource requirement comparison result; the resource requirement comparison result reflects the requirement condition of the virtual machine on various resources. And comparing the residual resources of the same type of the plurality of servers to obtain server resource comparison results corresponding to various types of resources. Each type of resource has a corresponding server resource comparison result, and the server resource comparison result reflects the proportional relationship of the residual resources among different servers. The server matched with the virtual machine can be determined based on the resource demand comparison result and the server resource comparison results corresponding to various resources. In the technical scheme, the resource requirements of the virtual machine and the residual resources of various resources on the server are comprehensively evaluated, so that the scheduling scheme of the virtual machine is more reasonable, and the selected server is more suitable for the actual service requirements of the virtual machine.
Fig. 4 is a schematic diagram of a hardware structure of a virtual machine scheduling apparatus 40 according to an embodiment of the present application, including:
a memory 41 for storing a computer program;
a processor 42 for executing a computer program to implement the steps of any of the virtual machine scheduling methods described above.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above virtual machine scheduling methods are implemented.
The foregoing details a virtual machine scheduling method, apparatus, device, and computer-readable storage medium provided in this embodiment of the present application. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (11)

1. A method for scheduling a virtual machine, comprising:
comparing various resources in the resource requirements of the virtual machine according to a set hierarchical analysis rule to obtain a resource requirement comparison result;
comparing the same type of residual resources of the plurality of servers to obtain server resource comparison results corresponding to various types of resources;
and determining a server matched with the virtual machine based on the resource demand comparison result and the server resource comparison result.
2. The virtual machine scheduling method according to claim 1, wherein the hierarchical analysis rule is a hierarchical analysis scale list including a correspondence between a resource comparison value and a scale value; correspondingly, the comparing various resources in the resource requirements of the virtual machine according to the set hierarchical analysis rule to obtain the resource requirement comparison result includes:
comparing every two resources in the resource requirements of the virtual machine to obtain a resource comparison value;
and inquiring the scale value corresponding to each resource comparison value from a set hierarchical analysis scale list, and constructing a resource demand comparison result based on the scale values.
3. The method according to claim 1, wherein the determining a server matching the virtual machine based on the resource requirement comparison result and the server resource comparison result comprises:
and if the resource requirement comparison result and the server resource comparison result do not meet the dimension requirement, determining a server matched with the virtual machine based on the normalized resource requirement comparison result and the normalized server resource comparison result.
4. The method according to claim 3, wherein the determining a server matching the virtual machine based on the normalized resource demand comparison result and the normalized server resource comparison result comprises:
performing column vector normalization processing on the resource demand comparison result to obtain a resource characteristic vector;
performing column vector normalization processing on the server resource comparison results corresponding to the various resources to obtain server characteristic vectors corresponding to the various resources;
fusing the resource characteristic vector and server characteristic vectors corresponding to various resources to determine a weight corresponding to each server;
and selecting a target weight meeting a preset requirement, and taking a server corresponding to the target weight as a server matched with the virtual machine.
5. The virtual machine scheduling method according to claim 4, wherein before the fusing the resource feature vector and the server feature vectors corresponding to the various types of resources and determining the weight corresponding to each server, the method further comprises:
calculating the maximum characteristic value of the resource demand comparison result and the maximum characteristic values of the server resource comparison results corresponding to various resources;
determining consistency parameters based on the maximum characteristic value, the dimensionality of the resource demand comparison result and the dimensionality of the server resource comparison result corresponding to each resource;
and if the consistency parameters meet the consistency requirement of the hierarchical analysis, executing the step of fusing the resource characteristic vectors and the server characteristic vectors corresponding to various resources to determine the weight corresponding to each server.
6. The virtual machine scheduling method of claim 5, further comprising:
and if the consistency parameter does not meet the consistency requirement of the hierarchical analysis, adjusting the resource requirement comparison result until the consistency parameter does not meet the consistency requirement of the hierarchical analysis.
7. The virtual machine scheduling method according to claim 1, wherein before comparing the remaining resources of the same type of the plurality of servers to obtain the server resource comparison result corresponding to each type of resource, the method further comprises:
and deleting the servers which do not meet the resource requirements according to the resource requirements of the virtual machines and the current residual resources of the servers.
8. The virtual machine scheduling method according to any of claims 1 to 7 wherein the resources comprise computing resources and network resources.
9. The virtual machine scheduling device is characterized by comprising a first comparison unit, a second comparison unit and a determination unit;
the first comparing unit is used for comparing various resources in the resource requirements of the virtual machine according to a set hierarchical analysis rule to obtain a resource requirement comparison result;
the second comparing unit is used for comparing the residual resources of the same type of the plurality of servers to obtain server resource comparison results corresponding to various types of resources;
and the determining unit is used for determining a server matched with the virtual machine based on the resource requirement comparison result and the server resource comparison result.
10. A virtual machine scheduling apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the virtual machine scheduling method according to any of claims 1 to 8.
11. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the virtual machine scheduling method according to any one of claims 1 to 8.
CN202110700465.8A 2021-06-23 2021-06-23 Virtual machine scheduling method, device, equipment and computer readable storage medium Pending CN115509678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110700465.8A CN115509678A (en) 2021-06-23 2021-06-23 Virtual machine scheduling method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110700465.8A CN115509678A (en) 2021-06-23 2021-06-23 Virtual machine scheduling method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115509678A true CN115509678A (en) 2022-12-23

Family

ID=84499599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110700465.8A Pending CN115509678A (en) 2021-06-23 2021-06-23 Virtual machine scheduling method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115509678A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737320A (en) * 2023-06-29 2023-09-12 河南大学 Cloud data center resource balance-aware virtual machine placement strategy based on AHP method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737320A (en) * 2023-06-29 2023-09-12 河南大学 Cloud data center resource balance-aware virtual machine placement strategy based on AHP method

Similar Documents

Publication Publication Date Title
US12298878B2 (en) Methods and systems for determining system capacity
CN110348562B (en) Neural network quantization strategy determination method, image identification method and device
US8117224B2 (en) Accuracy measurement of database search algorithms
CN108683530B (en) Data analysis method, device and storage medium for multi-dimensional data
CN110737818A (en) Network release data processing method and device, computer equipment and storage medium
CN106022505A (en) Method and device of predicting user off-grid
CN111562884B (en) Data storage method and device and electronic equipment
CN111506485A (en) Feature binning method, apparatus, device, and computer-readable storage medium
CN110880014A (en) Data processing method and device, computer equipment and storage medium
JP6901423B2 (en) Information processing equipment, information processing terminals, and programs
CN111475402A (en) Program function testing method and related device
CN115509678A (en) Virtual machine scheduling method, device, equipment and computer readable storage medium
CN110334012B (en) Risk assessment method and device
CN113869989B (en) Information processing method and device
CN111221827A (en) Database table connection method and device based on graphic processor, computer equipment and storage medium
CN107844496B (en) Statistical information output method and device
CN110661913A (en) User sorting method and device and electronic equipment
CN113836130A (en) Data quality evaluation method, device, equipment and storage medium
CN118212994A (en) Metabolomics data processing method, device, equipment and readable storage medium
CN112308466A (en) Enterprise qualification review method, device, computer equipment and storage medium
EP2312516A1 (en) Denoising explicit feedback for recommender systems
US20140351007A1 (en) Estimating the total sales over streaming bids
Al-Zanbouri et al. Data-aware web service recommender system for energy-efficient data mining services
El Haddad et al. Approximate anlysis of an unreliable M/M/c retrial queue with phase merging algorithm
CN117610970B (en) Intelligent evaluation method and system for data migration work

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