CN107562510B - Management method and management equipment for application instances - Google Patents

Management method and management equipment for application instances Download PDF

Info

Publication number
CN107562510B
CN107562510B CN201610505659.1A CN201610505659A CN107562510B CN 107562510 B CN107562510 B CN 107562510B CN 201610505659 A CN201610505659 A CN 201610505659A CN 107562510 B CN107562510 B CN 107562510B
Authority
CN
China
Prior art keywords
application instance
migrated
application
instance
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610505659.1A
Other languages
Chinese (zh)
Other versions
CN107562510A (en
Inventor
毛业勤
单海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610505659.1A priority Critical patent/CN107562510B/en
Publication of CN107562510A publication Critical patent/CN107562510A/en
Application granted granted Critical
Publication of CN107562510B publication Critical patent/CN107562510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a management method and a management device of an application example, wherein the method comprises the following steps: acquiring resource usage of an application instance to be migrated of a first VM of a plurality of VMs, wherein the application instance to be migrated is an application instance in an instance cluster, the instance cluster is an application instance set of the same application, the instance cluster comprises at least two application instances, and the resource usage is used for representing resource amount allocated when the application instance is initially deployed in the first VM or representing resource amount used by the application instance within a period of time; and migrating the application instance to be migrated from the first VM to a second VM in the plurality of VMs according to the resource usage of the application instance to be migrated, wherein the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated. By adopting the method and the device, the problem of reducing the running reliability of the application in the VM caused by the application instance migration can be solved.

Description

Management method and management equipment for application instances
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a management method and a management device for an application instance.
Background
With the increasing popularity of cloud computing technology and the large number of applications of cloud computing, the advantages of cloud computing in terms of achieving high availability of services, scalability of processing power, and the like are increasingly recognized by the industry. The cloud computing can use an operation and development environment of an application program as a service, and the operation and development environment refers to a cloud platform capable of providing resources such as a Central Processing Unit (CPU), a memory, and a disk, which are required when the application program operates. Generally, a cloud platform includes multiple Virtual Machines (VMs), and the VMs are generated by virtualizing hardware resources, where the hardware resources may include one or more physical machines used as storage devices, network service devices, and the like; multiple mutually isolated VMs can be virtualized on the one or more physical machines through a virtualization technology, that is, physical resources such as a processor, a memory, a disk, an input/output (I/O) port and the like are changed into a resource pool capable of being dynamically managed, and then the resources in the resource pool are provided for the virtual machines to use. For example, an application program of an application is deployed in a VM and certain resources are allocated to the application program, and the deployed application program may be referred to as an application instance of the application. In practice, a user or enterprise deploying an application instance may deploy one or more application instances of such an application in a cloud platform.
It is conceivable that each VM of the cloud platform includes application instances of various applications, and the application instances deployed on the VMs often need to be migrated from one virtual machine to another virtual machine due to resource allocation and the like, but the existing method for migrating the application instances may cause deployment of the migrated application instances to reduce reliability of running of the applications corresponding to the application instances in the VMs of the cloud platform.
Disclosure of Invention
The embodiment of the invention provides a management method and a management device for an application instance, which can solve the problem that the running reliability of the application in a VM (virtual machine) is reduced due to the migration of the application instance.
In a first aspect, an embodiment of the present invention provides a management method for an application instance, where the method is applied to a management device of a cloud platform, where multiple virtual machines VM run in the cloud platform, and the method includes: the method comprises the steps of obtaining resource usage of an application instance to be migrated of a first VM of the VMs, wherein the application instance to be migrated is an application instance in an instance cluster, migrating the application instance to be migrated from the first VM to a second VM of the VMs according to the resource usage of the application instance to be migrated, the application instance in the instance cluster is not deployed by the second VM, and the idle resource amount of the second VM is larger than or equal to the resource usage of the application instance to be migrated. The migrated application instances are not deployed in the VMs with application instances already deployed with the same application, so that decentralized deployment of the application instances with the same application is realized, the number of VMs meeting the condition that a plurality of application instances are deployed in the same VM is not increased, that is, the number of application instances of the same application that cannot be run due to a VM failure is not increased, and the probability of application running failure is not increased, that is, the problem of reducing the reliability of running of the application in the VMs due to migration of the application instances can be solved.
It should be noted that the instance cluster is an application instance set of the same application, and the instance cluster includes at least two application instances, and it is understood that if an application deploys only one application instance in the cloud platform, there is no instance cluster of the application; if an application deploys two or more application instances in the cloud platform, there is a cluster of instances of the application that includes all of the application instances of the application.
It should be noted that, the resource usage amount is used to represent a resource amount allocated when the application instance is initially deployed in the first VM, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as a processor core number, an allocated memory space, and an allocated disk space, allocated when the application instance to be migrated is initially deployed in the first VM; or the resource usage amount is used to represent a resource amount used by the application instance in a period of time, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as the number of processor cores, used memory space, used disk space, and the number of I/O requests, used in a period of time when the application instance to be migrated is deployed in the first VM. It is to be understood that, in the above description of the resource usage amount, the parameter included in the resource amount is merely an example, and the resource amount may further include a parameter such as the process number.
With reference to the first aspect, in a first implementation manner of the first aspect, the first VM is determined from the multiple virtual machines VM, a resource occupancy rate of the first VM is smaller than a preset value, and the resource occupancy rate is obtained by calculating at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
With reference to the first aspect or the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the migrating the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated includes: determining a second VM from the plurality of VMs according to the resource usage amount of the application instance to be migrated, wherein the second VM meets a first condition, the first condition is that the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than that of the first VM; or the second VM meets a second condition, where the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the preset value; and migrating the application instance to be migrated from the first VM to the second VM.
In a feasible scheme, all application instances in the VM with the lower resource occupancy rate are migrated to the VM with the higher resource occupancy rate, and after all application instances in the VM with the lower resource occupancy rate are migrated, the VM with the lower resource occupancy rate is closed, so that the consumption of electric power and the like can be saved, and the resource occupancy rate in the migrated VM can also be improved. If the application instance to be migrated is not the application instance of any instance cluster, that is, the application instance to be migrated is the only application instance deployed by an application, acquiring the resource usage amount of the application instance to be migrated, and migrating the application instance to be migrated from the first VM to a third VM of the plurality of VMs according to the resource usage amount of the application instance to be migrated, where the idle resource amount of the third VM is greater than or equal to the resource usage amount of the application instance to be migrated.
With reference to the first aspect or the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the migrating the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated includes:
determining a second VM from the at least two target VMs under the condition that at least two target VMs exist in the plurality of VMs according to the resource usage of the application instance to be migrated, wherein each target VM of the at least two target VMs meets a third condition, the third condition is that the target VM does not deploy the application instance in the instance cluster, the idle resource amount of the target VM is greater than or equal to the resource usage of the application instance to be migrated, and the condition that the second VM meets is that the difference between the idle resource amount of the second VM and the resource usage of the application instance to be migrated is minimum;
and migrating the application instance to be migrated from the first VM to the second VM.
In a second aspect, an embodiment of the present invention provides a management device, including: an acquisition unit and a migration unit. The device comprises an obtaining unit and a migration unit, wherein the obtaining unit is used for obtaining the resource usage amount of an application instance to be migrated of a first VM in the multiple VMs, and the application instance to be migrated is an application instance in an instance cluster; and the migration unit is used for migrating the application instance to be migrated from the first VM to a second VM of the plurality of VMs according to the resource usage of the application instance to be migrated, wherein the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated. The migrated application instances are not deployed in the VM where the application instances of the same application are deployed, so that decentralized deployment of the application instances of the same application is achieved, the number of the application instances of the same application which cannot be run due to a VM fault is not increased, the probability of application running failure is not increased, and the problem that the reliability of running of the application in the VM is reduced due to the migration of the application instances can be solved.
It should be noted that the instance cluster is an application instance set of the same application, and the instance cluster includes at least two application instances, and it is understood that if an application deploys only one application instance in the cloud platform, there is no instance cluster of the application; if an application deploys two or more application instances in the cloud platform, there is a cluster of instances of the application that includes all of the application instances of the application.
It should be noted that, the resource usage amount is used to represent a resource amount allocated when the application instance is initially deployed in the first VM, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as a processor core number, an allocated memory space, and an allocated disk space, allocated when the application instance to be migrated is initially deployed in the first VM; or the resource usage amount is used to represent a resource amount used by the application instance in a period of time, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as the number of processor cores, used memory space, used disk space, and the number of I/O requests, used in a period of time when the application instance to be migrated is deployed in the first VM. It is to be understood that, in the above description of the resource usage amount, the parameter included in the resource amount is merely an example, and the resource amount may further include a parameter such as the process number.
With reference to the second aspect, in a first implementation manner of the second aspect, the management device further includes a determining unit. A determining unit, configured to determine the first VM from the multiple virtual machines VM, where a resource occupancy rate of the first VM is smaller than a preset value, and the resource occupancy rate is obtained through calculation by at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
With reference to the second aspect or the first implementation manner of the second aspect, in a second implementation manner of the second aspect, in an aspect that the application instance to be migrated is migrated from the first VM to a second VM of the multiple VMs according to a resource usage amount of the application instance to be migrated, the migration unit is specifically configured to determine the second VM from the multiple VMs according to the resource usage amount of the application instance to be migrated, where the second VM satisfies a first condition that the second VM does not deploy the application instance in the instance cluster, an amount of idle resources of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and a resource occupancy rate of the second VM is greater than a resource occupancy rate of the first VM; or the second VM meets a second condition, where the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the preset value; and migrating the application instance to be migrated from the first VM to the second VM.
In a feasible scheme, all application instances in the VM with the lower resource occupancy rate are migrated to the VM with the higher resource occupancy rate, and after all application instances in the VM with the lower resource occupancy rate are migrated, the VM with the lower resource occupancy rate is closed, so that the consumption of electric power and the like can be saved, and the resource occupancy rate in the migrated VM can also be improved. If the application instance to be migrated is not the application instance of any instance cluster, that is, the application instance to be migrated is the only application instance deployed by an application, acquiring the resource usage amount of the application instance to be migrated, and migrating the application instance to be migrated from the first VM to a third VM of the plurality of VMs according to the resource usage amount of the application instance to be migrated, where the idle resource amount of the third VM is greater than or equal to the resource usage amount of the application instance to be migrated.
With reference to the second aspect or the first implementation manner of the second aspect, in a third implementation manner of the second aspect, in an aspect that the application instance to be migrated is migrated from the first VM to a second VM of the multiple VMs according to a resource usage amount of the application instance to be migrated, the migration unit is specifically configured to determine the second VM from the at least two target VMs when it is determined that at least two target VMs exist in the multiple VMs according to the resource usage amount of the application instance to be migrated, where each target VM of the at least two target VMs satisfies a third condition that the target VM does not deploy the application instance in the instance cluster, and an amount of free resources of the target VM is greater than or equal to the resource usage amount of the application instance to be migrated; the second VM meets the condition that the difference between the idle resource amount of the second VM and the resource usage amount of the application instance to be migrated is minimum; and migrating the application instance to be migrated from the first VM to the second VM.
In a third aspect, an embodiment of the present invention provides a management device, where the management device includes a processor and a memory; wherein, the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the following steps: the processor is used for acquiring the resource usage amount of an application instance to be migrated of a first VM of the plurality of VMs, wherein the application instance to be migrated is an application instance in an instance cluster; the processor is configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage of the application instance to be migrated, where the second VM does not deploy the application instance in the instance cluster, and an idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated. The migrated application instances are not deployed in the VM where the application instances of the same application are deployed, so that decentralized deployment of the application instances of the same application is achieved, the number of the application instances of the same application which cannot be run due to a VM fault is not increased, the probability of application running failure is not increased, and the problem that the reliability of running of the application in the VM is reduced due to the migration of the application instances can be solved.
It should be noted that the instance cluster is an application instance set of the same application, and the instance cluster includes at least two application instances, and it is understood that if an application deploys only one application instance in the cloud platform, there is no instance cluster of the application; if an application deploys two or more application instances in the cloud platform, there is a cluster of instances of the application that includes all of the application instances of the application.
It should be noted that, the resource usage amount is used to represent a resource amount allocated when the application instance is initially deployed in the first VM, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as a processor core number, an allocated memory space, and an allocated disk space, allocated when the application instance to be migrated is initially deployed in the first VM; or the resource usage amount is used to represent a resource amount used by the application instance in a period of time, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as the number of processor cores, used memory space, used disk space, and the number of I/O requests, used in a period of time when the application instance to be migrated is deployed in the first VM. It is to be understood that, in the above description of the resource usage amount, the parameter included in the resource amount is merely an example, and the resource amount may further include a parameter such as the process number.
With reference to the third aspect, in a first implementation manner of the third aspect, the processor is further configured to determine the first VM from the multiple virtual machines VM, where a resource occupancy rate of the first VM is smaller than a preset value, and the resource occupancy rate is obtained by calculating at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
With reference to the third aspect or the first implementation manner of the third aspect, in a second implementation manner of the third aspect, the processor is configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated, specifically: the processor is configured to determine a second VM from the multiple VMs according to the resource usage amount of the application instance to be migrated, where the second VM meets a first condition, the first condition is that the second VM does not deploy an application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the resource occupancy rate of the first VM; or the second VM meets a second condition, where the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the preset value; the processor is configured to migrate the application instance to be migrated from the first VM to the second VM.
With reference to the third aspect or the first implementation manner of the third aspect, in a third implementation manner of the third aspect, the processor is configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated, specifically: the processor is configured to determine the second VM from the at least two target VMs under the condition that it is determined that at least two target VMs exist in the multiple VMs according to the resource usage of the application instance to be migrated, where each target VM of the at least two target VMs satisfies a third condition, the third condition is that the target VM does not deploy an application instance in the instance cluster, and an idle resource amount of the target VM is greater than or equal to the resource usage of the application instance to be migrated; the second VM meets the condition that the difference between the idle resource amount of the second VM and the resource usage amount of the application instance to be migrated is minimum; the processor is configured to migrate the application instance to be migrated from the first VM to the second VM.
A fourth aspect of embodiments of the present invention provides a computer storage medium storing computer software instructions for a management device of the first and second aspects, comprising instructions for executing a program designed for the management device.
In the four aspects, multiple VMs are virtualized for one or more physical machines through virtualization technology, and the multiple VMs are used for deploying application instances; the management device in the above four aspects may be a physical machine that is separately set up, and in a feasible scheme, the physical machine corresponding to the management device may not be used for deploying the application instance. Alternatively, the management function of the management device may be implemented in a VM virtualized by one physical machine, and in a feasible scheme, the VM for implementing the management function may be on the same physical machine as the VM for deploying the application instance. Either way, the management device can manage the VM used to deploy the application instance.
In the embodiment of the present invention, the name of the management device does not limit the device itself, and in actual implementation, the devices may appear by other names. Provided that the respective devices function similarly to the present invention, are within the scope of the claims of the present invention and their equivalents.
In the embodiment of the invention, in the process of migrating a certain application instance in an instance cluster of the same application, the application instance to be migrated is migrated to the VM of which the resource idle amount is greater than or equal to the resource usage amount of the application instance to be migrated and does not contain any application instance in the instance cluster, and the application instance after being migrated is not deployed in the VM of the application instance already deployed with the same application, so that decentralized deployment of the application instance with the same application is realized, the number of the application instances of the same application which cannot be run due to a VM fault is not increased, the probability of application running failure is not increased, and the problem of reducing the running reliability of the application in the VM caused by migrating the application instance can be solved.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a possible cloud platform architecture according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a management method for an application instance according to an embodiment of the present invention;
fig. 3 is an exemplary diagram of a cloud platform provided in an embodiment of the present invention;
fig. 4a is a schematic structural diagram of a management device according to an embodiment of the present invention;
fig. 4b is a schematic structural diagram of another management device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another management device according to an embodiment of the present invention.
Detailed Description
The network architecture and the service scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by those skilled in the art that the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems along with the evolution of the network architecture and the appearance of a new service scenario. It is to be understood that the terminology used in the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. In addition, the terms "first," "second," "third," and "fourth," etc. in the description and claims of the invention and in the drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
To facilitate an understanding of the present invention, a possible architecture diagram applicable to the following embodiments of the present invention will be described. The architecture diagram shown in fig. 1 is a cloud platform architecture diagram, in which cloud platform users using the cloud platform and cloud platform management users having management authority are also schematically shown. The cloud platform comprises a plurality of VMs, such as a VM1, a VM2, a VM … … VMn and the like, wherein the VMs are generated by virtualizing hardware resources, and the hardware resources can comprise one or more physical machines used as storage devices, network service devices and the like; multiple VMs isolated from each other can be virtualized on the one or more physical machines by a virtualization technology, that is, physical resources such as a processor, a memory, a disk, an I/O port, and the like are changed into a resource pool capable of being dynamically managed, and then resources in the resource pool are provided for the virtual machines to use, for example, multiple application instances are run in the multiple VMs, and the multiple application instances can correspond to one or more applications. As illustrated in fig. 1, a cloud platform user may deploy application instances APPx and APPy in VM 1; deploying application instances APPm and APPn in VM 2; deploying an application instance APPI in the VMn; where APPx and APPi are application instances of the same application, it is understood that the application instances deployed by each VM in fig. 1 are merely illustrative. The cloud platform user can also know the running condition of the deployed application instance from the cloud platform. The cloud platform management user may be responsible for managing the cloud platform user, paying attention to the real-time operation condition (for example, whether a fault occurs or not) of a physical machine or a VM in the cloud platform, comprehensively considering the load capacity of the cloud platform, and making a corresponding operation and maintenance strategy.
In practical application, a plurality of VMs of the cloud platform can be managed by configuring a management device in the cloud platform. The management device can be a physical machine which is set up independently and is not used for deploying the application instance in the physical machine; alternatively, the management function of the management device may be implemented in a VM virtualized by one physical machine, and in a feasible scheme, the VM for implementing the management function may be on the same physical machine as the VM for deploying the application instance. The management device may manage an application instance in a VM for deploying the application instance, e.g., migrate the application instance from one VM to another VM. The existing method for migrating the application instance can cause deployment of the migrated application instance to reduce running reliability of the application corresponding to the application instance in a VM of a cloud platform. In the embodiment of the invention, in the process of migrating a certain application instance in an instance cluster of the same application, the application instance to be migrated is migrated to the VM of which the resource idle amount is greater than or equal to the resource usage amount of the application instance to be migrated and does not contain any application instance in the instance cluster, and the application instance after being migrated is not deployed in the VM of the application instance already deployed with the same application, so that decentralized deployment of the application instance with the same application is realized, the number of the application instances of the same application which cannot be run due to a VM fault is not increased, the probability of application running failure is not increased, and the problem of reducing the running reliability of the application in the VM caused by migrating the application instance can be solved.
Referring to fig. 2, a flowchart of a management method for an application instance is provided in an embodiment of the present invention. As shown in fig. 2, the method of the embodiment of the present invention may include the following steps 201 to 203. The management method of the application instance is performed by a management device.
201, determining the first VM from multiple virtual machines VM, where a resource occupancy rate of the first VM is smaller than a preset value, and the resource occupancy rate is obtained by calculating at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
Specifically, the management device determines a first VM with a resource occupancy rate smaller than a preset value from a plurality of VMs of the cloud platform. Wherein the resource occupancy is calculated by at least one of the following parameters: the processor occupancy rate, the memory occupancy rate, and the storage space occupancy rate of the disk of the first VM, for example, the resource occupancy rate may be calculated by weighted average according to the processor occupancy rate and the memory occupancy rate, and the weight corresponding to the processor occupancy rate and the weight corresponding to the memory occupancy rate.
In an optional scheme, if the resource occupancy rates of two or more VMs among the plurality of VMs are smaller than a preset value, the determination that the resource occupancy rate is the minimum is selected as the first VM from the VMs smaller than the preset value; or selecting the determined first VM with the least number of application instances to deploy from the VMs smaller than the preset value. The above are merely examples, and the embodiments of the present invention are not limited thereto.
It should be noted that each VM of the multiple VMs according to the embodiment of the present invention refers to a VM that has run one or more application instances, and a VM that has not run any application instance is not in the VM managed by the embodiment of the present invention.
202, acquiring the resource usage amount of an application instance to be migrated of a first VM in the plurality of VMs, where the application instance to be migrated is an application instance in an instance cluster.
Specifically, the management device obtains a resource usage amount of an application instance to be migrated of a first VM of the plurality of VMs, where the application instance to be migrated is an application instance in an instance cluster. The instance cluster is an application instance set of the same application, the instance cluster comprises at least two application instances, and it can be understood that if an application deploys only one application instance in the cloud platform, the instance cluster of the application does not exist; if an application deploys two or more application instances in the cloud platform, there is a cluster of instances of the application that includes all of the application instances of the application.
Further, the resource usage amount is used to represent a resource amount allocated when the application instance is initially deployed in the first VM, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as a processor core number, an allocated memory space, and an allocated disk space, allocated when the application instance to be migrated is initially deployed in the first VM; or the resource usage amount is used to represent a resource amount used by the application instance in a period of time, and for the application instance to be migrated, the resource usage amount of the application instance to be migrated may be at least one of resource amounts, such as the number of processor cores, used memory space, used disk space, and the number of I/O requests, used in a period of time when the application instance to be migrated is deployed in the first VM. It should be understood that, in the above description of the resource usage amount, the parameter included in the resource amount is only an example, and the resource amount may also include parameters such as a process number, and the parameter included in the resource amount is not limited in the embodiment of the present invention.
203, migrating the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage of the application instance to be migrated, where the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated.
Specifically, the management device migrates the application instance to be migrated from the first VM to a second VM of the plurality of VMs according to the resource usage amount of the application instance to be migrated. And the second VM is to satisfy condition a and condition B: the condition A is that the idle resource amount of the second VM is larger than or equal to the resource usage amount of the application instance to be migrated, and the condition B is that the application instance in the instance cluster is not deployed in the second VM. The application instance to be migrated can normally run in the migrated second VM by meeting the condition a, and further, the application instance after migration is not deployed in the VM already deployed with the application instance of the same application by meeting the condition B, and the probability of application running failure due to VM failure is not increased because the number of VMs deployed with the same plurality of application instances is not increased after migration, so that the problem of reducing the reliability of running of the application in the VM due to migration of the application instance can be solved.
Optionally, in a first possible solution, step 203 may also be implemented by: and determining a second VM from the plurality of VMs according to the resource usage amount of the application instance to be migrated. Specifically, the second VM determined by the management device meets a first condition, where the first condition is that the second VM does not deploy an application instance in the instance cluster, the amount of idle resources of the second VM is greater than or equal to the amount of resource usage of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the resource occupancy rate of the first VM; or the second VM meets a second condition, where the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the preset value. Under the condition that the management equipment carries out resource arrangement on a plurality of VMs in the cloud platform, all application instances in the VMs with low resource occupancy rate are respectively migrated to the VMs with high resource occupancy rate, so that the centralized management of the application instances can be realized. After determining the second VM, migrating the application instance to be migrated from the first VM to the second VM.
Optionally, in a second possible solution, step 203 may also be implemented by: and under the condition that at least two target VMs exist in the plurality of VMs is determined according to the resource usage amount of the application example to be migrated, determining the second VM from the at least two target VMs. Specifically, each target VM of the at least two target VMs satisfies a third condition, where the third condition is that the target VM does not deploy an application instance in the instance cluster, and an amount of idle resources of the target VM is greater than or equal to an amount of resource usage of the application instance to be migrated; the condition that the second VM meets, which is determined by the management device, is that a difference between an idle resource amount of the second VM and a resource usage amount of the application instance to be migrated is minimum. After determining the second VM, migrating the application instance to be migrated from the first VM to the second VM.
Further, in a second possible scenario, the condition that the at least two target VMs satisfy is a third condition, in the possible scenario, the screening may be performed according to the first condition or the second condition of the first possible scenario, and if there are at least two target VMs that satisfy the second condition in the multiple VMs, the second VM is determined from the at least two target VMs; or if the number of the target VMs satisfying the third condition is at least two, the second VM is determined from the at least two target VMs.
It should be noted that, in a second feasible solution, the determined condition of the second VM is that the difference between the amount of the idle resources of the second VM and the amount of the resources of the application instance to be migrated is minimum, and in a feasible solution, the condition that the second VM satisfies may also be that the difference between the amount of the idle resources of the second VM and the amount of the resources of the application instance to be migrated is maximum; alternatively, the management device may randomly select one of the at least two target VMs to be determined as the second VM. The embodiment of the present invention does not limit the determination method used for determining the second VM from the at least two target VMs.
In a possible embodiment, if a centralized management policy is adopted to organize the resources in the cloud platform, all application instances in the VM with the lower resource occupancy rate may be migrated to the VM with the higher resource occupancy rate, and after all application instances in the VM with the lower resource occupancy rate are migrated, the VM with the lower resource occupancy rate is closed, so that consumption of power and the like can be saved, and the resource occupancy rate in the migrated VM can also be improved. The management device may also determine, through step 201, a first VM with a resource occupancy rate smaller than a preset value from the multiple virtual machines VMs, and migrate all application instances in the first VM, and if the application instance to be migrated is an application instance in an instance cluster, complete the migration by executing step 202 and step 203, and the specific process may refer to the detailed description of step 202 and step 203, which is not described herein again; if the application instance to be migrated is not the application instance of any instance cluster, that is, the application instance to be migrated is the only application instance deployed by an application, acquiring the resource usage amount of the application instance to be migrated, and migrating the application instance to be migrated from the first VM to a third VM of the plurality of VMs according to the resource usage amount of the application instance to be migrated, where the idle resource amount of the third VM is greater than or equal to the resource usage amount of the application instance to be migrated. And the third VM meets the condition, so that the application instance to be migrated can be ensured to normally run in the third VM. The resource usage can refer to the detailed description in step 202, and is not described herein again. In a feasible scheme, the third VM further satisfies another condition except that the third VM satisfies a condition that the amount of idle resources is greater than or equal to the amount of resource usage of the application instance to be migrated: the resource occupancy rate of the third VM is greater than the resource occupancy rate of the first VM, or the resource occupancy rate of the third VM is greater than the preset value, so that the application instance in the first VM with lower resource occupancy rate can be migrated to the third VM with higher resource utilization rate, further, optionally, the first VM may be the VM with the lowest resource occupancy rate.
Further, if at least two target VMs meet the condition that the idle resource amount is larger than or equal to the resource usage amount of the application example to be migrated; or if at least two target VMs meet the condition that the idle resource amount is larger than or equal to the resource usage amount of the application example to be migrated and the condition that the resource occupancy rate is larger than that of the first VM; or, if at least two target VMs satisfy a condition that the amount of idle resources is greater than or equal to the resource usage amount of the application instance to be migrated and satisfy a condition that the resource occupancy rate is greater than the preset value, the management device determines the third VM from the at least two target VMs. In a feasible scheme, the difference between the determined idle resource amount of the third VM and the resource usage amount of the application instance to be migrated is minimum; in another feasible scheme, the difference between the determined idle resource amount of the third VM and the resource usage amount of the application instance to be migrated is maximum; in another possible solution, the management device may randomly select one of the at least two target VMs to be determined as the third VM. The embodiment of the present invention does not limit the determination method used for determining the third VM from the at least two target VMs.
In a possible embodiment, the management device may perform steps 201 to 203 at preset time intervals; alternatively, the management apparatus may execute step 201 to step 203 in a case where a resource consolidation request with respect to the plurality of VMs is received; alternatively, the management device may perform steps 202 to 203 in the case of receiving a migration request for a certain application instance.
Furthermore, in the embodiment of the present invention, multiple VMs are virtualized on one or more physical machines by using a virtualization technology, and the multiple VMs are used to deploy an application instance; the management device may be a physical machine separately set up, and the method described in steps 201 to 203 in the embodiment of the present invention is executed by the physical machine, and in a feasible scheme, the physical machine corresponding to the management device may not be used to deploy the application instance. Alternatively, the management function of the management device may be implemented in a VM virtualized by one physical machine, and in a feasible scheme, the VM for implementing the management function may be on the same physical machine as the VM for deploying the application instance, for example, the first VM or the second VM according to the embodiment of the present invention may be on the same physical machine as the VM for implementing the management device function, which is not limited in the embodiment of the present invention. Either way, the management device can manage the VM used to deploy the application instance.
Further, please refer to fig. 3 together, fig. 3 illustrates more completely other aspects that may be involved in the method shown in fig. 2 from the perspective of functional logic to facilitate the reader to further understand the technical solution described in the present application, and fig. 3 is an exemplary diagram of a cloud platform provided in the embodiment of the present invention. As shown in fig. 3, the cloud platform may include a management module, a resource monitoring module, an application instance deployment module, and a resource scheduling module. The modules can respectively execute the functions of the modules on each VM in the cloud platform. The resource monitoring module is configured to monitor resource usage and an idle resource amount of each VM included in the cloud platform, where the resource usage of each VM may include a resource amount allocated by the VM or a resource amount used within a period of time, and the resource amount may include, but is not limited to, at least one of the following parameters: processor core number, memory space, and disk space. Further, the resource monitoring module may also know the resource usage amount of each application instance deployed in each VM. The resource scheduling module is used for determining deployment position information of the application instance to be deployed, and in a feasible scheme, the resource scheduling module determines a VM for deploying the application instance according to the required resource information of the application instance and feeds back the determined deployment position information to the application instance deployment module, and the application instance deployment module completes deployment of the application instance according to the position information. The management module may obtain the resource usage amount and the idle resource amount of each VM from the resource monitoring module, and may also obtain the resource usage amount of each application instance, for example, the management module may select, by the resource monitoring module, a first VM with a lowest resource occupancy rate from the multiple VMs included in the cloud platform, and further migrate all the application instances included in the first VM, where a specific migration process is as follows: acquiring the resource usage amount of each application instance to be migrated in a first VM, if the application instance to be migrated is an application instance in an instance cluster, migrating the application instance to be migrated from the first VM to a second VM in the multiple VMs, wherein the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated; and if the application example to be migrated is not the application example in any example cluster, migrating the application example to be migrated from the first VM to a third VM in the plurality of VMs, wherein the idle resource amount of the third VM is larger than or equal to the resource usage amount of the application example to be migrated.
It should be noted that the management module, the resource monitoring module, the application instance deployment module, and the resource scheduling module shown in fig. 3 are logically functional descriptions. The management device involved in the embodiment shown in fig. 2 may perform the corresponding method steps by means of the management module shown in fig. 3. In a feasible scheme, the resource monitoring module, the application instance deployment module, and the resource scheduling module may be deployed on the same physical machine as the management module, or may be deployed on other physical machines, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, by migrating all application instances in a VM with low resource occupancy rate to a VM with higher resource utilization rate, the resource occupancy rate of the VM to which the application instances are migrated can be improved, and closing the operation of the VM to which the application instances are no longer deployed after migration, the cost overhead of energy sources such as electric power and the like can be reduced, furthermore, in the process of migrating a certain application instance in an application instance cluster of the same application, the application instance to be migrated is migrated to the VM of which the resource idle quantity is greater than or equal to the resource usage quantity of the application instance to be migrated and does not contain any application instance in the instance cluster, and by not deploying the application instance after migration in the VM of the application instance in which the same application is deployed, decentralized deployment of the application instances of the same application is realized, so that the number of the application instances of the same application which cannot be operated due to the fault of one VM is not increased, and furthermore, the probability of the application operation failure is not increased, namely, the problem that the reliability of the application operation in the VM is reduced due to the migration of the application instance can be solved.
Please refer to fig. 4a and fig. 4b, which are schematic structural diagrams of a management device according to an embodiment of the present invention. As shown in fig. 4a and 4b, the management device 4a and the management device 4b are computer devices including a bus 402, a communication interface 404, a memory 403, and at least one processor 401.
Processor 401 may be a general-purpose Central Processing Unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more ics for controlling the execution of programs in accordance with the present invention.
Bus 402 may include a path that transfers information between the above components. The bus 402 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, fig. 4a and 4b are shown with only one thick line, but do not indicate only one bus or one type of bus.
The Memory 403 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory 403 may be separate and coupled to the processor 401 via the bus 402. The memory 403 may also be integrated with the processor 401. Memory 403 provides instructions and data to processor 402.
It is to be appreciated that the communication interface 404 can include at least one of an input device and an output device such as a network card, an antenna, and the like.
Optionally, the memory 403 is used for storing application program codes for implementing the scheme of the present invention, and is controlled by the processor 401 to execute. The processor 401 is configured to execute application program code stored in the memory 403.
The processor 401 may execute a method for managing an application instance provided by the corresponding embodiment of fig. 2 in the present invention, where the method includes acquiring a resource usage amount of an application instance to be migrated of a first VM in the multiple VMs, where the application instance to be migrated is an application instance in an instance cluster, where the instance cluster is an application instance set of a same application, the instance cluster includes at least two application instances, and the resource usage amount is used to indicate an amount of resources allocated when the application instance is initially deployed in the first VM, or indicate an amount of resources used by the application instance within a period of time, and the resource amount includes at least one of the following parameters: processor core number, memory space and disk space; and migrating the application instance to be migrated from the first VM to a second VM of the plurality of VMs according to the resource usage of the application instance to be migrated, wherein the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated.
For a specific implementation, please refer to the embodiment corresponding to fig. 2 of the present application, which is not described herein again.
In particular implementations, as one embodiment, a management device may include multiple processors. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In some embodiments, the management device according to the embodiment of fig. 2 may be implemented in the manner of the computer device described above, and is not used for deploying the application instance in the computer device. The management device of the embodiment of the invention can manage the VM used for deploying the application instance in other computer devices, and can communicate with other computer devices through the communication interface 404.
In some embodiments, the computer device of figure 4b includes memory 403 that stores virtual machine 4031 and/or host 4032, and both virtual machine 4031 and host 4032 can execute modules or data structures. Multiple virtual machines 4031 may be included in a computer device.
The virtual machine 4031 is a computer device that can simulate one or more virtual computers by virtual machine software, and these virtual machines operate as real computers, and on which operating systems and application programs can be installed, and which can also access network resources. For applications running in a virtual machine, the virtual machine operates as if it were a real computer.
The host 4032 is used for completing the management and allocation of hardware resources; presenting a virtual hardware platform for virtual machine 4031; scheduling and isolation of virtual machine 4031 is achieved. The host 4032 may be a Virtual Machine Monitor (VMM); in addition, sometimes the VMM cooperates with 1 privileged virtual machine, which in combination make up the host 4032. The virtual hardware platform provides various hardware resources for each virtual machine running thereon, such as a virtual processor, a memory, a virtual disk, a virtual network card, and the like. The virtual disk may correspond to a file or a logical block device of the host 4032. The virtual machines run on the virtual hardware platforms prepared for them by the host 4032, and the host 4032 runs one or more virtual machines.
In this embodiment, the management function of the management device related to the embodiment in fig. 2 may be implemented in the manner of the host 4052, and optionally, the virtual machine 4031 may be used to deploy an application instance. Alternatively, the management function may be implemented in one virtual machine 4031, and the virtual machine used to implement the management function is not used to deploy the application instance. In a feasible scheme, if the virtual machine 4031 in the computer device is used to deploy an application instance, the management device may manage the virtual machine 4031 in the computer device, and may also manage a VM in another computing device, which is used to deploy an application instance, through the communication interface 404.
Referring to fig. 5, a schematic structural diagram of another management device is provided in the embodiment of the present invention. As shown in fig. 5, the management device 5 according to an embodiment of the present invention may include: an acquisition unit 501 and a migration unit 502. Optionally, the management device 5 may further include a determining unit 503.
An obtaining unit 501, configured to obtain a resource usage amount of an application instance to be migrated of a first VM in the multiple VMs, where the application instance to be migrated is an application instance in an instance cluster, where the instance cluster is an application instance set of the same application, the instance cluster includes at least two application instances, the resource usage amount is used to represent an amount of resources allocated when an application instance is initially deployed in the first VM, or is used to represent an amount of resources used by an application instance within a period of time, and the resource amount includes at least one of the following parameters: processor core number, memory space, and disk space.
A migration unit 502, configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated, where the second VM does not deploy the application instance in the instance cluster, and an idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated.
In one possible embodiment, the resource usage amount is used to represent an amount of resources used by the application instance over a period of time, and the resource usage amount further includes an input/output I/O request amount.
In a possible embodiment, the management device 5 further comprises a determination unit 503. The determining unit 503 is configured to determine the first VM from the multiple virtual machines VM, where a resource occupancy rate of the first VM is smaller than a preset value, and the resource occupancy rate is obtained through calculation by at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
In a possible embodiment, the migration unit is specifically configured to:
determining a second VM from the plurality of VMs according to the resource usage amount of the application instance to be migrated, wherein the second VM meets a first condition, the first condition is that the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than that of the first VM; or the second VM meets a second condition, where the second VM does not deploy the application instance in the instance cluster, the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated, and the resource occupancy rate of the second VM is greater than the preset value;
and migrating the application instance to be migrated from the first VM to the second VM.
In a possible embodiment, the migration unit is specifically configured to:
determining a second VM from the at least two target VMs under the condition that at least two target VMs exist in the plurality of VMs according to the resource usage of the application instance to be migrated, wherein each target VM of the at least two target VMs meets a third condition, the third condition is that the target VM does not deploy the application instance in the instance cluster, the idle resource amount of the target VM is greater than or equal to the resource usage of the application instance to be migrated, and the condition that the second VM meets is that the difference between the idle resource amount of the second VM and the resource usage of the application instance to be migrated is minimum;
and migrating the application instance to be migrated from the first VM to the second VM.
It should be noted that the functions of the functional units in the management device 5 described in the embodiment of the present invention may be specifically implemented according to the method in the embodiment of the method shown in fig. 2, and are not described herein again. In a possible solution, the management module in the embodiment shown in fig. 3 may be implemented by each unit included in the management device 5 in the embodiment of the present invention.
In the embodiment of the invention, in the process of migrating a certain application instance in an instance cluster of the same application, the application instance to be migrated is migrated to the VM of which the resource idle amount is greater than or equal to the resource usage amount of the application instance to be migrated and does not contain any application instance in the instance cluster, and the application instance after being migrated is not deployed in the VM of the application instance already deployed with the same application, so that decentralized deployment of the application instance with the same application is realized, the number of the application instances of the same application which cannot be run due to a VM fault is not increased, the probability of application running failure is not increased, and the problem of reducing the running reliability of the application in the VM caused by migrating the application instance can be solved.
In the present embodiment, the management device 5 is presented in the form of a functional unit. An "element" may refer to an application-specific integrated circuit (ASIC), an electronic circuit, a processor and memory that execute one or more software or firmware programs, an integrated logic circuit, and/or other devices that may provide the described functionality. In a simple embodiment, those skilled in the art may think that the management device 5 may be implemented in the form of a computer device shown in fig. 4a or fig. 4b, and for the case that no virtual machine or host exists in the computer device, the memory 403 stores program codes corresponding to the units of the management device 5 in the embodiment of the present invention, and the processor 401 calls the program codes in the memory to implement the management function; for the case where the virtual machine 4301 and the host 4302 exist in the computer device, each unit in the management device 5 may be implemented by the host 4032.
In an embodiment of the present invention, a computer storage medium is further provided for storing computer software instructions for the management device 5 shown in fig. 5, which includes a program designed for executing the above aspect for the management device 5.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a management device, or the like, and may specifically be a processor in the computer device) to execute all or part of the steps of the above-described method according to the embodiments of the present invention. The storage medium may include: various media capable of storing program codes, such as a U disk, a removable hard disk, a magnetic disk, an optical disk, a ROM, or a RAM.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A management method of an application instance is applied to management equipment of a cloud platform, wherein a plurality of Virtual Machines (VM) run in the cloud platform, and the management method is characterized by comprising the following steps:
acquiring resource usage of an application instance to be migrated of a first VM of the plurality of VMs, wherein the application instance to be migrated is an application instance in an instance cluster, the instance cluster is an application instance set of the same application, the instance cluster comprises at least two application instances, the resource usage is used for representing the amount of resources allocated when the application instance is initially deployed in the first VM or representing the amount of resources used by the application instance within a period of time, and the resource amount comprises at least one of the following parameters: processor core number, memory space and disk space;
according to the resource usage amount of the application instance to be migrated, migrating the application instance to be migrated from the first VM to a second VM of the plurality of VMs, wherein the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage amount of the application instance to be migrated;
the migrating the application instance to be migrated from the first VM to a second VM of the plurality of VMs according to the resource usage amount of the application instance to be migrated includes:
determining a second VM from the at least two target VMs under the condition that at least two target VMs exist in the plurality of VMs according to the resource usage of the application instance to be migrated, wherein each target VM of the at least two target VMs meets a third condition, the third condition is that the target VM does not deploy the application instance in the instance cluster, the idle resource amount of the target VM is greater than or equal to the resource usage of the application instance to be migrated, and the condition that the second VM meets is that the difference between the idle resource amount of the second VM and the resource usage of the application instance to be migrated is minimum;
and migrating the application instance to be migrated from the first VM to the second VM.
2. The method of claim 1, wherein the resource usage amount is used to represent an amount of resources used by the application instance over a period of time, and wherein the resource usage amount further comprises a number of input/output I/O requests.
3. Method according to claim 1 or 2, characterized in that the resource occupancy is calculated by at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
4. A management device, the management device serves a cloud platform, and a plurality of Virtual Machines (VMs) run in the cloud platform, the management device is characterized by comprising:
an obtaining unit, configured to obtain a resource usage amount of an application instance to be migrated of a first VM in the multiple VMs, where the application instance to be migrated is an application instance in an instance cluster, where the instance cluster is an application instance set of the same application, the instance cluster includes at least two application instances, the resource usage amount is used to represent an amount of resources allocated when an application instance is initially deployed in the first VM, or is used to represent an amount of resources used by an application instance within a period of time, and the resource amount includes at least one of the following parameters: processor core number, memory space and disk space;
a migration unit, configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage of the application instance to be migrated, where the second VM does not deploy the application instance in the instance cluster, and an idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated;
in an aspect that the application instance to be migrated is migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated, the migration unit is specifically configured to:
determining a second VM from the at least two target VMs under the condition that at least two target VMs exist in the plurality of VMs according to the resource usage of the application instance to be migrated, wherein each target VM of the at least two target VMs meets a third condition, the third condition is that the target VM does not deploy the application instance in the instance cluster, the idle resource amount of the target VM is greater than or equal to the resource usage of the application instance to be migrated, and the condition that the second VM meets is that the difference between the idle resource amount of the second VM and the resource usage of the application instance to be migrated is minimum;
and migrating the application instance to be migrated from the first VM to the second VM.
5. The management device of claim 4, wherein the resource usage amount is used to represent an amount of resources used by the application instance over a period of time, and wherein the resource usage amount further comprises a number of input/output I/O requests.
6. Management device according to claim 4 or 5, characterized in that the resource occupancy is calculated by at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
7. A management device that serves a cloud platform in which a plurality of virtual machines VM are running, the management device comprising a processor and a memory;
wherein, the memory is used for storing program codes, and the processor is used for calling the program codes stored in the memory to execute the following steps:
the processor is configured to obtain a resource usage amount of an application instance to be migrated of a first VM of the multiple VMs, where the application instance to be migrated is an application instance in an instance cluster, where the instance cluster is an application instance set of the same application, the instance cluster includes at least two application instances, the resource usage amount is used to represent an amount of resources allocated when the application instance is initially deployed in the first VM, or is used to represent an amount of resources used by the application instance within a period of time, and the resource amount includes at least one of the following parameters: processor core number, memory space and disk space;
the processor is configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage of the application instance to be migrated, where the second VM does not deploy the application instance in the instance cluster, and the idle resource amount of the second VM is greater than or equal to the resource usage of the application instance to be migrated;
the processor is configured to migrate the application instance to be migrated from the first VM to a second VM of the multiple VMs according to the resource usage amount of the application instance to be migrated, specifically:
the processor is configured to determine the second VM from the at least two target VMs under the condition that it is determined that at least two target VMs exist in the multiple VMs according to the resource usage of the application instance to be migrated, where each target VM of the at least two target VMs satisfies a third condition, the third condition is that the target VM does not deploy an application instance in the instance cluster, and an idle resource amount of the target VM is greater than or equal to the resource usage of the application instance to be migrated, and the condition that the second VM satisfies is that a difference between the idle resource amount of the second VM and the resource usage of the application instance to be migrated is minimum;
the processor is configured to migrate the application instance to be migrated from the first VM to the second VM.
8. The management device of claim 7, wherein the resource usage amount is used to represent an amount of resources used by the application instance over a period of time, and wherein the resource usage amount further comprises a number of input/output I/O requests.
9. The management device according to claim 7 or 8, wherein the resource occupancy is calculated by at least one of the following parameters: the processor occupancy rate and the memory occupancy rate of the first VM and the storage space occupancy rate of the disk.
CN201610505659.1A 2016-06-30 2016-06-30 Management method and management equipment for application instances Active CN107562510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610505659.1A CN107562510B (en) 2016-06-30 2016-06-30 Management method and management equipment for application instances

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610505659.1A CN107562510B (en) 2016-06-30 2016-06-30 Management method and management equipment for application instances

Publications (2)

Publication Number Publication Date
CN107562510A CN107562510A (en) 2018-01-09
CN107562510B true CN107562510B (en) 2021-09-21

Family

ID=60969343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610505659.1A Active CN107562510B (en) 2016-06-30 2016-06-30 Management method and management equipment for application instances

Country Status (1)

Country Link
CN (1) CN107562510B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617811B (en) * 2019-01-29 2020-06-30 电子科技大学 Rapid migration method for mobile application in cloud network
CN110457114B (en) * 2019-07-24 2020-11-27 杭州数梦工场科技有限公司 Application cluster deployment method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629941A (en) * 2012-03-20 2012-08-08 武汉邮电科学研究院 Caching method of a virtual machine mirror image in cloud computing system
CN102681895A (en) * 2011-03-11 2012-09-19 北京市国路安信息技术有限公司 Dynamic self-migrating cloud service method
CN104335182A (en) * 2012-06-04 2015-02-04 阿尔卡特朗讯公司 Method and apparatus for single point of failure elimination for cloud-based applications

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8156490B2 (en) * 2004-05-08 2012-04-10 International Business Machines Corporation Dynamic migration of virtual machine computer programs upon satisfaction of conditions
US20120054731A1 (en) * 2010-08-24 2012-03-01 International Business Machines Corporation Method, System and Computer Programs to Assist Migration to a Cloud Computing Environment
US8473557B2 (en) * 2010-08-24 2013-06-25 At&T Intellectual Property I, L.P. Methods and apparatus to migrate virtual machines between distributive computing networks across a wide area network
US9588796B2 (en) * 2014-06-28 2017-03-07 Vmware, Inc. Live migration with pre-opened shared disks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681895A (en) * 2011-03-11 2012-09-19 北京市国路安信息技术有限公司 Dynamic self-migrating cloud service method
CN102629941A (en) * 2012-03-20 2012-08-08 武汉邮电科学研究院 Caching method of a virtual machine mirror image in cloud computing system
CN104335182A (en) * 2012-06-04 2015-02-04 阿尔卡特朗讯公司 Method and apparatus for single point of failure elimination for cloud-based applications

Also Published As

Publication number Publication date
CN107562510A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
US10514960B2 (en) Iterative rebalancing of virtual resources among VMs to allocate a second resource capacity by migrating to servers based on resource allocations and priorities of VMs
US20220078036A1 (en) Asset management with respect to a shared pool of configurable computing resources
US10474488B2 (en) Configuration of a cluster of hosts in virtualized computing environments
US9183378B2 (en) Runtime based application security and regulatory compliance in cloud environment
US9710304B2 (en) Methods and apparatus to select virtualization environments for migration
US10678581B2 (en) Methods and apparatus to select virtualization environments during deployment
US10394475B2 (en) Method and system for memory allocation in a disaggregated memory architecture
US9176762B2 (en) Hierarchical thresholds-based virtual machine configuration
US10977086B2 (en) Workload placement and balancing within a containerized infrastructure
US9164791B2 (en) Hierarchical thresholds-based virtual machine configuration
US9038085B2 (en) System, method and program product for cost-aware selection of stored virtual machine images for subsequent use
JP5352890B2 (en) Computer system operation management method, computer system, and computer-readable medium storing program
US20170017511A1 (en) Method for memory management in virtual machines, and corresponding system and computer program product
CN111078363A (en) NUMA node scheduling method, device, equipment and medium for virtual machine
US20170093742A1 (en) Managing a shared pool of configurable computing resources having an arrangement of a set of dynamically-assigned resources
CN111857951A (en) Containerized deployment platform and deployment method
Sahasrabudhe et al. Comparing openstack and vmware
US10990519B2 (en) Multi-tenant cloud elastic garbage collector
CN107562510B (en) Management method and management equipment for application instances
CN107766154B (en) Server conversion method and device
CN109189556B (en) Affinity rule conflict monitoring method and device based on load balancing
WO2016141305A1 (en) Methods and apparatus to select virtualization environments for migration
CN109617954A (en) A kind of method and apparatus creating cloud host
CN109753343B (en) VNF instantiation method 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
GR01 Patent grant
GR01 Patent grant