A tenant multi-network access method and system

By installing Multus-CNI and Kube-OVN plug-ins on the cloud computing platform and dynamically adjusting the DPDK mode and DMA polling method, the problem of Pod network isolation is solved, resource consumption is reduced, and the performance and reliability of the cloud computing platform are improved.

CN118524063BActive Publication Date: 2024-09-13YUNBIAN CLOUD TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410995209.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-09-13
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

In a cloud computing environment, the dynamics and elasticity of Pods make network isolation difficult to achieve, especially in multi-network card scenarios. Multus CNI and Kube-OVN have a large performance overhead when implementing network isolation, which affects the resource utilization of large cloud computing platforms. .

Method used

By installing Multus-CNI and Kube-OVN plug-ins in the cloud platform, create multiple subnets, and add preliminary queues between OVN management instances and OVS instances, dynamically adjust the DPDK mode and DMA polling method, and optimize according to load and traffic conditions. Data packet processing reduces resource consumption.

Benefits of technology

It effectively reduces the performance overhead of network isolation, improves the high availability and reliability of the cloud computing platform, optimizes resource utilization, and improves user experience and system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118524063B
    Figure CN118524063B
Patent Text Reader

Abstract

The present invention relates to the field of cloud computing, specifically to a tenant multi-network access method and system, if the subnets being used by the Pod on the same node do not all have DPDK mode turned on, then an OVN management instance, a first OVS instance and a second OVS instance are created; if the load of the core bound to the first OVS instance is higher than a threshold or the traffic corresponding to the subnet is greater than a preset value, then a subnet is selected from the subnets that have not turned on the DPDK mode, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding pre-queue; if the load of the core bound to the second OVS instance is higher than a threshold, the average number of data packets received by the DMA of the DPDK from the receiving queue of each network card within a preset time period is obtained, and the subnets that are turned from the DPDK mode on to the non-DPDK mode and the DMA polling method are adjusted according to the load of the core bound to the first OVS instance and the second OVS instance, and the average number. The present invention improves the load balancing capability of tenant multi-network access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer networks, and in particular to a tenant multi-network access method and system. Background Art

[0002] The multi-tenant architecture in the cloud computing environment enables different users or organizations to share the same physical infrastructure. Each tenant has its own independent data and applications. It is crucial to ensure the security and isolation of these resources in the shared environment. Network isolation is an important means to achieve secure isolation between tenants. For physical and virtual machines, network isolation can be achieved through technologies such as dedicated network hardware, VLAN, virtual switch (vSwitch) and software defined network (SDN), thereby ensuring that the network traffic of different tenants is independent and secure. However, Pods share the same network namespace by default, allowing them to directly access each other, which increases the difficulty of isolation. In addition, Pods are highly dynamic and elastic, and are frequently created and destroyed, requiring network isolation to respond and adjust quickly. In actual business, there are many scenarios that require Pods to support multiple network cards, such as optimizing network functions, flexible network configuration, and high redundancy.

[0003] Multus CNI allows a Pod to connect to multiple networks. Kube-OVN provides a rich set of network functions. The combination of Multus CNI and Kube-OVN can achieve network isolation, subnet management, load balancing, ACL, and network policies. However, configuring multiple network interfaces for each Pod will increase resource overhead, including more network bandwidth, CPU, and memory consumption. This will have a greater impact on large cloud computing platforms, especially when there are many tenants. How to reduce the performance overhead of Multus CNI and Kube-OVN when implementing network isolation is of great significance. Summary of the invention

[0004] In order to solve the above problem, the present invention provides a tenant multi-network access method, the method comprising the following steps:

[0005] Install Multus-CNI and Kube-OVN plug-ins in the cloud platform, use Kube-OVN to create multiple subnets and use Multus-CNI to configure at least one subnet for the Pod; if the subnets used by the Pods on the same node are not all in DPDK mode, create an OVN management instance, the first OVS instance, and the second OVS instance;

[0006] The OVN management instance adds multiple standby queues after the receiving queue corresponding to the second OVS instance, and the number of the standby queues is the same as the number of subnets that do not have the DPDK mode enabled; if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that do not have the DPDK mode enabled, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding standby queue;

[0007] If the load of the core bound to the second OVS instance is higher than the threshold, the average number of data packets received by the DPDK DMA from the receive queue of each network card within the preset time period is obtained, and the subnet that is changed from DPDK mode to DPDK mode and the DMA polling method are adjusted according to the load of the core bound to the first OVS instance and the second OVS instance and the average.

[0008] Preferably, if the load of the core bound to the first OVS instance is higher than a threshold or the traffic corresponding to the subnet is greater than a preset value, a subnet is selected from the subnets in which the DPDK mode is not enabled, specifically:

[0009] If the load of the core bound to the first OVS instance is higher than the threshold, the interrupt frequency of each subnet that does not have DPDK mode enabled is obtained, and the subnet with the largest interrupt frequency is selected;

[0010] If the flow rate corresponding to the subnet is greater than a preset value, the subnet is used as the selected subnet.

[0011] Preferably, after placing the to-be-processed data packets corresponding to the selected subnet into the corresponding pre-queue, the method further includes:

[0012] The OVN management instance freezes the selected subnet in the first OVS instance and sets the flag of the standby queue to be readable. The second OVS instance adds the standby queue to the DMA polling according to the flag in the standby queue.

[0013] Preferably, the load of the core bound to the first OVS instance and the second OVS instance, the average adjustment of the subnet from the DPDK mode to the DPDK mode and the DMA polling method are specifically:

[0014] Calculate the load difference between the core bound to the second OVS instance and the core bound to the first OVS instance, as well as the difference between the load of the core bound to the second OVS instance and the threshold, and determine the subnet to be adjusted from the DPDK mode to the DPDK mode according to the load difference, the difference and the average value; then, determine the DMA polling mode.

[0015] Preferably, determining and adjusting the subnet to be changed from the DPDK-enabled mode to the DPDK-disabled mode according to the load difference, the difference value and the average value is specifically:

[0016] A correspondence table between weighted results and the average values ​​is established in advance, a weighted result is calculated according to the load difference and the difference value in a weighted manner, a corresponding average value in the correspondence table is determined according to the weighted result, at least one subnet closest to the average value is selected, and the subnet is adjusted from the DPDK mode to the DPDK mode.

[0017] Preferably, the determining of the DMA polling mode is specifically:

[0018] If the difference between the load of the core bound to the second OVS instance after adjustment and the threshold is within a preset range, for the DPDK mode enabled subnet, the DMA polling interval corresponding to the subnet is determined according to the average of the DPDK mode enabled subnet.

[0019] In addition, the present invention also provides a tenant multi-network access system, the system comprising the following modules:

[0020] The subnet instance creation module is used to install Multus-CNI and Kube-OVN plug-ins in the cloud platform, use Kube-OVN to create multiple subnets, and use Multus-CNI to configure at least one subnet for the Pod; if the subnets used by the Pods on the same node do not all have DPDK mode enabled, an OVN management instance, a first OVS instance, and a second OVS instance are created;

[0021] The first adjustment module is used for the OVN management instance to add multiple standby queues after the receiving queue corresponding to the second OVS instance, and the number of the standby queues is the same as the number of subnets that do not enable the DPDK mode; if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that do not enable the DPDK mode, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding standby queue;

[0022] The second adjustment module is used to obtain the average number of data packets received by the DPDK DMA from the receive queue of each network card within a preset time period if the load of the core bound to the second OVS instance is higher than the threshold, and adjust the subnet that is changed from turning on the DPDK mode to not turning on the DPDK mode and the DMA polling method according to the load of the core bound to the first OVS instance and the second OVS instance and the average number.

[0023] Preferably, if the load of the core bound to the first OVS instance is higher than a threshold or the traffic corresponding to the subnet is greater than a preset value, a subnet is selected from the subnets in which the DPDK mode is not enabled, specifically:

[0024] If the load of the core bound to the first OVS instance is higher than the threshold, the interrupt frequency of each subnet that does not have DPDK mode enabled is obtained, and the subnet with the largest interrupt frequency is selected;

[0025] If the flow rate corresponding to the subnet is greater than a preset value, the subnet is used as the selected subnet.

[0026] Preferably, after placing the to-be-processed data packets corresponding to the selected subnet into the corresponding pre-queue, the method further includes:

[0027] The OVN management instance freezes the selected subnet in the first OVS instance and sets the flag of the standby queue to be readable. The second OVS instance adds the standby queue to the DMA polling according to the flag in the standby queue.

[0028] Preferably, the load of the core bound to the first OVS instance and the second OVS instance, the average adjustment of the subnet from the DPDK mode to the DPDK mode and the DMA polling method are specifically:

[0029] Calculate the load difference between the core bound to the second OVS instance and the core bound to the first OVS instance, as well as the difference between the load of the core bound to the second OVS instance and the threshold, and determine the subnet to be adjusted from the DPDK mode to the DPDK mode according to the load difference, the difference and the average value; then, determine the DMA polling mode.

[0030] Preferably, determining and adjusting the subnet to be changed from the DPDK-enabled mode to the DPDK-disabled mode according to the load difference, the difference value and the average value is specifically:

[0031] A correspondence table between weighted results and the average values ​​is established in advance, a weighted result is calculated according to the load difference and the difference value in a weighted manner, a corresponding average value in the correspondence table is determined according to the weighted result, at least one subnet closest to the average value is selected, and the subnet is adjusted from the DPDK mode to the DPDK mode.

[0032] Preferably, the determining of the DMA polling mode is specifically:

[0033] If the difference between the load of the core bound to the second OVS instance after adjustment and the threshold is within a preset range, for the DPDK mode enabled subnet, the DMA polling interval corresponding to the subnet is determined according to the average of the DPDK mode enabled subnet.

[0034] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0035] There are many tenants in cloud computing, and the system resources are limited, so the rational use of resources is particularly important. Based on this, the present invention adjusts the use of resources in tenant multi-network access. Specifically, according to whether the DPDK mode is turned on in the subnet being used, the subnet is allocated to the corresponding OVS instance, and the subnet mode and the corresponding OVS instance are adjusted according to the load of the core bound to the OVS instance and the data traffic of the subnet. Dynamically adjusting the load of the core where the OVS instance is located ensures the high availability, performance and reliability of cloud computing, and improves the user experience and the overall efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a flow chart of Embodiment 1;

[0037] Figure 2 This is a diagram of the relationship between Pods, subnets, and OVS instances;

[0038] Figure 3 This is a structural diagram of the second embodiment. DETAILED DESCRIPTION

[0039] In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. In the present invention, if it involves the collection of personal privacy data, such as face, mobile phone usage information, etc., the individual's permission will be obtained in advance, including but not limited to verbal reminders, posters, mobile phone reminders, etc.; if it involves conflicts with laws and regulations, it will be produced or used within the scope permitted by laws and regulations.

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] Embodiment 1, the present invention provides a tenant multi-network access method, such as Figure 1 As shown, the method comprises the following steps:

[0042] S1, install Multus-CNI and Kube-OVN plug-ins in the cloud platform, use Kube-OVN to create multiple subnets and use Multus-CNI to configure at least one subnet for the Pod; if the subnets used by the Pods on the same node do not all have DPDK mode enabled, create an OVN management instance, the first OVS instance, and the second OVS instance;

[0043] Multus-CNI is a Kubernetes container network interface (CNI) plug-in. Through Multus-CNI, Pods can access multiple network interfaces. Kube-OVN is a Kubernetes network plug-in built on OVN (Open Virtual Network). It mainly implements network functions in Kubernetes clusters through OVN and OVS (Open vSwitch). When using Multus-CNI and Kube-OVN to implement multi-network access, Multus-CNI, as a meta-plug-in, calls the delegated subnet, and Kube-OVN implements the delegated subnet function.

[0044] To implement multi-network access for tenants, you must first install Multus-CNI and Kube-OVN plug-ins in a cloud platform such as Kubernetes (K8S), then use Kube-OVN to create multiple subnets, and use Multus-CNI to configure subnets for Pods, such as Figure 2 As shown, each Pod is configured with at least one subnet. Figure 2The subnets connected to each Pod with solid lines are the subnets currently in use, and the subnets connected to each Pod with dotted lines are the additional subnets or backup subnets of the Pod. The subnets created by Kube-OVN have two packet processing modes, namely kernel path mode and DPDK mode. The kernel path mode requires processing packets in kernel state, and needs to switch between user state and kernel state continuously, but because of the use of kernel modules, the implementation is relatively simple; the DPDK mode does not process packets in kernel state, but in user state, which reduces the system switching between kernel state and user state, has a faster processing speed, and can achieve flexible programming, and can realize more complex functions.

[0045] For the subnets used by the Pods on the same node, determine whether the DPDK mode is enabled. If not, that is, the subnets used by the Pods on the same node are partially enabled in the DPDK mode and partially not enabled in the DPDK mode, then create an OVN management instance, a first OVS instance, and a second OVS instance. Among them, the node refers to a server or host in cloud computing. The OVN (Open Virtual Network) management instance is also called an OVN instance, which is used to provide virtual network related functions, such as load balancing, etc. The OVN components include a northbound database, a southbound database, and an OVN controller. The OVS instance mainly determines the flow direction of the data packet and implements the virtual network related functions. In the present invention, the first OVS instance is used to process the data packet for the subnet that does not have the DPDK mode enabled, and the second OVS instance is used to process the data packet for the subnet that has the DPDK mode enabled. The first OVS instance is used to process the data packet of the subnet that does not have the DPDK mode enabled, and the second OVS instance is used to process the data packet of the subnet that has the DPDK mode enabled.

[0046] S2, the OVN management instance adds multiple standby queues after the receiving queue corresponding to the second OVS instance, and the number of the standby queues is the same as the number of subnets that do not have the DPDK mode enabled; if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that do not have the DPDK mode enabled, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding standby queue;

[0047] In order to achieve load balancing, in the present invention, multiple reserve queues are added in advance in the second VOS instance, the number of reserve queues is the same as the number of subnets that do not have DPDK mode enabled, and a relationship between the two is established in advance so that the reserve queues correspond to the subnets that do not have DPDK mode enabled. When the load of the core bound to the first OVS instance is higher than the threshold or the traffic of the subnet that does not have DPDK mode enabled is greater than the preset value, a subnet is selected from the subnet that does not have DPDK mode enabled, and the data packets to be processed corresponding to the selected subnet are placed in the corresponding reserve queue. In a more specific embodiment, the subnet data that does not have DPDK mode enabled is directly stored in the corresponding reserve queue by port forwarding or mirroring. In another more specific embodiment, multiple sending queues are added after the sending queue corresponding to the second OVS instance, the number of sending queues is the same as the number of reserve queues and corresponds one to one, so that the second OVS instance can receive and send processed data packets of the selected subnet, and the processing described here refers to performing various network functions on the data packets. By transferring the data packets of the first OVS instance to the second OVS instance for processing, on the one hand, the load of the core where the first OVS instance is located can be reduced, and on the other hand, the processing speed can be accelerated for the subnet of large data flows.

[0048] In a more specific embodiment, if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets in which the DPDK mode is not enabled, specifically:

[0049] If the load of the core bound to the first OVS instance is higher than the threshold, the interrupt frequency of each subnet that does not have DPDK mode enabled is obtained, and the subnet with the largest interrupt frequency is selected;

[0050] The kernel path mode, i.e., the subnet without DPDK mode, uses interrupt processing to wake up the kernel to process data packets. That is to say, when there is a data packet, an interrupt will be triggered, and the interrupt program will copy the data packet to the buffer in the kernel, thereby realizing the kernel processing of the data packet. However, frequent interrupts will lead to waste of system resources, especially CPU. When the load of the core bound to the first OVS instance is higher than the threshold, the subnet with the highest interrupt frequency of the subnet without DPDK mode is selected as the target. In a more specific embodiment, the interrupt frequency is calculated as the number of kernel interrupts triggered by a subnet due to the arrival of data packets within a preset time; the preset time is 2 minutes or 5 minutes.

[0051] If the flow rate corresponding to the subnet is greater than a preset value, the subnet is used as the selected subnet.

[0052] When the traffic of a subnet without DPDK mode enabled is greater than the preset value, more packets need to be processed, but the kernel path mode processes them slowly. In this case, a preset value is set. When the traffic corresponding to the subnet is greater than the preset value, the subnet is selected as the target.

[0053] After the target is determined, the data to be processed corresponding to the target is placed in the corresponding standby queue. Then the OVN management instance freezes the selected subnet in the first OVS instance and sets the flag of the standby queue to be readable. The second OVS instance adds the standby queue to the DMA polling according to the flag in the standby queue.

[0054] The first OVS instance no longer processes the data packets of the selected subnet. At this time, the flag bit of the standby queue corresponding to the selected subnet is set to readable, so that the second OVS instance can read the data packets from the standby queue and process them. The subnet with DPDK mode turned on uses polling to read data packets from the queue received by polling and then processes them, which is different from the kernel path mode.

[0055] S3, if the load of the core bound to the second OVS instance is higher than the threshold, obtain the average number of data packets received by the DPDK DMA from the receive queue of each network card within a preset time period, and adjust the subnet that changes from the DPDK mode to the DPDK mode and the DMA polling method according to the load of the core bound to the first OVS instance and the second OVS instance and the average.

[0056] When the load of the core bound to the second OVS instance is higher than the threshold, the average number of data packets received by DPDK from each receiving queue through DMA (Direct Memory Access) polling mode within a preset time period is obtained, and then the subnet that is converted from DPDK mode to DPDK mode is adjusted according to the load of the core bound to the first OVS instance and the second OVS instance and the average data. After the conversion, the DMA polling method is further adjusted.

[0057] In a specific embodiment, the load of the core bound to the first OVS instance and the second OVS instance, the average adjustment from the subnet with DPDK mode turned on to the subnet with DPDK mode turned off, and the DMA polling method are specifically:

[0058] Calculate the load difference between the core bound to the second OVS instance and the core bound to the first OVS instance, as well as the difference between the load of the core bound to the second OVS instance and the threshold, and determine the subnet to be adjusted from the DPDK mode to the DPDK mode according to the load difference, the difference and the average value; then, determine the DMA polling mode.

[0059] For example, the load of the core bound to the second OVS instance is 95%, the load of the core bound to the first OVS instance is 20%, the threshold is 90%, the load difference between the cores where the second OVS instance and the first OVS instance are located is 75%, and the difference between the second OVS instance and the threshold is 5%. If the second OVS instance corresponds to 3 subnets, the corresponding averages per second are 1000, 2000, and 3000 respectively. Determine the subnet to be adjusted based on these data.

[0060] In another specific embodiment, determining and adjusting the subnet from the DPDK-enabled mode to the DPDK-disabled mode according to the load difference, the difference value, and the average value is specifically:

[0061] A correspondence table between weighted results and the average values ​​is established in advance, a weighted result is calculated according to the load difference and the difference value in a weighted manner, a corresponding average value in the correspondence table is determined according to the weighted result, at least one subnet closest to the average value is selected, and the subnet is adjusted from the DPDK mode to the DPDK mode.

[0062] The load difference and the difference value are weighted. In a possible weighted calculation method, the weights of the load difference and the difference value are set to 0.5 respectively, and the weighted result is: 0.4. According to the pre-established correspondence table, assuming that 0.4 corresponds to 1800, the mode of the subnet corresponding to the average number of 2000 per second is changed to not opening DPDK.

[0063] Polling will also increase the load on the CPU core. After adjusting the subnet mode, the DMA polling method is further determined, specifically:

[0064] If the difference between the load of the core bound to the second OVS instance after adjustment and the threshold is within a preset range, for the DPDK mode enabled subnet, the DMA polling interval corresponding to the subnet is determined according to the average of the DPDK mode enabled subnet.

[0065] For example, after adjustment, the difference between the load of the core bound to the second OVS instance and the threshold is 3%. If the preset range is 5%, for the subnet corresponding to the second OVS instance, the DMA polling interval corresponding to the subnet is determined according to the average of the remaining subnets. In a more specific embodiment, the average value and the average value of the subnet in the above-mentioned transition mode are judged. If it is greater than the average value of the above-mentioned subnet that has undergone the transition, the DMA polling interval remains unchanged; if it is less than the average value of the above-mentioned subnet that has undergone the transition, the DMA polling interval is doubled. In another specific embodiment, the DMA polling interval corresponding to each subnet is determined according to the average value of the remaining subnets as follows: the average value of the average values ​​of the remaining subnets is calculated. If the average value is greater than or equal to the average value, the polling interval is kept unchanged; if the average value is less than the average value, the polling interval is doubled. This can speed up the polling process, avoid the need to poll all queues every time, and improve polling efficiency. In another embodiment, when the core load of the OVS instance is reduced to below the threshold or the traffic of the subnet is less than the preset value, the adjusted subnet will be restored. To prevent the subnet from oscillating between the first OVS instance and the second OVS instance, set a time interval. After an adjustment is completed, the adjusted subnet will not be adjusted again within this time interval.

[0066] Embodiment 2, the present invention also provides a tenant multi-network access system, such as Figure 3 As shown, the system includes the following modules:

[0067] The subnet instance creation module is used to install Multus-CNI and Kube-OVN plug-ins in the cloud platform, use Kube-OVN to create multiple subnets, and use Multus-CNI to configure at least one subnet for the Pod; if the subnets used by the Pods on the same node do not all have DPDK mode enabled, an OVN management instance, a first OVS instance, and a second OVS instance are created;

[0068] The first adjustment module is used for the OVN management instance to add multiple standby queues after the receiving queue corresponding to the second OVS instance, and the number of the standby queues is the same as the number of subnets that do not enable the DPDK mode; if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that do not enable the DPDK mode, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding standby queue;

[0069] The second adjustment module is used to obtain the average number of data packets received by the DPDK DMA from the receive queue of each network card within a preset time period if the load of the core bound to the second OVS instance is higher than the threshold, and adjust the subnet that is changed from turning on the DPDK mode to not turning on the DPDK mode and the DMA polling method according to the load of the core bound to the first OVS instance and the second OVS instance and the average number.

[0070] Preferably, if the load of the core bound to the first OVS instance is higher than a threshold or the traffic corresponding to the subnet is greater than a preset value, a subnet is selected from the subnets in which the DPDK mode is not enabled, specifically:

[0071] If the load of the core bound to the first OVS instance is higher than the threshold, the interrupt frequency of each subnet that does not have DPDK mode enabled is obtained, and the subnet with the largest interrupt frequency is selected;

[0072] If the flow rate corresponding to the subnet is greater than a preset value, the subnet is used as the selected subnet.

[0073] Preferably, after placing the to-be-processed data packets corresponding to the selected subnet into the corresponding pre-queue, the method further includes:

[0074] The OVN management instance freezes the selected subnet in the first OVS instance and sets the flag of the standby queue to be readable. The second OVS instance adds the standby queue to the DMA polling according to the flag in the standby queue.

[0075] Preferably, the load of the core bound to the first OVS instance and the second OVS instance, the average adjustment of the subnet from the DPDK mode to the DPDK mode and the DMA polling method are specifically:

[0076] Calculate the load difference between the core bound to the second OVS instance and the core bound to the first OVS instance, as well as the difference between the load of the core bound to the second OVS instance and the threshold, and determine the subnet to be adjusted from the DPDK mode to the DPDK mode according to the load difference, the difference and the average value; then, determine the DMA polling mode.

[0077] Preferably, determining and adjusting the subnet to be changed from the DPDK-enabled mode to the DPDK-disabled mode according to the load difference, the difference value and the average value is specifically:

[0078] A correspondence table between weighted results and the average values ​​is established in advance, a weighted result is calculated according to the load difference and the difference value in a weighted manner, a corresponding average value in the correspondence table is determined according to the weighted result, at least one subnet closest to the average value is selected, and the subnet is adjusted from the DPDK mode to the DPDK mode.

[0079] Preferably, the determining of the DMA polling mode is specifically:

[0080] If the difference between the load of the core bound to the second OVS instance after adjustment and the threshold is within a preset range, for the DPDK mode enabled subnet, the DMA polling interval corresponding to the subnet is determined according to the average of the DPDK mode enabled subnet.

[0081] Embodiment 3, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.

[0082] Through the description of the above implementation methods, technicians in this field can clearly understand that each implementation method can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it, and other embodiments may also be used. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A tenant multi-network access method, characterized in that: The method comprises the following steps: Install Multus-CNI and Kube-OVN plug-ins in the cloud platform, use Kube-OVN to create multiple subnets and use Multus-CNI to configure at least one subnet for the Pod; if the subnets used by the Pods on the same node are not all in DPDK mode, create an OVN management instance, the first OVS instance, and the second OVS instance; The OVN management instance adds multiple standby queues after the receiving queue corresponding to the second OVS instance, and the number of the standby queues is the same as the number of subnets that do not have the DPDK mode enabled; if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that do not have the DPDK mode enabled, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding standby queue; If the load of the core bound to the second OVS instance is higher than the threshold, the average number of data packets received by the DPDK DMA from the receive queue of each network card within the preset time period is obtained, and the subnet that is changed from DPDK mode to DPDK mode and the DMA polling method are adjusted according to the load of the core bound to the first OVS instance and the second OVS instance and the average.

2. The method according to claim 1, characterized in that If the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that have not enabled the DPDK mode, specifically: If the load of the core bound to the first OVS instance is higher than the threshold, the interrupt frequency of each subnet that does not have DPDK mode enabled is obtained, and the subnet with the largest interrupt frequency is selected; If the flow rate corresponding to the subnet is greater than a preset value, the subnet is used as the selected subnet.

3. The method according to claim 1, characterized in that After the to-be-processed data packets corresponding to the selected subnet are placed into the corresponding preparatory queue, the method further includes: The OVN management instance freezes the selected subnet in the first OVS instance and sets the flag of the standby queue to be readable. The second OVS instance adds the standby queue to the DMA polling according to the flag in the standby queue.

4. The method according to claim 1, characterized in that The load of the core bound to the first OVS instance and the second OVS instance, the average adjustment of the subnet from the DPDK mode to the DPDK mode, and the DMA polling method are specifically: Calculate the load difference between the core bound to the second OVS instance and the core bound to the first OVS instance, as well as the difference between the load of the core bound to the second OVS instance and the threshold, and determine the subnet to be adjusted from the DPDK mode to the DPDK mode according to the load difference, the difference and the average value; then, determine the DMA polling mode.

5. The method according to claim 4, characterized in that The determining, according to the load difference, the difference value, and the average value, to adjust the subnet from the DPDK-enabled mode to the DPDK-disabled mode is specifically: A correspondence table between weighted results and the average values ​​is established in advance, a weighted result is calculated according to the load difference and the difference value in a weighted manner, a corresponding average value in the correspondence table is determined according to the weighted result, at least one subnet closest to the average value is selected, and the subnet is adjusted from the DPDK mode to the DPDK mode.

6. The method according to claim 4, characterized in that The DMA polling method is specifically determined as follows: If the difference between the load of the core bound to the second OVS instance after adjustment and the threshold is within a preset range, for the DPDK mode enabled subnet, the DMA polling interval corresponding to the subnet is determined according to the average of the DPDK mode enabled subnet.

7. A tenant multi-network access system, characterized in that: The system includes the following modules: The subnet instance creation module is used to install Multus-CNI and Kube-OVN plug-ins in the cloud platform, use Kube-OVN to create multiple subnets, and use Multus-CNI to configure at least one subnet for the Pod; if the subnets used by the Pods on the same node do not all have DPDK mode enabled, an OVN management instance, a first OVS instance, and a second OVS instance are created; The first adjustment module is used for the OVN management instance to add multiple standby queues after the receiving queue corresponding to the second OVS instance, and the number of the standby queues is the same as the number of subnets that do not enable the DPDK mode; if the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that do not enable the DPDK mode, and the to-be-processed data packets corresponding to the selected subnet are placed in the corresponding standby queue; The second adjustment module is used to obtain the average number of data packets received by the DPDK DMA from the receive queue of each network card within a preset time period if the load of the core bound to the second OVS instance is higher than the threshold, and adjust the subnet that is changed from turning on the DPDK mode to not turning on the DPDK mode and the DMA polling method according to the load of the core bound to the first OVS instance and the second OVS instance and the average number.

8. The system according to claim 7, characterized in that If the load of the core bound to the first OVS instance is higher than the threshold or the traffic corresponding to the subnet is greater than the preset value, a subnet is selected from the subnets that have not enabled the DPDK mode, specifically: If the load of the core bound to the first OVS instance is higher than the threshold, the interrupt frequency of each subnet that does not have DPDK mode enabled is obtained, and the subnet with the largest interrupt frequency is selected; If the flow rate corresponding to the subnet is greater than a preset value, the subnet is used as the selected subnet.

9. The system according to claim 7, characterized in that After the to-be-processed data packets corresponding to the selected subnet are placed into the corresponding preparatory queue, the method further includes: The OVN management instance freezes the selected subnet in the first OVS instance and sets the flag of the standby queue to be readable. The second OVS instance adds the standby queue to the DMA polling according to the flag in the standby queue.

10. A computer storage device, wherein a computer program is stored on the storage device, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6.