last day (15 days later) » 

2:24 AM
Hi
My goal is to test the throughput and latency of two docker containers while bypassing the kernel
So I used OVS-DPDK to reach this goal
I can find some articles on how to use vhost-user/virtio and vhost-net to connect two VMs
But can't find a way to connect two containers
There must be a way
@VipinVarghese I see you mentioned that Iperf3 is using the kernel's TCP/UDP stack. Do the applications need to be implemented explicitly for OVS-DPDK to work?
I'd be online 18:30GMT time. Will be glad if we can have a discussion in this regard.
 
Hi Mohammad as I have shared since you need to connect 2 dockers with iperf3 you need Network stack termination for tcp|udp. In docker the network stack is from host OS, hence you need interface similar to TAP or MACveth to achieve the same. I have already shared in comments and answers the iperf3 requires stack termination which leads to current OVS-DPDK to be initlaied with TAP PMD
I have shared an alternative to use DPDK-iperf3 which does not require host network stack. thereby bypass kernel. In this case you can use memif or viurtio
what confused me is your edit Edit 2

Based on Vipin's answer these steps won't work considering my requirements.
please share what is error you faced if possible logs to better understand what went wrong.
 
2:41 AM
Hi cool that you're online
 
yes I work out of India
its 8 am
can you share your observations
 
It must be misunderstood. By that edit I meant that my steps are not working since I was trying to connect the physical ports
So you mean If a create a virtio/vhost interface and use the DPDK-Iperf3 in my containers, it must work right?
Cool. I'm based in Iran. we have 45 minutes time difference then :‌D
 
no as mentioned in comemnts and answers, virtio will not work for you. you will need tap PMD since you are using containers and not guest OS.
did you try with the suggested answer? what is error you are facing?
 
and TAP uses the host kernel! So what's the point of OVS-DPDK in this case?
 
I have done this 4 years back for teleco client, where they had critical application running on Guest OS with DPDK, while telemetry and data collection running on docker (non critical)
 
2:47 AM
No I ddin't try the TAP yet since you said it uses the kernel.
 
you are using operf3 it requires kernel socket for TCP and UDP
iperf3
since it is docker you are using for kernel stack termination (sockets in iperf3) you need kernel interface like tap
for iperf3 to work
 
I'm using this for a research purpose
 
are you clear on the fact one needs network stack for sockets to work for iperf3?
 
Well seems no way to truly bypass the kernel!
Yep
Any workaround? any other container manager except for docker that can handle this?
 
:) now I understand the issue. can you please check the answer if I have suggested to use dpdk with iperf3 (which has network userspace stack)
did you try exploring those?
 
2:50 AM
The dpdk iperf3?
Not yet
 
If one needs to simply check iperf3 performance, please use DPDK-iperf3 such as github project which do the same.
as far I understand from current conversation following things are clear to me
1. Iperf3 requires either kernel or userspace net work stack
2. In linux docker, one can use the kernel stack to achieve this
 
I'm wondering if docker uses the kernel stack and dpdk-iperf3 has its own userspace stack and I'm running it inside of the container. How could it use the OVS-DPDK in my host?
 
have you used Docker before?
 
Yes I used but for commercial uses not in depth
 
hhmm, can you please lookup to confirm whether docker uses host Kernel stack via namespaces and groups?
that will help I am sure
as I I was summarizing
as far I understand from the current conversation following things are clear to me
1. Iperf3 requires either kernel or userspace net work stack
2. In linux docker, one can use the kernel stack to achieve this
 
2:54 AM
BTW, I'm not really restricted to Iperf3. If there is any other throughput tester I can also use that instead
 
3. DPDK-OVS will only bypass Linux kernel bridge
4. Hence easisest alternatvie is to use TAP interface to inject back to kernel for dockers
5. There is alternative (as shared in answer) for userspace network stack and iperf3 purely on DPDK
6. Dockers run on host and uses Kerenl stack bifurcated by namespace and cgroups
7. currently in your setup you have not tried TAP PMD based OVS-DPDK or alternate to userspace iperf3 yet
is this right understanding?
 
ok
last question the edit you have added Based on Vipin's answer these steps won't work considering my requirements. is only assumption as things were not clear. is this correct understanding?
 
So is there any question you want to ask me now?
 
2:59 AM
Yes, I was wondering if memif PMD would work in this case
 
note: for iperf3 alternative approach I highly recommend adding a new question
memif can work with user space tcp stack(as I have suggested in the answer)
 
Sure I will
 
you will need a mechanism to termiante sockets
so shall I update the asnwer based on the current discussion?
can you close the same by accepting the same
 
One last question to get sure I got it correct.
 
this will help the community
please ask
 
3:00 AM
I cannot truly bypass the kernel anyway right?
since TAP will eventually use the kernel
right?
 
you can
if you use memif or vhsot with userspace tcp stack
but with tap or pcap pmd
you are usign host kernel stack
so no
 
by userspace tcp stack you mean something like mTCP right?
 
is there any other question?
 
And if I use dpdk-iperf, do I still need to build OVS with dpdk?
 
well for VM yes, but for Docker, i think you can bypass with simple (1 core DPDK ) app on host
does this answer all your queries?
 
3:03 AM
Yes
and one more question before we leave
 
if ti has helped you please accept and upvote to close the ticket.
 
Its not related to this question
 
ok pelase ask
 
Is there any general way that we can run any dockerized application on DPDK-OVS to benefit from kernel bypass?
I'm asking for research purpose
 
you can without using ovs-dpdk
ok hope this useful
 
3:06 AM
Hmmm
I can open a new question for that
Thanks for your help
It was a pleasure talking to you
 
4:05 AM
please accept and close the current ticket. I will add the summary as extension to the current answer
 

last day (15 days later) »