CN114253662A - Method, device, equipment and medium for dynamically migrating virtual machines - Google Patents

Method, device, equipment and medium for dynamically migrating virtual machines Download PDF

Info

Publication number
CN114253662A
CN114253662A CN202111338435.3A CN202111338435A CN114253662A CN 114253662 A CN114253662 A CN 114253662A CN 202111338435 A CN202111338435 A CN 202111338435A CN 114253662 A CN114253662 A CN 114253662A
Authority
CN
China
Prior art keywords
host
resource utilization
utilization rate
current
idle
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.)
Withdrawn
Application number
CN202111338435.3A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111338435.3A priority Critical patent/CN114253662A/en
Publication of CN114253662A publication Critical patent/CN114253662A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

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

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 invention provides a dynamic migration method of a virtual machine, which is applied to a cloud platform and comprises the following steps: acquiring a resource utilization rate parameter of each current host in the cluster; preprocessing the resource utilization rate parameters of each host; determining the idle degree corresponding to the current host according to the preprocessed resource utilization rate parameters and a DS evidence theory; the virtual machine to be migrated in the source host is migrated to the target host, wherein the source host is a host with a resource utilization rate exceeding a preset threshold, and the target host is a host with the largest current idle degree.

Description

Method, device, equipment and medium for dynamically migrating virtual machines
Technical Field
The present invention relates to the field of virtual machine migration, and in particular, to a method, an apparatus, a device, and a medium for dynamically migrating a virtual machine.
Background
In the cloud platform, hardware resources are gathered together through a network, and then the hardware resources are virtualized through a virtualization technology, so that the allocation of hardware can be realized on a physical host machine by creating a virtual machine. Compared with the actual cluster, the hardware cost is greatly reduced, and the performance requirement on the server is also reduced.
However, when too many virtual machines are distributed on a single host, physical resources are easily caused to reach a limit alarm value, so that the system is crashed; in the prior art, the solution is mainly to randomly migrate the virtual machine on the host that reaches the limit alarm value to other hosts, but this method can reduce the pressure of a single physical host, but does not consider the resource utilization of other hosts, which easily causes uneven distribution of cloud platform resources and does not realize full utilization of the cloud platform resources.
Disclosure of Invention
The invention aims to solve the problems in the prior art, innovatively provides a virtual machine dynamic migration method, device, equipment and medium, effectively solves the problem that resource allocation of a cloud platform is uneven when the resource utilization rate of a certain physical host in a cluster reaches a threshold value for virtual machine migration in the prior art, and realizes full utilization of the cloud platform resources.
The invention provides a dynamic migration method of a virtual machine, which is applied to a cloud platform and comprises the following steps:
acquiring a resource utilization rate parameter of each current host in the cluster;
preprocessing the resource utilization rate parameters of each host;
determining the idle degree corresponding to the current host according to the preprocessed resource utilization rate parameters and a DS evidence theory;
and migrating the virtual machine to be migrated in the source host to the target host, wherein the source host is a host with the resource utilization rate exceeding a preset threshold value, and the target host is a host with the maximum current idle degree.
Optionally, the method further comprises:
judging whether the resource utilization rate of the hosts with the resource utilization rate exceeding the preset threshold exceeds the preset threshold or not, if so, re-acquiring the idle degree of each current host, and migrating the virtual machines to be migrated to the hosts with the maximum re-determined idle degree; and until the resource utilization rate after the host migration with the resource utilization rate exceeding the preset threshold value does not exceed the preset threshold value.
Optionally, the resource utilization parameter includes, but is not limited to, a central processing unit utilization, a logical memory occupancy, an operating memory usage, and a disk usage.
Further, the preprocessing according to the resource utilization parameter of each host specifically includes:
acquiring the idle resource utilization rate of each host according to the resource utilization rate parameters of each host;
and normalizing the utilization rate of the idle resources of each host by a softmax function.
Further, the normalization processing of the idle resource utilization rate of each host by the softmax function is specifically:
Figure BDA0003351407040000021
wherein, the idle resource utilization rate parameter after normalization processing is
Figure BDA0003351407040000022
i is the ith host computer,
Figure BDA0003351407040000023
is the j resource utilization parameter in the i host.
Optionally, determining, according to the preprocessed resource utilization parameter and the DS evidence theory, that the idle degree of the corresponding current host is specifically:
and fusing the preprocessed resource utilization rate parameters as basic probability distribution of the DS evidence theory to determine the idle degree of the current host.
Further, fusing the preprocessed resource utilization rate parameters as basic probability distribution of the DS evidence theory, and determining the idle degree of the current host specifically comprises:
Figure BDA0003351407040000031
wherein the resource utilization rate parameter after pretreatment is
Figure BDA0003351407040000032
i is the ith host, j is the jth resource utilization parameter in the ith host, K is the weight coefficient, CiIs the current idle degree of the ith host.
The second aspect of the present invention provides a virtual machine dynamic migration apparatus, which is applied to a cloud platform, and includes:
the first acquisition module is used for acquiring the resource utilization rate parameter of each current host in the cluster;
the preprocessing module is used for preprocessing the resource utilization rate parameters of each host;
the determining module is used for determining the idle degree corresponding to the current host according to the preprocessed resource utilization rate parameters and the DS evidence theory;
and the migration module migrates the virtual machine to be migrated in the source host to the destination host, wherein the source host is a host with a resource utilization rate exceeding a preset threshold, and the destination host is a host with the largest current idle degree.
A third aspect of the present invention provides an electronic device comprising: a memory for storing a computer program; a processor for implementing the steps of a method for dynamic migration of virtual machines according to the first aspect of the present invention when executing the computer program.
A fourth aspect of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of a method for dynamic migration of virtual machines according to the first aspect of the present invention.
The technical scheme adopted by the invention comprises the following technical effects:
1. the target host of the virtual machine migration is the host with the largest idle degree at present, and the problem that resource allocation of a cloud platform is uneven when the resource utilization rate of a certain physical host in a cluster reaches a threshold value for virtual machine migration in the prior art is effectively solved, so that the host with over-high pressure is released, the cluster efficiency is improved, and the cloud platform resource is fully utilized.
2. According to the technical scheme, the idleness degree corresponding to the current host is determined according to the preprocessed multi-item resource utilization rate parameters and the DS evidence theory, the multi-item utilization rate of the host is comprehensively considered, and the situation that the utilization condition of the host resource cannot be correctly reflected due to a single parameter is avoided.
3. In the technical scheme of the invention, after the migration of a certain virtual machine of a source host is finished, whether the resource utilization rate of the host with the resource utilization rate exceeding a preset threshold value after the migration exceeds the preset threshold value is judged, if so, the idle degree of each host is obtained again, and the virtual machine to be migrated is migrated to the host with the maximum idle degree which is determined again; until the resource utilization rate of the host with the resource utilization rate exceeding the preset threshold value after the host is migrated does not exceed the preset threshold value, the resource utilization rate of the source host can be reduced, the relative idle degree of the target host migrated every time is maximum, the cluster efficiency is further improved, and the full utilization of the cloud platform resources is realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without any creative effort.
FIG. 1 is a schematic flow diagram of a process according to an embodiment of the present invention;
FIG. 2 is another schematic flow diagram of a process according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating step S2 in a method according to an embodiment of the present invention;
FIG. 4 is a schematic view showing the structure of an apparatus according to a second embodiment of the present invention;
FIG. 5 is another schematic diagram of an apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the pre-processing module 102 in a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a third apparatus in an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example one
As shown in fig. 1, the present invention provides a method for dynamically migrating a virtual machine, which is applied to a cloud platform, and includes:
s1, acquiring the resource utilization rate parameter of each current host in the cluster;
s2, preprocessing the resource utilization rate parameters according to each host;
s3, determining the idle degree corresponding to the current host according to the preprocessed resource utilization rate parameters and the DS evidence theory;
and S4, migrating the virtual machine to be migrated in the source host to the destination host, wherein the source host is a host with a resource utilization rate exceeding a preset threshold, and the destination host is a host with the largest current idle degree.
Further, as shown in fig. 2, the technical solution of the present invention further provides a method for dynamically migrating a virtual machine, which is applied to a cloud platform, and further includes:
s5, judging whether the resource utilization rate after the host computer migration with the resource utilization rate exceeding the preset threshold exceeds the preset threshold, if so, executing the step S6; if the judgment result is no, executing step S7;
s6, re-acquiring the idle degree of each current host, and migrating the virtual machine to be migrated to the host with the maximum idle degree; and until the resource utilization rate after the host migration with the resource utilization rate exceeding the preset threshold value does not exceed the preset threshold value.
And S7, finishing the virtual machine migration process.
In step S1, the resource utilization parameter includes, but is not limited to, a central processing unit utilization, a logic memory occupancy, an operating memory utilization, a disk utilization, and other hardware resource utilization parameters, which is not limited herein.
As shown in fig. 3, step S2 specifically includes:
s21, obtaining the idle resource utilization rate of each host according to the resource utilization rate parameters of each host;
and S22, performing normalization processing on the utilization rate of the free resources of each host through a softmax function.
In step S21, the idle resource utilization rate of each host is obtained according to the resource utilization rate parameter of each host, when the resource utilization rate of a host in the monitored cluster (which may be a certain resource utilization rate or all resource utilization rates) reaches the alarm threshold, the resource utilization rate parameter of each other host in the current cluster is read, the resource utilization rate parameter is converted into a percentage form, and the resource utilization rate parameter is subtracted from the real number 1 to obtain the idle resource utilization rate, for example, if the resource utilization rate of a Central Processing Unit (CPU) is 40%, then the idle resource utilization rate is 60%.
In step S22, the normalization process of the free resource utilization rate of each host by the softmax function (normalization index function, function of mapping data to 0-1 interval) is specifically:
Figure BDA0003351407040000071
wherein, the idle resource utilization rate parameter after normalization processing is
Figure BDA0003351407040000072
i is the ith host computer,
Figure BDA0003351407040000073
for the j resource interest in the i hostA rate parameter.
In step S3, determining, according to the preprocessed resource utilization parameter and the DS evidence theory, that the idle degree of the corresponding current host is specifically:
and fusing the preprocessed resource utilization rate parameters as basic probability distribution of the DS evidence theory to determine the idle degree of the current host.
Specifically, the obtained idle resource utilization rate parameter after normalization processing
Figure BDA0003351407040000074
Regarding the resource utilization rate parameter after the preprocessing (namely the idle resource utilization rate parameter after the normalization processing) as the recommendation degree of the host i
Figure BDA0003351407040000075
) As a basic probability distribution of DS evidence theory (Dempster-Shafer evidence theory, an inference theory that infers results by multiple information source probabilities) to perform fusion, it is specifically determined that the idle degree of the current host is:
Figure BDA0003351407040000081
wherein the resource utilization rate parameter after pretreatment is
Figure BDA0003351407040000082
i is the ith host, j is the jth resource utilization parameter in the ith host, K is the weight coefficient, CiIs the current idle degree of the ith host.
In step S4, the virtual machine to be migrated in the source host is migrated to the destination host, where the source host is a host whose resource utilization exceeds a preset threshold, and the destination host is a host with the largest current idle degree. The selection of the virtual machines to be migrated may be random selection, or priority ordering may be set according to the running service condition, resource occupation condition, and the like of each virtual machine of the source host, and the virtual machines with unimportant running services or higher resource utilization rate are preferentially selected for migration, so as to avoid the influence on running important services due to migration of the virtual machines.
In step S6, after migration of a virtual machine of the source host is completed, the resource utilization rate of the host whose resource utilization rate exceeds the preset threshold still exceeds the preset threshold, and another virtual machine of the source host needs to be selected for migration, and the idle degree of each host is obtained again (available for use)
Figure BDA0003351407040000083
Wherein k is the migration number of the virtual machine), namely, the steps S1-S3 are executed again, and the virtual machine to be migrated is migrated to the host with the maximum redetermined idle degree; and until the resource utilization rate after the host migration with the resource utilization rate exceeding the preset threshold value does not exceed the preset threshold value. Since the destination host that has been migrated before can still serve as the destination host of the current migration during the current migration, but the resource utilization rates of the destination host that has been migrated and the hosts that have not been migrated have changed, the current idle level of each host needs to be recalculated, i.e., steps S1-S3 are re-executed.
It should be noted that, in the technical solution of the present invention, steps S-S7 may all be implemented by hardware or software language programming, and the implementation idea corresponds to each step, and may also be implemented by other manners, which is not limited herein.
The target host of the virtual machine migration is the host with the largest idle degree at present, and the problem that resource allocation of a cloud platform is uneven when the resource utilization rate of a certain physical host in a cluster reaches a threshold value for virtual machine migration in the prior art is effectively solved, so that the host with over-high pressure is released, the cluster efficiency is improved, and the cloud platform resource is fully utilized.
According to the technical scheme, the idleness degree corresponding to the current host is determined according to the preprocessed multi-item resource utilization rate parameters and the DS evidence theory, the multi-item utilization rate of the host is comprehensively considered, and the situation that the utilization condition of the host resource cannot be correctly reflected due to a single parameter is avoided.
In the technical scheme of the invention, after the migration of a certain virtual machine of a source host is finished, whether the resource utilization rate of the host with the resource utilization rate exceeding a preset threshold value after the migration exceeds the preset threshold value is judged, if so, the idle degree of each host is obtained again, and the virtual machine to be migrated is migrated to the host with the maximum idle degree which is determined again; until the resource utilization rate of the host with the resource utilization rate exceeding the preset threshold value after the host is migrated does not exceed the preset threshold value, the resource utilization rate of the source host can be reduced, the relative idle degree of the target host migrated every time is maximum, the cluster efficiency is further improved, and the full utilization of the cloud platform resources is realized.
Example two
As shown in fig. 4, the technical solution of the present invention further provides a virtual machine dynamic migration apparatus, which is applied to a cloud platform, and includes:
a first obtaining module 101, configured to obtain a resource utilization parameter of each current host in a cluster;
the preprocessing module 102 is used for preprocessing the resource utilization rate parameters of each host;
the determining module 103 determines the idle degree of the corresponding current host according to the preprocessed resource utilization rate parameters and the DS evidence theory;
the migration module 104 migrates a virtual machine to be migrated in a source host to a destination host, where the source host is a host whose resource utilization rate exceeds a preset threshold, and the destination host is a host with the largest current idle degree.
Further, as shown in fig. 5, the technical solution of the present invention further provides a dynamic migration apparatus for a virtual machine, which is applied to a cloud platform, and further includes:
the judging module 105 is used for judging whether the resource utilization rate of the host with the resource utilization rate exceeding the preset threshold exceeds the preset threshold or not after the host is migrated, if so, re-acquiring the idle degree of each current host, and migrating the virtual machine to be migrated to the host with the maximum re-determined idle degree; and until the resource utilization rate after the host migration with the resource utilization rate exceeding the preset threshold value does not exceed the preset threshold value.
In the first obtaining module 101, the resource utilization parameter includes, but is not limited to, a central processing unit utilization, a logic memory occupancy, an operating memory utilization, a disk utilization, and may also be another hardware resource utilization parameter, which is not limited herein.
As shown in fig. 6, the steps executed by the preprocessing module 102 specifically include:
a second obtaining sub-module 1021, which obtains the idle resource utilization rate of each host according to the resource utilization rate parameters of each host;
the normalization processing sub-module 1022 normalizes the utilization rate of the idle resources of each host through the softmax function.
In the second obtaining sub-module 1021, the idle resource utilization rate of each host is obtained according to the resource utilization rate parameter of each host, when the resource utilization rate of a host (which may be a certain resource utilization rate or all resource utilization rates) in the monitored cluster reaches the alarm threshold, the resource utilization rate parameter of each other host in the current cluster is read, the resource utilization rate parameter is converted into a percentage form, and the resource utilization rate parameter is subtracted from the real number 1 to obtain the idle resource utilization rate, for example, if the resource utilization rate of a Central Processing Unit (CPU) is 40%, then the idle resource utilization rate is 60%.
In the normalization processing sub-module 1022, the normalization processing of the idle resource utilization rate of each host by the softmax function specifically includes:
Figure BDA0003351407040000111
wherein, the idle resource utilization rate parameter after normalization processing is
Figure BDA0003351407040000112
i is the ith host computer,
Figure BDA0003351407040000113
is the j resource utilization parameter in the i host.
In the determining module 103, determining, according to the preprocessed resource utilization parameter and the DS evidence theory, that the idle degree corresponding to the current host is specifically:
and fusing the preprocessed resource utilization rate parameters as basic probability distribution of the DS evidence theory to determine the idle degree of the current host.
Specifically, the obtained idle resource utilization rate parameter after normalization processing
Figure BDA0003351407040000114
Regarding the resource utilization rate parameter after the preprocessing (namely the idle resource utilization rate parameter after the normalization processing) as the recommendation degree of the host i
Figure BDA0003351407040000115
) Fusing basic probability distribution serving as a DS evidence theory, and specifically determining the idle degree of the current host:
Figure BDA0003351407040000116
wherein the resource utilization rate parameter after pretreatment is
Figure BDA0003351407040000117
i is the ith host, j is the jth resource utilization parameter in the ith host, K is the weight coefficient, CiIs the current idle degree of the ith host.
In the migration module 104, the virtual machine to be migrated in the source host is migrated to the destination host, where the source host is a host whose resource utilization exceeds a preset threshold, and the destination host is a host with the largest current idle degree. The selection of the virtual machines to be migrated may be random selection, or priority ordering may be set according to the running service condition, resource occupation condition, and the like of each virtual machine of the source host, and the virtual machines with unimportant running services or higher resource utilization rate are preferentially selected for migration, so as to avoid the influence on running important services due to migration of the virtual machines.
In the determination module 105, a virtual machine of the source hostAfter migration is completed, the resource utilization rate of the hosts with the resource utilization rate exceeding the preset threshold still exceeds the preset threshold, and then one of the remaining virtual machines of the source host needs to be selected for migration, and the idle degree of each current host is obtained again (available for use)
Figure BDA0003351407040000121
K is the migration times of the virtual machines), and migrating the virtual machines to be migrated to the host with the maximum redetermined idle degree; and until the resource utilization rate after the host migration with the resource utilization rate exceeding the preset threshold value does not exceed the preset threshold value. Because, during the current migration, the destination host that has been migrated before can still serve as the destination host that is currently migrated, but the resource utilization rates of the destination host that has been migrated and the hosts that have not been migrated have changed, the current idle degree of each host needs to be recalculated.
The target host of the virtual machine migration is the host with the largest idle degree at present, and the problem that resource allocation of a cloud platform is uneven when the resource utilization rate of a certain physical host in a cluster reaches a threshold value for virtual machine migration in the prior art is effectively solved, so that the host with over-high pressure is released, the cluster efficiency is improved, and the cloud platform resource is fully utilized.
According to the technical scheme, the idleness degree corresponding to the current host is determined according to the preprocessed multi-item resource utilization rate parameters and the DS evidence theory, the multi-item utilization rate of the host is comprehensively considered, and the situation that the utilization condition of the host resource cannot be correctly reflected due to a single parameter is avoided.
In the technical scheme of the invention, after the migration of a certain virtual machine of a source host is finished, whether the resource utilization rate of the host with the resource utilization rate exceeding a preset threshold value after the migration exceeds the preset threshold value is judged, if so, the idle degree of each host is obtained again, and the virtual machine to be migrated is migrated to the host with the maximum idle degree which is determined again; until the resource utilization rate of the host with the resource utilization rate exceeding the preset threshold value after the host is migrated does not exceed the preset threshold value, the resource utilization rate of the source host can be reduced, the relative idle degree of the target host migrated every time is maximum, the cluster efficiency is further improved, and the full utilization of the cloud platform resources is realized.
EXAMPLE III
As shown in fig. 7, the present invention further provides an electronic device, including: a memory 201 for storing a computer program; a processor 202, configured to implement the steps of a virtual machine dynamic migration method as described in the first embodiment when the computer program is executed.
The memory 201 in the embodiments of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device. It will be appreciated that the memory 201 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a magnetic random access Memory (flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. The volatile memory may be a Random Access Memory (RAM) which serves as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Synchronous Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous link Dynamic Random Access Memory (SLDRAM, Synchronous Dynamic Random Access Memory), Direct Memory (DRmb Random Access Memory, Random Access Memory). The memory 201 described in embodiments herein is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed in the embodiments of the present application may be applied to the processor 202, or implemented by the processor 202. The processor 202 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 202. The processor 202 may be a general-purpose processor, a DSP (Digital Signal Processing, i.e., a chip capable of implementing Digital Signal Processing), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. Processor 202 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 201, and the processor 202 reads the program in the memory 201 and performs the steps of the foregoing method in combination with its hardware. When the processor 202 executes the program, the corresponding processes in the methods according to the embodiments of the present application are realized, and for brevity, are not described herein again.
The target host of the virtual machine migration is the host with the largest idle degree at present, and the problem that resource allocation of a cloud platform is uneven when the resource utilization rate of a certain physical host in a cluster reaches a threshold value for virtual machine migration in the prior art is effectively solved, so that the host with over-high pressure is released, the cluster efficiency is improved, and the cloud platform resource is fully utilized.
According to the technical scheme, the idleness degree corresponding to the current host is determined according to the preprocessed multi-item resource utilization rate parameters and the DS evidence theory, the multi-item utilization rate of the host is comprehensively considered, and the situation that the utilization condition of the host resource cannot be correctly reflected due to a single parameter is avoided.
In the technical scheme of the invention, after the migration of a certain virtual machine of a source host is finished, whether the resource utilization rate of the host with the resource utilization rate exceeding a preset threshold value after the migration exceeds the preset threshold value is judged, if so, the idle degree of each host is obtained again, and the virtual machine to be migrated is migrated to the host with the maximum idle degree which is determined again; until the resource utilization rate of the host with the resource utilization rate exceeding the preset threshold value after the host is migrated does not exceed the preset threshold value, the resource utilization rate of the source host can be reduced, the relative idle degree of the target host migrated every time is maximum, the cluster efficiency is further improved, and the full utilization of the cloud platform resources is realized.
Example four
The technical solution of the present invention 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 method for dynamically migrating a virtual machine according to the first embodiment are implemented.
For example, comprising a memory 201 storing a computer program executable by a processor 202 for performing the steps of the method as described above. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code. Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The target host of the virtual machine migration is the host with the largest idle degree at present, and the problem that resource allocation of a cloud platform is uneven when the resource utilization rate of a certain physical host in a cluster reaches a threshold value for virtual machine migration in the prior art is effectively solved, so that the host with over-high pressure is released, the cluster efficiency is improved, and the cloud platform resource is fully utilized.
According to the technical scheme, the idleness degree corresponding to the current host is determined according to the preprocessed multi-item resource utilization rate parameters and the DS evidence theory, the multi-item utilization rate of the host is comprehensively considered, and the situation that the utilization condition of the host resource cannot be correctly reflected due to a single parameter is avoided.
In the technical scheme of the invention, after the migration of a certain virtual machine of a source host is finished, whether the resource utilization rate of the host with the resource utilization rate exceeding a preset threshold value after the migration exceeds the preset threshold value is judged, if so, the idle degree of each host is obtained again, and the virtual machine to be migrated is migrated to the host with the maximum idle degree which is determined again; until the resource utilization rate of the host with the resource utilization rate exceeding the preset threshold value after the host is migrated does not exceed the preset threshold value, the resource utilization rate of the source host can be reduced, the relative idle degree of the target host migrated every time is maximum, the cluster efficiency is further improved, and the full utilization of the cloud platform resources is realized.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. A dynamic migration method of a virtual machine is applied to a cloud platform and is characterized by comprising the following steps:
acquiring a resource utilization rate parameter of each current host in the cluster;
preprocessing the resource utilization rate parameters of each host;
determining the idle degree corresponding to the current host according to the preprocessed resource utilization rate parameters and a DS evidence theory;
and migrating the virtual machine to be migrated in the source host to the target host, wherein the source host is a host with the resource utilization rate exceeding a preset threshold value, and the target host is a host with the maximum current idle degree.
2. The method according to claim 1, further comprising:
judging whether the resource utilization rate of the hosts with the resource utilization rate exceeding the preset threshold exceeds the preset threshold or not, if so, re-acquiring the idle degree of each current host, and migrating the virtual machines to be migrated to the hosts with the maximum re-determined idle degree; and until the resource utilization rate after the host migration with the resource utilization rate exceeding the preset threshold value does not exceed the preset threshold value.
3. The method as claimed in claim 1, wherein the resource utilization parameters include but are not limited to cpu utilization, logical memory occupancy, operating memory usage, and disk usage.
4. The method according to claim 3, wherein the preprocessing according to the resource utilization parameter of each host specifically comprises:
acquiring the idle resource utilization rate of each host according to the resource utilization rate parameters of each host;
and normalizing the utilization rate of the idle resources of each host by a softmax function.
5. The method according to claim 4, wherein the normalization of the utilization rate of the free resources of each host by the softmax function is specifically:
Figure FDA0003351407030000021
wherein, the idle resource utilization rate parameter after normalization processing is
Figure FDA0003351407030000022
i is the ith host computer,
Figure FDA0003351407030000023
is the j resource utilization parameter in the i host.
6. The method according to claim 1, wherein the determining, according to the preprocessed resource utilization parameter and DS evidence theory, the idle degree of the corresponding current host specifically comprises:
and fusing the preprocessed resource utilization rate parameters as basic probability distribution of the DS evidence theory to determine the idle degree of the current host.
7. The method according to claim 6, wherein the preprocessed resource utilization parameters are fused as basic probability distribution of DS evidence theory, and the determining of the idle degree of the current host specifically comprises:
Figure FDA0003351407030000024
wherein the resource utilization rate parameter after pretreatment is
Figure FDA0003351407030000025
i is the ith host, j is the jth resource utilization parameter in the ith host, K is the weight coefficient, CiIs the current idle degree of the ith host.
8. The utility model provides a virtual machine dynamic migration device, characterized by is applied to in the cloud platform, includes:
the first acquisition module is used for acquiring the resource utilization rate parameter of each current host in the cluster;
the preprocessing module is used for preprocessing the resource utilization rate parameters of each host;
the determining module is used for determining the idle degree corresponding to the current host according to the preprocessed resource utilization rate parameters and the DS evidence theory;
and the migration module migrates the virtual machine to be migrated in the source host to the destination host, wherein the source host is a host with a resource utilization rate exceeding a preset threshold, and the destination host is a host with the largest current idle degree.
9. An electronic device, comprising: a memory for storing a computer program; a processor for implementing the steps of a method of dynamic migration of a virtual machine as claimed in any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of a method for dynamic migration of virtual machines according to any one of claims 1 to 7.
CN202111338435.3A 2021-11-12 2021-11-12 Method, device, equipment and medium for dynamically migrating virtual machines Withdrawn CN114253662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111338435.3A CN114253662A (en) 2021-11-12 2021-11-12 Method, device, equipment and medium for dynamically migrating virtual machines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111338435.3A CN114253662A (en) 2021-11-12 2021-11-12 Method, device, equipment and medium for dynamically migrating virtual machines

Publications (1)

Publication Number Publication Date
CN114253662A true CN114253662A (en) 2022-03-29

Family

ID=80792517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111338435.3A Withdrawn CN114253662A (en) 2021-11-12 2021-11-12 Method, device, equipment and medium for dynamically migrating virtual machines

Country Status (1)

Country Link
CN (1) CN114253662A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974700B (en) * 2023-08-16 2024-04-09 北京志凌海纳科技有限公司 Method, system, equipment and storage medium for realizing dynamic balance of resources

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974700B (en) * 2023-08-16 2024-04-09 北京志凌海纳科技有限公司 Method, system, equipment and storage medium for realizing dynamic balance of resources

Similar Documents

Publication Publication Date Title
US9361218B2 (en) Method of allocating referenced memory pages from a free list
US10467048B2 (en) Techniques for virtual machine migration
US11558311B2 (en) Automated local scaling of compute instances
CN108153589B (en) Method and system for data processing in a multi-threaded processing arrangement
CN112465146B (en) Quantum and classical hybrid cloud platform and task execution method
CN111381970B (en) Cluster task resource allocation method and device, computer device and storage medium
US20170344400A1 (en) Method and system for performance ticket reduction
US20160182320A1 (en) Techniques to generate a graph model for cloud infrastructure elements
CN108153594B (en) Resource fragment sorting method of artificial intelligence cloud platform and electronic equipment
KR102061466B1 (en) Conservative garbage collecting and tagged integers for memory management
CN109960569B (en) Virtualization processing method and device
CN114253662A (en) Method, device, equipment and medium for dynamically migrating virtual machines
CN107463332B (en) File segmentation method and device
US11403026B2 (en) Method, device and computer program product for managing storage system
CN117112222A (en) Request processing method and device, electronic equipment and storage medium
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
CN116360960A (en) Memory allocation method and memory allocation device based on many-core chip
CN111143073B (en) Virtualized resource management method, device and storage medium
CN110297692B (en) Distributed software task dynamic management method and system
US20220197701A1 (en) Managing resource allocation in a software-defined system
CN111352710A (en) Process management method and device, computing equipment and storage medium
US11997021B1 (en) Automated provisioning techniques for distributed applications with independent resource management at constituent services
US11418417B2 (en) Managing stateful workloads executing on temporarily available resources of a cloud computing system
CN116991582A (en) Reserved memory self-adaptive configuration method, device, equipment and storage medium
WO2023226437A1 (en) Resource scheduling method, apparatus and device

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20220329

WW01 Invention patent application withdrawn after publication