CN104834566B - Adjust the method and relevant apparatus of the switching port of forward process thread - Google Patents

Adjust the method and relevant apparatus of the switching port of forward process thread Download PDF

Info

Publication number
CN104834566B
CN104834566B CN201510147499.3A CN201510147499A CN104834566B CN 104834566 B CN104834566 B CN 104834566B CN 201510147499 A CN201510147499 A CN 201510147499A CN 104834566 B CN104834566 B CN 104834566B
Authority
CN
China
Prior art keywords
forwarding processing
forwarding
processing thread
thread
threads
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510147499.3A
Other languages
Chinese (zh)
Other versions
CN104834566A (en
Inventor
李力军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510147499.3A priority Critical patent/CN104834566B/en
Publication of CN104834566A publication Critical patent/CN104834566A/en
Application granted granted Critical
Publication of CN104834566B publication Critical patent/CN104834566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses the method and apparatus of the switching port of adjustment forward process thread.A kind of method of switching port of adjustment forward process thread includes:Detect the status attribute of the K forward process thread of the virtual switch vSwitch in host;In the case where detecting that the status attribute of K forward process thread of the vSwitch meets default adjustment trigger conditions, the switching port that at least one forward process thread in the K forward process thread is serviced is adjusted.The technical solution of the embodiment of the present invention improves the adaptive ability of forwarding resource utilization and network flow variation.

Description

Method and related device for adjusting switching port of forwarding processing thread
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a related apparatus for adjusting a switch port of a forwarding processing thread.
Background
The virtualization technology is a decoupling technology for separating the bottom hardware device from the upper operating system and the application program, and as shown in fig. 1, a Virtual Machine Monitor (VMM) layer is introduced to manage the bottom hardware resources and create a Virtual Machine (VM) independent of the bottom hardware for the upper operating system and the application program.
Network Function Virtualization (NFV) technology can make mobile operators vary from day to day in how to build their own networks and implement new services. Through the virtualization technology, software and hardware separation is realized, and an operator can provide faster and better network service and is helped to compete with internet manufacturers. Among others, a final goal of applying NFV technology is to replace those proprietary dedicated network element devices of communication networks by x86 server, storage and switching devices based on industry standards. Therefore, network element devices such as a firewall, flow charging, routing service and the like which are operated originally can be migrated into the VM to operate in the NFV scene, so that the cost is saved, and the utilization rate of resources and the flexible control capability are improved. This puts higher demands on performance specifications such as the switching capability, packet loss rate, and delay of a Virtual Switch (vSwitch) in a virtualized scene.
In the NFV field, there is a Service chain (ServiceChain) mechanism, that is, at the edge of mobile, fixed broadband and data center networks, a specific Service flow of a specific user may need to be processed one by one through multiple Virtual Application Service (VAS) entities in sequence. For example, a service flow on a HyperText transfer protocol (HTTP) world wide Web (Web) needs to be sequentially connected with three VAS entities, namely a content filter, a cache service and a firewall, in series to perform corresponding processing, and then the processed service flow enters the Internet (Internet). In view of an operator, each user corresponds to one service package, one service package can correspond to one ServiceChain, and the content of the service package can be changed, namely, the used service or VAS sequence can be changed, so that the aim of flexible control can be achieved.
In the process of network virtualization, a service with high network throughput is transferred and operated in a VM in an NFV scenario, so that both a VM across a physical host and a VM with the physical host need high network traffic exchange capabilities, which are mainly provided by vSwitch. However, the vSwitch is responsible for network traffic switching, which may become a bottleneck if a single Central Processing Unit (CPU) is used, and therefore, the introduction of multi-core parallel Processing capability to improve network traffic switching performance of the vSwitch is considered in the industry.
Under the condition that the vSwitch uses a multi-core forwarding mechanism, multiple CPUs are used for processing at the same time, and each port (port) of each VM and an uplink port (uplink port) of a physical network card need to be handed to a certain CPU for processing, so that the processing capacity of the multiple CPUs can be utilized. Wherein each forwarding processing thread in vSwitch corresponds to a different CPU. As to which ports traffic needs to be handled by a CPU (corresponding to a forwarding processing thread), the prior art fixedly binds the CPU (corresponding to the forwarding processing thread) and the ports before the service runs, for example, CPU1 and Port1 are fixedly bound (equivalent to fixedly binding the forwarding processing thread corresponding to CPU1 and Port 1), and CPU2 and Port2 are fixedly bound (equivalent to fixedly binding the forwarding processing thread corresponding to CPU2 and Port 2). The inventor of the invention finds that in the research and practice process, the fixed binding of the forwarding processing thread and the Port in the prior art always makes the forwarding processing thread and the Port difficult to flexibly adapt to the change of network flow, and simultaneously influences the resource utilization efficiency.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adjusting an exchange port of a forwarding processing thread, aiming to improve the utilization rate of forwarding resources and the adaptive capacity of network flow change.
A first aspect of an embodiment of the present invention provides a method for adjusting a switch port of a forwarding processing thread, including: detecting state attributes of K forwarding processing threads of a virtual switch vSwitch in a host machine;
and under the condition that the state attributes of K forwarding processing threads of the vSwitch are detected to meet preset adjustment triggering conditions, adjusting switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the state attribute of the forwarding processing thread includes at least one of the following state attributes: affinity between a processor of the forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic forwarded and processed by the forwarding processing thread, wherein the service priority of the key traffic is higher than a priority threshold.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the adjustment triggering condition includes at least one of the following conditions:
the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
The adjusting of the switch ports served by at least 1 of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the key traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the key traffic is reduced, the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the exchange port served by the processor is improved, and the load balance among the K forwarding processing threads is improved.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the status attribute of the forwarding processing thread includes a remaining forwarding resource amount and/or a remaining forwarding resource amount proportion of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads includes:
and if the obtained load balance among the K forwarding processing threads is lower than a second threshold value, adjusting the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads so as to improve the load balance among the K forwarding processing threads.
With reference to the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the state attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
With reference to the second possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread;
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
With reference to the second possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
With reference to the second possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by critical traffic forwarded and processed by the forwarding processing thread,
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or, if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 in the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
With reference to the sixth possible implementation manner of the first aspect, in an eighth possible implementation manner of the first aspect, the affinity node is a non-uniform memory access NUMA node.
With reference to the first aspect or any one of the first to eighth possible implementation manners of the first aspect, in a ninth possible implementation manner of the first aspect, the switch port includes a virtual switch port and/or a physical switch port, and the virtual switch port is connected to a virtual machine running on the host.
A second aspect of the present invention provides an apparatus for adjusting a switch port of a forwarding processing thread, including: the detection unit is used for detecting the state attributes of K forwarding processing threads of a virtual switch vSwitch in a host machine;
an adjusting unit, configured to adjust, when it is detected that state attributes of K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads, where K is a positive integer.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the state attribute of the forwarding processing thread includes at least one of the following state attributes: affinity between a processor of the forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic forwarded and processed by the forwarding processing thread, wherein the service priority of the key traffic is higher than a priority threshold.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the adjustment triggering condition includes at least one of the following conditions:
the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
The adjusting of the switch ports served by at least 1 of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the key traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the key traffic is reduced, the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the exchange port served by the processor is improved, and the load balance among the K forwarding processing threads is improved.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the status attribute of the forwarding processing thread includes a remaining forwarding resource amount and/or a remaining forwarding resource amount proportion of the forwarding processing thread; the adjusting unit is specifically configured to obtain a load balancing degree between the K forwarding processing threads based on remaining forwarding resource amounts and/or remaining forwarding resource amount ratios of the K forwarding processing threads, and adjust an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads if the obtained load balancing degree between the K forwarding processing threads is lower than a second threshold, so as to improve the load balancing degree between the K forwarding processing threads.
With reference to the second possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the state attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread;
the adjusting unit is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
the adjusting unit is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
the adjusting unit is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
With reference to the second possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread;
the adjusting unit is specifically configured to, if it is detected that a remaining forwarding resource amount occupation ratio of a forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that a remaining forwarding resource amount occupation ratio of a forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and in a case that a forwarding processing thread serving as a switch port j3 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, adjust the forwarding processing thread serving as the switch port j3 to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
the adjusting unit is specifically configured to, if it is detected that the remaining proportion of forwarding resource amounts of forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the proportion of remaining forwarding resource amounts of forwarding processing thread x2 in the K forwarding processing threads is larger than the fourth threshold, and in a case that the forwarding processing thread serving K3 switching ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switching ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, enable both the remaining proportions of forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 to be larger than the fourth threshold, adjust the forwarding processing thread serving K3 switching ports to the forwarding processing thread x1 as the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
With reference to the second possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
the adjusting unit is specifically configured to, when it is detected that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to a same affinity node as a switch port j4 of the vSwitch that the processor serves, adjust a forwarding processing thread serving for the switch port j4 from the forwarding processing thread x3 to a forwarding processing thread x4, where a processor of the forwarding processing thread x4 and the switch port j4 belong to the same affinity node.
With reference to the second possible implementation manner of the second aspect, in a seventh possible implementation manner of the second aspect, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by the critical traffic forwarded by the forwarding processing thread,
the adjusting unit is specifically configured to, if it is detected that a forwarding resource quota actually occupied by a critical traffic of an exchange port j5 served by a forwarding processing thread x1 in the K forwarding processing threads is smaller than a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, an exchange port served by the forwarding processing thread x1 includes an exchange port j5 and an exchange port j6, and adjust the forwarding processing thread served by the exchange port j6 from the forwarding processing thread x1 to a forwarding processing thread x 2;
or,
the adjusting unit is specifically configured to, if it is detected that a forwarding resource quota actually occupied by a critical traffic of an exchange port j5 served by a forwarding processing thread x1 in the K forwarding processing threads is smaller than a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, and it is detected that a remaining forwarding resource quota of a forwarding processing thread x2 in the K forwarding processing threads is greater than or equal to a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, an exchange port served by the forwarding processing thread x1 includes an exchange port j5 and an exchange port j6, and a forwarding processing thread served by the exchange port j6 is adjusted to be a forwarding processing thread x2 by a forwarding processing thread x 1.
With reference to the sixth possible implementation manner of the second aspect, in an eighth possible implementation manner of the second aspect, the affinity node is a non-uniform memory access (NUMA) architecture node.
With reference to the second aspect or any one of the first to eighth possible implementation manners of the second aspect, in a ninth possible implementation manner of the second aspect, the switch port includes a virtual switch port and/or a physical switch port, and the virtual switch port is connected to a virtual machine running on the host.
A third aspect of the present invention provides a computing node comprising:
the virtual switch comprises a hardware layer, a host machine running on the hardware layer and at least one virtual machine running on the host machine, wherein the hardware layer comprises K processors, and K forwarding processing threads of a virtual switch vSwitch in the host machine are in one-to-one correspondence with the K processors;
the host is used for detecting the state attributes of K forwarding processing threads of the vSwitch in the host; and under the condition that the state attributes of K forwarding processing threads of the vSwitch are detected to meet preset adjustment triggering conditions, adjusting switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the state attribute of the forwarding processing thread includes at least one of the following state attributes: affinity between a processor of the forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic forwarded and processed by the forwarding processing thread, wherein the service priority of the key traffic is higher than a priority threshold.
With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the adjustment triggering condition includes at least one of the following conditions:
the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
The adjusting of the switch ports served by at least 1 of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the key traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the key traffic is reduced, the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the exchange port served by the processor is improved, and the load balance among the K forwarding processing threads is improved.
With reference to the second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the status attribute of the forwarding processing thread includes a remaining forwarding resource amount and/or a remaining forwarding resource amount proportion of the forwarding processing thread; in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when it is detected that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment triggering condition, the host is specifically configured to obtain a load balancing degree between the K forwarding processing threads based on remaining forwarding resource amounts and/or remaining forwarding resource amount ratios of the K forwarding processing threads, and if the obtained load balancing degree between the K forwarding processing threads is lower than a second threshold, adjust the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads to improve the load balancing degree between the K forwarding processing threads.
With reference to the second possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the state attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread; wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host is specifically configured to,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
With reference to the second possible implementation manner of the third aspect, in a fifth possible implementation manner of the third aspect, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread;
wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host is specifically configured to,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
With reference to the second possible implementation manner of the third aspect, in a sixth possible implementation manner of the third aspect, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host is specifically configured to,
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
With reference to the second possible implementation manner of the third aspect, in a seventh possible implementation manner of the third aspect, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by critical traffic forwarded and processed by the forwarding processing thread,
wherein, in the case of detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, the host is specifically configured to adjust an aspect of a switch port served by at least 1 forwarding processing thread of the K forwarding processing threads, where the switch port is served by at least 1 forwarding processing thread of the K forwarding processing threads, and the host is configured to perform the adjustment on the switch port
If it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or, if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 in the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
With reference to the sixth possible implementation manner of the third aspect, in an eighth possible implementation manner of the third aspect, the affinity node is a non-uniform memory access NUMA node.
With reference to the third aspect or any one of the first to eighth possible implementation manners of the third aspect, in a ninth possible implementation manner of the third aspect, the switch port includes a virtual switch port and/or a physical switch port, and the virtual switch port is connected to a virtual machine running on the host.
It can be seen that in the technical solution of the embodiment of the present invention, by detecting the state attributes of K forwarding processing threads of a vSwitch in a host, and when it is detected that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads is adjusted. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a diagram of a virtualization architecture according to an embodiment of the present invention;
FIGS. 2-a and 2-b are schematic diagrams of two other virtualization architectures provided by embodiments of the present invention;
fig. 3 is a flowchart illustrating a method for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention;
fig. 4-a is a schematic flowchart of another method for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention;
FIG. 4-b is a schematic diagram of a service relationship between a switch port and a forwarding processing thread according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating another method for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating another method for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention;
FIG. 7-a is a schematic diagram of an apparatus for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention;
7-b and 7-c are schematic diagrams of two arrangements for adjusting the switch port of the forwarding processing thread according to the embodiment of the present invention;
FIG. 8 is a diagram of a compute node according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for adjusting an exchange port of a forwarding processing thread, aiming to improve the utilization rate of forwarding resources and the adaptive capacity of network flow change.
In order to make the technical solutions of the present invention better understood, 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.
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of the invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
To facilitate an understanding of the embodiments of the present invention, a few elements that will be introduced in the description of the embodiments of the present invention are first introduced herein;
virtual machine VM:
one or more virtual computers can be simulated on one physical computer through virtual machine software, the virtual machines work like real computers, an operating system and an application program can be installed on the virtual machines, and the virtual machines can also access network resources. For applications running in a virtual machine, the virtual machine operates as if it were a real computer.
Hardware layer:
a hardware platform on which the virtualized environment runs. The hardware layer may include various hardware, for example, the hardware layer of a certain computing node may include a CPU and a Memory, and may further include a high-speed/low-speed Input/Output (I/O) device such as a network card and a Memory, and other devices having a specific processing function, such as an Input/Output Memory Management Unit (IOMMU), where the IOMMU may be used to convert a virtual machine physical address and a Host physical address.
Host (Host):
as management layer, it is used to complete the management and allocation of hardware resources; presenting a virtual hardware platform for a virtual machine; and the scheduling and isolation of the virtual machine are realized. Wherein, the Host may be a Virtual Machine Monitor (VMM); in addition, sometimes the VMM and 1 privileged virtual machine cooperate, the combination of which constitutes the Host. The virtual hardware platform provides various hardware resources for each virtual machine running thereon, such as virtual CPU, memory, virtual disk, virtual network card, and the like. The virtual disk may correspond to a file of the Host or a logical block device. The virtual machine runs on a virtual hardware platform prepared by the Host, and one or more virtual machines run on the Host.
Referring to fig. 2-a and 2-b, fig. 2-a and 2-b are schematic diagrams of two virtualization architectures of a computing node according to an embodiment of the present invention, where the architectures mainly include three layers: hardware layer, Host, and Virtual Machine (VM). The hardware layer may include a network card. A virtual switch (vSwitch) is deployed in the Host. The hardware layer further comprises K processors, wherein the K forwarding processing threads of the virtual switch vSwitch in the host machine are in one-to-one correspondence with the K processors.
In which different virtual switch ports in the architecture shown in fig. 2-a are connected to different virtual machines (a single virtual machine includes one switch port) running on top of the host. The virtual switch ports of the architecture shown in fig. 2-b may be connected to the same virtual machine running on top of the host (a single virtual machine may include multiple switch ports).
The technical solution of the embodiments of the present invention can be implemented based on the architecture shown in fig. 2-a or fig. 2-b or a modified architecture thereof.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention, where the method for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention may include:
301. the state attributes of K forwarding processing threads of a virtual switch (vSwitch) in a Host (Host) are detected.
The state attributes of the K forwarding processing threads of the vSwitch in the Host may be detected in real time or periodically, or may be detected under the trigger of some trigger conditions. The triggering condition may be, for example, a device restart, a component replacement, a virtual machine migration, or the like.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes at least one of the following state attributes: the method comprises the following steps of affinity between a processor of a forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic of the exchange port served by the forwarding processing thread (namely the forwarding resource limit actually occupied by the key traffic of the exchange port served by the forwarding processing thread), wherein the service priority of the key traffic is higher than a priority threshold.
302. And under the condition that the state attributes of K forwarding processing threads of the vSwitch are detected to meet preset adjustment triggering conditions, adjusting switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
The switching ports comprise virtual switching ports and/or physical switching ports, and the virtual switching ports are connected with virtual machines running on the host machines.
Wherein a virtual machine running on the host machine may provide a VAS.
Wherein adjusting the switch ports served by at least 1 of the K forwarding processing threads may include: adding, deleting and/or changing a switch port served by at least 1 of the K forwarding processing threads.
It can be seen that, in this embodiment, by detecting the state attributes of K forwarding processing threads of a vSwitch in a host, and when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads is adjusted. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
Optionally, in some possible embodiments of the present invention, the adjustment triggering condition includes at least one of the following conditions: the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
Optionally, in some possible embodiments of the present invention, the adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the critical traffic is reduced (for example, the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by the forwarding processing thread and the forwarding resource quota nominally occupied by the critical traffic does not exceed a preset range), the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the switching port served by the processor of the at least 1 forwarding processing thread is improved (for example, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is higher than the preset range), and the load balance between the K forwarding processing threads is improved (for example, the load balance between the K forwarding processing threads is higher than the preset range).
For example, assume that the adjustment trigger condition includes the following conditions: if the difference between the forwarding resource quota actually occupied by the critical traffic forwarded by the forwarding processing thread and the forwarding resource quota nominally occupied by the critical traffic exceeds a preset range, then the switching port served by at least 1 of the K forwarding processing threads is adjusted, so that the difference between the forwarding resource quota actually occupied by the critical traffic forwarded by at least 1 of the K forwarding processing threads and the forwarding resource quota nominally occupied by the critical traffic is reduced (for example, the difference between the forwarding resource quota actually occupied by the critical traffic forwarded by the forwarding processing threads and the forwarding resource quota nominally occupied by the critical traffic does not exceed the preset range).
By way of further example, assume that the adjustment trigger condition includes the following conditions: if the affinity between the processor of the forwarding processing thread and the switch port served by the processor is lower than the preset range, the switch port served by at least 1 of the K forwarding processing threads is adjusted, so that the affinity between the processor of at least 1 of the K forwarding processing threads and the switch port served by the processor of the at least 1 of the K forwarding processing threads is increased (if the affinity between the processor of the forwarding processing thread and the switch port served by the processor of the forwarding processing thread is higher than the preset range).
By way of further example, assume that the adjustment trigger condition includes the following conditions: if the load balance among the K forwarding processing threads is lower than the preset range, the load balance among the K forwarding processing threads is improved (for example, the load balance among the K forwarding processing threads is higher than the preset range).
In a case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, a specific implementation manner of adjusting the switch port served by at least 1 forwarding processing thread of the K forwarding processing threads may be various, and some possible implementation manners are exemplified below.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread may include, for example, a remaining forwarding resource quota and/or a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, in the case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads may include:
and if the obtained load balance among the K forwarding processing threads is lower than a second threshold value, adjusting the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads so as to improve the load balance among the K forwarding processing threads.
For example, a higher load balance indicates more balanced load, and a lower load balance indicates more unbalanced load. The second threshold may be, for example, 0.5, 0.6, 0.8, 0.9 or other values, assuming that the value range of the load balancing degree is 0-1.
For example, the load balancing degree may also be represented by a variance of remaining forwarding resource quota of K forwarding processing threads, where a larger variance indicates a lower load balancing degree, and a larger variance indicates a higher load balancing degree, and so on.
It can be understood that the load balance among the K forwarding processing threads is improved by adjusting the switching ports served by at least 1 forwarding processing thread of the K forwarding processing threads, which is beneficial to improving the forwarding resource utilization rate and the adaptive capacity of network traffic change under the virtual architecture.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
The value of the third threshold may be determined according to the total forwarding resource quota of the forwarding processing thread. Assuming that the total forwarding resource quota of the forwarding processing threads (forwarding processing threads x1 or x2) is 100, the third threshold may be equal to 10, 16, 8, 20, or other values, and so on.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capability of network traffic change.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
Wherein, the ratio of the surplus forwarding resource line is the ratio of the surplus forwarding resource line to the total forwarding resource line. Wherein the fourth threshold may be, for example, equal to 5%, 10%, 15, 17%, 9%, 20%, 25%, or other values.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is relatively small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capacity of the network traffic change.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
The inventor researches and realizes that the data transfer efficiency between the processors and the switching ports belonging to the same affinity node is generally higher than the data transfer efficiency between the processors and the switching ports belonging to different affinity nodes, so that the processors of the forwarding processing threads and the switching ports served by the processors belong to the same affinity node as much as possible by adjusting the forwarding processing threads serving the switching ports, and the related data transfer efficiency is improved.
Optionally, in some possible embodiments of the present invention, the affinity node may be a Non-Uniform Memory Access Architecture (NUMA) node or other nodes that can describe object affinity.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by critical traffic of an exchange port served by the forwarding processing thread.
Wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 among the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 among the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1.
The priority threshold may be equal to 1 or 2, for example, assuming there are 3 priority levels of traffic, i.e. level 1, level 2 and level 3, assuming there are 4 priority levels of traffic, i.e. level 1, level 2, level 3 and level 4, the priority threshold may be equal to 1, 2 or 3, for example, and so on. The value of the priority threshold can be determined according to specific needs.
It will be appreciated that the above example introduces a possible mechanism that is advantageous for ensuring the forwarding resource quota for high priority traffic. For example, the priority level of the heartbeat packet is usually higher than the priority levels of other flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the heartbeat packet as much as possible, and for example, the priority level of some core service flows is usually higher than the priority level of common service flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the core service flows as much as possible, and is favorable for improving the effective utilization rate of the forwarding resources under the virtual architecture and the adaptive capacity of network flow change.
It is to be understood that the foregoing examples only show some possible implementations of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy the preset adjustment trigger condition, and certainly, there may be other possible implementations of adjusting.
To facilitate a better understanding and an implementation of the above-described aspects of the embodiments of the present invention, some specific scenarios are illustrated below.
Referring to fig. 4-a, fig. 4-a is a flowchart illustrating a method for adjusting a switch port of a forwarding processing thread according to another embodiment of the present invention, where the method for adjusting a switch port of a forwarding processing thread according to another embodiment of the present invention may include:
401. after the computing node is powered on, the Host in the computing node initially configures the switching port served by the forwarding processing thread in the vSwitch in the Host.
The switching ports comprise virtual switching ports and/or physical switching ports, and the virtual switching ports are connected with virtual machines running on the host machines.
Wherein one forwarding processing thread may serve one or more switch ports.
Wherein the service relationship between one forwarding processing thread in vSwitch and a switch port may be as shown in fig. 4-b for example.
Among them, in a ServiceChain scenario in the NFV field, there are often adjustments and changes of VAS sequences, such as: a physical host operated by the VAS has a software upgrade scenario and a hardware failure scenario, and at this time, a VM on the physical host needs to be migrated. In a migration scenario of a VAS in ServiceChain, a forwarding flow policy on a vSwitch where the VAS is located needs to be migrated to a target vSwitch where the VAS is migrated. Also for example, the VAS itself may be out of service during operation due to traffic regulations, or due to internal anomalies. For another example, if a certain VAS processing capability becomes a performance bottleneck along with the development of a service, such VAS with the same function needs to be added to the service, and the service processing capability is improved through load balancing.
In the service scenarios illustrated above, the ports related to the VM corresponding to the VAS are embodied as operations of adding, deleting, and changing traffic on the vSwitch, and then the mechanism of this embodiment may be introduced to adjust the deployment.
The detected trigger condition may include, for example, that the VM running on the Host is increased, decreased, or changed. Or a VM adds, reduces or changes its switch port, a forwarding processing thread in a vSwitch adds, reduces or changes, although not limited to the above examples.
402. And the Host detects the state attributes of K forwarding processing threads of the vSwitch in the Host, wherein the state attributes of the forwarding processing threads comprise the remaining forwarding resource quota of the forwarding processing threads and/or the remaining forwarding resource quota occupation ratio of the forwarding processing threads.
Wherein, K forwarding processing threads in the vSwitch are in one-to-one correspondence with K processors in the compute nodes.
403. And under the condition that the state attributes of the K forwarding processing threads of the vSwitch are detected to meet a preset adjustment triggering condition, Host adjusts the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
In a case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, a specific implementation manner of adjusting the switch port served by at least 1 forwarding processing thread of the K forwarding processing threads may be various, and some possible implementation manners are exemplified below.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread may include, for example, a remaining forwarding resource quota and/or a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, in the case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads may include:
and if the obtained load balance among the K forwarding processing threads is lower than a second threshold value, adjusting the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads so as to improve the load balance among the K forwarding processing threads.
For example, a higher load balance indicates more balanced load, and a lower load balance indicates more unbalanced load. The second threshold may be, for example, 0.5, 0.6, 0.8, 0.9 or other values, assuming that the value range of the load balancing degree is 0-1.
For example, the load balancing degree may also be represented by a variance of remaining forwarding resource quota of K forwarding processing threads, where a larger variance indicates a lower load balancing degree, and a larger variance indicates a higher load balancing degree, and so on.
It can be understood that the load balance among the K forwarding processing threads is improved by adjusting the switching ports served by at least 1 forwarding processing thread of the K forwarding processing threads, which is beneficial to improving the forwarding resource utilization rate and the adaptive capacity of network traffic change under the virtual architecture.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
The value of the third threshold may be determined according to the total forwarding resource quota of the forwarding processing thread. Assuming that the total forwarding resource quota of the forwarding processing threads (forwarding processing threads x1 or x2) is 100, the third threshold may be equal to 10, 16, 8, 20, or other values, and so on.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capability of network traffic change.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
Wherein, the ratio of the surplus forwarding resource line is the ratio of the surplus forwarding resource line to the total forwarding resource line. Wherein the fourth threshold may be, for example, equal to 5%, 10%, 15, 17%, 9%, 20%, 25%, or other values.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is relatively small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capacity of the network traffic change.
It can be seen that, in this embodiment, by detecting state attributes of K forwarding processing threads of a vSwitch in a host, for example, a remaining forwarding resource amount of the forwarding processing thread and/or a remaining forwarding resource amount proportion of the forwarding processing thread, and on the condition that the state attributes of the K forwarding processing threads of the vSwitch are detected to meet a preset adjustment trigger condition, an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads is adjusted. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for adjusting a switch port of a forwarding processing thread according to another embodiment of the present invention, where the method for adjusting a switch port of a forwarding processing thread according to another embodiment of the present invention may include:
501. after the computing node is powered on, the Host in the computing node initially configures the switching port served by the forwarding processing thread in the vSwitch in the Host.
The switching ports comprise virtual switching ports and/or physical switching ports, and the virtual switching ports are connected with virtual machines running on the host machines.
Wherein one forwarding processing thread may serve one or more switch ports.
In some computing node configurations for running ServiceChain services, an intelligent physical network card of an Intel or other manufacturer is generally selected as a device for VAS external communication, and in some environments, the physical network card has affinity with a specific NUMA node of a server, so a CPU for processing IO of the physical network card needs to ensure that the physical network card has the same NUMA node, and the performance can be optimal, otherwise, performance degradation of about 30% may occur due to cross-NUMA IO access.
Similarly, virtual switch ports also suffer from NUMA node ownership issues, and virtual switch ports can also suffer performance degradation due to cross-NUMA IO accesses.
In the service scenarios illustrated above, the ports related to the VM corresponding to the VAS are embodied as operations of adding, deleting, and changing traffic on the vSwitch, and then the mechanism of this embodiment may be introduced to adjust the deployment.
The detected trigger condition may include, for example, that the VM running on Host has been added, subtracted, or changed. Or the VM increases, decreases or changes its switching port, or the forwarding processing thread in the vSwitch increases, decreases or changes, or the computing node changes or adds a physical network card, etc., which is not limited to the above examples.
502. The Host detects state attributes of K forwarding processing threads of the vSwitch in the Host, wherein the state attributes of the forwarding processing threads comprise the affinity between processors of the forwarding processing threads and the switching ports served by the processors.
Wherein, K forwarding processing threads in the vSwitch are in one-to-one correspondence with K processors in the compute nodes.
503. And under the condition that the state attributes of the K forwarding processing threads of the vSwitch are detected to meet a preset adjustment triggering condition, Host adjusts the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
In a case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, a specific implementation manner of adjusting the switch port served by at least 1 forwarding processing thread of the K forwarding processing threads may be various, and some possible implementation manners are exemplified below.
Optionally, in some possible embodiments of the present invention, in a case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads may include:
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
Specifically, for example, the adjusting of the forwarding processing thread serving the switch port j4 to the forwarding processing thread x4 by the forwarding processing thread x3 includes: and when the remaining forwarding resource limit of the forwarding processing thread x4 is greater than the forwarding resource limit occupied by the traffic of the switching port j4, adjusting the forwarding processing thread serving for the switching port j4 from the forwarding processing thread x3 to the forwarding processing thread x 4.
Optionally, in some possible embodiments of the invention, the affinity node may be a non-uniform memory access architecture (NUMA) node or other node that can describe object affinity.
It can be seen that, in this embodiment, by detecting state attributes of K forwarding processing threads of a vSwitch in a host, for example, affinity between a processor of the forwarding processing thread and a switching port served by the processor, and the like, and in a case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, an switching port served by at least 1 forwarding processing thread of the K forwarding processing threads is adjusted. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
The inventor researches and realizes that the data transfer efficiency between the processors and the switching ports belonging to the same affinity node is generally higher than the data transfer efficiency between the processors and the switching ports belonging to different affinity nodes, so that the processors of the forwarding processing threads and the switching ports served by the processors belong to the same affinity node as much as possible by adjusting the forwarding processing threads serving the switching ports, and the related data transfer efficiency is improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for adjusting a switch port of a forwarding processing thread according to another embodiment of the present invention, where the method for adjusting a switch port of a forwarding processing thread according to another embodiment of the present invention may include:
601. after the computing node is powered on, the Host in the computing node initially configures the switching port served by the forwarding processing thread in the vSwitch in the Host.
When the Host initially configures the switching port served by the forwarding processing thread, the forwarding processing thread can be preferentially configured for the switching port with higher traffic priority.
The switching ports comprise virtual switching ports and/or physical switching ports, and the virtual switching ports are connected with virtual machines running on the host machines.
Wherein one forwarding processing thread may serve one or more switch ports.
For example, in a ServiceChain scenario, the VM supports the VAS function, and simultaneously needs a virtual network card of another network plane for management and environment configuration. Because the number of hardware network cards of the compute node is limited, a virtual network card of a management plane of the VM may be connected to a port of the vSwitch, and at this time, the service traffic and the management traffic are completed on the same vSwitch, although the traffic of the management plane is not large, the basic capability of the management plane needs to be guaranteed for processing, otherwise, the VAS may be affected by heartbeat interruption. Therefore, the ports associated with such management plane have higher priority, and the forwarding resource amount of such high-priority ports needs to be guaranteed as much as possible.
Of course, the forwarding resource quota of some core services should be guaranteed as much as possible.
602. The method comprises the steps that the Host detects state attributes of K forwarding processing threads of vSwitch in the Host, wherein the state attributes of the forwarding processing threads comprise forwarding resource limits actually occupied by key flow of an exchange port served by the forwarding processing threads.
Wherein, K forwarding processing threads in the vSwitch are in one-to-one correspondence with K processors in the compute nodes.
The priority threshold may be equal to 1 or 2, assuming there are 3 priority levels of traffic, i.e. level 1, level 2 and level 3, assuming there are 4 priority levels of traffic, i.e. level 1, level 2, level 3 and level 4, the priority threshold may be equal to 1, 2 or 3, for example, and so on. The value of the priority threshold can be determined according to specific needs.
603. And under the condition that the state attributes of the K forwarding processing threads of the vSwitch are detected to meet a preset adjustment triggering condition, Host adjusts the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
In a case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, a specific implementation manner of adjusting the switch port served by at least 1 forwarding processing thread of the K forwarding processing threads may be various, and some possible implementation manners are exemplified below.
Wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 among the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 among the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1.
It can be seen that, in this embodiment, by detecting state attributes of K forwarding processing threads of a vSwitch in a host, the state attributes of the forwarding processing threads include forwarding resource amounts actually occupied by critical traffic of an exchange port served by the forwarding processing threads, and when it is detected that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment triggering condition, an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads is adjusted. Due to the introduction of the mechanism which can adjust the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
Among other things, the above examples introduce possible mechanisms that are advantageous for ensuring the forwarding resource quota for high priority traffic. For example, the priority level of the heartbeat packet is usually higher than the priority levels of other flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the heartbeat packet as much as possible, and for example, the priority level of some core service flows is usually higher than the priority level of common service flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the core service flows as much as possible, and is favorable for improving the effective utilization rate of the forwarding resources under the virtual architecture and the adaptive capacity of network flow change.
The embodiment of the invention also provides a relevant device for implementing the scheme.
Referring to fig. 7-a, an apparatus 700 for adjusting a switch port of a forwarding processing thread according to an embodiment of the present invention may include:
a detecting unit 710, configured to detect state attributes of K forwarding processing threads of a virtual switch vSwitch in a host;
an adjusting unit 720, configured to, when it is detected that state attributes of K forwarding processing threads of the vSwitch meet a preset adjustment triggering condition, adjust a switch port served by at least 1 forwarding processing thread of the K forwarding processing threads, where K is a positive integer.
Optionally, in some possible embodiments of the present invention, the switch port includes a virtual switch port and/or a physical switch port, where the virtual switch port is connected to a virtual machine running on the host.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes at least one of the following state attributes: affinity between a processor of the forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic forwarded and processed by the forwarding processing thread, wherein the service priority of the key traffic is higher than a priority threshold.
Optionally, in some possible embodiments of the present invention, the adjustment triggering condition includes at least one of the following conditions: the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
Optionally, in some possible embodiments of the present invention, the adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the critical traffic is reduced (for example, the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by the forwarding processing thread and the forwarding resource quota nominally occupied by the critical traffic does not exceed a preset range), the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the switching port served by the processor of the at least 1 forwarding processing thread is improved (for example, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is higher than the preset range), and the load balance between the K forwarding processing threads is improved (for example, the load balance between the K forwarding processing threads is higher than the preset range).
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource amount and/or a remaining forwarding resource amount proportion of the forwarding processing thread; the adjusting unit 720 is specifically configured to obtain a load balancing degree between the K forwarding processing threads based on the remaining forwarding resource amounts and/or remaining forwarding resource amount ratios of the K forwarding processing threads, and adjust an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads if the obtained load balancing degree between the K forwarding processing threads is lower than a second threshold, so as to improve the load balancing degree between the K forwarding processing threads.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread;
the adjusting unit 720 is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
the adjusting unit 720 is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
the adjusting unit 720 is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread;
the adjusting unit 720 is specifically configured to, if it is detected that the remaining proportion of the forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining proportion of the forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving as the switch port j3 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining proportion of the forwarding resource amount of the forwarding processing thread x2 is still larger than the fourth threshold, adjust the forwarding processing thread serving as the switch port j3 to the forwarding processing thread x2 by the forwarding processing thread x 1;
or, the adjusting unit 720 is specifically configured to, if it is detected that the remaining proportion of forwarding resource quota of forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the proportion of remaining forwarding resource quota of forwarding processing thread x2 in the K forwarding processing threads is larger than the fourth threshold, and in a case that the forwarding processing thread serving K3 switching ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switching ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, enable the remaining proportions of forwarding resource quota of the forwarding processing thread x2 and the forwarding processing thread x1 to be both larger than the fourth threshold, adjust the forwarding processing threads serving K3 switching ports to the forwarding processing thread x1 to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
the adjusting unit 720 is specifically configured to, when it is detected that the processor of the forwarding processing thread x3 in the K forwarding processing threads and the switch port j4 of the vSwitch that the processor serves do not belong to the same affinity node, adjust the forwarding processing thread serving for the switch port j4 from the forwarding processing thread x3 to the forwarding processing thread x4, where the processor of the forwarding processing thread x4 and the switch port j4 belong to the same affinity node.
For example, the adjusting unit 720 is specifically configured to, when it is detected that the processor of the forwarding processing thread x3 in the K forwarding processing threads and the switching port j4 of the vSwitch that the processor serves do not belong to the same affinity node, and when it is detected that the remaining forwarding resource quota of the forwarding processing thread x4 is greater than the forwarding resource quota occupied by the traffic of the switching port j4, adjust the forwarding processing thread serving for the switching port j4 from the forwarding processing thread x3 to the forwarding processing thread x4, where the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
Optionally, in some possible embodiments of the present invention, the affinity node is a non-uniform memory access NUMA node.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by the critical traffic of the forwarding processing thread,
the adjusting unit 720 is specifically configured to, if it is detected that a forwarding resource quota actually occupied by a critical traffic of an exchange port j5 served by a forwarding processing thread x1 in the K forwarding processing threads is smaller than a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, an exchange port served by the forwarding processing thread x1 includes an exchange port j5 and an exchange port j6, and adjust the forwarding processing thread served by the exchange port j6 from the forwarding processing thread x1 to a forwarding processing thread x 2;
or,
the adjusting unit 720 is specifically configured to, if it is detected that a forwarding resource quota actually occupied by a critical traffic of an exchange port j5 served by a forwarding processing thread x1 in the K forwarding processing threads is smaller than a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, and it is detected that a remaining forwarding resource quota of a forwarding processing thread x2 in the K forwarding processing threads is greater than or equal to a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, an exchange port served by the forwarding processing thread x1 includes an exchange port j5 and an exchange port j6, and adjust the forwarding processing thread served by the exchange port j6 to be the forwarding processing thread x2 by the forwarding processing thread x 1.
It can be understood that the functions of the modules of the apparatus 700 for adjusting the switch port of the forwarding processing thread in this embodiment may be specifically implemented according to the method described in the foregoing embodiment, and the specific implementation process of the method may refer to the relevant description in the foregoing embodiment, which is not described herein again. The means 700 for adjusting the switch port of the forwarding processing thread may be, for example, Host or vSwitch, or as shown in fig. 7-b for example, the means 700 for adjusting the switch port of the forwarding processing thread may be deployed in Host, or as shown in fig. 7-c for example, the means 700 for adjusting the switch port of the forwarding processing thread may be deployed in vSwitch.
It can be seen that, in this embodiment, the apparatus 700 adjusts the switch ports served by at least 1 forwarding processing thread in the K forwarding processing threads by detecting the state attributes of the K forwarding processing threads of the vSwitch in the host, and when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
Referring to fig. 8, an embodiment of the present invention further provides a computing node 800, which may include:
a hardware layer 810, a host 820 running on top of the hardware layer 810, and at least one virtual machine 830 running on top of the host 820.
The hardware layer 810 includes K processors, and the K forwarding processing threads of the virtual switch 821 in the host 820 are in one-to-one correspondence with the K processors.
The host 820 is configured to detect state attributes of K forwarding processing threads of a virtual switch 821 in the host; and under the condition that it is detected that the state attributes of K forwarding processing threads of the virtual switch 821 satisfy a preset adjustment triggering condition, adjusting the switching ports served by at least 1 forwarding processing thread of the K forwarding processing threads, where K is a positive integer.
The Host 820 may detect the state attributes of the K forwarding processing threads of the vSwitch in the Host in real time or periodically, or may detect the state attributes of the K forwarding processing threads of the vSwitch in the Host under the trigger of some trigger conditions. The trigger condition may be, for example, a device restart, a component replacement, a virtual machine migration, and the like.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes at least one of the following state attributes: the method comprises the following steps of affinity between a processor of a forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic of the exchange port served by the forwarding processing thread (namely the forwarding resource limit actually occupied by the key traffic of the exchange port served by the forwarding processing thread), wherein the service priority of the key traffic is higher than a priority threshold.
Optionally, in some possible embodiments of the present invention, the adjustment triggering condition includes at least one of the following conditions: the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
Optionally, in some possible embodiments of the present invention, the adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the critical traffic is reduced (for example, the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by the forwarding processing thread and the forwarding resource quota nominally occupied by the critical traffic does not exceed a preset range), the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the switching port served by the processor of the at least 1 forwarding processing thread is improved (for example, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is higher than the preset range), and the load balance between the K forwarding processing threads is improved (for example, the load balance between the K forwarding processing threads is higher than the preset range).
The switching ports comprise virtual switching ports and/or physical switching ports, and the virtual switching ports are connected with virtual machines running on the host machines.
In the case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy the preset adjustment triggering condition, the host 820 may adjust the specific implementation manner of the switch port served by at least 1 forwarding processing thread of the K forwarding processing threads, which may be various, for example, some possible adjustment implementation manners are described below.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread may include, for example, a remaining forwarding resource quota and/or a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy the preset adjustment triggering condition, the host 820 may specifically be configured to:
and if the obtained load balance among the K forwarding processing threads is lower than a second threshold value, adjusting the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads so as to improve the load balance among the K forwarding processing threads.
For example, a higher load balance indicates more balanced load, and a lower load balance indicates more unbalanced load. The second threshold may be, for example, 0.5, 0.6, 0.8, 0.9 or other values, assuming that the value range of the load balancing degree is 0-1.
For example, the load balancing degree may also be represented by a variance of remaining forwarding resource quota of K forwarding processing threads, where a larger variance indicates a lower load balancing degree, and a larger variance indicates a higher load balancing degree, and so on.
It can be understood that the load balance among the K forwarding processing threads is improved by adjusting the switching ports served by at least 1 forwarding processing thread of the K forwarding processing threads, which is beneficial to improving the forwarding resource utilization rate and the adaptive capacity of network traffic change under the virtual architecture.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread; wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host 820 may specifically be configured to:
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
The value of the third threshold may be determined according to the total forwarding resource quota of the forwarding processing thread. Assuming that the total forwarding resource quota of the forwarding processing threads (forwarding processing threads x1 or x2) is 100, the third threshold may be equal to 10, 16, 8, 20, or other values, and so on.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capability of network traffic change.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host 820 may specifically be configured to:
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
Wherein, the ratio of the surplus forwarding resource line is the ratio of the surplus forwarding resource line to the total forwarding resource line. Wherein the fourth threshold may be, for example, equal to 5%, 10%, 15, 17%, 9%, 20%, 25%, or other values.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is relatively small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capacity of the network traffic change.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host 820 may specifically be configured to:
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
The inventor researches and realizes that the data transfer efficiency between the processors and the switching ports belonging to the same affinity node is generally higher than the data transfer efficiency between the processors and the switching ports belonging to different affinity nodes, so that the processors of the forwarding processing threads and the switching ports served by the processors belong to the same affinity node as much as possible by adjusting the forwarding processing threads serving the switching ports, and the related data transfer efficiency is improved.
Optionally, in some possible embodiments of the invention, the affinity node may be a non-uniform memory access architecture (NUMA) node or other node that can describe object affinity.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by the critical traffic forwarded by the forwarding processing thread.
Wherein, in the aspect of adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet a preset adjustment trigger condition, the host 820 may specifically be configured to:
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 among the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 among the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1.
The priority threshold may for example be equal to 1 or 2, assuming there are 3 priority levels of traffic, i.e. level 1, level 2 and level 3, assuming there are 4 priority levels of traffic, i.e. level 1, level 2, level 3 and level 4, the priority threshold may for example be equal to 1, 2 or 3, and so on. The value of the priority threshold can be determined according to specific needs.
It will be appreciated that the above example introduces a possible mechanism that is advantageous for ensuring the forwarding resource quota for high priority traffic. For example, the priority level of the heartbeat packet is usually higher than the priority levels of other flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the heartbeat packet as much as possible, and for example, the priority level of some core service flows is usually higher than the priority level of common service flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the core service flows as much as possible, and is favorable for improving the effective utilization rate of the forwarding resources under the virtual architecture and the adaptive capacity of network flow change.
It can be understood that the foregoing examples only show some possible implementations of the host 820 for adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy the preset adjustment trigger condition, and certainly, other possible implementations of adjustment are also possible.
It can be understood that the functions of the modules of the computing node 800 in this embodiment may be specifically implemented according to the method introduced in the foregoing method embodiment, and the specific implementation process may refer to the relevant description in the foregoing embodiment, which is not described herein again.
It can be seen that in this embodiment, the host 820 adjusts the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads by detecting the state attributes of the K forwarding processing threads of the vSwitch in the host, and when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet the preset adjustment trigger condition. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention. Computer device 900 may include input device 903 (optional), output device 904 (optional), processor 901, and memory 905.
Memory 903 may include both read-only memory and random access memory, among other things, and provides instructions and data to processor 902. A portion of the memory 903 may also include non-volatile random access memory (NVRAM).
In some embodiments, memory 903 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
host machine (Host) as management layer to complete hardware resource management and distribution; presenting a virtual hardware platform for a virtual machine; and the scheduling and isolation of the virtual machine are realized. Wherein, the Host may be a Virtual Machine Monitor (VMM); in addition, sometimes the VMM and 1 privileged virtual machine cooperate, the combination of which constitutes the Host. The virtual hardware platform provides various hardware resources for each virtual machine running thereon, such as a virtual processor, a memory, a virtual disk, a virtual network card, and the like. The virtual disk may correspond to a file of the Host or a logical block device. The virtual machine runs on a virtual hardware platform prepared by the Host, and one or more virtual machines run on the Host.
Virtual machine: one or more virtual computers can be simulated on one physical computer through virtual machine software, the virtual machines work like real computers, an operating system and an application program can be installed on the virtual machines, and the virtual machines can also access network resources. For applications running in a virtual machine, the virtual machine operates as if it were a real computer.
The host includes, but is not limited to, a detection unit 710 and an adjustment unit 720.
For specific implementation of each module in the host machine, refer to the corresponding module in the embodiment shown in fig. 7-a, which is not described herein again.
In the embodiment of the present invention, the processor 902 is configured to, by calling an operation instruction (which may be stored in an operating system) stored in the memory 903: detecting state attributes of K forwarding processing threads of a virtual switch vSwitch in a host machine; and under the condition that the state attributes of K forwarding processing threads of the vSwitch are detected to meet preset adjustment triggering conditions, adjusting switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer.
The processor 902 controls the operation of the computer device 900, wherein the processor 902 may also be referred to as a CPU. The memory 903 may include both read-only memory and random access memory, and provides instructions and data to the processor 902. A portion of the memory 903 may also include non-volatile random access memory (NVRAM), among others. In a particular application, the various components of the gateway 900 are coupled together by a bus system 905, where the bus system 905 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For clarity of illustration, however, the various buses are labeled in the figure as bus system 905.
The method disclosed in the above embodiments of the present invention may be applied to the processor 902, or implemented by the processor 902. The processor 902 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 902. The processor 902 may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 903, and the processor 902 reads the information in the memory 903 and performs the steps of the above method in combination with the hardware thereof.
It can be seen that, in this embodiment, the processor 902 adjusts the switching ports served by at least 1 forwarding processing thread of the K forwarding processing threads by detecting the state attributes of the K forwarding processing threads of the vSwitch in the host, and when detecting that the state attributes of the K forwarding processing threads of the vSwitch meet the preset adjustment trigger condition. Due to the introduction of the mechanism capable of adjusting the switching ports served by the forwarding processing threads according to the state attributes of the forwarding processing threads of the vSwitch, the switching ports served by the forwarding processing threads can be dynamically changed, and the traditional mechanism that the forwarding processing threads and the switching ports served by the forwarding processing threads are always fixedly bound is abandoned, so that the improvement of the utilization rate of forwarding resources and the adaptive capacity of network traffic change under the virtual architecture is facilitated.
The state attributes of the K forwarding processing threads of the vSwitch in the Host may be detected in real time or periodically, or may be detected under the trigger of some trigger conditions. The triggering condition may be, for example, a device restart, a component replacement, a virtual machine migration, or the like.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes at least one of the following state attributes: the method comprises the following steps of affinity between a processor of a forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic of the exchange port served by the forwarding processing thread (namely the forwarding resource limit actually occupied by the key traffic of the exchange port served by the forwarding processing thread), wherein the service priority of the key traffic is higher than a priority threshold.
The switching ports comprise virtual switching ports and/or physical switching ports, and the virtual switching ports are connected with virtual machines running on the host machines.
Wherein a virtual machine running on the host machine may provide a VAS.
Optionally, in some possible embodiments of the present invention, the adjustment triggering condition includes at least one of the following conditions: the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
Optionally, in some possible embodiments of the present invention, the adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the critical traffic is reduced (for example, the difference between the forwarding resource quota actually occupied by the critical traffic forwarded and processed by the forwarding processing thread and the forwarding resource quota nominally occupied by the critical traffic does not exceed a preset range), the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the switching port served by the processor of the at least 1 forwarding processing thread is improved (for example, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is higher than the preset range), and the load balance between the K forwarding processing threads is improved (for example, the load balance between the K forwarding processing threads is higher than the preset range).
When detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy the preset adjustment triggering condition, the processor 902 may adjust specific implementation manners of the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads, which may be various, for example, some possible adjustment implementation manners below.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread may include, for example, a remaining forwarding resource quota and/or a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, in the case that it is detected that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads may include:
and if the obtained load balance among the K forwarding processing threads is lower than a second threshold value, adjusting the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads so as to improve the load balance among the K forwarding processing threads.
For example, a higher load balance indicates more balanced load, and a lower load balance indicates more unbalanced load. The second threshold may be, for example, 0.5, 0.6, 0.8, 0.9 or other values, assuming that the value range of the load balancing degree is 0-1.
For example, the load balancing degree may also be represented by a variance of remaining forwarding resource quota of K forwarding processing threads, where a larger variance indicates a lower load balancing degree, and a larger variance indicates a higher load balancing degree, and so on.
It can be understood that the load balance among the K forwarding processing threads is improved by adjusting the switching ports served by at least 1 forwarding processing thread of the K forwarding processing threads, which is beneficial to improving the forwarding resource utilization rate and the adaptive capacity of network traffic change under the virtual architecture.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
The value of the third threshold may be determined according to the total forwarding resource quota of the forwarding processing thread. Assuming that the total forwarding resource quota of the forwarding processing threads (forwarding processing threads x1 or x2) is 100, the third threshold may be equal to 10, 16, 8, 20, or other values, and so on.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capability of network traffic change.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a remaining forwarding resource quota occupation ratio of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
Wherein, the ratio of the surplus forwarding resource line is the ratio of the surplus forwarding resource line to the total forwarding resource line. Wherein the fourth threshold may be, for example, equal to 5%, 10%, 15, 17%, 9%, 20%, 25%, or other values.
It can be understood that when the remaining forwarding resource quota of the forwarding processing thread is relatively small, the switching port served by the forwarding processing thread is adjusted (e.g., reduced or replaced), which is beneficial to improving the load balance among the K forwarding processing threads, and is beneficial to improving the forwarding resource utilization rate under the virtual architecture and the adaptive capacity of the network traffic change.
Optionally, in some possible embodiments of the present invention, the state attribute of the forwarding processing thread includes an affinity between a processor of the forwarding processing thread and a switch port served by the processor;
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
The inventor researches and realizes that the data transfer efficiency between the processors and the switching ports belonging to the same affinity node is generally higher than the data transfer efficiency between the processors and the switching ports belonging to different affinity nodes, so that the processors of the forwarding processing threads and the switching ports served by the processors belong to the same affinity node as much as possible by adjusting the forwarding processing threads serving the switching ports, and the related data transfer efficiency is improved.
Optionally, in some possible embodiments of the present invention, the affinity node may be a Non-Uniform Memory Access Architecture (NUMA) node or other nodes that can describe object affinity.
Optionally, in some possible embodiments of the present invention, the status attribute of the forwarding processing thread includes a forwarding resource quota actually occupied by the critical traffic forwarded by the forwarding processing thread.
Wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 among the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 among the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1.
The priority threshold may be equal to 1 or 2, for example, assuming there are 3 priority levels of traffic, i.e. level 1, level 2 and level 3, assuming there are 4 priority levels of traffic, i.e. level 1, level 2, level 3 and level 4, the priority threshold may be equal to 1, 2 or 3, for example, and so on. The value of the priority threshold can be determined according to specific needs.
It will be appreciated that the above example introduces a possible mechanism that is advantageous for ensuring the forwarding resource quota for high priority traffic. For example, the priority level of the heartbeat packet is usually higher than the priority levels of other flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the heartbeat packet as much as possible, and for example, the priority level of some core service flows is usually higher than the priority level of common service flows, so the mechanism based on the above example is favorable for ensuring the forwarding resource amount of the core service flows as much as possible, and is favorable for improving the effective utilization rate of the forwarding resources under the virtual architecture and the adaptive capacity of network flow change.
It is to be understood that the foregoing examples only show some possible implementations of the processor 902 adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy the preset adjustment trigger condition, and certainly, other possible implementations of adjustment are possible.
It can be understood that the functions of the modules of the computer device 900 in this embodiment may be specifically implemented according to the method described in the foregoing method embodiment, and the specific implementation process of the functions may refer to the relevant description in the foregoing embodiment, which is not described herein again.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, 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 instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solution of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (18)

1. A method for adjusting a switch port of a forwarding processing thread, comprising:
detecting state attributes of K forwarding processing threads of a virtual switch vSwitch in a host machine;
under the condition that the state attributes of K forwarding processing threads of the vSwitch are detected to meet preset adjustment triggering conditions, adjusting switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer;
wherein the adjustment trigger condition comprises at least one of the following conditions: the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
2. The method of claim 1, wherein the state attributes of the forwarding processing thread comprise at least one of the following: affinity between a processor of the forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic forwarded and processed by the forwarding processing thread, wherein the service priority of the key traffic is higher than a priority threshold.
3. The method of claim 2,
the adjusting of the switch ports served by at least 1 of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the key traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the key traffic is reduced, the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the exchange port served by the processor is improved, and the load balance among the K forwarding processing threads is improved.
4. The method of claim 3,
the state attribute of the forwarding processing thread comprises the remaining forwarding resource quota and/or the remaining forwarding resource quota proportion of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment triggering condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads includes:
and if the obtained load balance among the K forwarding processing threads is lower than a second threshold value, adjusting the switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads so as to improve the load balance among the K forwarding processing threads.
5. The method of claim 3, wherein the status attribute of the forwarding processing thread comprises a remaining forwarding resource quota of the forwarding processing thread; wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
6. The method of claim 3, wherein the status attribute of the forwarding processing thread comprises a remaining forwarding resource quota of the forwarding processing thread;
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and if the forwarding processing thread serving for the switch port j3 of the vSwitch is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, the forwarding processing thread serving for the switch port j3 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
if it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x1 of the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 of the K forwarding processing threads is greater than the fourth threshold, and in the case that the forwarding processing thread serving K3 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource occupation ratios of the forwarding processing thread x2 and the forwarding processing thread x1 can both be made greater than the fourth threshold, then the forwarding processing thread x1 adjusts the forwarding processing thread serving the K3 switch ports to the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
7. The method of claim 3,
the state attribute of the forwarding processing thread comprises the affinity between the processor of the forwarding processing thread and the switching port served by the processor;
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
when detecting that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to the same affinity node as a switching port j4 of the vSwitch that the processor serves, adjusting the forwarding processing thread serving the switching port j4 to be a forwarding processing thread x4 by the forwarding processing thread x3, wherein the processor of the forwarding processing thread x4 and the switching port j4 belong to the same affinity node.
8. The method of claim 3, wherein the status attribute of the forwarding processing thread includes a forwarding resource amount actually occupied by the critical traffic forwarded by the forwarding processing thread,
wherein, when detecting that the state attributes of the K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, adjusting the switch ports served by at least 1 forwarding processing thread of the K forwarding processing threads comprises:
if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to be the forwarding processing thread x2 by the forwarding processing thread x 1;
or, if it is detected that the forwarding resource quota actually occupied by the critical traffic of the switching port j5 served by the forwarding processing thread x1 in the K forwarding processing threads is smaller than the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, and it is detected that the remaining forwarding resource quota of the forwarding processing thread x2 in the K forwarding processing threads is greater than or equal to the forwarding resource quota nominally occupied by the critical traffic of the switching port j5, the switching port served by the forwarding processing thread x1 includes a switching port j5 and a switching port j6, and the forwarding processing thread served by the switching port j6 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
9. An apparatus for adjusting a switch port of a forwarding processing thread, comprising:
the detection unit is used for detecting the state attributes of K forwarding processing threads of a virtual switch vSwitch in a host machine;
an adjusting unit, configured to adjust, when it is detected that state attributes of K forwarding processing threads of the vSwitch satisfy a preset adjustment trigger condition, an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads, where K is a positive integer;
wherein the adjustment trigger condition comprises at least one of the following conditions:
the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
10. The apparatus of claim 9, wherein the state attributes of the forwarding processing thread comprise at least one of the following: affinity between a processor of the forwarding processing thread and an exchange port served by the processor, a residual forwarding resource limit of the forwarding processing thread, a residual forwarding resource limit proportion of the forwarding processing thread, and a forwarding resource limit actually occupied by key traffic forwarded and processed by the forwarding processing thread, wherein the service priority of the key traffic is higher than a priority threshold.
11. The apparatus of claim 10,
the adjusting of the switch ports served by at least 1 of the K forwarding processing threads is performed such that at least one of the following conditions is satisfied: the difference between the forwarding resource quota actually occupied by the key traffic forwarded and processed by at least 1 forwarding processing thread of the K forwarding processing threads and the forwarding resource quota nominally occupied by the key traffic is reduced, the affinity between the processor of at least 1 forwarding processing thread of the K forwarding processing threads and the exchange port served by the processor is improved, and the load balance among the K forwarding processing threads is improved.
12. The apparatus of claim 11,
the state attribute of the forwarding processing thread comprises the remaining forwarding resource quota and/or the remaining forwarding resource quota proportion of the forwarding processing thread; the adjusting unit is specifically configured to obtain a load balancing degree between the K forwarding processing threads based on remaining forwarding resource amounts and/or remaining forwarding resource amount ratios of the K forwarding processing threads, and adjust an exchange port served by at least 1 forwarding processing thread of the K forwarding processing threads if the obtained load balancing degree between the K forwarding processing threads is lower than a second threshold, so as to improve the load balancing degree between the K forwarding processing threads.
13. The apparatus of claim 11, wherein the status attribute of the forwarding processing thread comprises a remaining forwarding resource quota of the forwarding processing thread;
the adjusting unit is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving for the switch port j1 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount of the forwarding processing thread x2 can still be greater than the third threshold, the forwarding processing thread serving for the switch port j1 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
the adjusting unit is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 of the K forwarding processing threads is less than or equal to a third threshold, and it is detected that the remaining forwarding resource amount of the forwarding processing thread x2 of the K forwarding processing threads is greater than the third threshold, and in the case that the forwarding processing thread serving the K1 switch ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving the K2 switch ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, the remaining forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 can both be greater than the third threshold, the forwarding processing thread serving the K1 switch ports is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and adjusting forwarding processing threads serving the k2 switching ports to the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k1 and the k2 are positive integers;
or,
the adjusting unit is specifically configured to: if it is detected that the remaining forwarding resource amount of the forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a third threshold, and the sum of the remaining forwarding resource amount of the forwarding processing thread x1 and the forwarding resource amount occupied by the traffic rate of the switching port j2 currently served by the forwarding processing thread x1 is smaller than the remaining forwarding resource amount of the forwarding processing thread x2 in the K forwarding processing threads, the forwarding processing thread serving for the switching port j2 is adjusted to the forwarding processing thread x2 by the forwarding processing thread x 1.
14. The apparatus of claim 11, wherein the status attribute of the forwarding processing thread comprises a remaining forwarding resource quota of the forwarding processing thread;
the adjusting unit is specifically configured to, if it is detected that a remaining forwarding resource amount occupation ratio of a forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that a remaining forwarding resource amount occupation ratio of a forwarding processing thread x2 in the K forwarding processing threads is larger than a third threshold, and in a case that a forwarding processing thread serving as a switch port j3 of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, the remaining forwarding resource amount occupation ratio of the forwarding processing thread x2 can still be larger than the fourth threshold, adjust the forwarding processing thread serving as the switch port j3 to the forwarding processing thread x2 by the forwarding processing thread x 1;
or,
the adjusting unit is specifically configured to, if it is detected that the remaining proportion of forwarding resource amounts of forwarding processing thread x1 in the K forwarding processing threads is smaller than or equal to a fourth threshold, and it is detected that the proportion of remaining forwarding resource amounts of forwarding processing thread x2 in the K forwarding processing threads is larger than the fourth threshold, and in a case that the forwarding processing thread serving K3 switching ports of the vSwitch is adjusted to the forwarding processing thread x2 by the forwarding processing thread x1, and the forwarding processing thread serving K4 switching ports of the vSwitch is adjusted to the forwarding processing thread x1 by the forwarding processing thread x2, enable both the remaining proportions of forwarding resource amounts of the forwarding processing thread x2 and the forwarding processing thread x1 to be larger than the fourth threshold, adjust the forwarding processing thread serving K3 switching ports to the forwarding processing thread x1 as the forwarding processing thread x2, and adjusting the forwarding processing threads serving the k4 switching ports to be the forwarding processing thread x1 by the forwarding processing thread x2, wherein the k3 and the k4 are positive integers.
15. The apparatus of claim 11,
the state attribute of the forwarding processing thread comprises the affinity between the processor of the forwarding processing thread and the switching port served by the processor;
the adjusting unit is specifically configured to, when it is detected that a processor of a forwarding processing thread x3 in the K forwarding processing threads does not belong to a same affinity node as a switch port j4 of the vSwitch that the processor serves, adjust a forwarding processing thread serving for the switch port j4 from the forwarding processing thread x3 to a forwarding processing thread x4, where a processor of the forwarding processing thread x4 and the switch port j4 belong to the same affinity node.
16. The apparatus of claim 11,
the state attribute of the forwarding processing thread comprises the forwarding resource quota actually occupied by the key traffic forwarded by the forwarding processing thread,
the adjusting unit is specifically configured to, if it is detected that a forwarding resource quota actually occupied by a critical traffic of an exchange port j5 served by a forwarding processing thread x1 in the K forwarding processing threads is smaller than a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, an exchange port served by the forwarding processing thread x1 includes an exchange port j5 and an exchange port j6, and adjust the forwarding processing thread served by the exchange port j6 from the forwarding processing thread x1 to a forwarding processing thread x 2;
or,
the adjusting unit is specifically configured to, if it is detected that a forwarding resource quota actually occupied by a critical traffic of an exchange port j5 served by a forwarding processing thread x1 in the K forwarding processing threads is smaller than a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, and it is detected that a remaining forwarding resource quota of a forwarding processing thread x2 in the K forwarding processing threads is greater than or equal to a forwarding resource quota nominally occupied by a critical traffic of the exchange port j5, an exchange port served by the forwarding processing thread x1 includes an exchange port j5 and an exchange port j6, and a forwarding processing thread served by the exchange port j6 is adjusted to be a forwarding processing thread x2 by a forwarding processing thread x 1.
17. A computing node, comprising:
the virtual switch comprises a hardware layer, a host machine running on the hardware layer and at least one virtual machine running on the host machine, wherein the hardware layer comprises K processors, and K forwarding processing threads of a virtual switch vSwitch in the host machine are in one-to-one correspondence with the K processors;
the host is used for detecting the state attributes of K forwarding processing threads of the vSwitch in the host; under the condition that the state attributes of K forwarding processing threads of the vSwitch are detected to meet preset adjustment triggering conditions, adjusting switching ports served by at least 1 forwarding processing thread in the K forwarding processing threads, wherein K is a positive integer;
wherein the adjustment trigger condition comprises at least one of the following conditions:
the difference between the forwarding resource limit actually occupied by the key traffic forwarded and processed by the forwarding processing thread and the forwarding resource limit nominally occupied by the key traffic exceeds a preset range, the affinity between the processor of the forwarding processing thread and the switching port served by the processor of the forwarding processing thread is lower than the preset range, and the load balance among the K forwarding processing threads is lower than the preset range.
18. A storage medium characterized in that,
the storage medium stores a computer software product comprising instructions for causing a computer device to perform the method of any one of claims 1 to 8.
CN201510147499.3A 2015-03-31 2015-03-31 Adjust the method and relevant apparatus of the switching port of forward process thread Active CN104834566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510147499.3A CN104834566B (en) 2015-03-31 2015-03-31 Adjust the method and relevant apparatus of the switching port of forward process thread

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510147499.3A CN104834566B (en) 2015-03-31 2015-03-31 Adjust the method and relevant apparatus of the switching port of forward process thread

Publications (2)

Publication Number Publication Date
CN104834566A CN104834566A (en) 2015-08-12
CN104834566B true CN104834566B (en) 2018-09-07

Family

ID=53812474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510147499.3A Active CN104834566B (en) 2015-03-31 2015-03-31 Adjust the method and relevant apparatus of the switching port of forward process thread

Country Status (1)

Country Link
CN (1) CN104834566B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450538A (en) * 2015-10-15 2016-03-30 北京锐安科技有限公司 Load balancing method and apparatus
CN106603437A (en) * 2016-12-16 2017-04-26 南京铁道职业技术学院 Port distribution method and apparatus
CN108337102B (en) * 2017-01-19 2020-07-24 华为技术有限公司 Method and device for deploying and generating parameters and files in virtual network
CN110708209B (en) * 2019-08-28 2021-04-13 华云数据控股集团有限公司 Virtual machine flow acquisition method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102067533A (en) * 2009-05-15 2011-05-18 思科技术公司 Port grouping for association with virtual interfaces
US7962647B2 (en) * 2008-11-24 2011-06-14 Vmware, Inc. Application delivery control module for virtual network switch
CN102841810A (en) * 2011-05-14 2012-12-26 国际商业机器公司 Techniques for executing threads in a computing environment
CN103049336A (en) * 2013-01-06 2013-04-17 浪潮电子信息产业股份有限公司 Hash-based network card soft interrupt and load balancing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7555547B2 (en) * 2004-02-26 2009-06-30 Oracle International Corp. System and method for identifying network communications of a priority service among a plurality of services
US9736211B2 (en) * 2012-08-27 2017-08-15 Vmware, Inc. Method and system for enabling multi-core processing of VXLAN traffic
US9407580B2 (en) * 2013-07-12 2016-08-02 Nicira, Inc. Maintaining data stored with a packet

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7962647B2 (en) * 2008-11-24 2011-06-14 Vmware, Inc. Application delivery control module for virtual network switch
CN102067533A (en) * 2009-05-15 2011-05-18 思科技术公司 Port grouping for association with virtual interfaces
CN102841810A (en) * 2011-05-14 2012-12-26 国际商业机器公司 Techniques for executing threads in a computing environment
CN103049336A (en) * 2013-01-06 2013-04-17 浪潮电子信息产业股份有限公司 Hash-based network card soft interrupt and load balancing method

Also Published As

Publication number Publication date
CN104834566A (en) 2015-08-12

Similar Documents

Publication Publication Date Title
US11075842B2 (en) Inline load balancing
CN108475244B (en) Accelerating network packet processing
CN113556275B (en) Calculation method, calculation apparatus, and computer-readable storage medium
CN107409116B (en) Computing device, method, medium, and apparatus for managing virtual network functions
EP3001616B1 (en) Techniques for routing service chain flow packets between virtual machines
US20200287962A1 (en) Load balancing in a distributed system
US10545778B1 (en) Software redundancy for network functions
US20180357086A1 (en) Container virtual switching
CN104834566B (en) Adjust the method and relevant apparatus of the switching port of forward process thread
WO2018071176A1 (en) Generalized packet processing offload in a datacenter
KR102516167B1 (en) Method and apparatus for dynamic virtual system on chip
CN104272288A (en) SR-IOV failover & aggregation control system to ensure within-physical-port veb loopback
CN103699428A (en) Method and computer device for affinity binding of interrupts of virtual network interface card
CN103116517B (en) The method of adjustment of I/O passage and adjusting apparatus under virtual platform
CN106557444A (en) The method and apparatus for realizing SR-IOV network interface cards is, the method and apparatus for realizing dynamic migration
Niranjan Mysore et al. FasTrak: enabling express lanes in multi-tenant data centers
EP4141666A1 (en) Dual user space-kernel space datapaths for packet processing operations
US11301278B2 (en) Packet handling based on multiprocessor architecture configuration
Katsikas et al. Metron: High-performance NFV service chaining even in the presence of blackboxes
US20210224138A1 (en) Packet processing with load imbalance handling
Krude et al. Online reprogrammable multi tenant switches
Bonelli et al. The acceleration of OfSoftSwitch
US10459631B2 (en) Managing deletion of logical objects of a managed system
US20220321403A1 (en) Programmable network segmentation for multi-tenant fpgas in cloud infrastructures
Rathore et al. PC-based router virtualization with hardware support

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant