CN109558216B - Single root I/O virtualization optimization method and system based on online migration - Google Patents

Single root I/O virtualization optimization method and system based on online migration Download PDF

Info

Publication number
CN109558216B
CN109558216B CN201811507379.XA CN201811507379A CN109558216B CN 109558216 B CN109558216 B CN 109558216B CN 201811507379 A CN201811507379 A CN 201811507379A CN 109558216 B CN109558216 B CN 109558216B
Authority
CN
China
Prior art keywords
network
virtual machine
migration
virtual
data
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
CN201811507379.XA
Other languages
Chinese (zh)
Other versions
CN109558216A (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.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN201811507379.XA priority Critical patent/CN109558216B/en
Publication of CN109558216A publication Critical patent/CN109558216A/en
Application granted granted Critical
Publication of CN109558216B publication Critical patent/CN109558216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The invention relates to the technical field of cloud computing, in particular to a single root I/O virtualization optimization method and a single root I/O virtualization optimization system based on online migration; the method comprises the steps of dynamically sensing the network load change condition of the virtual machine to acquire the network data information of the virtual machine; after receiving the network data information, the network monitoring module classifies and distributes VF to the virtual machines; then the network monitoring module monitors the network state of the virtual machine, and if the information data monitored by the network monitoring module for the virtual machine exceeds a set threshold value, the monitored virtual machine is migrated; the method and the system can dynamically sense the network load of the virtual machines, classify the virtual machines and distribute the VF with limited quantity to the virtual machines so as to improve the network performance of the virtual machines, thereby improving the overall network performance of the system, and relieving the network pressure of a host by adopting a method for online migration of the virtual machines.

Description

Single root I/O virtualization optimization method and system based on online migration
Technical Field
The invention relates to the technical field of cloud computing, in particular to a single root I/O virtualization optimization method and a single root I/O virtualization optimization system based on online migration.
Background
With the rapid development of cloud computing technology, virtualization technology is almost deployed in modern data centers, and the separation of virtual machine software and hardware can better perform operations such as software management, fault detection and system maintenance in the data centers. By running a plurality of virtual servers on one physical server in a data isolation mode and the like, the virtualization technology can greatly improve the physical resource utilization rate of the server, and the performance of the virtual server is not greatly influenced. At present, the virtualization technology of the CPU and the memory is relatively mature, and the I/O virtualization technology becomes a key point that restricts the performance of the system.
The network resource is an extremely important one of the I/O resources, and due to the scarcity and high competitiveness of the data center network resource, the reasonable scheduling of the network resource in the virtualization environment and the improvement of the data center network bandwidth utilization rate are a key problem to be solved urgently.
Network I/O virtualization is a key technology for solving the problem, but in several mainstream I/O virtualization modes at present, no method can ensure expandability and meet the performance requirement of a virtual machine. Software-based virtualization is well extensible but has limited performance due to the virtual machine monitor's intervention in the I/O path of the virtual machine. The hardware-assisted virtualization mode, which is a Pass-through technology or a single-root I/O virtualization technology, bypasses the interference of a virtual machine monitor on an I/O path of a virtual machine, can achieve the I/O performance close to that of a physical machine, but breaks the service transparency of virtualization, and brings difficulty to the online migration of the virtual machine.
Disclosure of Invention
The invention mainly solves the technical problem of providing a single I/O virtualization optimization method based on online migration, which can dynamically sense the network load of virtual machines, classify the virtual machines and distribute limited VF to the virtual machines to improve the network performance of the virtual machines, thereby improving the overall network performance of a system, and relieve the network pressure of a host by adopting an online migration method of the virtual machines, so as to avoid the situation that the host is crashed due to the overweight network load, and migrate the virtual machines when the network load of the host does not exceed the bearing range; the invention also provides a single root I/O virtualization optimization system based on online migration.
In order to solve the technical problems, the invention adopts a technical scheme that: the method for optimizing the virtualization of the single root I/O based on online migration comprises the following steps:
step S1, dynamically sensing the network load change condition of the virtual machine to acquire the network data information of the virtual machine, and sending the network data information to the network monitoring module;
step S2, after the network monitoring module receives the network data information, classifying and distributing VF to the virtual machine;
step S3, the network monitoring module monitors the network status of the virtual machine, and if the information data monitored by the network monitoring module for the virtual machine exceeds a set threshold, the monitored virtual machine is migrated.
As a modification of the present invention, step S1 includes:
step S11, the virtual machine sends the acquired traffic information to the network monitoring module when each sampling period is finished;
in step S12, the virtual machine reads the memory information it is using, and sends the acquired memory information to the host when each sampling period ends.
As a further improvement of the present invention, in step S2, the network monitoring module classifies the virtual machines into network-intensive virtual machines and non-network-intensive virtual machines according to the received network data information, assigns VFs to the network-intensive virtual machines, and allows the non-network-intensive virtual machines to operate using a paravirtualized network card.
As a further improvement of the present invention, in step S2, a single I/O virtualized network card is set as a master device and a paravirtualized network card is set as a slave device using an active backup mode of a binding driving technique, a network monitoring module creates two queues to manage virtual machines, all the virtual machines are just started to be placed in a general queue, when each sampling period ends, the virtual machines are sorted according to the current flow and from large to small, a certain number of virtual machines are selected to be placed in a priority queue, the remaining virtual machines are placed in a general queue, then VF is allocated to the virtual machines in the priority queue, and the virtual machines in the general queue work using the paravirtualized network card.
As a further improvement of the present invention, step S3 includes:
step S31, the network monitoring module monitors the network state of the virtual machine and analyzes the network density of the virtual machine; if the information data monitored by the virtual machine by the network monitoring module exceeds a set threshold value, entering the next step;
step S32, predicting whether the information data of the next period of the network state of the virtual machine exceeds the set threshold value, if so, entering the next step;
step S33, the network monitoring module selects the virtual machine whose information data exceed the set threshold value and transfers the virtual machine to the transfer management module;
step S34, the migration management module selects the host with the minimum network intensive state in the cluster to receive the migrated virtual machine;
step S35, if the information data of the migrated virtual machine exceeds the set threshold, repeat step S34.
As a further improvement of the present invention, in step S31, the network monitoring module stores the information data into the file netinfo and at the same time analyzes the network density of the virtual machine; the method for analyzing the network density of the virtual machine is that the network monitoring module reads past n sampled data from a file, if k data in the sampled data exceed a set threshold value, the step S33 is executed, otherwise, the processes of storing the data, reading the data and analyzing the data are repeated continuously.
As a further improvement of the present invention, in step S32, the method of predicting the information data of the next cycle of the network state of the virtual machine is to perform prediction using an autoregressive prediction model based on time series.
As a further improvement of the present invention, in step S33, the network monitoring module selects a virtual machine to be migrated on the host, reads the network data information and the memory information of the virtual machine in the file, selects the virtual machine to be migrated based on the principle of letting the maximum load be transmitted per byte unit, and sends the IP address of the virtual machine to the migration management module.
A single root I/O virtualization optimization system based on online migration, comprising:
a plurality of virtual machines;
the network monitoring module is used for monitoring each virtual machine and receiving network data information sent by each virtual machine;
and the migration management module is used for reading the network data information of each virtual machine in the file to calculate the network bandwidth utilization rate of the host according to the total flow sent and received by the host and a method of dividing the total flow by the network card bandwidth when receiving the migration trigger signal, sequencing the bandwidth utilization rates of the host in a descending order, selecting the smallest host, and migrating the virtual machine to the host.
As an improvement of the present invention, the present invention further comprises:
and the VF scheduling module is used for sequencing the virtual machines from large to small according to the network flow in the sampling period, selecting a certain number of the virtual machines in the front to place in the priority queue, and placing the rest of the virtual machines in the general queue.
The invention has the beneficial effects that: compared with the prior art, the method can dynamically sense the network load of the virtual machines, classify the virtual machines and distribute the VF with limited quantity to the virtual machines so as to improve the network performance of the virtual machines, thereby improving the overall network performance of the system, and the method for online migration of the virtual machines is adopted to relieve the network pressure of the host machines, so that the virtual machines are migrated when the network load of the host machines does not exceed the bearing range in order to avoid the condition that the host machines are crashed due to the overweight network load.
Drawings
FIG. 1 is a block diagram of the steps of a single root I/O virtualization optimization method based on online migration according to the present invention;
FIG. 2 is a block diagram of the internal steps of step S1 in FIG. 1;
FIG. 3 is a block diagram of the internal steps of step S3 in FIG. 1;
FIG. 4 is a diagram illustrating a VF assignment scheduling process of the present invention;
FIG. 5 is a schematic diagram illustrating a scheduling process of online migration of virtual machines according to the present invention;
FIG. 6 is a block diagram of a VF assignment scheduling process of the present invention;
FIG. 7 is a block diagram of a scheduling process of online migration of virtual machines in accordance with the present invention;
FIG. 8 is a block diagram of a single root I/O virtualization optimization system based on online migration of the present invention.
Detailed Description
The current virtual machine allocation and scheduling strategy mainly concerns the economy and the efficiency of data center computing resource utilization, and has a certain degree of deficiency in network resource scheduling. Network resources remain highly competitive and scarce resources in data centers relative to computing and storage resources. If the network resources cannot be reasonably scheduled, the performance of the whole system will be affected. Particularly after the data center deploys the virtualization technology, multiple virtual machines on the same host may request the network resource at the same time, which necessarily results in a more competitive network resource. Data centers often optimize network performance of virtual machines by using single root I/O virtualization technology.
In data centers, single root I/O virtualization technology has in fact become a standard technology for network I/O virtualization. Compared with a paravirtualization technology, the single-root I/O virtualization technology can greatly reduce communication delay of virtual machines by monopolizing the VFs, but if each virtual machine allocates the VFs, the requirement for network-intensive virtual machine communication cannot be met, because the effective bandwidth acquired by each VF is inversely proportional to the total number of configured VFs, and the increase of the number of VFs can cause the bandwidth of a single VF to decrease. In addition, due to variability of the application service program in the running process, the system may become unbalanced on network load after running for a period of time, so that some hosts have performance degradation due to excessive network load, while some hosts have low resource utilization rate due to insufficient network load, and if no further optimization is performed on single-root I/O virtualization, the scalability and network performance of the system are necessarily affected. However, using single root I/O virtualization technology also has disadvantages in two ways: (1) when the number of VFs of a single I/O virtualization network card is increased, the effective bandwidth acquired by each VF is inversely proportional to the total number of the configured VFs, so that the performance of the single VF is reduced; (2) the online migration of the virtual machine of a single I/O virtualization network card is limited, so that the load balance cannot be achieved when the load among different hosts in the cluster system changes, and the overall performance of the system is affected. Therefore, the invention provides a single I/O virtualization network optimization method based on online migration, which dynamically senses the network load state of a virtual machine, and ensures the performance of an I/O intensive virtual machine by limiting the number of VFs, thereby ensuring the overall network performance of a system. When the network load of the host computer is too heavy and can not meet the network requirement of the virtual machine, a mode of combining single I/O virtualization and paravirtualization is adopted, part of the virtual machine is migrated to other idle host computers on line to run, and the network load among cluster systems is balanced, so that the overall network performance of the data center is optimized.
As shown in fig. 1 to fig. 3, a single root I/O virtualization optimization method based on online migration includes the following steps:
step S1, dynamically sensing the network load change condition of the virtual machine to acquire the network data information of the virtual machine, and sending the network data information to the network monitoring module;
step S2, after the network monitoring module receives the network data information, classifying and distributing VF to the virtual machine;
step S3, the network monitoring module monitors the network status of the virtual machine, and if the information data monitored by the network monitoring module for the virtual machine exceeds a set threshold, the monitored virtual machine is migrated.
As shown in fig. 2, step S1 includes:
step S11, the virtual machine sends the acquired traffic information to the network monitoring module when each sampling period is finished;
in step S12, the virtual machine reads the memory information it is using, and sends the acquired memory information to the host when each sampling period ends.
Specifically, firstly, collecting network data of a virtual machine for dynamically sensing the network load change condition of the virtual machine, reading an interface file/proc/net/dev provided by a Linux system by the virtual machine to obtain network information of the virtual machine, and sending the obtained flow information to a network monitoring module of a host computer when each sampling period is finished; and the virtual machine obtains the size of the memory in use by reading the file/proc/meminfo, and sends the obtained data to the host computer at the end of each sampling period.
In step S2, the network monitoring module classifies the virtual machines into network-intensive virtual machines and non-network-intensive virtual machines according to the received network data information, and assigns VF to the network-intensive virtual machines, so that the non-network-intensive virtual machines work using the paravirtualized network card.
Further, in step S2, setting a single I/O virtualized network card as a master device and a paravirtualized network card as a slave device using an active backup mode of a binding driving technique, creating two queues by a network monitoring module to manage virtual machines, just starting to place all the virtual machines into a general queue, sorting the virtual machines according to the current flow and descending order when each sampling period ends, selecting a certain number of virtual machines to place into a priority queue, placing the remaining virtual machines into the general queue, then allocating VF to the virtual machines in the priority queue, and the virtual machines in the general queue work using the paravirtualized network card; specifically, after receiving the traffic information sent by the virtual machine, the network monitoring module of the host divides the virtual machine into a network-intensive virtual machine and a non-network-intensive virtual machine, and assigns VF to the network-intensive virtual machine, so that the non-network-intensive virtual machine works using a paravirtualized network card. In the process, if the original virtual machine which is not network-intensive is classified as the network-intensive virtual machine in the sampling period, the semi-virtualization network card of the virtual machine is switched into the single I/O virtualized VF network card; if the virtual machine is originally network-intensive and is classified as a non-network-intensive virtual machine in this sampling period, its VF is deprived of it to allow it to work with a paravirtualized network card. The method for dividing the virtual machine into a network intensive virtual machine and a non-network intensive virtual machine comprises the following steps: two queues are used for managing the virtual machines, the network intensive virtual machines are placed in the priority queues, and the non-network intensive virtual machines are placed in the general queues. The network monitoring module sorts the virtual machines according to the flow of the virtual machines in the sampling period from large to small, selects a certain number of the virtual machines in the front to place in a priority queue, and places the rest virtual machines in a general queue. The method for dynamically switching the single I/O virtual network card and the semi-virtual network card comprises the following steps: and the active backup mode of the binding driving technology is used for setting a single I/O virtualization network card as a master device, setting a semi-virtualization network card as a slave device, and directly realizing the dynamic switching of the single I/O virtualization network card and the semi-virtualization network card by the virtual hot plug of the single I/O virtualization network card.
As shown in fig. 3, step S3 includes:
step S31, the network monitoring module monitors the network state of the virtual machine and analyzes the network density of the virtual machine; if the information data monitored by the virtual machine by the network monitoring module exceeds a set threshold value, entering the next step;
step S32, predicting whether the information data of the next period of the network state of the virtual machine exceeds the set threshold value, if so, entering the next step;
step S33, the network monitoring module selects the virtual machine whose information data exceed the set threshold value and transfers the virtual machine to the transfer management module;
step S34, the migration management module selects the host with the minimum network intensive state in the cluster to receive the migrated virtual machine;
step S35, if the information data of the migrated virtual machine exceeds the set threshold, repeat step S34.
In step S31, the network monitoring module stores the information data into the netinfo file and analyzes the network density of the virtual machine; the method for analyzing the network density of the virtual machine is that the network monitoring module reads past n sampled data from a file, if k data in the sampled data exceed a set threshold value, the step S33 is executed, otherwise, the processes of storing the data, reading the data and analyzing the data are repeated continuously.
Further, in step S32, the method of predicting the information data of the next cycle of the network state of the virtual machine is to perform prediction using an auto-regression prediction model based on time series.
Still further, in step S33, the network monitoring module selects a virtual machine to be migrated on the host, reads network data information and memory information of the virtual machine in the file, selects the virtual machine to be migrated based on the principle that each byte transmits the maximum load, and sends the IP address of the virtual machine to the migration management module.
Specifically, firstly, a network monitoring module of the host monitors the network state of the virtual machine, and when the flow data of the virtual machine arrives each time, the network monitoring module stores the data into a file netinfo; the network monitoring module reads n past sampling data from the file, if k data in the n past sampling data exceed the set valueIf the threshold value is determined, the next step is carried out, otherwise, the processes of storing the data, reading the data and analyzing the data are continuously repeated; secondly, the network monitoring module of the host machine predicts the future trend of the network state of the virtual machine, and if the result of predicting the next period also exceeds the set threshold value, migration is triggered; the network monitoring module selects a virtual machine to be migrated based on the principle that the maximum load is transmitted per byte, sends the IP address of the virtual machine and a migration triggering signal to a migration management module of the migration control host, and enters the next step; the method for predicting the data of the next period comprises the following steps: predicting by using an autoregressive prediction model based on a time series, wherein the autoregressive prediction model is a process of using self as a regression variable, a first-order autoregressive model AR (1) is adopted, the value of the (p +1) th sampling period is predicted by considering the time series x1, x2, … and xp, and the value of the (p +1) th sampling period is estimated according to the following mode:
Figure BDA0001899776230000081
wherein mu is the expected value of the previous p time sequences, the parameter phi is used for capturing the change of the time sequences, and Gaussian white noise is determined by the fluctuation degree of the current sequence; thirdly, the migration management module of the migration control host selects the host with the minimum network density in the cluster to receive the migrated virtual machine, and starts to migrate the virtual machine, if the migrated virtual machine is a paravirtualized or fully virtualized virtual machine, the virtual machine can be directly migrated; and if the selected virtual machine uses a single I/O virtualization device, the single I/O virtualized VF is dynamically switched into a semi-virtualized virtual network card by combining the activation-backup modes of the ACPI hot plug technology and the binding drive technology. If the network load is too heavy after the virtual machine is migrated, namely, the migration signal is also triggered, the previous step is repeated. The method for selecting the migration virtual machine in the host comprises the following steps: based on the principle of letting the maximum load be transmitted per unit byte, the virtual machine migration decision factor is calculated according to the following formula:
Figure BDA0001899776230000091
wherein, Traffic _ data represents the total size of the sending and receiving data packets in one sampling period, Num represents the total sampling times, and mem is the size of the memory of the virtual machine. And sorting according to the descending order of the virtual machine migration judgment factors from large to small, and selecting the largest virtual machine for migration.
The specific method for online migration of the virtual machine of the single-root I/O virtualization device is as follows:
(I) setting a single I/O virtualization device as a master device and a semi-virtualized network card as a slave device by using an active backup mode of a binding driving technology; (II) when migration is triggered, the migration management module of the migration control host informs the virtual hot plug controller of the source host to trigger a virtual hot removal event of the single-root I/O virtualization device of the selected virtual machine; (III) the virtual machine closes the drive of the single I/O virtualization device, stops using the single I/O virtualization device to respond to the virtual hot removal event, and automatically converts the active network card based on the binding drive technology into a paravirtualized network card through the single I/O virtualization network card; (IV) at this time, the virtual machine is no longer related to hardware and can be safely migrated to the target host; (V) after the migration is completed, triggering a virtual hot-plug addition event of single I/O virtualization equipment of the virtual machine by a virtual hot-plug controller of the target host; (VI) the virtual machine loads a single I/O virtualization network card driver and selects a new virtual function to start working.
As shown in FIG. 8, a single root I/O virtualization optimization system based on online migration includes:
a plurality of virtual machines;
the network monitoring module is used for monitoring each virtual machine and receiving network data information sent by each virtual machine;
and the migration management module is used for reading the network data information of each virtual machine in the file to calculate the network bandwidth utilization rate of the host according to the total flow sent and received by the host and a method of dividing the total flow by the network card bandwidth when receiving the migration trigger signal, sequencing the bandwidth utilization rates of the host in a descending order, selecting the smallest host, and migrating the virtual machine to the host.
The invention relates to a single root I/O virtualization optimization system based on online migration, which further comprises:
and the VF scheduling module is used for sequencing the virtual machines from large to small according to the network flow in the sampling period, selecting a certain number of the virtual machines in the front to place in the priority queue, and placing the rest of the virtual machines in the general queue.
The network monitoring module is provided with an analysis unit for analyzing the network density of the virtual machine.
As shown in fig. 4 and 5, the specific process of dynamically scheduling the VF of the single I/O virtualization network card of the present invention is as follows:
the method comprises the following steps: the method comprises the following steps of collecting various data in the virtual machine, including network data and memory information of the virtual machine, and the step one comprises the following execution steps:
(1.1) firstly, accurately collecting network data of a virtual machine for dynamically sensing the network load condition of the virtual machine, reading a kernel interface file/proc/net/dev of Linux by the virtual machine to obtain network information of the virtual machine, subtracting the last sending and receiving total flow from the existing sending and receiving total flow to obtain the total flow sent and received in the current sampling period, and dividing the total flow sent and received in the current sampling period by a network card bandwidth to obtain the bandwidth utilization rate of the virtual machine in the current sampling period. The network monitoring module in the virtual machine collects the network data of the virtual machine according to the method, the network monitoring module sends the total flow sum sent and received in the sampling period to the network monitoring module of the host machine when each sampling period is finished, and the data of all the virtual machines collected by the network monitoring module of the host machine is the total flow sum sent and received by the host machine.
(1.2) the virtual machine reads the file/proc/meminfo to obtain the size of the memory used by the virtual machine, sends the obtained memory information to the host and stores the memory information into the file at the end of each sampling period so as to facilitate subsequent processing, and is used for determining which virtual machine is to be migrated after migration is triggered.
Step two: scheduling VF resources of single I/O virtualization network card
Firstly, setting a single I/O virtualization network card as a master device and a semi-virtualization network card as a slave device by using an active backup mode of a binding driving technology, and directly realizing the dynamic switching of the single I/O virtualization network card and the semi-virtualization network card by carrying out virtual hot plugging on the single I/O virtualization network card; and then, a network monitoring module of the host machine creates two queues to manage the virtual machines, all the virtual machines are put into a general queue at the beginning, when each sampling period is finished, the virtual machines are sorted according to the current flow and from large to small, the virtual machines with the largest certain number are selected to be put into a priority queue, the rest virtual machines are put into the general queue, then VF is distributed to the virtual machines in the priority queue, and the virtual machines in the general queue work by using a paravirtualized network card. In the process, if the virtual machine which is originally non-network-intensive is classified as the network-intensive virtual machine in the sampling period, the semi-virtualization network card is switched to be the single I/O virtualization VF network card, and if the virtual machine which is originally network-intensive is classified as the non-network-intensive virtual machine in the sampling period, the VF of the virtual machine is deprived to enable the virtual machine to work by using the semi-virtualization network card.
Step three: the network monitoring module of the host computer carries on the unified management and analysis to the network data of the virtual machine, the network intensity degree of the analysis virtual machine, this step three includes the following execution step:
(3.1) when the network data of the virtual machine arrives each time, the network monitoring module of the host stores the data into the netinfo file, and meanwhile, the network density degree of the virtual machine is analyzed; the method for analyzing the network density of the virtual machine comprises the following steps: the network monitoring module reads the past n sampled data from the file, namely the total flow rate sent and received by the host computer and if k data in the n sampled data exceed the set threshold value, the step (3.2) is carried out, otherwise, the processes of storing the data, reading the data and analyzing the data are continuously repeated.
(3.2) predicting the future trend of the network state of the virtual machine, if the predicted result of the next period also exceeds a set threshold value, triggering migration to enter a third step, and simultaneously sending a migration signal to a migration management module of the migration control host by the network monitoring module; the method for predicting the data of the next period is to predict by using an autoregressive prediction model based on a time series, wherein the autoregressive prediction model is a process of using self as a regression variable, a first-order autoregressive model AR (1) is adopted, the value of the (p +1) th sampling period is predicted by considering the time series x1, x2, … and xp, and the value of the (p +1) th sampling period is estimated according to the following modes:
Figure BDA0001899776230000111
where μ is the expected value of the previous p time series, the parameter φ is used to capture the variation of the time series, and it is Gaussian white noise that depends on the fluctuation degree of the current series.
Step four: after migration is triggered, the network monitoring module selects a virtual machine to be migrated on the host, reads network and memory information of the virtual machine in a file, selects the virtual machine to be migrated based on a principle of enabling each byte to transmit the maximum load, and sends an IP address of the virtual machine to a migration management module of a migration control host; the method for selecting the migrated virtual machine in the host is based on the principle that the maximum load is transmitted per unit byte, and the virtual machine migration judgment factor is calculated according to the following formula:
Figure BDA0001899776230000112
wherein, Traffic _ data represents the total size of the sending and receiving data packets in one sampling period, Num represents the total sampling times, and mem is the size of the memory of the virtual machine. And sorting according to the descending order of the virtual machine migration judgment factors from large to small, and selecting the largest virtual machine for migration.
Step five: the migration management module of the migration control host selects the host with the minimum network intensive state in the cluster to receive the virtual machine to be migrated, and the method for selecting the host with the minimum network intensive state comprises the following steps: and calculating the network bandwidth utilization rate of the host according to the total flow sent and received by the host and a method of dividing the total flow by the network card bandwidth, sorting the hosts according to the descending order of the bandwidth utilization rates of the hosts, and selecting the smallest host. And (5) starting to migrate the virtual machine, if the network load is still too heavy after the virtual machine is migrated, triggering a migration signal, and repeating the step four.
The single-root I/O virtualized virtual machine online migration method comprises the following execution steps:
(5.1) setting the single-root I/O virtualization device as a master device and setting the semi-virtualized network card as a slave device by using an active backup mode of a binding driving technology; the master device, i.e., the single root I/O virtualization device, operates in an active state using the master device, and only when the master device is in an inactive state, operates using the slave device, i.e., the paravirtualized network card.
And (5.2) when the migration is triggered, the migration management module of the migration control host informs the virtual hot plug controller of the source host to trigger a virtual hot removal event of the selected virtual machine single-root I/O virtualization device.
(5.3) the virtual machine shuts down the drive of the single-root I/O virtualization device of the virtual machine and stops using the single-root I/O virtualization device to respond to the virtual hot removal event, and the active network card of the binding drive technology is automatically converted into a paravirtualized network card by the single-root I/O virtualization network card.
And (5.4) at the moment, the virtual machine is no longer related to hardware and can be safely migrated to the target host.
And (5.5) after the migration is completed, triggering a virtual hot-plug controller of the destination host machine to perform virtual hot-add event of the single-root I/O virtualization device of the virtual machine.
And (5.6) loading a single I/O virtualization network card driver by the virtual machine and selecting a new virtual function to start working.
As shown in fig. 4 and 6, the host for VF scheduling includes n virtual machines and a privileged domain virtual machine, and the privileged domain virtual machine manages the single I/O virtualized network card and performs scheduling allocation of VFs. The network monitoring module in the privileged domain virtual machine receives network flow information sent by each virtual machine, the VF scheduling module sorts the virtual machines according to the network flow in the sampling period from large to small, selects a certain number of the virtual machines in the front to place in a priority queue, and places the rest virtual machines in a general queue. The priority queue is placed into the network intensive virtual machines, the general queue is placed into the non-network intensive virtual machines, all the virtual machines are placed into the general queue in the initial state, and the network intensive virtual machines are inserted into the priority queue in each scheduling process. The VF scheduling module allocates VFs to the virtual machines in the priority queue, and the virtual machines in the general queue work by using a paravirtualized network card. A typical queue variation during this scheduling process is as follows: when dispatching, if the network flow of a virtual machine in the priority queue is smaller than that of a virtual machine in the general queue, the VF dispatching module moves the virtual machine in the priority queue to the general queue and deprives the VF of the virtual machine, and inserts the virtual machine with the maximum network flow of the general queue into the priority queue and distributes the VF to the virtual machine.
As shown in fig. 5 and 7, the network resource schedule is composed of n hosts and one migration control host. The host of the network resource scheduling system comprises k virtual machines and a network monitoring module, wherein the network monitoring module reads a kernel interface file/proc/net/dev of Linux to acquire network information and a file/proc/meminfo of the virtual machines to acquire the size of a memory used by the virtual machines, and the acquired data is stored in the file for subsequent processing. And at the end of each sampling period, the network monitoring module reads the past n sampling data in the file, namely the total flow rate sent and received by the host computer and the predicted data of the next period if k data in the n sampling data exceed the set threshold, and triggers a migration signal if the prediction result also exceeds the set threshold. After triggering the migration signal, the network monitoring module calculates the virtual machine migration judgment factors, sorts the virtual machine migration judgment factors in a descending order, and selects the largest virtual machine to migrate. The migration control host comprises a migration management module, when the migration management module receives a migration trigger signal, the migration management module reads network information of each host in a file, calculates the network bandwidth utilization rate of the hosts according to the total flow sent and received by the hosts and a method of dividing the total flow by the network card bandwidth, sorts the bandwidth utilization rates of the hosts in a descending order, selects the smallest host, and migrates the virtual machine to the host.
In the invention, a single I/O virtualization optimization method based on online migration dynamically senses the network load of a virtual machine, divides the virtual machine into a network-intensive virtual machine and a non-network-intensive virtual machine, and distributes limited VF to the network-intensive virtual machine to improve the network performance of the network-intensive virtual machine, thereby improving the overall network performance of the system. The optimization method adopts an online migration method of the virtual machines to relieve the network pressure of the host machines, and in order to avoid the condition that the host machine network is too heavy and crashes, the virtual machines need to be migrated when the network load of the host machine does not exceed the bearing range. The invention adopts a method for detecting the threshold value of the network resource to trigger the migration, in order to eliminate unnecessary transient peak value interference and ensure that the host computer has continuous network load in the future, only k of n sampling data exceed the threshold value, the n sampling data are judged to be effective triggering, and the change trend of the future network load is predicted so as to better schedule the network resource.
The invention has the following advantages:
1. the method combines the advantages of the paravirtualization and the single-root I/O virtualization, not only can improve the network performance of the virtual machine, but also can ensure the expandability of the virtual machine, dynamically senses the network load state of the virtual machine, and ensures the performance of the I/O intensive virtual machine by limiting the number of VFs, thereby ensuring the overall network performance of the system.
2. According to the optimization method, when a single I/O virtualization network card cannot meet the network performance requirements of the host, part of virtual machines are migrated to other idle hosts to run, and network loads among cluster systems are balanced, so that the overall network performance of the data center is optimized.
3. The optimization method does not modify the scheduling program of the virtual machine monitor, is a supplement to the virtual machine monitor scheduling system, and can be applied to any virtualization platform, such as Xen, KVM and the like.
4. The optimization method combines the ACPI hot plug technology and the binding driving technology to activate the backup mode, and the problem of on-line migration of the virtual machine of the single I/O virtualization device can be well solved by dynamically switching the single I/O virtualized VF and the semi-virtualized virtual network card.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A single root I/O virtualization optimization method based on online migration is characterized by comprising the following steps:
step S1, dynamically sensing the network load change condition of the virtual machine to acquire the network data information of the virtual machine, and sending the network data information to the network monitoring module;
step S2, after the network monitoring module receives the network data information, classifying and distributing VF to the virtual machine;
step S3, the network monitoring module monitors the network state of the virtual machine, if the information data monitored by the network monitoring module for the virtual machine exceeds the set threshold, the monitored virtual machine is migrated;
the step S3 includes:
step S31, the network monitoring module monitors the network state of the virtual machine and analyzes the network density of the virtual machine; if the information data monitored by the virtual machine by the network monitoring module exceeds a set threshold value, entering the next step;
step S32, predicting whether the information data of the next period of the network state of the virtual machine exceeds the set threshold value, if so, entering the next step;
step S33, the network monitoring module selects the virtual machine whose information data exceed the set threshold value and transfers the virtual machine to the transfer management module;
step S34, the migration management module receives the migrated virtual machine by selecting the host with the minimum network intensive state in the cluster;
step S35, if the information data of the migrated virtual machine exceeds the set threshold, repeating step S34;
in the step S32, the method of predicting the information data of the next cycle of the network state of the virtual machine is to use an autoregressive prediction model based on time series for prediction;
the autoregressive prediction mode is a process of using self as a regression variable, a first-order autoregressive model AR (1) is adopted, the value of the (p +1) th sampling period is predicted by considering time sequences x1, x2, … and xp, and the value of the (p +1) th sampling period is estimated according to the following modes:
Figure FDA0002620729770000011
wherein mu is the expected value of the previous p time sequences, the parameter phi is used for capturing the change of the time sequences, and Gaussian white noise is determined by the fluctuation degree of the current sequence;
in step S34, if the migration is a paravirtualized or fully virtualized virtual machine, the migration may be performed directly; if the selected virtual machine uses a single I/O virtualization device, the single I/O virtualized VF is dynamically switched into a semi-virtualized virtual network card by combining the activation-backup modes of the ACPI hot plug technology and the binding drive technology; if the network load is too heavy after the virtual machine is migrated, the migration signal is also triggered, and the previous step is repeated;
the method for selecting the migration virtual machine in the host comprises the following steps: based on the principle of letting the maximum load be transmitted per unit byte, the virtual machine migration decision factor is calculated according to the following formula:
Figure FDA0002620729770000021
wherein, Traffic _ data represents the total size of the sending and receiving data packets in one sampling period, Num represents the total sampling times, and mem is the size of the memory of the virtual machine; and sorting according to the descending order of the virtual machine migration judgment factors from large to small, and selecting the largest virtual machine for migration.
2. The method for optimizing single root I/O virtualization based on online migration according to claim 1, wherein step S1 includes:
step S11, the virtual machine sends the acquired traffic information to the network monitoring module when each sampling period is finished;
in step S12, the virtual machine reads the memory information it is using, and sends the acquired memory information to the host when each sampling period ends.
3. The single root I/O virtualization optimization method based on online migration of claim 1, wherein in step S2, the network monitoring module classifies the virtual machines into network-intensive virtual machines and non-network-intensive virtual machines according to the received network data information, assigns VFs to the network-intensive virtual machines, and allows the non-network-intensive virtual machines to work using a paravirtualized network card.
4. The method for optimizing the virtualization of the single I/O based on online migration according to claim 3, wherein in step S2, a single I/O virtualization network card is set as a master device and a paravirtualized network card is set as a slave device using an active backup mode of a binding driving technique, the network monitoring module creates two queues to manage the virtual machines, all the virtual machines are just started to be placed in the general queue, when each sampling period ends, the virtual machines are sorted according to the current flow and from large to small, a certain number of virtual machines are selected to be placed in the priority queue, the remaining virtual machines are placed in the general queue, then VF is allocated to the virtual machines in the priority queue, and the virtual machines in the general queue work using the paravirtualized network card.
5. The single root I/O virtualization optimization method based on online migration according to claim 1, wherein in step S31, the network monitoring module stores the information data into a netinfo file and simultaneously analyzes the network density of the virtual machine; the method for analyzing the network density of the virtual machine is that the network monitoring module reads past n sampled data from a file, if k data in the sampled data exceed a set threshold value, the step S33 is executed, otherwise, the processes of storing the data, reading the data and analyzing the data are repeated continuously.
6. The method for optimizing single root I/O virtualization based on online migration of claim 1, wherein in step S33, the network monitoring module selects a virtual machine to be migrated on the host, reads network data information and memory information of the virtual machine in the file, selects the virtual machine to be migrated based on a principle of letting the maximum load be transmitted per byte unit, and sends an IP address of the virtual machine to the migration management module.
7. An online migration-based single root I/O virtualization optimization system applying the optimization method according to any one of claims 1 to 6, comprising:
a plurality of virtual machines;
the network monitoring module is used for monitoring each virtual machine and receiving network data information sent by each virtual machine;
and the migration management module is used for reading the network data information of each virtual machine in the file to calculate the network bandwidth utilization rate of the host according to the total flow sent and received by the host and a method of dividing the total flow by the network card bandwidth when receiving the migration trigger signal, sequencing the bandwidth utilization rates of the host in a descending order, selecting the smallest host, and migrating the virtual machine to the host.
8. The system of claim 7, further comprising:
and the VF scheduling module is used for sequencing the virtual machines from large to small according to the network flow in the sampling period, selecting a certain number of the virtual machines in the front to place in the priority queue, and placing the rest of the virtual machines in the general queue.
CN201811507379.XA 2018-12-11 2018-12-11 Single root I/O virtualization optimization method and system based on online migration Active CN109558216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811507379.XA CN109558216B (en) 2018-12-11 2018-12-11 Single root I/O virtualization optimization method and system based on online migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811507379.XA CN109558216B (en) 2018-12-11 2018-12-11 Single root I/O virtualization optimization method and system based on online migration

Publications (2)

Publication Number Publication Date
CN109558216A CN109558216A (en) 2019-04-02
CN109558216B true CN109558216B (en) 2020-10-27

Family

ID=65869385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811507379.XA Active CN109558216B (en) 2018-12-11 2018-12-11 Single root I/O virtualization optimization method and system based on online migration

Country Status (1)

Country Link
CN (1) CN109558216B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113184B (en) * 2019-04-17 2021-10-26 杭州中科先进技术研究院有限公司 KVM virtual machine network optimization method and device under SR-IOV environment
CN114416293A (en) * 2021-12-31 2022-04-29 阿里巴巴(中国)有限公司 Fault recovery method and device for virtualization equipment
CN115484212B (en) * 2022-07-26 2023-10-20 浪潮通信技术有限公司 QoS adjustment method and device for VF and electronic equipment
CN115576732B (en) * 2022-11-15 2023-03-10 阿里云计算有限公司 Root cause positioning method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250211A (en) * 2016-08-05 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of virtualization implementation method based on SR_IOV
CN107133093A (en) * 2017-06-02 2017-09-05 郑州云海信息技术有限公司 The online moving method and device of a kind of virtual machine
CN107562511A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 Moving method, physical server, virtual server and the system of physical to virtual

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562511A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 Moving method, physical server, virtual server and the system of physical to virtual
CN106250211A (en) * 2016-08-05 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of virtualization implementation method based on SR_IOV
CN107133093A (en) * 2017-06-02 2017-09-05 郑州云海信息技术有限公司 The online moving method and device of a kind of virtual machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Raccoon: A Novel Network I/O Allocation Framework for Workload-Aware VM Scheduling in Virtual Environments";Lingfang Zeng等;《IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS》;20170930;第28卷(第9期);摘要,第2-5节 *

Also Published As

Publication number Publication date
CN109558216A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN109558216B (en) Single root I/O virtualization optimization method and system based on online migration
US11403220B2 (en) Method and apparatus for adaptive cache load balancing for SSD-based cloud computing storage system
CN104508634B (en) The dynamic resource allocation of virtual machine
US8694644B2 (en) Network-aware coordination of virtual machine migrations in enterprise data centers and clouds
JP6219512B2 (en) Virtual hadoop manager
US7945913B2 (en) Method, system and computer program product for optimizing allocation of resources on partitions of a data processing system
CN103810016B (en) Realize method, device and the group system of virtual machine (vm) migration
US20170017511A1 (en) Method for memory management in virtual machines, and corresponding system and computer program product
CN106133693B (en) Moving method, device and the equipment of virtual machine
CN108427604B (en) Cluster resource adjustment method and device and cloud platform
CN107992362B (en) Method, device and system for automatic performance test
EP2524277A2 (en) Methods and apparatus for coordinated energy management in virtualized data centers
CN111399986A (en) Method and device for configuring Pod resource quota
CN102508718A (en) Method and device for balancing load of virtual machine
CN101488098A (en) Multi-core computing resource management system based on virtual computing technology
US20160196157A1 (en) Information processing system, management device, and method of controlling information processing system
JP2013515991A (en) Method, information processing system, and computer program for dynamically managing accelerator resources
US11579908B2 (en) Containerized workload scheduling
CN102681895A (en) Dynamic self-migrating cloud service method
CN110262897B (en) Hadoop calculation task initial allocation method based on load prediction
CN103955398A (en) Virtual machine coexisting scheduling method based on processor performance monitoring
CN104598298A (en) Virtual machine dispatching algorithm based on task load and current work property of virtual machine
CN113672345A (en) IO prediction-based cloud virtualization engine distributed resource scheduling method
CN113032102A (en) Resource rescheduling method, device, equipment and medium
CN106020971B (en) CPU scheduling method and device in cloud host system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant