CN103838520A - Input/output traffic control method and equipment - Google Patents

Input/output traffic control method and equipment Download PDF

Info

Publication number
CN103838520A
CN103838520A CN201410055844.6A CN201410055844A CN103838520A CN 103838520 A CN103838520 A CN 103838520A CN 201410055844 A CN201410055844 A CN 201410055844A CN 103838520 A CN103838520 A CN 103838520A
Authority
CN
China
Prior art keywords
bandwidth
virtual machine
node
external service
upper limit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410055844.6A
Other languages
Chinese (zh)
Inventor
柳永强
陈增溪
于璠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410055844.6A priority Critical patent/CN103838520A/en
Publication of CN103838520A publication Critical patent/CN103838520A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an input/output traffic control method and equipment and relates to the field of computers. The bandwidth traffic of a virtual machine migration task is controlled, influence of virtual machine inner service can be effectively lowered, and normal running of the virtual machine inner service is guaranteed. According to the specific scheme, first, according to the bandwidth upper limit which can be used for virtual machine outer service carried out at an N<th> moment, the bandwidth for carrying out the service is adjusted, so that the executed bandwidth does not exceed the usable bandwidth, and performance data of data storage during service executing, the bandwidth using amount of service executing and the bandwidth used by all virtual machines are monitored; and then the usable bandwidth upper limit for executing the service at an N + 1<th> moment is obtained, and when the service is executed at the N + 1<th> moment, the bandwidth used in the N + 1<th> moment for executing the service does not exceed the usable bandwidth upper limit for executing the service in the N + 1<th> moment. The input/output traffic control method and equipment are used for controlling input/output traffic.

Description

Input/output flow control method and device
Technical Field
The invention relates to the field of computers, in particular to an input/output flow control method and input/output flow control equipment.
Background
At present, a large number of virtual machines can run on a large-scale server, virtualized cluster dynamic resource scheduling can uniformly manage computing resources, memory resources and storage resources of a plurality of computing nodes (physical servers) in a server cluster, and by using a virtual machine migration technology (migrating virtual machines among different physical servers and different storage media), virtualized cluster dynamic resource scheduling migrates the virtual machines on different physical servers and different storage media, so that resource use hot spots are eliminated in time, and the utilization rate of resources is improved.
In the prior art, the storage I/O (Input/Output) control of a virtual machine includes two aspects, on one hand, storage resources are adjusted to meet business requirements: the service priority of each virtual machine is appointed by configuring rules and strategies, and when I/O congestion is detected, the storage I/O control dynamically allocates available I/O resources to the virtual machines according to the rules, so that the service level of key application is improved; on the other hand, storage allocation is automatically performed: when storage I/O control is enabled for a data store, the system will begin to monitor the device latency observed by the host in communicating with the data store, and when the latency exceeds a set threshold, the system will allocate I/O bandwidth resources to each virtual machine accessing the data store in proportion to its share.
In the virtual machine migration process, network and storage bandwidth resources of a source/destination physical server are consumed, so that the influence of high I/O impact of virtual machine migration on the online virtual machine service needs to be considered to be minimum in the virtual machine migration process.
However, in the prior art, the I/O request of the service inside the virtual machine is only limited to be adjusted and controlled, the I/O request of the service outside the virtual machine, which is generated by management operations such as virtual machine creation and virtual machine migration, is not adjusted and controlled, the storage bandwidth occupied by each virtual machine migration task is not controlled, and the virtual machine migration operation may cause the data storage of the physical server to reach the performance bottleneck, thereby causing a great influence on the service inside the virtual machine, and possibly causing the service inside the virtual machine to be interrupted.
Disclosure of Invention
Embodiments of the present invention provide an input/output traffic control method and device, which can control bandwidth traffic of an external service of a virtual machine, can effectively reduce an influence on an internal service of the virtual machine when the external service of the virtual machine is executed, and ensure that the internal service of the virtual machine can normally run.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides an input/output flow control method, including:
adjusting the bandwidth for executing the external service of the virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidths of all the virtual machines, wherein N is more than or equal to 1 and is an integer;
and acquiring the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment according to performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th moment, the bandwidth used for executing the external service of the virtual machine is adjusted according to the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment is not more than the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment.
With reference to the first aspect, in a first possible implementation manner,
before the executing the virtual machine external service according to the bandwidth upper limit usable for executing the virtual machine external service at the nth time, the method further includes:
judging whether the external service of the virtual machine meets the execution condition;
if the external service of the virtual machine does not meet the execution condition, the external service of the virtual machine is not executed for the moment, and the judgment of whether the external service of the virtual machine meets the execution condition or not is executed again after a preset time interval;
if the external service of the virtual machine meets the execution condition, acquiring an initial bandwidth upper limit for executing the external service of the virtual machine, wherein the initial bandwidth upper limit is a bandwidth upper limit which can be used for executing the external service of the virtual machine when the N is equal to 1.
With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner,
after the acquiring, at the nth +1 th time, the bandwidth upper limit usable for executing the external service of the virtual machine according to the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage amount for executing the external service of the virtual machine, and the bandwidth used by all the virtual machines, so that when the external service of the virtual machine is executed at the nth +1 th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the bandwidth upper limit usable for executing the external service of the virtual machine at the nth +1 th time, so that the bandwidth used for executing the external service of the virtual machine at the nth +1 th time does not exceed the bandwidth upper limit usable for executing the external service of the virtual machine at the nth +1 th time, the method further includes:
and judging whether the external service of the virtual machine is finished, if not, adding 1 to the N value, repeatedly executing the steps of adjusting the execution bandwidth according to the available bandwidth upper limit at the Nth moment and monitoring the related data at the Nth moment, and acquiring the available bandwidth upper limit at the N +1 th moment according to the related data obtained by monitoring at the Nth moment and adjusting the execution bandwidth not to exceed the available bandwidth upper limit at the N +1 th moment until the external service of the virtual machine is finished.
With reference to the first aspect, in a third possible implementation manner,
the virtual machine external traffic is a single node virtual machine migration within the first node,
the adjusting, according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the nth time, the bandwidth for executing the external service of the virtual machine so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitoring the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage for executing the external service of the virtual machine, and the bandwidth used by all the virtual machines, includes:
adjusting the bandwidth for executing the migration of the single-node virtual machine according to the upper limit of the bandwidth which can be used for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the upper limit of the available bandwidth, and monitoring performance data of data storage of the first node, the bandwidth usage amount of the first node for executing the migration of the single-node virtual machine and the bandwidth used by all the virtual machines on the first node when executing the migration of the single-node virtual machine at the Nth moment;
the method for adjusting the bandwidth used for executing the external service of the virtual machine according to the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time when the performance data stored when the external service of the virtual machine is executed at the N th time, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all the virtual machines are acquired at the N +1 th time so that the bandwidth used for executing the external service of the virtual machine at the N +1 th time is not more than the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time includes:
acquiring an available upper limit of the bandwidth for executing the single-node virtual machine migration on the first node at the N +1 th moment according to the performance data of the data storage of the first node, the bandwidth usage amount for executing the single-node virtual machine migration on the first node and the bandwidth used by all virtual machines on the first node when executing the single-node virtual machine migration at the N +1 th moment as input parameters of a bandwidth iteration algorithm, so that when executing the single-node virtual machine migration at the N +1 th moment, and adjusting the bandwidth used for executing the migration of the single-node virtual machine according to the upper limit of the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment, so that the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment does not exceed the upper limit of the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment.
With reference to the first aspect, in a fourth possible implementation manner,
the virtual machine external traffic is a dual-node virtual machine migration between the first node and a second node,
the adjusting, according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the nth time, the bandwidth for executing the external service of the virtual machine so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitoring the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage for executing the external service of the virtual machine, and the bandwidth used by all the virtual machines, includes:
adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the upper limit of the bandwidth available for executing the migration of the dual-node virtual machine at the Nth moment, so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the upper limit of the available bandwidth, respectively monitoring performance data of data storage of the first node and the second node when executing the migration of the dual-node virtual machine at the Nth moment, respectively monitoring the bandwidth usage amount of the first node and the second node for executing the migration of the dual-node virtual machine, and respectively monitoring the bandwidth used by all the virtual machines on the first node and the second node;
the adjusting, according to performance data stored when the external service of the virtual machine is executed at the nth time, a bandwidth usage amount for executing the external service of the virtual machine, and bandwidths used by all the virtual machines, so that when the external service of the virtual machine is executed at the N +1 th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to a bandwidth upper limit that can be used for executing the external service of the virtual machine at the N +1 th time, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the bandwidth upper limit that can be used for executing the external service of the virtual machine at the N +1 th time, includes:
acquiring a first bandwidth upper limit available for executing the dual-node virtual machine migration on the first node at the N +1 th moment according to performance data stored in data of the first node when the dual-node virtual machine migration is executed at the N th moment, a bandwidth usage amount for executing the dual-node virtual machine migration on the first node and a bandwidth used by all virtual machines on the first node as input parameters of a bandwidth iterative algorithm, so that when the dual-node virtual machine migration is executed on the first node at the N +1 th moment, a bandwidth used for executing the dual-node virtual machine migration on the first node is adjusted according to the first bandwidth upper limit available for executing the dual-node virtual machine migration on the first node at the N +1 th moment, and a bandwidth used for executing the dual-node virtual machine migration on the first node at the N +1 th moment is not more than the N +1 th moment Inscribing a first bandwidth upper limit available for executing the dual-node virtual machine migration on the first node;
acquiring a second available upper limit of bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment according to the performance data of the data storage of the second node when the migration of the dual-node virtual machine is executed at the N th moment, the bandwidth usage amount of executing the migration of the dual-node virtual machine on the second node and the bandwidth used by all the virtual machines on the second node as input parameters of a bandwidth iterative algorithm, so that when the migration of the dual-node virtual machine is executed on the second node at the N +1 th moment, the bandwidth used for executing the migration of the dual-node virtual machine on the second node is adjusted according to the second available upper limit of bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment, and the bandwidth used for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment does not exceed the N +1 th moment Inscribing a second available bandwidth upper limit for executing the dual-node virtual machine migration on the second node;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as a bandwidth upper limit which can be used for executing the dual-node virtual machine migration at the N +1 th moment on the first node and the second node;
if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the bandwidth upper limit which can be used for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node.
With reference to the first possible implementation manner of the first aspect, in a fifth possible implementation manner,
the external service of the virtual machine is migration of a single-node virtual machine in a first node, and the judging whether the external service of the virtual machine meets the execution condition includes:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the preset upper limit of the sum of the bandwidths which can be used by all the services on each single node;
and if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, determining that the migration of the single-node virtual machine meets the execution condition.
With reference to the first possible implementation manner of the first aspect, in a sixth possible implementation manner,
the external service of the virtual machine is the migration of the dual-node virtual machine between the first node and the second node, and the judging whether the external service of the virtual machine meets the execution condition includes:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
judging whether the average bandwidth used by all services on the second node is larger than a preset minimum average bandwidth or not, or judging whether the sum of the bandwidths used by all the services on the second node is smaller than a preset upper limit of the sum of the bandwidths;
if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, and the average bandwidth used by all services on the second node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the second node is less than the upper limit of the sum of the bandwidths, it is determined that the migration of the dual-node virtual machine meets the execution condition.
With reference to the first possible implementation manner of the first aspect, in a seventh possible implementation manner,
the external service of the virtual machine is migration of a single-node virtual machine in a first node, and the obtaining of the initial bandwidth upper limit for executing the external service of the virtual machine comprises:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm.
With reference to the first possible implementation manner of the first aspect, in an eighth possible implementation manner,
the external service of the virtual machine is the migration of the dual-node virtual machine between a first node and a second node, and the acquiring of the initial bandwidth upper limit for executing the external service of the virtual machine comprises:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the second node from the total bandwidth of the storage device of the second node;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the second initial bandwidth algorithm;
if the obtained first initial bandwidth upper limit for executing the external service of the virtual machine on the first node is the same as the obtained second initial bandwidth upper limit for executing the external service of the virtual machine on the second node, taking the first initial bandwidth upper limit or the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node;
if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node.
With reference to the third or fourth possible implementation manner of the first aspect, in a ninth possible implementation manner, the bandwidth iteration algorithm includes:
Ti(t)=(1-μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein, Ti (t) is the usable bandwidth usage of the ith migration service at the time t, Ti (t-1) is the usable bandwidth usage of the ith migration service at the time (t-1), E (t-1) is the performance data stored in the data at the time (t-1), mu is a weighted average factor, delta is the performance data threshold for judging whether the data storage reaches the bottleneck, theta is a parameter for measuring the bandwidth usage trend of the online virtual machine,
Figure BDA0000467215760000091
bvm (t) is the storage bandwidth amount used by all online virtual machines at the time t, beta represents the weight of the designated I/O service, and the setting range of beta is 0-4.
With reference to the seventh or eighth possible implementation manner of the first aspect, in a tenth possible implementation manner, the first initial bandwidth algorithm and the second initial bandwidth algorithm include:
the first initial bandwidth algorithm comprises: t1= (W1/W2) × T2
The method comprises the following steps that T1 is an initial bandwidth upper limit of external services of a virtual machine to be processed currently, T2 and W2 are respectively a bandwidth and a weight of the external services of the virtual machine to be processed currently, W1 is a weight of the external services of the virtual machine to be processed currently, Tmin1 is a preset minimum bandwidth which can be used by the external services of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external services of the virtual machine on each single node; when T1< Tmin1, then T1= Tmin1 is set, and when T1> Tmax, then T1= Tmax is set;
the second initial bandwidth algorithm comprises: t3= (W3/Wavg) × Tavg
The method comprises the following steps that T3 is the initial bandwidth upper limit of the external service of the virtual machine to be processed currently, W3 is the weight of the external service of the virtual machine to be processed currently, Tavg is the average bandwidth of multiple external services of the virtual machine being processed, Tmin1 is the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; wavg is the average weight of the traffic outside the virtual machine under process, and when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
In a second aspect, an embodiment of the present invention provides an input/output flow control apparatus, comprising:
the monitoring unit is used for adjusting the bandwidth for executing the external service of the virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidths of all the virtual machines, wherein N is more than or equal to 1 and is an integer;
a first obtaining unit, configured to obtain, according to performance data stored when the virtual machine external service is executed at an nth time, a bandwidth usage amount for executing the virtual machine external service, and a bandwidth used by all the virtual machines, an upper limit of a bandwidth usable for executing the virtual machine external service at an N +1 th time;
a bandwidth control unit, configured to, when the external service of the virtual machine is executed at a time N +1, adjust a bandwidth used for executing the external service of the virtual machine according to a bandwidth upper limit that can be used for executing the external service of the virtual machine at the time N +1, so that the bandwidth used for executing the external service of the virtual machine at the time N +1 does not exceed the bandwidth upper limit that can be used for executing the external service of the virtual machine at the time N + 1.
With reference to the second aspect, in a first possible implementation manner,
the apparatus further comprises:
a first judging unit, configured to judge whether the external service of the virtual machine satisfies an execution condition before the external service of the virtual machine is executed according to an upper limit of a bandwidth available for executing the external service of the virtual machine at an nth time;
a suspending unit, configured to temporarily not execute the external service of the virtual machine if the external service of the virtual machine does not satisfy the execution condition, and execute, by a second determining unit after a preset time interval, the determination of whether the external service of the virtual machine satisfies the execution condition;
a second obtaining unit, configured to obtain an initial bandwidth upper limit for executing the external service of the virtual machine if the external service of the virtual machine meets the execution condition, where the initial bandwidth upper limit is a bandwidth upper limit that can be used for executing the external service of the virtual machine when N is equal to 1.
With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner,
the apparatus further comprises:
a second determining unit, configured to determine whether the external service of the virtual machine is ended after the bandwidth used for executing the external service of the virtual machine at the N +1 th time is adjusted according to the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time when the external service of the virtual machine is executed at the N +1 th time by obtaining the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time according to the performance data stored when the external service of the virtual machine is executed at the N th time, the bandwidth used for executing the external service of the virtual machine, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time, and if the external service of the virtual machine is not ended, adding 1 to the value N, the monitoring unit adjusting the bandwidth for executing the external service of the virtual machine according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidth of all the virtual machines, wherein N is not less than 1 and is an integer, the first acquisition unit executing the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the Nth moment according to the performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidth of all the virtual machines at the Nth +1 moment, when executing the external service of the virtual machine at the (N + 1) th moment, the bandwidth control unit adjusts the bandwidth used for executing the external service of the virtual machine according to the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment, so that the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment does not exceed the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment until the external service of the virtual machine is finished.
With reference to the second aspect, in a third possible implementation manner,
the monitoring unit is specifically configured to:
adjusting the bandwidth for executing the migration of the single-node virtual machine according to the upper limit of the bandwidth which can be used for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the upper limit of the available bandwidth, and monitoring performance data of data storage of the first node, the bandwidth usage amount of the first node for executing the migration of the single-node virtual machine and the bandwidth used by all the virtual machines on the first node when executing the migration of the single-node virtual machine at the Nth moment;
the first obtaining unit is specifically configured to:
acquiring an available upper limit of the bandwidth for executing the single-node virtual machine migration on the first node at the N +1 th moment according to the performance data stored in the data of the first node when the single-node virtual machine migration is executed at the N th moment, the bandwidth usage amount for executing the single-node virtual machine migration on the first node and the used bandwidth of all virtual machines on the first node as input parameters of a bandwidth iteration algorithm;
the control bandwidth unit is specifically configured to:
when the single-node virtual machine migration is executed at the N +1 th moment, adjusting the bandwidth used by the first node for executing the single-node virtual machine migration according to the available bandwidth upper limit of the single-node virtual machine migration executed at the N +1 th moment, so that the bandwidth used by the first node for executing the single-node virtual machine migration at the N +1 th moment does not exceed the available bandwidth upper limit of the single-node virtual machine migration executed at the N +1 th moment.
In combination with the second aspect, in a fourth possible implementation manner,
the virtual machine external traffic is a dual-node virtual machine migration between the first node and a second node,
the monitoring unit is specifically configured to:
adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the upper limit of the bandwidth available for executing the migration of the dual-node virtual machine at the Nth moment, so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the upper limit of the available bandwidth, respectively monitoring performance data of data storage of the first node and the second node when executing the migration of the dual-node virtual machine at the Nth moment, respectively monitoring the bandwidth usage amount of the first node and the second node for executing the migration of the dual-node virtual machine, and respectively monitoring the bandwidth used by all the virtual machines on the first node and the second node;
the first obtaining unit is specifically configured to:
acquiring a usable first bandwidth upper limit for executing the dual-node virtual machine migration on the first node at the N +1 th moment according to the performance data stored in the data of the first node when the dual-node virtual machine migration is executed at the N th moment, the bandwidth usage amount for executing the dual-node virtual machine migration on the first node and the used bandwidth of all virtual machines on the first node as input parameters of a bandwidth iteration algorithm;
acquiring a second available upper limit of the bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment according to the performance data stored in the data of the second node when the migration of the dual-node virtual machine is executed at the N th moment, the bandwidth usage amount for executing the migration of the dual-node virtual machine on the second node and the bandwidth used by all the virtual machines on the second node as input parameters of a bandwidth iteration algorithm;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as a bandwidth upper limit which can be used for executing the dual-node virtual machine migration at the N +1 th moment on the first node and the second node;
if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the available bandwidth upper limit for executing the dual-node virtual machine migration at the N +1 th moment on the first node and the second node;
the control bandwidth unit is specifically configured to:
when the dual-node virtual machine migration is executed at the N +1 th moment, adjusting the bandwidth used by the first node and the second node for executing the dual-node virtual machine migration according to the available bandwidth upper limit of the dual-node virtual machine migration executed at the N +1 th moment, so that the bandwidth used by the first node and the second node for executing the dual-node virtual machine migration at the N +1 th moment does not exceed the available bandwidth upper limit of the dual-node virtual machine migration executed at the N +1 th moment.
With reference to the first possible implementation manner of the second aspect, in a fifth possible implementation manner,
the external service of the virtual machine is migration of a single-node virtual machine in a first node, and the first determining unit is specifically configured to:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the preset upper limit of the sum of the bandwidths which can be used by all the services on each single node;
and if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, determining that the migration of the single-node virtual machine meets the execution condition.
With reference to the second aspect, in a sixth possible implementation manner,
the external service of the virtual machine is migration of a dual-node virtual machine between the first node and the second node, and the first determining unit is specifically configured to:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
judging whether the average bandwidth used by all services on the second node is larger than a preset minimum average bandwidth or not, or judging whether the sum of the bandwidths used by all the services on the second node is smaller than a preset upper limit of the sum of the bandwidths;
if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, and the average bandwidth used by all services on the second node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the second node is less than the upper limit of the sum of the bandwidths, it is determined that the migration of the dual-node virtual machine meets the execution condition.
With reference to the first possible implementation manner of the second aspect, in a seventh possible implementation manner,
the external service of the virtual machine is migration of a single-node virtual machine in the first node, and the second obtaining unit is specifically configured to:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm.
With reference to the first possible implementation manner of the second aspect, in an eighth possible implementation manner,
the external service of the virtual machine is migration of a dual-node virtual machine between the first node and a second node, and the second obtaining unit is specifically configured to:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the second node from the total bandwidth of the storage device of the second node;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the second initial bandwidth algorithm;
if the obtained first initial bandwidth upper limit for executing the external service of the virtual machine on the first node is the same as the obtained second initial bandwidth upper limit for executing the external service of the virtual machine on the second node, taking the first initial bandwidth upper limit or the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node;
if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node.
With reference to the third or fourth possible implementation manner of the second aspect, in a ninth possible implementation manner,
the bandwidth iteration algorithm comprises the following steps:
Ti(t)=(1―μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein, Ti (t) is the usable bandwidth usage of the ith migration service at the time t, Ti (t-1) is the usable bandwidth usage of the ith migration service at the time (t-1), E (t-1) is the performance data stored in the data at the time (t-1), mu is a weighted average factor, delta is the performance data threshold for judging whether the data storage reaches the bottleneck, theta is a parameter for measuring the bandwidth usage trend of the online virtual machine,
Figure BDA0000467215760000171
bvm (t) is the storage bandwidth amount used by all online virtual machines at the time t, beta represents the weight of the designated I/O service, and the setting range of beta is 0-4.
With reference to the seventh or eighth possible implementation manner of the second aspect, in a tenth possible implementation manner,
the first initial bandwidth algorithm and the second initial bandwidth algorithm comprise:
the first initial bandwidth algorithm comprises: t1= (W1/W2) × T2
The method comprises the following steps that T1 is an initial bandwidth upper limit of external services of a virtual machine to be processed currently, T2 and W2 are respectively a bandwidth and a weight of the external services of the virtual machine to be processed currently, W1 is a weight of the external services of the virtual machine to be processed currently, Tmin1 is a preset minimum bandwidth which can be used by the external services of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external services of the virtual machine on each single node; when T1< Tmin1, then T1= Tmin1 is set, and when T1> Tmax, then T1= Tmax is set;
the second initial bandwidth algorithm comprises: t3= (W3/Wavg) × Tavg
The method comprises the following steps that T3 is the initial bandwidth upper limit of the external service of the virtual machine to be processed currently, W3 is the weight of the external service of the virtual machine to be processed currently, Tavg is the average bandwidth of multiple external services of the virtual machine being processed, Tmin1 is the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; wavg is the average weight of the traffic outside the virtual machine under process, and when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
The embodiment of the invention provides an input/output flow control method and equipment, wherein the bandwidth of executing the external service of a virtual machine is adjusted according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment, so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and the performance data of data storage, the bandwidth usage for executing the external service of the virtual machine and the used bandwidth of all virtual machines are monitored when the external service of the virtual machine is executed at the Nth moment, wherein N is more than or equal to 1 and is an integer; and acquiring the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment according to performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th moment, the bandwidth used for executing the external service of the virtual machine is adjusted according to the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment is not more than the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment. Therefore, the influence on the internal service of the virtual machine can be effectively reduced by controlling the bandwidth flow of the virtual machine migration task, and the internal service of the virtual machine can be ensured to run normally.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first flowchart illustrating an input/output flow control method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a data center according to an embodiment of the present invention;
fig. 3 is a second flowchart illustrating an input/output flow control method according to an embodiment of the present invention;
fig. 4 is a third schematic flowchart of an input/output flow control method according to an embodiment of the present invention;
fig. 5 is a first schematic structural diagram of an input/output flow control device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an input/output flow control device according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating an effect of performing single-node virtual machine migration according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an effect of performing a dual-node virtual machine migration according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another input/output flow control device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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.
An embodiment of the present invention provides an input/output flow control method, as shown in fig. 1, the method including:
101. adjusting the bandwidth of executing the external service of the virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount of executing the external service of the virtual machine and the used bandwidth of all the virtual machines, wherein N is more than or equal to 1 and is an integer.
102. And acquiring the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th moment according to the performance data stored when the external service of the virtual machine is executed at the (N) th moment, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th moment, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th moment, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment does not exceed.
It should be noted that, in the embodiment provided by the present invention, the nth time and the N +1 th time are any two adjacent times within a time range for executing the same external service of the virtual machine, and a time sequence relationship exists between the two times. For example, the nth time is the 2 nd minute for executing the external service of the virtual machine, the (N + 1) th time is the 3 rd minute for executing the external service of the virtual machine, in this example, the time unit is selected from minutes, and in practice, the time unit may be selected as needed, which is not limited in the present invention.
The embodiment of the invention provides an input/output flow control method, which adjusts the bandwidth for executing the external service of a virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment, so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitors performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all virtual machines, wherein N is more than or equal to 1 and is an integer; and acquiring the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time according to the performance data stored when the external service of the virtual machine is executed at the (N) th time, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th time does not exceed. Therefore, the influence on the internal service of the virtual machine can be effectively reduced by controlling the bandwidth flow of the virtual machine migration task, and the internal service of the virtual machine can be ensured to run normally.
In order to enable those skilled in the art to more clearly understand the technical solution provided by the embodiment of the present invention, the following describes in detail the input/output flow control method provided by the embodiment of the present invention through a specific embodiment:
before describing the input/output flow control method provided by this embodiment in detail, a system architecture of an application scenario of the present invention is briefly introduced, and a schematic diagram of an architecture of a data center is shown in fig. 2:
the management node manages the whole data center, provides functions of life cycle management, resource scheduling management, operation and maintenance and the like of the computing node/virtual machine, and is a central pivot of the whole data center.
Clustering is a logical concept consisting of multiple compute nodes and providing some high-level functions at granularity, such as resource scheduling, high availability, etc.
Compute nodes are physical servers that provide a stand-alone virtualization function, on which multiple virtual machines are typically run.
A data center typically contains a plurality of clusters and computing nodes.
In an embodiment of the present invention, the virtual machine external service includes: single-node virtual machine migration (virtual machine storage migration) and dual-node virtual machine migration (virtual machine whole machine migration).
When the external service of the virtual machine is the migration of the single-node virtual machine, as shown in fig. 3, the method for controlling the input/output traffic provided by the embodiment of the present invention includes:
201. and judging whether the migration of the single-node virtual machine meets the execution condition.
Specifically, when the external service of the virtual machine is the migration of the single-node virtual machine, whether the average bandwidth used by all the services on the first node is greater than the preset minimum average bandwidth required by all the services on each single node or whether the sum of the bandwidths used by all the services on the first node is less than the preset upper limit of the sum of the bandwidths that can be used by all the services on each single node is judged;
and if the average bandwidth used by all the services on the first node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths, determining that the I/O service meets the execution condition.
Illustratively, suppose the average bandwidth and the sum of the bandwidths used by all the services on node 1 are denoted as Tm and Tn, respectively;
and if Tn is less than Tlim or Tm is more than Tmin, executing the single-node virtual machine migration, wherein Tlim is the preset upper limit of the sum of the bandwidths which can be used by all the services on each single node, and Tmin is the preset minimum average bandwidth which needs to be used by all the services on each single node.
202. If the execution condition is not satisfied, execution is performed after a preset time interval 201.
For example, assuming that the preset time interval is 10s, if the execution condition is not satisfied, the determination of whether the execution condition is satisfied is performed again after 10s has elapsed since the last determination that the execution condition is not satisfied.
203. And if the execution condition is met, acquiring an initial bandwidth upper limit for executing the migration of the single-node virtual machine.
Specifically, when the external service of the virtual machine is migration of a single-node virtual machine in the first node, the first method for obtaining the initial bandwidth upper limit for executing the migration of the single-node virtual machine includes:
if the first node does not have any other external service except the internal service of the virtual machine, the upper limit of the initial bandwidth of the migration of the first arriving single-node virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the single-node virtual machine migration to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the single-node virtual machine migration to be processed currently according to a second initial bandwidth algorithm.
For example, assuming that the first node is node 1, and except for the internal traffic of the virtual machine on node 1, if there is no external traffic of any other virtual machine, the initial bandwidth upper limit of the migration of the first arriving single-node virtual machine is Tmin1 ≦ T ≦ Tmax;
the Tmin1 is a preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external service of the virtual machine on each single node;
when only one external service of the virtual machine is being processed on the node 1, the initial bandwidth upper limit of the migration of the currently-to-be-processed single-node virtual machine is T1= (W1/W2) × T2;
wherein, T2 and W2 are respectively the bandwidth and weight of the external traffic of the virtual machine being processed, W1 is the weight of the migration of the single-node virtual machine currently to be processed, when T1< Tmin1, T1= Tmin1 is set, and when T1> Tmax, T1= Tmax is set;
when multiple virtual machine external services are concurrently processed on the node 1, the initial bandwidth upper limit of the current single-node virtual machine migration to be processed is T3= (W3/Wavg) × Tavg, where W3 is the weight of the current single-node virtual machine migration to be processed, Tavg is the average bandwidth of the multiple virtual machine external services being processed, Wavg is the average weight of the multiple virtual machine external services being processed, when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
It should be noted that the first mentioned method for allocating the initial bandwidth for executing the external service of the virtual machine can be applied to a scenario in which the efficiency of executing the migration task of the virtual machine is ensured and the internal service of the virtual machine cannot be affected.
Specifically, when the external service of the virtual machine is migration of a single-node virtual machine in the first node, the second method for obtaining the initial bandwidth upper limit for executing the migration of the single-node virtual machine includes:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the migration of the first arriving single-node virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the single-node virtual machine migration to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the single-node virtual machine migration to be processed currently according to a second initial bandwidth algorithm.
For example, assuming that the first node is node 1, and except for the internal traffic of the virtual machine on node 1, if there is no external traffic of any other virtual machine, the initial bandwidth upper limit of the migration of the first arriving single-node virtual machine is T4 ≦ Tmin 1;
the Tmin1 is a preset minimum bandwidth which can be used by external services of the virtual machine on each single node; tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node;
when only one virtual machine external service is being processed on the node 1, the initial bandwidth upper limit of the single-node virtual machine migration to be currently processed is T5= (W5/W4) × T4, where W5 is the weight of the single-node virtual machine migration to be currently processed, T4 and W4 are the bandwidth and the weight of the virtual machine external service to be processed, respectively, when T5< Tmin1, T5= Tmin1 is set, and when T5> Tmax, T5= Tmax is set;
on the node 1, when multiple virtual machine external services are concurrently processed, the initial bandwidth upper limit of the single-node virtual machine migration currently to be processed is T6= (W6/Wavg1) × Tavg1, where W6 is the weight of the single-node virtual machine migration currently to be processed, Tavg1 is the average bandwidth of the multiple virtual machine external services being processed, Wavg1 is the average weight of the multiple virtual machine external services being processed, when T6< Tmin1, T6= Tmin1 is set, and when T6> Tmax, T6= Tmax is set.
It should be noted that the second method for allocating the initial bandwidth for executing the external service of the virtual machine mentioned above can be applied to a scenario that does not affect the internal service of the virtual machine without excessively pursuing the efficiency of executing the virtual machine migration task.
Specifically, when the external service of the virtual machine is migration of a single-node virtual machine in the first node, the third method for obtaining the initial bandwidth upper limit for executing the migration of the single-node virtual machine includes:
if the first node does not have any other external service except the internal service of the virtual machine, the migration initial bandwidth upper limit of the first arriving single-node virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the first node from the total bandwidth of the storage device of the first node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the single-node virtual machine migration to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the single-node virtual machine migration to be processed currently according to a second initial bandwidth algorithm.
For example, assuming that the first node is node 1, and if there is no other virtual machine external traffic except for the virtual machine internal traffic on node 1, the initial bandwidth upper limit of migration of the first arriving single-node virtual machine is Ta, Ta = Ts-Tvm, where Ts is the total bandwidth of the storage device of the single node, Tvm is the bandwidth already used by all virtual machines on node 1, and Ta is the remaining bandwidth;
when only one virtual machine external service is being processed on the node 1, the initial bandwidth upper limit of the current single-node virtual machine migration to be processed is T7= (W7/W8) × Ta, wherein W7 is the weight of the current single-node virtual machine migration to be processed, W8 is the weight of the virtual machine external service to be processed, when T7< Tmin1, T7= Tmin1 is set, and when T7> Tmax, T7= Tmax is set;
when a plurality of virtual machine external services are concurrently processed on the node 1, the initial bandwidth upper limit of the current single-node virtual machine migration to be processed is T9= (W9/Wsum)) × Ta, where W9 is the weight of the current single-node virtual machine migration to be processed, Wsum is the total weight of the plurality of virtual machine external services being processed, when T9< Tmin1, T9= Tmin1 is set, and when T9> Tmax, T9= Tmax is set.
It should be noted that the third method for allocating the initial bandwidth for executing the external service of the virtual machine mentioned above can be applied to a scenario where the efficiency of executing the virtual machine migration task is ensured as much as possible and the impact on the internal service of the virtual machine is small.
204. Adjusting the bandwidth for executing the migration of the single-node virtual machine according to the available upper limit of the bandwidth for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data of data storage of the single node, the bandwidth usage amount of the migration of the single-node virtual machine executed on the single node and the used bandwidth of all virtual machines on the single node when the migration of the single-node virtual machine is executed at the Nth moment, wherein N is more than or equal to 1 and is an integer.
Specifically, the bandwidth for executing the migration of the single-node virtual machine at the nth time is set according to the upper limit of the bandwidth available for executing the migration of the single-node virtual machine at the nth time, the migration of the single-node virtual machine is executed according to the set bandwidth, and the performance data of the data storage of the single node, the usage amount of the bandwidth for executing the migration of the single-node virtual machine, and the bandwidth used by all virtual machines on the single node when the migration of the single-node virtual machine is executed at the nth time are monitored.
For example, the performance data of the data storage needs to be obtained by the following formula, and the symbols and meanings used in the formula are shown in the following table:
symbol Meaning (unit)
E(t) Performance data for data storage at time t
C(t) Cpu utilization at time t
R(t) Read I/OPS for data storage at time t
W(t) Write I/OPS for data storage at time t
At(t) Average I/O latency on data store at time t
Svc(t) Average I/O processing time on data store at time t
Ui(t) Utilization rate of data storage request pairs at time t
Wi Weight of a certain data dimension
α Smoothing factor
It should be noted that, the remaining data parameters in the table may be obtained from the system log record of the server or set as needed, for example, I/OPS (Input/Output Operations Per Second).
Calculating performance data for the data store:
E(t)=W1×C(t)+W2×R(t)+W3×W(t)
+W4×At(t)+W5×Svc(t)+W6×Ui(t)
typically to reduce jitter of two samples, it is necessary to average the performance data of the data storage:
E(t)=E(t-1)×(1-α)+E(t)×α
alternatively, in order to improve the stability of the feedback control, the jitter must be reduced as much as possible for the input parameters, so the data collected N times before use can be considered, and then weighted average is performed, and the calculation formula is as follows:
<math> <mrow> <mi>E</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <msub> <mi>W</mi> <mi>i</mi> </msub> <mo>&times;</mo> <mi>E</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>-</mo> <mi>i</mi> <mo>)</mo> </mrow> </mrow> </math> wherein, <math> <mrow> <munderover> <mi>&Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <msub> <mi>W</mi> <mi>i</mi> </msub> <mo>=</mo> <mn>1</mn> </mrow> </math>
in addition, it should be noted that, in the embodiment provided by the present invention, the nth time and the N +1 th time are any two adjacent times within a time range of executing the same external service of the virtual machine, and a time sequence relationship exists between the nth time and the N +1 th time. For example, the nth time is the 2 nd minute for executing the migration of the single-node virtual machine, the (N + 1) th time is the 3 rd minute for executing the migration of the single-node virtual machine, in this example, the time unit is selected from minutes, and in practice, the time unit may be selected as needed, which is not limited in the present invention.
205. And acquiring the available upper limit of the bandwidth for executing the migration of the single-node virtual machine on the single node at the (N + 1) th moment according to the performance data stored in the data of the single node when the migration of the single-node virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the migration of the single-node virtual machine on the single node and the used bandwidth of all the virtual machines on the single node.
Specifically, when the external service of the virtual machine is the migration of the single-node virtual machine in the first node,
acquiring performance data of data storage, bandwidth usage amount for executing migration of the single-node virtual machine and used bandwidth of all the virtual machines when the single-node virtual machine migration is executed at the Nth moment on the first node;
and taking the performance data stored when the single-node virtual machine migration is executed at the Nth moment on the first node, the bandwidth usage amount for executing the single-node virtual machine migration and the used bandwidth of all the virtual machines as input parameters of a bandwidth iteration algorithm to obtain the available bandwidth upper limit for executing the single-node virtual machine migration at the N +1 th moment.
Illustratively, the symbols and meanings used by the bandwidth iteration algorithm are shown in the following table:
according to the performance index of data storage, the bandwidth use condition of the online virtual machine, the migration bandwidth at the time t-1 is calculated, and the formula is as follows:
Ti(t)=(1―μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein,
Figure BDA0000467215760000271
mu is a weighted average factor, delta represents a threshold value when the storage performance of the designated data reaches a bottleneck, beta represents a priority weight of the designated I/O service, the setting range of beta is 0-4, wherein beta = k multiplied by w, w represents the priority, k is set according to the value range of w, and k ensures that the calculated beta is within the range of 0-4.
206. When the single-node virtual machine migration is executed at the N +1 th moment, the bandwidth used when the single-node virtual machine migration is executed is adjusted according to the available bandwidth upper limit when the single-node virtual machine migration is executed on the single node at the N +1 th moment, so that the bandwidth used when the single-node virtual machine migration is executed on the single node at the N +1 th moment does not exceed the available bandwidth upper limit when the single-node virtual machine migration is executed on the single node at the N +1 th moment.
Illustratively, Cgroups (control groups) is a mechanism provided by the Linux kernel that can limit, record, and isolate physical resources (such as memory, I/O, and the like) used by process groups, and can limit the bandwidth when performing single-node virtual machine migration through Cgroups. For example, assuming that the upper limit of the bandwidth for performing the single-node virtual machine migration in the 2 nd minute obtained in step 205 is 10M (megabyte), the bandwidth for performing the single-node virtual machine migration in the 2 nd minute is limited by Cgroups, so that the bandwidth for performing the single-node virtual machine migration in the 2 nd minute does not exceed 10M.
207. And judging whether the migration of the single-node virtual machine is finished or not.
208. And if the migration of the single-node virtual machine is not finished, adding 1 to the value of N, and executing 204 to 207.
209. And completing migration execution of the single-node virtual machine.
It should be noted that the bandwidth feedback control described in step 204, step 205, and step 206 is continued from the start of migration of the single-node virtual machine to the end of migration, so that the whole process of migration of the single-node virtual machine can be effectively controlled, the influence on the internal service of the virtual machine is reduced to the minimum, or even no influence on the internal service of the virtual machine is obtained, and the migration of the single-node virtual machine is completed without the perception of the user.
When the external service of the virtual machine is the migration of the dual-node virtual machine, as shown in fig. 4, the method for controlling the input/output traffic provided by the embodiment of the present invention includes:
301. and judging whether the migration of the double-node virtual machine meets the execution condition.
Specifically, when the external service of the virtual machine is a dual-node virtual machine migration between a first node and a second node, whether an average bandwidth used by all services on the first node is greater than a preset minimum average bandwidth required by all services on each single node or whether the sum of bandwidths used by all services on the first node is less than the upper limit of the sum of bandwidths that can be used by all services on each single node is judged;
judging whether the average bandwidth used by all services on the second node is larger than the preset minimum average bandwidth required by all services on each single node or whether the sum of the bandwidths used by all services on the second node is smaller than the preset upper limit of the sum of the bandwidths used by all services on each single node;
and if the average bandwidth used by all the services on the first node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths, and the average bandwidth used by all the services on the second node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the second node is smaller than the upper limit of the sum of the bandwidths, determining that the migration of the dual-node virtual machine meets the execution condition.
Illustratively, assuming that the first node is node 1 and the second node is node 2, the average bandwidth and the sum of the bandwidths used by all the services on node 1 are respectively represented as Tm1 and Tn1, and the average bandwidth and the sum of the bandwidths used by all the services on node 2 are respectively represented as Tm2 and Tn 2;
and if Tn1 is less than Tlim or Tm1 is more than Tmin, and Tn2 is less than Tlim or Tm2 is more than Tmin, executing the migration of the virtual machine of the double nodes, wherein Tlim is the preset upper limit of the sum of the bandwidths capable of being used by all the services on each single node, and Tmin is the preset minimum average bandwidth required by all the services on each single node.
302. If the execution condition is not satisfied, then the process is executed 301 after a preset time interval.
For example, assuming that the preset time interval is 10s, if the execution condition is not satisfied, the determination of whether the execution condition is satisfied is performed again after 10s has elapsed since the last determination that the execution condition is not satisfied.
303. And if the execution condition is met, acquiring an initial bandwidth upper limit for executing the migration of the dual-node virtual machine.
Specifically, when the external service of the virtual machine is the migration of the dual-node virtual machine between the first node and the second node, the obtaining of the initial bandwidth upper limit for executing the migration of the dual-node virtual machine includes:
if the first node does not have any other external service except the internal service of the virtual machine, the upper limit of the initial bandwidth of the migration of the first arrived double-node virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the migration of the first arrived dual-node virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the migration of the current dual-node virtual machine to be processed according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the migration of the current to-be-processed double-node virtual machine according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the upper limit of the initial bandwidth of the migration of the first arrived double-node virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the migration of the first arrived double-node virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the migration of the first arrived dual-node virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the second node from the total bandwidth of the storage device of the second node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the migration of the current dual-node virtual machine to be processed according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the migration of the current to-be-processed double-node virtual machine according to a second initial bandwidth algorithm;
if the acquired first initial bandwidth upper limit for executing the dual-node virtual machine migration on the first node is the same as the acquired second initial bandwidth upper limit for executing the dual-node virtual machine migration on the second node, taking the first initial bandwidth upper limit or the second bandwidth upper limit as the initial bandwidth upper limit for executing the dual-node virtual machine migration on the first node and the second node;
and if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the dual-node virtual machine migration on the first single node and the second single node.
It should be noted that the method provided in step 203 is also applicable to calculating and obtaining the initial bandwidth upper limit for performing the dual-node migration service on the single node.
Exemplarily, assuming that the first node is node 1 and the second node is node 2, the initial bandwidth upper limits for executing the dual-node virtual machine migration on node 1 and node 2 are respectively obtained as T10 and T11 according to the method in step 203;
if T10 and T11 are the same, the upper limit of the initial bandwidth for executing the migration of the dual-node virtual machine on the node 1 and the node 2 is T10;
if T10 and T11 are not the same, the initial bandwidth upper bound for performing the dual node virtual machine migration on node 1 and node 2 is the minimum of T10 and T11.
304. Adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the available upper limit of the bandwidth for executing the migration of the dual-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the available upper limit of the bandwidth, and monitoring the performance data of the data storage of each node, the bandwidth usage amount of the migration of the dual-node virtual machine executed on each node and the used bandwidth of all the virtual machines on each node when executing the migration of the dual-node virtual machine at the Nth moment.
Specifically, the bandwidth for executing the migration of the dual-node virtual machine at the nth time is set on each node according to the upper limit of the bandwidth available for executing the migration of the dual-node virtual machine at the nth time, the migration of the dual-node virtual machine is executed according to the set bandwidth, and the performance data of the data storage of each node, the bandwidth usage amount of the dual-node virtual machine migration executed on each node, and the bandwidth used by all the virtual machines on each node when the migration of the dual-node virtual machine is executed at the nth time are monitored.
Illustratively, the calculation method of the performance data of the data storage of each node is the same as the algorithm in step 204.
The performance data of the data storage needs to be obtained through the following formula, and the symbols and meanings used in the formula are shown in the following table:
symbol Meaning (unit)
E(t) Performance data for data storage at time t
C(t) Cpu utilization at time t
R(t) Read I/OPS for data storage at time t
W(t) Write I/OPS for data storage at time t
At(t) Average I/O latency on data store at time t
Svc(t) Average I/O processing time on data store at time t
Ui(t) Utilization rate of data storage request pairs at time t
Wi Weight of a certain data dimension
α Smoothing factor
It should be noted that the I/OPS, i.e. the number of I/O operations performed per second, and the rest of the data parameters in the table may be obtained from the system log record of the server or set as required.
Calculating performance data for the data store:
E(t)=W1×C(t)+W2×R(t)+W3×W(t)
+W4×At(t)+W5×Svc(t)+W6×Ui(t)
typically to reduce jitter of two samples, it is necessary to average the performance data of the data storage:
E(t)=E(t-1)×(1-α)+E(t)×α
alternatively, in order to improve the stability of the feedback control, the jitter must be reduced as much as possible for the input parameters, so the data collected N times before use can be considered, and then weighted average is performed, and the calculation formula is as follows:
<math> <mrow> <mi>E</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <msub> <mi>W</mi> <mi>i</mi> </msub> <mo>&times;</mo> <mi>E</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>-</mo> <mi>i</mi> <mo>)</mo> </mrow> </mrow> </math> wherein, <math> <mrow> <munderover> <mi>&Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <msub> <mi>W</mi> <mi>i</mi> </msub> <mo>=</mo> <mn>1</mn> </mrow> </math>
in addition, it should be noted that, in the embodiment provided by the present invention, the nth time and the N +1 th time are any two adjacent times within a time range of executing the same external service of the virtual machine, and a time sequence relationship exists between the nth time and the N +1 th time. For example, the nth time is the 2 nd minute for executing the migration of the dual-node virtual machine, the (N + 1) th time is the 3 rd minute for executing the migration of the dual-node virtual machine, in this example, the time unit is selected from minutes, and in practice, the time unit may be selected as needed, which is not limited in the present invention.
305. And acquiring the available upper limit of the bandwidth for executing the migration of the double-node virtual machine on each node at the N +1 th moment according to the performance data of the data storage of each node when the migration of the double-node virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the migration of the double-node virtual machine on each node and the used bandwidth of all the virtual machines on each node.
Specifically, when the external service of the virtual machine is the migration of the dual-node virtual machine between the first node and the second node,
acquiring a first bandwidth upper limit which can be used when the dual-node virtual machine migration is executed on a first node at the N +1 th moment;
acquiring a second bandwidth upper limit which can be used when the dual-node virtual machine migration is executed on a second node at the N +1 th moment;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as the available bandwidth upper limit for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node;
and if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the bandwidth upper limit which can be used for executing the external service of the virtual machine at the N +1 th moment on the first node and the second node.
For example, assuming that the first node is node 1 and the second node is node 2, the upper limits of the bandwidths that can be used for executing the migration of the dual-node virtual machine at the N +1 th time on node 1 and node 2 are respectively calculated as T12 and T13 according to the algorithm in step 205;
the algorithm in step 205 is as follows:
the symbols and meanings used by the bandwidth iteration algorithm are shown in the following table:
Figure BDA0000467215760000321
according to the performance index of data storage, the bandwidth use condition of the online virtual machine, the migration bandwidth at the time t-1 is calculated, and the formula is as follows:
Ti(t)=(1―μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein,mu is a weighted average factor, delta represents a threshold value when the storage performance of the designated data reaches a bottleneck, beta represents a priority weight of the designated I/O service, the setting range of beta is 0-4, wherein beta = k multiplied by w, w represents the priority, k is set according to the value range of w, and k ensures that the calculated beta is within the range of 0-4.
If the T12 and the T13 are the same, the upper limit of the available bandwidth for executing the migration of the dual-node virtual machine at the N +1 th time on the node 1 and the node 2 is T12 or T13;
if T12 is not the same as T13, the upper limit of the available bandwidth for performing the dual-node virtual machine migration at the N +1 th time on the node 1 and the node 2 is the minimum value of T12 and T13.
306. When the dual-node virtual machine migration is executed at the N +1 th moment, the bandwidth used when the dual-node virtual machine migration is executed is adjusted according to the available bandwidth upper limit when the dual-node virtual machine migration is executed on each node at the N +1 th moment, so that the bandwidth used when the dual-node virtual machine migration is executed on each node at the N +1 th moment does not exceed the available bandwidth upper limit when the dual-node virtual machine migration is executed on each node at the N +1 th moment.
For example, assuming that the nodes performing the dual-node virtual machine migration are node 1 and node 2, Cgroups is a mechanism provided by the Linux kernel and capable of limiting, recording, and isolating physical resources (such as memory, I/O, and the like) used by a process group, and the bandwidth when performing the dual-node virtual machine migration may be limited by Cgroups. For example, assuming that the upper limit of the bandwidth for performing the dual-node virtual machine migration on the 3 rd minute nodes 1 and 2 is 5M, which is obtained according to step 305, the bandwidth for performing the dual-node virtual machine migration on the 3 rd minute nodes 1 and 2 is limited by Cgroups, so that the bandwidth for performing the dual-node virtual machine migration on the 3 rd minute nodes 1 and 2 does not exceed 5M.
307. And judging whether the migration of the double-node virtual machine is finished or not.
308. And if the migration of the double-node virtual machine is not finished, adding 1 to the value of N and executing the steps 304 to 307.
309. And completing migration execution of the double-node virtual machine.
It should be noted that the bandwidth feedback control described in step 304, step 305, and step 306 is continued from the start of the migration of the dual-node virtual machine to the end of the migration, so that the whole migration process of the dual-node virtual machine can be effectively controlled, the influence on the internal service of the virtual machine of each node is reduced to the minimum, or even the internal service of the virtual machine is not influenced at all, and the migration of the dual-node virtual machine is completed without the perception of the user.
The embodiment of the invention provides an input/output flow control method, which adjusts the bandwidth for executing the external service of a virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment, so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitors performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all virtual machines, wherein N is more than or equal to 1 and is an integer; and acquiring the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time according to the performance data stored when the external service of the virtual machine is executed at the (N) th time, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th time does not exceed the. Therefore, the influence on the internal service of the virtual machine can be effectively reduced by controlling the bandwidth flow of the virtual machine migration task, and the internal service of the virtual machine can be ensured to run normally.
An embodiment of the present invention provides an input/output flow control apparatus 10, as shown in fig. 4, the apparatus 10 including:
the monitoring unit 11 is configured to adjust a bandwidth for executing the external service of the virtual machine according to an upper limit of a bandwidth available for executing the external service of the virtual machine at the nth time, so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitor performance data stored when the external service of the virtual machine is executed at the nth time, a bandwidth usage amount for executing the external service of the virtual machine, and bandwidths used by all the virtual machines, where N is greater than or equal to 1 and N is an integer.
A first obtaining unit 12, configured to obtain the execution of the virtual machine external service at the N +1 th time according to the performance data stored when the virtual machine external service is executed at the nth time, the bandwidth usage amount for executing the virtual machine external service, and the bandwidth used by all virtual machines.
A control bandwidth unit 13, configured to adjust, when the virtual machine external service is executed at the N +1 th time, a bandwidth used for executing the virtual machine external service according to the execution of the virtual machine external service at the N +1 th time, so that the bandwidth used for executing the virtual machine external service at the N +1 th time does not exceed the bandwidth used for executing the virtual machine external service at the N +1 th time.
Optionally, as shown in fig. 5, the apparatus 10 further includes:
a first judging unit 14, configured to judge whether the virtual machine external service satisfies the execution condition before executing the virtual machine external service according to the virtual machine external service executed at the nth time.
A suspending unit 15, configured to temporarily not execute the external service of the virtual machine if the external service of the virtual machine does not meet the execution condition, and after a preset time interval, the first determining unit 14 performs a determination of whether the external service of the virtual machine meets the execution condition.
A second obtaining unit 16, configured to obtain an initial bandwidth upper limit for executing the external service of the virtual machine if the external service of the virtual machine meets the execution condition, where the initial bandwidth upper limit is a bandwidth upper limit that can be used for executing the external service of the virtual machine when N is equal to 1.
A second determination unit 17, configured to, when acquiring the upper limit of the bandwidth available for executing the external service of the virtual machine at the N +1 th time based on the performance data stored when the external service of the virtual machine is executed at the N +1 th time, the bandwidth usage amount of the external service of the executing virtual machine, and the bandwidth already used by all the virtual machines, so that when the external service of the virtual machine is executed at the N +1 th time, adjust the bandwidth used for executing the external service of the virtual machine according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the N +1 th time, so that the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the upper limit of the bandwidth available for executing the external service of the virtual machine at the N +1 th time, determine whether the external service of the virtual machine is ended, and if the external service of the virtual machine is not ended, add the value of N to 1 to a second determination unit, configured to execute the external service of Judging whether the external service of the virtual machine is finished or not after the used bandwidth upper limit, if not, adding 1 to the value N, monitoring the bandwidth of the external service of the virtual machine by adjusting the bandwidth of the external service of the virtual machine according to the available bandwidth upper limit when the external service of the virtual machine is executed at the Nth moment so that the bandwidth of the external service of the virtual machine is not more than the available bandwidth upper limit, monitoring the performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount of the external service of the virtual machine and the used bandwidth of all the virtual machines, wherein N is more than or equal to 1 and is an integer, acquiring the bandwidth upper limit available for the external service of the virtual machine at the Nth moment according to the performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount of the external service of the virtual machine and the used bandwidth of all, the control bandwidth unit 13 adjusts the bandwidth used for executing the external service of the virtual machine according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the N +1 th time when the external service of the virtual machine is executed at the N +1 th time, so that the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the upper limit of the bandwidth available for executing the external service of the virtual machine at the N +1 th time until the external service of the virtual machine is finished.
Optionally, when the external service of the virtual machine is the migration of the single-node virtual machine in the first node,
the monitoring unit 11 is specifically configured to:
adjusting the bandwidth for executing the migration of the single-node virtual machine according to the available upper limit of the bandwidth for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the available upper limit of the bandwidth, and monitoring the performance data of the data storage of the first node, the bandwidth usage amount of the migration of the single-node virtual machine executed on the first node and the used bandwidth of all virtual machines on the first node when executing the migration of the single-node virtual machine at the Nth moment.
The first obtaining unit 12 is specifically configured to:
and acquiring the available upper limit of the bandwidth for executing the migration of the single-node virtual machine on the first node at the N +1 th moment according to the performance data stored in the data of the first node when executing the migration of the single-node virtual machine at the N th moment, the bandwidth usage amount for executing the migration of the single-node virtual machine on the first node and the used bandwidth of all the virtual machines on the first node as input parameters of a bandwidth iteration algorithm.
For example, the performance data of the data storage needs to be obtained by the following formula, and the symbols and meanings used in the formula are shown in the following table:
symbol Meaning (unit)
E(t) Performance data for data storage at time t
C(t) Cpu utilization at time t
R(t) Read I/OPS for data storage at time t
W(t) Write I/OPS for data storage at time t
At(t) Average I/O latency on data store at time t
Svc(t) Average I/O processing time on data store at time t
Ui(t) Utilization rate of data storage request pairs at time t
Wi Weight of a certain data dimension
α Smoothing factor
It should be noted that the I/OPS is the number of I/O operations per second, and the rest of data parameters in the table may be obtained from the system log record of the server or set as needed.
Calculating performance data for the data store:
E(t)=W1×C(t)+W2×R(t)+W3×W(t)
+W4×At(t)+W5×Svc(t)+W6×Ui(t)
typically to reduce jitter of two samples, it is necessary to average the performance data of the data storage:
E(t)=E(t-1)×(1-α)+E(t)×α
alternatively, in order to improve the stability of the feedback control, the jitter must be reduced as much as possible for the input parameters, so the data collected N times before use can be considered, and then weighted average is performed, and the calculation formula is as follows:
<math> <mrow> <mi>E</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <msub> <mi>W</mi> <mi>i</mi> </msub> <mo>&times;</mo> <mi>E</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>-</mo> <mi>i</mi> <mo>)</mo> </mrow> </mrow> </math> wherein, <math> <mrow> <munderover> <mi>&Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mi>n</mi> <mo>-</mo> <mn>1</mn> </mrow> </munderover> <msub> <mi>W</mi> <mi>i</mi> </msub> <mo>=</mo> <mn>1</mn> </mrow> </math>
the control bandwidth unit 13 is specifically configured to:
when the single-node virtual machine migration is executed at the N +1 th moment, the bandwidth used for executing the single-node virtual machine migration on the first node is adjusted according to the available bandwidth upper limit of the single-node virtual machine migration executed at the N +1 th moment, and the bandwidth used for executing the single-node virtual machine migration on the first node at the N +1 th moment is not more than the available bandwidth upper limit of the single-node virtual machine migration executed on the first node at the N +1 th moment.
Illustratively, the symbols and meanings used by the bandwidth iteration algorithm are shown in the following table:
Figure BDA0000467215760000373
Figure BDA0000467215760000381
according to the performance index of data storage, the bandwidth use condition of the online virtual machine, the migration bandwidth at the time t-1 is calculated, and the formula is as follows:
Ti(t)=(1―μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein,
Figure BDA0000467215760000382
mu is a weighted average factor, delta represents a threshold value when the storage performance of the designated data reaches a bottleneck, beta represents a priority weight of the designated I/O service, the setting range of beta is 0-4, wherein beta = k multiplied by w, w represents the priority, k is set according to the value range of w, and k ensures that the calculated beta is within the range of 0-4.
The first judging unit 14 is specifically configured to:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the preset upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
and if the average bandwidth used by all services on the first node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is smaller than the upper limit of the sum of the bandwidths, determining that the migration of the single-node virtual machine meets the execution condition.
Illustratively, suppose the average bandwidth and the sum of the bandwidths used by all the services on node 1 are denoted as Tm and Tn, respectively;
and if Tn is less than Tlim or Tm is more than Tmin, executing the single-node virtual machine migration, wherein Tlim is the preset upper limit of the sum of the bandwidths which can be used by all the services on each single node, and Tmin is the preset minimum average bandwidth which needs to be used by all the services on each single node.
The second obtaining unit 16 is specifically configured to:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the first node from the total bandwidth of the storage device of the first node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machine are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed according to a second initial bandwidth algorithm.
Optionally, when the external service of the virtual machine is the migration of the dual-node virtual machine between the first node and the second node,
the monitoring unit 11 is specifically configured to:
adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the available upper limit of the bandwidth for executing the migration of the dual-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the available upper limit of the bandwidth, respectively monitoring performance data of data storage of the first node and the second node when the migration of the dual-node virtual machine is executed at the Nth moment, respectively monitoring the bandwidth usage amount of the first node and the second node for executing the migration of the dual-node virtual machine, and respectively monitoring the used bandwidth of all the virtual machines on the first node and the second node.
The first obtaining unit 12 is specifically configured to:
acquiring a first available bandwidth upper limit for executing the migration of the dual-node virtual machine on the first node at the N +1 th moment according to performance data stored in data of the first node when the migration of the dual-node virtual machine is executed at the Nth moment, the bandwidth usage amount of the dual-node virtual machine executed on the first node and the used bandwidth of all virtual machines on the first node as input parameters of a bandwidth iteration algorithm;
acquiring a second available upper limit of the bandwidth for executing the migration of the double-node virtual machine on the second node at the N +1 th moment according to the performance data stored in the data of the second node when the migration of the double-node virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the migration of the double-node virtual machine on the second node and the used bandwidth of all the virtual machines on the second node as input parameters of a bandwidth iteration algorithm;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as the available bandwidth upper limit for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node;
and if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the available bandwidth upper limit for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node.
The control bandwidth unit 13 is specifically configured to:
when the dual-node virtual machine migration is executed at the N +1 th moment, adjusting the bandwidth used for executing the dual-node virtual machine migration on the first node and the second node according to the available bandwidth upper limit of the dual-node virtual machine migration executed at the N +1 th moment, so that the bandwidth used for executing the dual-node virtual machine migration on the first node and the second node at the N +1 th moment does not exceed the available bandwidth upper limit of the dual-node virtual machine migration executed at the N +1 th moment.
The first judging unit 14 is specifically configured to:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
judging whether the average bandwidth used by all services on the second node is larger than a preset minimum average bandwidth or not, or judging whether the sum of the bandwidths used by all the services on the second node is smaller than a preset upper limit of the sum of the bandwidths;
and if the average bandwidth used by all the services on the first node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths, and the average bandwidth used by all the services on the second node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the second node is smaller than the upper limit of the sum of the bandwidths, determining that the migration of the dual-node virtual machine meets the execution condition.
The second obtaining unit 16 is specifically configured to:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the first node from the total bandwidth of the storage device of the first node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machine are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the external service of the first arrived virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the second node from the total bandwidth of the storage device of the second node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machine are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the acquired first initial bandwidth upper limit for executing the external service of the virtual machine on the first node is the same as the acquired second initial bandwidth upper limit for executing the external service of the virtual machine on the second node, taking the first initial bandwidth upper limit or the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node;
and if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node.
Optionally, the bandwidth iteration algorithm includes:
Ti(t)=(1-μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein, Ti (t) is the usable bandwidth usage of the ith migration service at the time t, Ti (t-1) is the usable bandwidth usage of the ith migration service at the time (t-1), E (t-1) is the performance data stored in the data at the time (t-1), mu is a weighted average factor, delta is the performance data threshold for judging whether the data storage reaches the bottleneck, theta is a parameter for measuring the bandwidth usage trend of the online virtual machine,
Figure BDA0000467215760000421
bvm (t) is the storage bandwidth amount used by all online virtual machines at the time t, beta represents the weight of the designated I/O service, and the setting range of beta is 0-4.
Alternatively to this, the first and second parts may,
the first initial bandwidth algorithm includes: t1= (W1/W2) × T2
The method comprises the following steps that T1 is an initial bandwidth upper limit of external services of a virtual machine to be processed currently, T2 and W2 are respectively a bandwidth and a weight of the external services of the virtual machine to be processed currently, W1 is a weight of the external services of the virtual machine to be processed currently, Tmin1 is a preset minimum bandwidth which can be used by the external services of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external services of the virtual machine on each single node; when T1< Tmin1, then T1= Tmin1 is set, and when T1> Tmax, then T1= Tmax is set;
the second initial bandwidth algorithm includes: t3= (W3/Wavg) × Tavg
The method comprises the following steps that T3 is the initial bandwidth upper limit of the external service of the virtual machine to be processed currently, W3 is the weight of the external service of the virtual machine to be processed currently, Tavg is the average bandwidth of multiple external services of the virtual machine being processed, Tmin1 is the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; wavg is the average weight of the traffic outside the virtual machine under process, and when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
In order to make it clear for those skilled in the art that the input/output flow control device provided by the embodiments of the present invention is provided, the input/output flow control device is described by the following example:
fig. 7 shows an effect schematic diagram of executing migration of a single-node virtual machine when external service of the virtual machine is migration of the single-node virtual machine.
Fig. 8 shows an effect schematic diagram of executing the migration of the dual-node virtual machine when the external service of the virtual machine is the migration of the dual-node virtual machine.
The embodiment of the invention provides an input/output flow control device, which adjusts the bandwidth for executing the external service of a virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment, so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitors performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all virtual machines, wherein N is more than or equal to 1 and is an integer; and acquiring the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time according to the performance data stored when the external service of the virtual machine is executed at the (N) th time, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th time does not exceed the. Therefore, the influence on the internal service of the virtual machine can be effectively reduced by controlling the bandwidth flow of the virtual machine migration task, and the internal service of the virtual machine can be ensured to run normally.
Another input/output flow control device 90 is provided in the embodiment of the present invention, as shown in fig. 9, the device 90 includes: a bus 94; and a processor 91, a memory 92 and an interface 93 connected to a bus 94, wherein the interface 93 is used for communication; the memory 92 is configured to store instructions, and the processor 91 is configured to execute the instructions to:
adjusting the bandwidth of executing the external service of the virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount of the external service of the virtual machine and the used bandwidth of all the virtual machines, wherein N is more than or equal to 1 and is an integer;
and acquiring the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time according to the performance data stored when the external service of the virtual machine is executed at the (N) th time, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th time does not exceed the.
Optionally, the processor 91 is configured to execute the instructions further to:
before executing the external service of the virtual machine according to the available bandwidth upper limit of the external service of the virtual machine executed at the Nth moment, judging whether the external service of the virtual machine meets the execution condition;
if the external service of the virtual machine does not meet the execution condition, the external service of the virtual machine is not executed for the moment, and the external service of the virtual machine is executed again after a preset time interval to judge whether the external service of the virtual machine meets the execution condition;
if the external service of the virtual machine meets the execution condition, acquiring an initial bandwidth upper limit for executing the external service of the virtual machine, wherein the initial bandwidth upper limit is a bandwidth upper limit which can be used for executing the external service of the virtual machine when N is equal to 1.
Optionally, the processor 91 is configured to execute the instructions further to:
acquiring an upper limit of a bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th moment according to performance data stored when the external service of the virtual machine is executed at the (N) th moment, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th moment, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th moment, and after the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment does not exceed the upper limit of the bandwidth which can be used for executing;
if not, adding 1 to the N value, repeatedly executing the steps of adjusting the execution bandwidth according to the upper limit of the available bandwidth at the Nth moment and monitoring the related data at the Nth moment, and acquiring the upper limit of the available bandwidth at the N +1 th moment according to the related data at the Nth moment and adjusting the upper limit of the available bandwidth at the N +1 th moment until the external service of the virtual machine is finished.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is a single-node virtual machine migration in the first node, adjust a bandwidth for executing the external service of the virtual machine according to an upper limit of a bandwidth available for executing the external service of the virtual machine at the nth time so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitor performance data of data storage, a bandwidth usage amount for executing the external service of the virtual machine, and bandwidths that are used by all virtual machines when the external service of the virtual machine is executed at the nth time, where the monitoring specifically may include:
adjusting the bandwidth for executing the migration of the single-node virtual machine according to the available upper limit of the bandwidth for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the available upper limit of the bandwidth, and monitoring the performance data of the data storage of the first node, the bandwidth usage amount of the migration of the single-node virtual machine executed on the first node and the used bandwidth of all virtual machines on the first node when executing the migration of the single-node virtual machine at the Nth moment.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is a single-node virtual machine migration in the first node, and obtain, according to performance data stored when the external service of the virtual machine is executed at the nth time, a bandwidth usage amount for executing the external service of the virtual machine, and bandwidths used by all virtual machines, an upper limit of a bandwidth available for executing the external service of the virtual machine at the N +1 th time, so that when the external service of the virtual machine is executed at the N +1 th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the N +1 th time, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the upper limit of the bandwidth available for executing the external service of the:
and acquiring the available bandwidth upper limit for executing the migration of the single-node virtual machine on the first node at the N +1 th moment according to the performance data stored in the data of the first node when the migration of the single-node virtual machine is executed at the N th moment, the bandwidth usage amount of the single-node virtual machine executed on the first node and the used bandwidth of all the virtual machines on the first node as input parameters of a bandwidth iterative algorithm, so that when the migration of the single-node virtual machine is executed at the N +1 th moment, the bandwidth used for executing the migration of the single-node virtual machine is adjusted according to the available bandwidth upper limit for executing the migration of the single-node virtual machine at the N +1 th moment, and the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment is not more than the available bandwidth upper limit for executing the migration of the single-node.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is migrated to the single-node virtual machine in the first node, and determine whether the external service of the virtual machine meets an execution condition, where the executing condition specifically includes:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all services on the first node is smaller than the preset upper limit of the sum of the bandwidths available for all services on each single node;
and if the average bandwidth used by all services on the first node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is smaller than the upper limit of the sum of the bandwidths, determining that the migration of the single-node virtual machine meets the execution condition.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is migrated to the single-node virtual machine in the first node, and obtain an initial upper limit of a bandwidth for executing the external service of the virtual machine, which may specifically include:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the first node from the total bandwidth of the storage device of the first node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machine are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed according to a second initial bandwidth algorithm.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is a dual-node virtual machine migration between the first node and the second node, adjust the bandwidth for executing the external service of the virtual machine according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the nth time, so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitor performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage amount for executing the external service of the virtual machine, and the bandwidth used by all virtual machines, which may specifically include:
adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the available upper limit of the bandwidth for executing the migration of the dual-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the available upper limit of the bandwidth, respectively monitoring performance data of data storage of the first node and the second node when the migration of the dual-node virtual machine is executed at the Nth moment, respectively monitoring the bandwidth usage amount of the first node and the second node for executing the migration of the dual-node virtual machine, and respectively monitoring the used bandwidth of all the virtual machines on the first node and the second node.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is a dual-node virtual machine migration between the first node and the second node, and obtain the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time according to the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage amount for executing the external service of the virtual machine, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time, so that when the external service of the virtual machine is executed at the N +1 th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the upper:
acquiring a usable first bandwidth upper limit for executing the dual-node virtual machine migration on the first node at the N +1 th moment according to the performance data stored in the data of the first node when the dual-node virtual machine migration is executed at the N th moment, the bandwidth usage amount of the dual-node virtual machine migration executed on the first node and the used bandwidth of all the virtual machines on the first node as input parameters of a bandwidth iteration algorithm, so that when the dual-node virtual machine migration is executed on the first node at the N +1 th moment, adjusting the bandwidth used for executing the dual-node virtual machine migration on the first node according to the first bandwidth upper limit which can be used for executing the dual-node virtual machine migration on the first node at the N +1 th moment, so that the bandwidth used for executing the dual-node virtual machine migration on the first node at the N +1 th moment does not exceed the first bandwidth upper limit which can be used for executing the dual-node virtual machine migration on the first node at the N +1 th moment;
acquiring a second available upper limit of the bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment according to the performance data stored in the data of the second node when the migration of the dual-node virtual machine is executed at the N th moment, the bandwidth usage amount of the migration of the dual-node virtual machine executed on the second node and the used bandwidth of all the virtual machines on the second node as input parameters of a bandwidth iterative algorithm, so that when the migration of the dual-node virtual machine is executed on the second node at the N +1 th moment, adjusting the bandwidth used for executing the dual-node virtual machine migration on the second node according to a second bandwidth upper limit which can be used for executing the dual-node virtual machine migration on the second node at the N +1 th moment, so that the bandwidth used for executing the dual-node virtual machine migration on the second node at the N +1 th moment does not exceed the second bandwidth upper limit which can be used for executing the dual-node virtual machine migration on the second node at the N +1 th moment;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as the available bandwidth upper limit for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node;
and if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the available bandwidth upper limit for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node.
Optionally, the processor 91 is configured to execute the instruction, so that the external service of the virtual machine is a dual-node virtual machine migration between the first node and the second node, and determine whether the external service of the virtual machine meets an execution condition, where the executing may specifically include:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
judging whether the average bandwidth used by all services on the second node is larger than a preset minimum average bandwidth or not, or judging whether the sum of the bandwidths used by all the services on the second node is smaller than a preset upper limit of the sum of the bandwidths;
and if the average bandwidth used by all the services on the first node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths, and the average bandwidth used by all the services on the second node is larger than the minimum average bandwidth, or the sum of the bandwidths used by all the services on the second node is smaller than the upper limit of the sum of the bandwidths, determining that the migration of the dual-node virtual machine meets the execution condition.
Optionally, the processor 91 is configured to execute the instruction, so that the virtual machine external service is migrated to a dual-node virtual machine between the first node and the second node, and obtain an initial bandwidth upper limit for executing the virtual machine external service, which may specifically include:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the first node from the total bandwidth of the storage device of the first node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machine are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the external service of the first arrived virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the used bandwidth of all the virtual machines on the second node from the total bandwidth of the storage device of the second node with the residual bandwidth;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machine are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the acquired first initial bandwidth upper limit for executing the external service of the virtual machine on the first node is the same as the acquired second initial bandwidth upper limit for executing the external service of the virtual machine on the second node, taking the first initial bandwidth upper limit or the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node;
and if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node.
Optionally, the bandwidth iteration algorithm includes:
Ti(t)=(1-μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein, Ti (t) is the available bandwidth usage of the ith migration service at the time t, Ti (t-1) is the available bandwidth usage of the ith migration service at the time (t-1), and E (t-1) is the time (t-1)Mu is a weighted average factor, delta is a performance data threshold for judging whether the data storage reaches a bottleneck or not, theta is a parameter for measuring the bandwidth use trend of the online virtual machine,
Figure BDA0000467215760000501
bvm (t) is the storage bandwidth amount used by all online virtual machines at the time t, beta represents the weight of the designated I/O service, and the setting range of beta is 0-4.
Optionally, the first initial bandwidth algorithm includes: t1= (W1/W2) × T2
The method comprises the following steps that T1 is an initial bandwidth upper limit of external services of a virtual machine to be processed currently, T2 and W2 are respectively a bandwidth and a weight of the external services of the virtual machine to be processed currently, W1 is a weight of the external services of the virtual machine to be processed currently, Tmin1 is a preset minimum bandwidth which can be used by the external services of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external services of the virtual machine on each single node; when T1< Tmin1, then T1= Tmin1 is set, and when T1> Tmax, then T1= Tmax is set;
the second initial bandwidth algorithm includes: t3= (W3/Wavg) × Tavg
The method comprises the following steps that T3 is the initial bandwidth upper limit of the external service of the virtual machine to be processed currently, W3 is the weight of the external service of the virtual machine to be processed currently, Tavg is the average bandwidth of multiple external services of the virtual machine being processed, Tmin1 is the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; wavg is the average weight of the traffic outside the virtual machine under process, and when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
The embodiment of the invention provides an input/output flow control device, which adjusts the bandwidth for executing the external service of a virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment, so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitors performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all virtual machines, wherein N is more than or equal to 1 and is an integer; and acquiring the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time according to the performance data stored when the external service of the virtual machine is executed at the (N) th time, the bandwidth usage amount of the external service of the executing virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the (N + 1) th time, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th time does not exceed the. Therefore, the influence on the internal service of the virtual machine can be effectively reduced by controlling the bandwidth flow of the virtual machine migration task, and the internal service of the virtual machine can be ensured to run normally.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (22)

1. An input/output flow control method, comprising:
adjusting the bandwidth for executing the external service of the virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidths of all the virtual machines, wherein N is more than or equal to 1 and is an integer;
and acquiring the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment according to performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage amount for executing the external service of the virtual machine and the used bandwidth of all the virtual machines, so that when the external service of the virtual machine is executed at the (N + 1) th moment, the bandwidth used for executing the external service of the virtual machine is adjusted according to the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment, and the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment is not more than the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment.
2. The method of claim 1, wherein prior to said executing the virtual-machine-external traffic according to an upper limit of bandwidth available for executing the virtual-machine-external traffic at time N, the method further comprises:
judging whether the external service of the virtual machine meets the execution condition;
if the external service of the virtual machine does not meet the execution condition, the external service of the virtual machine is not executed for the moment, and the judgment of whether the external service of the virtual machine meets the execution condition or not is executed again after a preset time interval;
if the external service of the virtual machine meets the execution condition, acquiring an initial bandwidth upper limit for executing the external service of the virtual machine, wherein the initial bandwidth upper limit is a bandwidth upper limit which can be used for executing the external service of the virtual machine when the N is equal to 1.
3. The method according to claim 1 or 2,
after the acquiring, at the nth +1 th time, the bandwidth upper limit usable for executing the external service of the virtual machine according to the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage amount for executing the external service of the virtual machine, and the bandwidth used by all the virtual machines, so that when the external service of the virtual machine is executed at the nth +1 th time, the bandwidth used for executing the external service of the virtual machine is adjusted according to the bandwidth upper limit usable for executing the external service of the virtual machine at the nth +1 th time, so that the bandwidth used for executing the external service of the virtual machine at the nth +1 th time does not exceed the bandwidth upper limit usable for executing the external service of the virtual machine at the nth +1 th time, the method further includes:
and judging whether the external service of the virtual machine is finished, if not, adding 1 to the N value, repeatedly executing the steps of adjusting the execution bandwidth according to the available bandwidth upper limit at the Nth moment and monitoring the related data at the Nth moment, and acquiring the available bandwidth upper limit at the N +1 th moment according to the related data obtained by monitoring at the Nth moment and adjusting the execution bandwidth not to exceed the available bandwidth upper limit at the N +1 th moment until the external service of the virtual machine is finished.
4. The method of claim 1, wherein the virtual machine external traffic is single node virtual machine migration within the first node,
the adjusting, according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the nth time, the bandwidth for executing the external service of the virtual machine so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitoring the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage for executing the external service of the virtual machine, and the bandwidth used by all the virtual machines, includes:
adjusting the bandwidth for executing the migration of the single-node virtual machine according to the upper limit of the bandwidth which can be used for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the upper limit of the available bandwidth, and monitoring performance data of data storage of the first node, the bandwidth usage amount of the first node for executing the migration of the single-node virtual machine and the bandwidth used by all the virtual machines on the first node when executing the migration of the single-node virtual machine at the Nth moment;
the method for adjusting the bandwidth used for executing the external service of the virtual machine according to the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time obtained according to the performance data stored when the external service of the virtual machine is executed at the N th time, the bandwidth usage amount for executing the external service of the virtual machine and the bandwidth used by all the virtual machines, so that the bandwidth used for executing the external service of the virtual machine at the N +1 th time is adjusted according to the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time is not more than the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time includes:
acquiring an available upper limit of the bandwidth for executing the single-node virtual machine migration on the first node at the N +1 th moment according to the performance data of the data storage of the first node, the bandwidth usage amount for executing the single-node virtual machine migration on the first node and the bandwidth used by all virtual machines on the first node when executing the single-node virtual machine migration at the N +1 th moment as input parameters of a bandwidth iteration algorithm, so that when executing the single-node virtual machine migration at the N +1 th moment, and adjusting the bandwidth used for executing the migration of the single-node virtual machine according to the upper limit of the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment, so that the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment does not exceed the upper limit of the bandwidth used for executing the migration of the single-node virtual machine at the N +1 th moment.
5. The method of claim 1, wherein the virtual machine external traffic is a two-node virtual machine migration between a first node and a second node,
the adjusting, according to the upper limit of the bandwidth available for executing the external service of the virtual machine at the nth time, the bandwidth for executing the external service of the virtual machine so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitoring the performance data stored when the external service of the virtual machine is executed at the nth time, the bandwidth usage for executing the external service of the virtual machine, and the bandwidth used by all the virtual machines, includes:
adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the upper limit of the bandwidth available for executing the migration of the dual-node virtual machine at the Nth moment, so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the upper limit of the available bandwidth, respectively monitoring performance data of data storage of the first node and the second node when executing the migration of the dual-node virtual machine at the Nth moment, respectively monitoring the bandwidth usage amount of the first node and the second node for executing the migration of the dual-node virtual machine, and respectively monitoring the bandwidth used by all the virtual machines on the first node and the second node;
the method for adjusting the bandwidth used for executing the external service of the virtual machine according to the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time obtained according to the performance data stored when the external service of the virtual machine is executed at the N th time, the bandwidth usage amount for executing the external service of the virtual machine and the bandwidth used by all the virtual machines, so that the bandwidth used for executing the external service of the virtual machine at the N +1 th time is adjusted according to the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time is not more than the bandwidth upper limit available for executing the external service of the virtual machine at the N +1 th time includes:
acquiring a first bandwidth upper limit available for executing the dual-node virtual machine migration on the first node at the N +1 th moment according to performance data stored in data of the first node when the dual-node virtual machine migration is executed at the N th moment, a bandwidth usage amount for executing the dual-node virtual machine migration on the first node and a bandwidth used by all virtual machines on the first node as input parameters of a bandwidth iterative algorithm, so that when the dual-node virtual machine migration is executed on the first node at the N +1 th moment, a bandwidth used for executing the dual-node virtual machine migration on the first node is adjusted according to the first bandwidth upper limit available for executing the dual-node virtual machine migration on the first node at the N +1 th moment, and a bandwidth used for executing the dual-node virtual machine migration on the first node at the N +1 th moment is not more than the N +1 th moment Inscribing a first bandwidth upper limit available for executing the dual-node virtual machine migration on the first node;
acquiring a second available upper limit of bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment according to the performance data of the data storage of the second node when the migration of the dual-node virtual machine is executed at the N th moment, the bandwidth usage amount of executing the migration of the dual-node virtual machine on the second node and the bandwidth used by all the virtual machines on the second node as input parameters of a bandwidth iterative algorithm, so that when the migration of the dual-node virtual machine is executed on the second node at the N +1 th moment, the bandwidth used for executing the migration of the dual-node virtual machine on the second node is adjusted according to the second available upper limit of bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment, and the bandwidth used for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment does not exceed the N +1 th moment Inscribing a second available bandwidth upper limit for executing the dual-node virtual machine migration on the second node;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as a bandwidth upper limit which can be used for executing the dual-node virtual machine migration at the N +1 th moment on the first node and the second node;
if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the bandwidth upper limit which can be used for executing the migration of the dual-node virtual machine at the N +1 th moment on the first node and the second node.
6. The method according to claim 2, wherein the external service of the virtual machine is migration of a single-node virtual machine in the first node, and the determining whether the external service of the virtual machine satisfies the execution condition includes:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all services on the first node is smaller than the preset upper limit of the sum of the bandwidths available for all services on each single node;
and if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, determining that the migration of the single-node virtual machine meets the execution condition.
7. The method according to claim 2, wherein the virtual machine external service is a dual-node virtual machine migration between a first node and a second node, and the determining whether the virtual machine external service satisfies an execution condition includes:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
judging whether the average bandwidth used by all services on the second node is larger than a preset minimum average bandwidth or not, or judging whether the sum of the bandwidths used by all the services on the second node is smaller than a preset upper limit of the sum of the bandwidths;
if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, and the average bandwidth used by all services on the second node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the second node is less than the upper limit of the sum of the bandwidths, it is determined that the migration of the dual-node virtual machine meets the execution condition.
8. The method of claim 2, wherein the external service of the virtual machine is migration of a single-node virtual machine in the first node, and wherein the obtaining the initial upper limit of the bandwidth for executing the external service of the virtual machine comprises:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm.
9. The method of claim 2, wherein the virtual machine external traffic is a dual-node virtual machine migration between a first node and a second node, and wherein the obtaining an initial bandwidth cap for executing the virtual machine external traffic comprises:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the second node from the total bandwidth of the storage device of the second node;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the second initial bandwidth algorithm;
if the obtained first initial bandwidth upper limit for executing the external service of the virtual machine on the first node is the same as the obtained second initial bandwidth upper limit for executing the external service of the virtual machine on the second node, taking the first initial bandwidth upper limit or the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node;
if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node.
10. The method of claim 4 or 5, wherein the bandwidth iteration algorithm comprises:
Ti(t)=(1―μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein, Ti (t) is the usable bandwidth usage of the ith migration service at the time t, Ti (t-1) is the usable bandwidth usage of the ith migration service at the time (t-1), E (t-1) is the performance data stored in the data at the time (t-1), mu is a weighted average factor, delta is the performance data threshold for judging whether the data storage reaches the bottleneck, theta is a parameter for measuring the bandwidth usage trend of the online virtual machine,
Figure FDA0000467215750000071
bvm (t) is the amount of storage bandwidth used by all online virtual machines at time t, and β represents the indexAnd determining the priority weight of the I/O service, wherein the setting range of beta is 0-4.
11. The method of claim 8 or 9, wherein the first initial bandwidth algorithm and the second initial bandwidth algorithm comprise:
the first initial bandwidth algorithm comprises: t1= (W1/W2) × T2
The method comprises the following steps that T1 is an initial bandwidth upper limit of external services of a virtual machine to be processed currently, T2 and W2 are respectively a bandwidth and a weight of the external services of the virtual machine to be processed currently, W1 is a weight of the external services of the virtual machine to be processed currently, Tmin1 is a preset minimum bandwidth which can be used by the external services of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external services of the virtual machine on each single node; when T1< Tmin1, then T1= Tmin1 is set, and when T1> Tmax, then T1= Tmax is set;
the second initial bandwidth algorithm comprises: t3= (W3/Wavg) × Tavg
The method comprises the following steps that T3 is the initial bandwidth upper limit of the external service of the virtual machine to be processed currently, W3 is the weight of the external service of the virtual machine to be processed currently, Tavg is the average bandwidth of multiple external services of the virtual machine being processed, Tmin1 is the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; wavg is the average weight of the traffic outside the virtual machine under process, and when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
12. An input/output flow control device, comprising:
the monitoring unit is used for adjusting the bandwidth for executing the external service of the virtual machine according to the available upper limit of the bandwidth for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the available upper limit of the bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidths of all the virtual machines, wherein N is more than or equal to 1 and is an integer;
a first obtaining unit, configured to obtain, according to performance data stored when the virtual machine external service is executed at an nth time, a bandwidth usage amount for executing the virtual machine external service, and a bandwidth used by all the virtual machines, an upper limit of a bandwidth usable for executing the virtual machine external service at an N +1 th time;
a bandwidth control unit, configured to, when the external service of the virtual machine is executed at a time N +1, adjust a bandwidth used for executing the external service of the virtual machine according to a bandwidth upper limit that can be used for executing the external service of the virtual machine at the time N +1, so that the bandwidth used for executing the external service of the virtual machine at the time N +1 does not exceed the bandwidth upper limit that can be used for executing the external service of the virtual machine at the time N + 1.
13. The apparatus of claim 12, further comprising:
a first judging unit, configured to judge whether the external service of the virtual machine satisfies an execution condition before the external service of the virtual machine is executed according to an upper limit of a bandwidth available for executing the external service of the virtual machine at an nth time;
a suspending unit, configured to temporarily not execute the external service of the virtual machine if the external service of the virtual machine does not satisfy the execution condition, and after a preset time interval, the second determining unit performs the determination of whether the external service of the virtual machine satisfies the execution condition;
a second obtaining unit, configured to obtain an initial bandwidth upper limit for executing the external service of the virtual machine if the external service of the virtual machine meets the execution condition, where the initial bandwidth upper limit is a bandwidth upper limit that can be used for executing the external service of the virtual machine when N is equal to 1.
14. The apparatus according to claim 12 or 13, characterized in that it further comprises:
a second determining unit, configured to determine whether the external service of the virtual machine is ended after the bandwidth used for executing the external service of the virtual machine at the N +1 th time is adjusted according to the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time when the external service of the virtual machine is executed at the N +1 th time by obtaining the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time according to the performance data stored when the external service of the virtual machine is executed at the N th time, the bandwidth used for executing the external service of the virtual machine, and the bandwidth used for executing the external service of the virtual machine at the N +1 th time does not exceed the upper limit of the bandwidth usable for executing the external service of the virtual machine at the N +1 th time, and if the external service of the virtual machine is not ended, adding 1 to the value N, the monitoring unit adjusting the bandwidth for executing the external service of the virtual machine according to the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the Nth moment so that the bandwidth for executing the external service of the virtual machine does not exceed the upper limit of the available bandwidth, and monitoring performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidth of all the virtual machines, wherein N is not less than 1 and is an integer, the first acquisition unit executing the upper limit of the bandwidth which can be used for executing the external service of the virtual machine at the Nth moment according to the performance data stored when the external service of the virtual machine is executed at the Nth moment, the bandwidth usage for executing the external service of the virtual machine and the used bandwidth of all the virtual machines at the Nth +1 moment, when executing the external service of the virtual machine at the (N + 1) th moment, the bandwidth control unit adjusts the bandwidth used for executing the external service of the virtual machine according to the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment, so that the bandwidth used for executing the external service of the virtual machine at the (N + 1) th moment does not exceed the bandwidth upper limit available for executing the external service of the virtual machine at the (N + 1) th moment until the external service of the virtual machine is finished.
15. The apparatus of claim 12, wherein when the virtual machine external traffic is a single node virtual machine migration within the first node,
the monitoring unit is specifically configured to:
adjusting the bandwidth for executing the migration of the single-node virtual machine according to the upper limit of the bandwidth which can be used for executing the migration of the single-node virtual machine at the Nth moment so that the bandwidth for executing the migration of the single-node virtual machine does not exceed the upper limit of the available bandwidth, and monitoring performance data of data storage of the first node, the bandwidth usage amount of the first node for executing the migration of the single-node virtual machine and the bandwidth used by all the virtual machines on the first node when executing the migration of the single-node virtual machine at the Nth moment;
the first obtaining unit is specifically configured to:
acquiring an available upper limit of the bandwidth for executing the single-node virtual machine migration on the first node at the N +1 th moment according to the performance data stored in the data of the first node when the single-node virtual machine migration is executed at the N th moment, the bandwidth usage amount for executing the single-node virtual machine migration on the first node and the used bandwidth of all virtual machines on the first node as input parameters of a bandwidth iteration algorithm;
the control bandwidth unit is specifically configured to:
when the single-node virtual machine migration is executed at the N +1 th moment, adjusting the bandwidth used by the first node for executing the single-node virtual machine migration according to the available bandwidth upper limit of the single-node virtual machine migration executed at the N +1 th moment, so that the bandwidth used by the first node for executing the single-node virtual machine migration at the N +1 th moment does not exceed the available bandwidth upper limit of the single-node virtual machine migration executed at the N +1 th moment.
16. The apparatus of claim 12, wherein the virtual machine external traffic is a dual-node virtual machine migration between the first node and a second node,
the monitoring unit is specifically configured to:
adjusting the bandwidth for executing the migration of the dual-node virtual machine according to the upper limit of the bandwidth available for executing the migration of the dual-node virtual machine at the Nth moment, so that the bandwidth for executing the migration of the dual-node virtual machine does not exceed the upper limit of the available bandwidth, respectively monitoring performance data of data storage of the first node and the second node when executing the migration of the dual-node virtual machine at the Nth moment, respectively monitoring the bandwidth usage amount of the first node and the second node for executing the migration of the dual-node virtual machine, and respectively monitoring the bandwidth used by all the virtual machines on the first node and the second node;
the first obtaining unit is specifically configured to:
acquiring a usable first bandwidth upper limit for executing the dual-node virtual machine migration on the first node at the N +1 th moment according to the performance data stored in the data of the first node when the dual-node virtual machine migration is executed at the N th moment, the bandwidth usage amount for executing the dual-node virtual machine migration on the first node and the used bandwidth of all virtual machines on the first node as input parameters of a bandwidth iteration algorithm;
acquiring a second available upper limit of the bandwidth for executing the migration of the dual-node virtual machine on the second node at the N +1 th moment according to the performance data stored in the data of the second node when the migration of the dual-node virtual machine is executed at the N th moment, the bandwidth usage amount for executing the migration of the dual-node virtual machine on the second node and the bandwidth used by all the virtual machines on the second node as input parameters of a bandwidth iteration algorithm;
if the first bandwidth upper limit is the same as the second bandwidth upper limit, taking the first bandwidth upper limit or the second bandwidth upper limit as a bandwidth upper limit which can be used for executing the dual-node virtual machine migration at the N +1 th moment on the first node and the second node;
if the first bandwidth upper limit is different from the second bandwidth upper limit, taking the minimum value of the first bandwidth upper limit and the second bandwidth upper limit as the available bandwidth upper limit for executing the dual-node virtual machine migration at the N +1 th moment on the first node and the second node;
the control bandwidth unit is specifically configured to:
when the dual-node virtual machine migration is executed at the N +1 th moment, adjusting the bandwidth used by the first node and the second node for executing the dual-node virtual machine migration according to the available bandwidth upper limit of the dual-node virtual machine migration executed at the N +1 th moment, so that the bandwidth used by the first node and the second node for executing the dual-node virtual machine migration at the N +1 th moment does not exceed the available bandwidth upper limit of the dual-node virtual machine migration executed at the N +1 th moment.
17. The apparatus of claim 13, wherein the virtual machine external traffic is single node virtual machine migration within the first node,
the first judging unit is specifically configured to:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the preset upper limit of the sum of the bandwidths which can be used by all the services on each single node;
and if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, determining that the migration of the single-node virtual machine meets the execution condition.
18. The apparatus of claim 13, wherein the virtual machine external traffic is a dual-node virtual machine migration between the first node and a second node,
the first judging unit is specifically configured to:
judging whether the average bandwidth used by all services on the first node is larger than the preset minimum average bandwidth required to be used by all services on each single node or whether the sum of the bandwidths used by all the services on the first node is smaller than the upper limit of the sum of the bandwidths capable of being used by all the services on each single node;
judging whether the average bandwidth used by all services on the second node is larger than a preset minimum average bandwidth or not, or judging whether the sum of the bandwidths used by all the services on the second node is smaller than a preset upper limit of the sum of the bandwidths;
if the average bandwidth used by all services on the first node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the first node is less than the upper limit of the sum of the bandwidths, and the average bandwidth used by all services on the second node is greater than the minimum average bandwidth, or the sum of the bandwidths used by all services on the second node is less than the upper limit of the sum of the bandwidths, it is determined that the migration of the dual-node virtual machine meets the execution condition.
19. The apparatus of claim 13, wherein the virtual machine external traffic is single node virtual machine migration within the first node,
the second obtaining unit is specifically configured to:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
and if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm.
20. The apparatus of claim 13, wherein the virtual machine external traffic is a dual-node virtual machine migration between the first node and a second node,
the second obtaining unit is specifically configured to:
if the first node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the first node from the total bandwidth of the storage device of the first node;
if only one external service of the virtual machine is being processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the first node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to a second initial bandwidth algorithm;
if the second node does not have any other external service except the internal service of the virtual machine, the initial bandwidth upper limit of the first arrived external service of the virtual machine is larger than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node and is smaller than the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is smaller than the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node; or
The initial bandwidth upper limit of the first arrived external service of the virtual machine is the residual bandwidth, and the residual bandwidth is obtained by subtracting the bandwidth already used by all the virtual machines on the second node from the total bandwidth of the storage device of the second node;
if only one external service of the virtual machine is being processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the first initial bandwidth algorithm;
if a plurality of external services of the virtual machines are simultaneously processed on the second node, calculating the initial bandwidth upper limit of the external service of the virtual machine to be processed currently according to the second initial bandwidth algorithm;
if the obtained first initial bandwidth upper limit for executing the external service of the virtual machine on the first node is the same as the obtained second initial bandwidth upper limit for executing the external service of the virtual machine on the second node, taking the first initial bandwidth upper limit or the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node;
if the first initial bandwidth upper limit is different from the second initial bandwidth upper limit, taking the minimum value of the first initial bandwidth upper limit and the second initial bandwidth upper limit as the initial bandwidth upper limit for executing the external service of the virtual machine on the first node and the second node.
21. The apparatus of claim 15 or 16, wherein the bandwidth iteration algorithm comprises:
Ti(t)=(1―μ)×Ti(t-1)+μ×(Δ÷E(t-1)×θ×Ti(t-1)+β)
wherein, Ti (t) is the usable bandwidth usage of the ith migration service at the time t, Ti (t-1) is the usable bandwidth usage of the ith migration service at the time (t-1), E (t-1) is the performance data stored in the data at the time (t-1), mu is a weighted average factor, delta is the performance data threshold for judging whether the data storage reaches the bottleneck, theta is a parameter for measuring the bandwidth usage trend of the online virtual machine,
Figure FDA0000467215750000141
bvm (t) is the storage bandwidth amount used by all online virtual machines at the time t, beta represents the priority weight of the designated I/O service, and the setting range of beta is 0-4.
22. The apparatus of claim 19 or 20, wherein the first initial bandwidth algorithm and the second initial bandwidth algorithm comprise:
the first initial bandwidth algorithm comprises: t1= (W1/W2) × T2
The method comprises the following steps that T1 is an initial bandwidth upper limit of external services of a virtual machine to be processed currently, T2 and W2 are respectively a bandwidth and a weight of the external services of the virtual machine to be processed currently, W1 is a weight of the external services of the virtual machine to be processed currently, Tmin1 is a preset minimum bandwidth which can be used by the external services of the virtual machine on each single node, and Tmax is a preset maximum bandwidth which can be used by the external services of the virtual machine on each single node; when T1< Tmin1, then T1= Tmin1 is set, and when T1> Tmax, then T1= Tmax is set;
the second initial bandwidth algorithm comprises: t3= (W3/Wavg) × Tavg
The method comprises the following steps that T3 is the initial bandwidth upper limit of the external service of the virtual machine to be processed currently, W3 is the weight of the external service of the virtual machine to be processed currently, Tavg is the average bandwidth of multiple external services of the virtual machine being processed, Tmin1 is the preset minimum bandwidth which can be used by the external service of the virtual machine on each single node, and Tmax is the preset maximum bandwidth which can be used by the external service of the virtual machine on each single node; wavg is the average weight of the traffic outside the virtual machine under process, and when T3< Tmin1, T3= Tmin1 is set, and when T3> Tmax, T3= Tmax is set.
CN201410055844.6A 2014-02-19 2014-02-19 Input/output traffic control method and equipment Pending CN103838520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410055844.6A CN103838520A (en) 2014-02-19 2014-02-19 Input/output traffic control method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410055844.6A CN103838520A (en) 2014-02-19 2014-02-19 Input/output traffic control method and equipment

Publications (1)

Publication Number Publication Date
CN103838520A true CN103838520A (en) 2014-06-04

Family

ID=50802074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410055844.6A Pending CN103838520A (en) 2014-02-19 2014-02-19 Input/output traffic control method and equipment

Country Status (1)

Country Link
CN (1) CN103838520A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243231A (en) * 2014-06-30 2014-12-24 华为技术有限公司 Estimation method and related equipment for rate of flow among virtual machine pairs
CN104796673A (en) * 2015-05-19 2015-07-22 中国地质大学(武汉) Energy consumption optimization-oriented cloud video monitoring system task access method
CN105357097A (en) * 2014-08-19 2016-02-24 中兴通讯股份有限公司 Virtual network (VN) regulation method and system
CN106484318A (en) * 2015-09-01 2017-03-08 Hgst荷兰公司 The control based on seeervice level of storage system
CN106921695A (en) * 2015-12-24 2017-07-04 阿里巴巴集团控股有限公司 Resource encapsulation method and device and assets packaging method
CN106921512A (en) * 2015-12-28 2017-07-04 中移(苏州)软件技术有限公司 A kind of large data sets group rental family band width control method and device
US10333814B2 (en) 2014-06-30 2019-06-25 Huawei Technologies Co., Ltd. Method for estimating traffic rate between virtual machine pair, and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040249858A1 (en) * 2003-06-03 2004-12-09 Hitachi, Ltd. Control method of storage control apparatus and storage control apparatus
CN102123093A (en) * 2011-03-04 2011-07-13 华中科技大学 Method for ensuring necessary network bandwidth of virtual machine
CN103346978A (en) * 2013-07-16 2013-10-09 上海大学 Method for guaranteeing fairness and stability of virtual machine network bandwidth

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040249858A1 (en) * 2003-06-03 2004-12-09 Hitachi, Ltd. Control method of storage control apparatus and storage control apparatus
CN102123093A (en) * 2011-03-04 2011-07-13 华中科技大学 Method for ensuring necessary network bandwidth of virtual machine
CN103346978A (en) * 2013-07-16 2013-10-09 上海大学 Method for guaranteeing fairness and stability of virtual machine network bandwidth

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243231B (en) * 2014-06-30 2018-01-23 华为技术有限公司 The evaluation method and relevant device of flow rate between virtual machine pair
CN104243231A (en) * 2014-06-30 2014-12-24 华为技术有限公司 Estimation method and related equipment for rate of flow among virtual machine pairs
US10819610B2 (en) 2014-06-30 2020-10-27 Huawei Technologies Co., Ltd. Method for estimating traffic rate between virtual machine pair, and related device
US10333814B2 (en) 2014-06-30 2019-06-25 Huawei Technologies Co., Ltd. Method for estimating traffic rate between virtual machine pair, and related device
CN105357097A (en) * 2014-08-19 2016-02-24 中兴通讯股份有限公司 Virtual network (VN) regulation method and system
CN104796673A (en) * 2015-05-19 2015-07-22 中国地质大学(武汉) Energy consumption optimization-oriented cloud video monitoring system task access method
CN104796673B (en) * 2015-05-19 2017-08-25 中国地质大学(武汉) A kind of cloud video monitoring system task cut-in method towards energy optimization
CN106484318A (en) * 2015-09-01 2017-03-08 Hgst荷兰公司 The control based on seeervice level of storage system
CN106484318B (en) * 2015-09-01 2021-07-16 西部数据技术公司 Data storage system, method and equipment
CN106921695A (en) * 2015-12-24 2017-07-04 阿里巴巴集团控股有限公司 Resource encapsulation method and device and assets packaging method
CN112866354A (en) * 2015-12-24 2021-05-28 创新先进技术有限公司 Resource packaging method and device and asset packaging method
CN112866354B (en) * 2015-12-24 2023-08-11 创新先进技术有限公司 Resource packaging method and device and asset packaging method
CN106921512A (en) * 2015-12-28 2017-07-04 中移(苏州)软件技术有限公司 A kind of large data sets group rental family band width control method and device
CN106921512B (en) * 2015-12-28 2020-08-04 中移(苏州)软件技术有限公司 Big data cluster tenant bandwidth control method and device

Similar Documents

Publication Publication Date Title
US10659318B2 (en) Methods and apparatus related to management of unit-based virtual resources within a data center environment
CN103838520A (en) Input/output traffic control method and equipment
EP3507692B1 (en) Resource oversubscription based on utilization patterns in computing systems
Xu et al. iAware: Making live migration of virtual machines interference-aware in the cloud
US20190324819A1 (en) Distributed-system task assignment method and apparatus
US11297130B2 (en) Cluster resource management in distributed computing systems
US9152200B2 (en) Resource and power management using nested heterogeneous hypervisors
US9183016B2 (en) Adaptive task scheduling of Hadoop in a virtualized environment
CA2780231C (en) Goal oriented performance management of workload utilizing accelerators
US11206193B2 (en) Method and system for provisioning resources in cloud computing
US9529642B2 (en) Power budget allocation in a cluster infrastructure
US8898674B2 (en) Memory databus utilization management system and computer program product
US20090265712A1 (en) Auto-Configuring Workload Management System
US7778275B2 (en) Method for dynamically allocating network adapters to communication channels for a multi-partition computer system
US20140373010A1 (en) Intelligent resource management for virtual machines
US20130167152A1 (en) Multi-core-based computing apparatus having hierarchical scheduler and hierarchical scheduling method
JP5616523B2 (en) Information processing system
WO2017000645A1 (en) Method and apparatus for allocating host resource
Liao et al. Energy optimization schemes in cluster with virtual machines
CN111464331A (en) Control method and system for thread creation and terminal equipment
CN111104203A (en) Virtual machine decentralized scheduling method and device, electronic device and storage medium
JP2014167713A (en) Information processing device, information processing system, information processing device management program and information processing device management method
JP6374059B2 (en) Computer resource allocation determination method, computer resource allocation determination method program, and control computer
KR20170094899A (en) System and method for managing computing resources
Kakkar et al. Heuristic of vm allocation to reduce migration complexity at cloud server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140604

WD01 Invention patent application deemed withdrawn after publication