CN109840135A - A kind of load-balancing method, device and electronic equipment - Google Patents

A kind of load-balancing method, device and electronic equipment Download PDF

Info

Publication number
CN109840135A
CN109840135A CN201910094168.6A CN201910094168A CN109840135A CN 109840135 A CN109840135 A CN 109840135A CN 201910094168 A CN201910094168 A CN 201910094168A CN 109840135 A CN109840135 A CN 109840135A
Authority
CN
China
Prior art keywords
processor
load
group
virtual machine
processors
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.)
Granted
Application number
CN201910094168.6A
Other languages
Chinese (zh)
Other versions
CN109840135B (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201910094168.6A priority Critical patent/CN109840135B/en
Publication of CN109840135A publication Critical patent/CN109840135A/en
Application granted granted Critical
Publication of CN109840135B publication Critical patent/CN109840135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Multi Processors (AREA)

Abstract

The embodiment of the present invention provides a kind of load-balancing method, device and electronic equipment, when belonging to the load of first processor of first processor group higher than threshold value, traverses all second processors of second processor group;When exist with it is first processor same physical kernel, idle, or when with first processor same host, idle second processor, second processor is moved to first processor group;When there is no second processor with first processor same physical kernel, with first processor same host, idle, the third processor with first processor difference host is selected from first processor group, and target virtual machine of the configuration on first processor is moved into the third processor.Processor group has been carried out grouping management by the present invention, and the flexibility of load balancing is effectively increased by the adjustment of the dynamic of grouping, realizes the good result of load balancing.

Description

Load balancing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a load balancing method and apparatus, and an electronic device.
Background
Virtualization is a resource management technology, is widely applied to data centers, abstractly converts resources such as computation, network, storage and the like, breaks through barriers among different computing entities, and enables users to more reasonably and fully utilize the resources. I/O virtualization is a core part of virtualization technology that allows virtual machines to share I/O resources in a data center.
However, the inventors have found through research that there are still some problems with the method for optimizing the performance of I/O virtualization, in an example, when a virtual machine is competing for CPU resources, load balancing is usually performed in a virtual machine migration manner, but the benefits brought by load balancing are largely offset by additional overheads such as cache pollution and context switching introduced by frequent virtual CPU migration, so that the effect due to load balancing cannot be achieved due to the uniqueness of load balancing configuration.
Therefore, how to improve the flexibility of load balancing and further improve the load balancing effect is a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a load balancing method, a load balancing device, and an electronic device, which are used to solve the problems of poor flexibility and poor effect of load balancing in the prior art.
To achieve the above and other related objects, according to a first aspect of the present invention, an embodiment of the present invention provides a load balancing method, including:
traversing all second processors of the second processor group when a load of a first processor belonging to the first processor group is higher than a threshold;
when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, moving the second processor to the first processor group to enable a virtual machine configured on the first processor to use processor resources of the new first processor group;
when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor.
Optionally, all processors of the first processor group are configured as a first time slice, all processors of the second processor group are configured as a second time slice, and the first time slice is different from the second time slice;
all processors of the first processor group are configured with first type virtual machines, all processors of the second processor group are configured with second type virtual machines, and the first type virtual machines and the second type virtual machines have different service types.
Optionally, selecting a third processor from the first processor group, the third processor being a different host than the first processor, comprises:
arranging the third processors according to the sequence of the load from small to large;
sequentially calculating the sum of the load of the target virtual machine and the load of the third processor as a reference load;
when the reference load is lower than the highest load of the third processor, the third processor corresponding to the reference load is selected.
Optionally, before selecting a third processor of a host different from the first processor group and migrating the target virtual machine configured on the first processor to the third processor, the method further includes:
the method includes selecting a virtual machine with the largest load as a target virtual machine from virtual machines configured on a first processor.
According to a second aspect of the present invention, an embodiment of the present invention further provides a load balancing apparatus, including:
the traversing module is used for traversing all the second processors of the second processor group when the load of the first processor belonging to the first processor group is higher than the threshold value;
a grouping module for moving a second processor to the first processor group when there is an idle second processor of the same physical core as the first processor or an idle second processor of the same host as the first processor, so that the virtual machine configured on the first processor can use the processor resources of the new first processor group;
and the migration module is used for selecting a third processor of a host different from the first processor group and migrating the target virtual machine configured on the first processor to the third processor when the idle second processor with the same physical kernel as the first processor does not exist and the idle second processor with the same host as the first processor does not exist.
Optionally, the system further comprises a configuration module, configured to configure all processors of the first processor group as a first time slice, configure all processors of the second processor group as a second time slice, and the first time slice is different from the second time slice; configuring a first type virtual machine on all processors of the first processor group, and configuring a second type virtual machine on all processors of the second processor group, wherein the first type virtual machine and the second type virtual machine have different service types.
Optionally, the migration module is further configured to arrange the third processors in order of decreasing load;
sequentially calculating the sum of the load of the target virtual machine and the load of the third processor as a reference load;
when the reference load is lower than the highest load of the third processor, the third processor corresponding to the reference load is selected.
Optionally, the migration module is further configured to select, from the virtual machines configured on the first processor, a virtual machine with a largest load as the target virtual machine.
According to a third aspect of the present invention, there is also provided an electronic device, including a processor; and the number of the first and second groups,
a memory communicatively coupled to the processor; wherein,
the memory stores instructions executable by the processor to enable the processor to:
traversing all second processors of the second processor group when a load of a first processor belonging to the first processor group is higher than a threshold;
when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, moving the second processor to the first processor group to enable a virtual machine configured on the first processor to use processor resources of the new first processor group;
when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor.
As described above, the load balancing method, the load balancing device, and the electronic device provided in the embodiments of the present invention have the following beneficial effects: traversing all second processors of the second processor group when a load of a first processor belonging to the first processor group is higher than a threshold; when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, moving the second processor to the first processor group to enable a virtual machine configured on the first processor to use processor resources of the new first processor group; when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor. The invention carries out grouping management on the processor groups, effectively improves the flexibility of load balancing by means of dynamic grouping adjustment, and realizes good effect of load balancing.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
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, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a load balancing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for selecting a physical processor according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a load balancing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an electronic device that executes a load balancing method according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1 to 4. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
Referring to fig. 1, which is a schematic flow chart of a load balancing method provided in an embodiment of the present invention, as shown in fig. 1, an embodiment of the present invention shows a process of performing load balancing:
step S101: all second processors of the second processor group are traversed when the load of a first processor belonging to the first processor group is above a threshold.
In the implementation of the invention, the virtual machines are classified, and the physical processors are grouped, so that the flexibility and the effect of load balancing are improved.
In an exemplary embodiment, the virtual machine is classified, and a virtual machine type is determined when the virtual machine is created, where the virtual machine type may be classified according to different running services on the virtual machine, and specifically, the virtual machine may be classified into two types, I/O load and computational load. The I/O load type has the requirements of shorter time delay and higher scheduling frequency for the physical processor, and the physical processor needs to be ensured to meet the requirements of the type of virtual machine; the calculation load type can have longer processing time, so that the requirement of long-time calculation is met, and the physical processor can also meet the requirement of the type of virtual machine.
In addition, in specific implementation, when the type of the virtual machine cannot be determined, the virtual machine may be temporarily marked as an unclassified type, monitoring the running condition of the CPU of the virtual machine over a period of time includes acquiring parameters such as call delay and call frequency to the processor, and when the parameters satisfy a corresponding numerical range, determining the virtual type, which is not described in detail in the embodiments of the present invention.
Further, for the physical CPU grouping, the plurality of physical processors in the data center or the server cluster are divided into a plurality of groups, and each processor group may include any plurality of physical processors. In an exemplary embodiment, according to the type of the virtual machine, corresponding physical processor groups may be configured, and a first processor group and a second processor group may be configured, where all physical processors of the first processor group may have a short time slice in order to reduce scheduling latency of I/O and increase scheduling frequency, so as to meet processing requirements of the I/O load type virtual machine, and all physical processors of the second processor group may set a long time slice, so as to ensure a higher processing time duration.
In this way, the virtual machines of the I/O load type may be configured on the physical processors of the first processor group, and the virtual machines of the computation load type may be configured on the second processor group, thereby implementing matching configuration of different types of virtual machines by different physical processor groups.
Based on the above description, the embodiments of the present invention are described in detail by taking an example that the first processor in the first processor group has a higher load and needs to perform load balancing, where the first processor group may have a plurality of first processors, and the second processor group may have a plurality of second processors. All second processors of the second processor group are traversed when the load of a first processor belonging to the first processor group is above a threshold.
Step S102: when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, the second processor is moved to the first processor group to enable a virtual machine configured on the first processor to use the processor resources of the new first processor group.
Traversing all the second processors in the second processor group, judging whether a second processor which has the same physical kernel with the first processor or is configured in the same host with the first processor exists, if the load of the second processor is lower than a threshold value and is in an idle state, adjusting the second processor group, and realizing the regrouping. Specifically, the second processor that meets the above condition is removed from the second processor group and added to the first processor group, thereby enabling the virtual machine on the first processor to use the physical processor resources of the new first processor group.
Step S103: when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor.
When the idle second processor with the same physical kernel as the first processor does not exist and the idle second processor with the same host as the first processor does not exist, the virtual machine migration is required if the current host processor resource cannot meet the requirement of the virtual machine.
When virtual machine migration needs to be performed, refer to fig. 2, which is a schematic flowchart of a method for selecting a physical processor according to an embodiment of the present invention, as shown in fig. 2, the method includes:
step S1031: the third processors are arranged in order of load from small to large.
The physical processors of other hosts, different from the host where the first processor is located, may be sorted in order of the current load from small to large. In an exemplary embodiment, the current load of the third processor a may be determined to be 1.2, the current load of the third processor B may be determined to be 2.5, and the current load of the third processor C may be determined to be 4.1 by counting the average thread description load of the physical processors for a fixed time.
Step S1032: and sequentially calculating the sum of the load of the target virtual machine and the load of the third processor as a reference load.
And taking the virtual machine to be migrated as a target virtual machine, wherein the load of the target virtual machine is 6 at present, and then sequentially calculating to obtain each reference load. The reference load of the target virtual machine and the third processor a is 7.2, the reference load of the target virtual machine and the third processor B is 8.5, and the reference load of the target virtual machine and the third processor C is 10.1.
Step S1033: when the reference load is lower than the highest load of the third processor, the third processor corresponding to the reference load is selected.
When the maximum load of the third processor is 10, that is, the third processor supports up to 10 threads in a fixed time, it is determined whether the processor performance limit is reached when the virtual machine is transferred to the third processor by referring to the load. Based on the above embodiment, it can be seen that the reference load of the target virtual machine and the third processor a is 7.2, and the reference load of the target virtual machine and the third processor B is 8.5, both of which are lower than the highest load, either one of the third processor a and the third processor B may be selected, and preferably, the third processor having the largest difference between the reference load and the highest load, that is, the third processor a, may be selected.
Moreover, when the virtual machine is migrated, the embodiment of the invention further optimizes the virtual machine selection mode. Since a plurality of virtual machines may be configured on the first processor at the same time, the virtual machine with the largest load may be selected as the target virtual machine from among the virtual machines configured on the first processor, so as to migrate the target virtual machine to the physical processors of other hosts.
By the method, the target virtual machine can be further migrated to the selected third processor, so that load balancing is realized.
As can be seen from the description of the foregoing embodiments, in the load balancing method provided in an embodiment of the present invention, when the load of a first processor belonging to a first processor group is higher than a threshold, all second processors of a second processor group are traversed; when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, moving the second processor to the first processor group to enable a virtual machine configured on the first processor to use processor resources of the new first processor group; when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor. The invention carries out grouping management on the processor groups, effectively improves the flexibility of load balancing by means of dynamic grouping adjustment, and realizes good effect of load balancing.
Through the above description of the method embodiments, those skilled in the art can clearly understand that the present invention can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and so on.
Corresponding to the load balancing method provided by the embodiment of the invention, the invention also provides a load balancing device.
Referring to fig. 3, which is a schematic structural diagram of a load balancing apparatus according to an embodiment of the present invention, as shown in fig. 3, the load balancing apparatus includes:
a traversing module 11, configured to traverse all second processors of the second processor group when a load of a first processor belonging to the first processor group is higher than a threshold;
a grouping module 12, configured to, when there is a second idle processor of the same physical core as the first processor or a second idle processor of the same host as the first processor, move the second processor to the first processor group, so that the virtual machine configured on the first processor can use the processor resources of the new first processor group;
and a migration module 13, configured to, when there is no idle second processor with the same physical core as the first processor and there is no idle second processor with the same host as the first processor, select a third processor with a host different from the first processor group, and migrate the target virtual machine configured on the first processor to the third processor.
In an exemplary embodiment, the load balancing apparatus may further include a configuration module, configured to configure all the processors of the first processor group as a first time slice, configure all the processors of the second processor group as a second time slice, and the first time slice is different from the second time slice; configuring a first type virtual machine on all processors of the first processor group, and configuring a second type virtual machine on all processors of the second processor group, wherein the first type virtual machine and the second type virtual machine have different service types.
In order to implement effective performance of virtual machine migration, the migration module 13 may be further configured to arrange the third processors in order of decreasing load;
sequentially calculating the sum of the load of the target virtual machine and the load of the third processor as a reference load;
when the reference load is lower than the highest load of the third processor, the third processor corresponding to the reference load is selected.
In order to determine the target virtual machine, so as to improve the virtual machine migration efficiency, in this embodiment of the present invention, the migration module 13 may be further configured to select, from the virtual machines configured on the first processor, a virtual machine with a largest load as the target virtual machine.
Embodiments of the present invention provide a non-volatile computer storage medium, where a computer-executable instruction is stored in the computer storage medium, and the computer-executable instruction may execute a load balancing method in any of the above method embodiments.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device for executing a load balancing method according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes:
one or more processors 410 and a memory 420, with one processor 410 being an example in fig. 4.
The apparatus for performing the load balancing method may further include: an input device 430 and an output device 440.
The processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, such as the bus connection in fig. 4.
Memory 420, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the load balancing method in the embodiment of the present invention (for example, traversal module 11, grouping module 12, and migration module 13 shown in fig. 3). The processor 410 executes various functional applications of the server and data processing by executing nonvolatile software programs, instructions and modules stored in the memory 420, so as to implement the load balancing method of the above method embodiment.
The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the load balancing apparatus, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 420 may optionally include memory located remotely from processor 410, which may be connected to a load balancing apparatus via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the load balancing apparatus. The output device 440 may include a display device such as a display screen.
The one or more modules are stored in the memory 420 and, when executed by the one or more processors 410, perform the load balancing method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The electronic device of embodiments of the present invention exists in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic devices with data interaction functions.
The above-described embodiments of the apparatus are merely illustrative, and 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 modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of load balancing, comprising the steps of:
traversing all second processors of the second processor group when a load of a first processor belonging to the first processor group is higher than a threshold;
when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, moving the second processor to the first processor group to enable a virtual machine configured on the first processor to use processor resources of the new first processor group;
when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor.
2. The method of load balancing according to claim 1, wherein all processors of the first processor group are configured as a first time slice, all processors of the second processor group are configured as a second time slice, and the first time slice is different from the second time slice;
all processors of the first processor group are configured with first type virtual machines, all processors of the second processor group are configured with second type virtual machines, and the first type virtual machines and the second type virtual machines have different service types.
3. The method of load balancing according to claim 1, wherein selecting a third processor of a different host from the first processor from the first group of processors comprises:
arranging the third processors according to the sequence of the load from small to large;
sequentially calculating the sum of the load of the target virtual machine and the load of the third processor as a reference load;
when the reference load is lower than the highest load of the third processor, the third processor corresponding to the reference load is selected.
4. The method of load balancing according to claim 1, wherein selecting a third processor of a host different from the first processor group, and before migrating the target virtual machine configured on the first processor to the third processor, further comprises:
the method includes selecting a virtual machine with the largest load as a target virtual machine from virtual machines configured on a first processor.
5. A load balancing apparatus, comprising:
the traversing module is used for traversing all the second processors of the second processor group when the load of the first processor belonging to the first processor group is higher than the threshold value;
a grouping module for moving a second processor to the first processor group when there is an idle second processor of the same physical core as the first processor or an idle second processor of the same host as the first processor, so that the virtual machine configured on the first processor can use the processor resources of the new first processor group;
and the migration module is used for selecting a third processor of a host different from the first processor group and migrating the target virtual machine configured on the first processor to the third processor when the idle second processor with the same physical kernel as the first processor does not exist and the idle second processor with the same host as the first processor does not exist.
6. The load balancing apparatus of claim 5, further comprising a configuration module configured to configure all processors of the first processor group as a first time slice, configure all processors of the second processor group as a second time slice, and the first time slice is different from the second time slice; configuring a first type virtual machine on all processors of the first processor group, and configuring a second type virtual machine on all processors of the second processor group, wherein the first type virtual machine and the second type virtual machine have different service types.
7. The load balancing apparatus according to claim 5, wherein the migration module is further configured to arrange the third processors in order of decreasing load;
sequentially calculating the sum of the load of the target virtual machine and the load of the third processor as a reference load;
when the reference load is lower than the highest load of the third processor, the third processor corresponding to the reference load is selected.
8. The load balancing apparatus according to claim 5, wherein the migration module is further configured to select a virtual machine with a largest load as the target virtual machine from among the virtual machines configured on the first processor.
9. An electronic device, characterized in that the electronic device comprises a processor; and the number of the first and second groups,
a memory communicatively coupled to the processor; wherein,
the memory stores instructions executable by the processor to enable the processor to:
traversing all second processors of the second processor group when a load of a first processor belonging to the first processor group is higher than a threshold;
when there is a second processor idle of the same physical core as the first processor or a second processor idle of the same host as the first processor, moving the second processor to the first processor group to enable a virtual machine configured on the first processor to use processor resources of the new first processor group;
when there is no idle second processor having the same physical core as the first processor and no idle second processor having the same host as the first processor, a third processor having a different host from the first processor is selected from the first processor group, and the target virtual machine configured on the first processor is migrated to the third processor.
10. An electronic device comprising a load balancing apparatus according to any one of claims 5 to 8.
CN201910094168.6A 2019-01-30 2019-01-30 Load balancing method and device and electronic equipment Active CN109840135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910094168.6A CN109840135B (en) 2019-01-30 2019-01-30 Load balancing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910094168.6A CN109840135B (en) 2019-01-30 2019-01-30 Load balancing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109840135A true CN109840135A (en) 2019-06-04
CN109840135B CN109840135B (en) 2022-02-18

Family

ID=66884270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910094168.6A Active CN109840135B (en) 2019-01-30 2019-01-30 Load balancing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109840135B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427673A (en) * 2020-03-16 2020-07-17 杭州迪普科技股份有限公司 Load balancing method, device and equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799772A (en) * 2010-02-26 2010-08-11 上海华为技术有限公司 Kernel dispatching method, kernel backup method and multi-core processor
CN102394903A (en) * 2011-07-14 2012-03-28 上海红神信息技术有限公司 Active reconstruction calculating system constructing system
CN102402462A (en) * 2010-09-30 2012-04-04 微软公司 Techniques for load balancing GPU enabled virtual machines
US20120102189A1 (en) * 2010-10-25 2012-04-26 Stephany Burge Dynamic heterogeneous computer network management tool
CN103377089A (en) * 2012-04-16 2013-10-30 国际商业机器公司 Programmatic load-based management method and system of processor population
CN103778017A (en) * 2012-10-19 2014-05-07 国际商业机器公司 Affinity of virtual processor dispatching
US20140173623A1 (en) * 2012-12-17 2014-06-19 Mediatek Inc. Method for controlling task migration of task in heterogeneous multi-core system based on dynamic migration threshold and related computer readable medium
CN104503838A (en) * 2014-11-23 2015-04-08 华中科技大学 Method for scheduling virtual CPU (Central Processing Unit)
CN104850461A (en) * 2015-05-12 2015-08-19 华中科技大学 NUMA-oriented virtual cpu (central processing unit) scheduling and optimizing method
CN107918557A (en) * 2016-10-05 2018-04-17 联发科技股份有限公司 A kind of apparatus and method and multiple nucleus system for running multiple nucleus system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799772A (en) * 2010-02-26 2010-08-11 上海华为技术有限公司 Kernel dispatching method, kernel backup method and multi-core processor
CN102402462A (en) * 2010-09-30 2012-04-04 微软公司 Techniques for load balancing GPU enabled virtual machines
US20120102189A1 (en) * 2010-10-25 2012-04-26 Stephany Burge Dynamic heterogeneous computer network management tool
CN102394903A (en) * 2011-07-14 2012-03-28 上海红神信息技术有限公司 Active reconstruction calculating system constructing system
CN103377089A (en) * 2012-04-16 2013-10-30 国际商业机器公司 Programmatic load-based management method and system of processor population
CN103778017A (en) * 2012-10-19 2014-05-07 国际商业机器公司 Affinity of virtual processor dispatching
US20140173623A1 (en) * 2012-12-17 2014-06-19 Mediatek Inc. Method for controlling task migration of task in heterogeneous multi-core system based on dynamic migration threshold and related computer readable medium
CN104503838A (en) * 2014-11-23 2015-04-08 华中科技大学 Method for scheduling virtual CPU (Central Processing Unit)
CN104850461A (en) * 2015-05-12 2015-08-19 华中科技大学 NUMA-oriented virtual cpu (central processing unit) scheduling and optimizing method
CN107918557A (en) * 2016-10-05 2018-04-17 联发科技股份有限公司 A kind of apparatus and method and multiple nucleus system for running multiple nucleus system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TOQEER ALI SYED,SHAHRULNIZA MUSA,ABDUR RAHMAN,SALMAN JAN: "Towards Secure Instance Migration in the Cloud", 《IEEE》 *
马汝辉: "基于多核的虚拟化技术研究", 《万方》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427673A (en) * 2020-03-16 2020-07-17 杭州迪普科技股份有限公司 Load balancing method, device and equipment
CN111427673B (en) * 2020-03-16 2023-04-07 杭州迪普科技股份有限公司 Load balancing method, device and equipment

Also Published As

Publication number Publication date
CN109840135B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
US10228984B2 (en) Management of virtual machine migration in an operating environment
US11966792B2 (en) Resource processing method of cloud platform, related device, and storage medium
WO2021121115A1 (en) Virtual machine numa node scheduling method and apparatus, and device and medium
US20170185454A1 (en) Method and Electronic Device for Determining Resource Consumption of Task
WO2017166643A1 (en) Method and device for quantifying task resources
WO2017185616A1 (en) File storage method and electronic equipment
CN109783237A (en) A kind of resource allocation method and device
US9900264B1 (en) Adaptive balancing of application programming interface calls of cloud tenants
WO2014194695A1 (en) Method and server for pvp team matching in computer games
US20170207958A1 (en) Performance of Multi-Processor Computer Systems
US10616134B1 (en) Prioritizing resource hosts for resource placement
EP2921954A1 (en) Virtual machine allocation method and apparatus
US20150156135A1 (en) Reputation-based mediation of virtual control planes
US9882773B2 (en) Virtual resource provider with virtual control planes
US11204702B2 (en) Storage domain growth management
WO2020164476A1 (en) Data downloading method and related apparatus
US9553774B2 (en) Cost tracking for virtual control planes
CN112988066B (en) Data processing method and device
WO2021068205A1 (en) Access control method and apparatus, and server and computer-readable medium
CN112448984A (en) Resource transmission method, electronic device and computer storage medium
CN103678892A (en) Role object management method and role object management device
CN109840135B (en) Load balancing method and device and electronic equipment
CN108388760A (en) A kind of printed circuit board wiring method, apparatus and electronic equipment
CN112565210A (en) CDN node recommendation method, system, electronic device and storage medium
CN109542625A (en) A kind of storage resource control method, device and electronic equipment

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