I'm trying to test the throughput between two docker containers using Iperf3 (any throughput tester app) connected to OVS (openvswitch) and DPDK on ubuntu 18.04 (VMWare workstation). The goal of this is to compare the performance of OVS-DPDK vs Linux kernel in some scenarios.
I can't find a proper solution, which explains how to connect OVS+DPDK to the docker containers so that the containers can pass TCP/UDP traffic to each other.
I'd appreciate your help explaining how to connect two docker containers with OVS+DPDK. The configuration that needs to be done in the docker containers, and the ones that need to be done in the host OS.
BTW I don't have traffic from outside.
Thanks
Edit
- DPDK version is 20.11.0
- OVS version is 2.15.90
- Iperf3
Here are the steps I take:
I install dpdk using apt:
sudo apt install openvswitch-switch-dpdk
set the alternative as:
sudo update-alternatives --set OvS-vswitchd /usr/lib/openvswitch-switch -dpdk/OvS-vswitchd-dpdk
Allocate the hugepages and update the grub.
mount hugepages
bind NIC to DPDK:
sudo dpdk-devbind --bind=vfio-pci ens33
. Although I don't need this step because I don't have traffic from outside if I don't bind my NIC thesudo service openvswitch-switch restart
fails.I create a bridge:
ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
I create two ports for my containers:
ovs-vsctl add-port br0 client -- set Interface client type=dpdk options:dpdk-devargs=<binded_nic_pci_addr>
andovs-vsctl add-port br0 server -- set Interface server type=dpdk options:dpdk-devargs=<binded_nic_pci_addr>
. (server port number: 1, client port number: 2)Open bidirectional flow between ports:
sudo ovs-ofctl del-flows br0
sudo ovs-ofctl add-flow br0 in_port=1,action=output:2
ovs-ofctl add-flow br0 in_port=2,action=output:1
After step 8 I don't know how to connect my iperf3 docker containers to use these ports. I appreciate your help in letting me know how to connect containers to the ports and test the network.
Edit 2
Based on Vipin's answer these steps won't work considering my requirements.
[EDIT: update to reflect only using OVS-DPDK and iperf3 on container]
There are multiple ways one can connect 2 dockers to talk directly with each other using to run iperf3.
For scenario 2 one needs to add TAP interface to OVS. because end application iperf3 is using Kernel Stack for TCP|UDP termination. One can use the below settings (modified based on OVS-DPDK version) to achieve the result.
Note:
[EDIT-1] based on the conversation https://chat.stackoverflow.com/rooms/231963/ovs-dpdk, @MohammadSiavashi
testpmd, l2fwd, skeleton
instead of running OVS-DPDK.Current agreement:
TAP PMD based OVS-DPDK
andalternate to userspace iperf3
.