I have a question about the P4 switch. I created a network in mininet using p4lang / tutorials. However, when I tested the bandwidth with the iperf tool, I found that the bandwidth was only less than 20Mbps. However, if I set the switches in the network as ordinary switches instead of P4 switches, the bandwidth can reach more than 20Gbps.
Why does this happen? Is there a problem with my switch settings ? Or my experimental equipment performance is insufficient?
Hi @ZSL ,
Here a detail explanation about performances that you can obtain with BMv2 switch behavioral-model/performance.md at main · p4lang/behavioral-model · GitHub. Performance is much better in hardware or dpdk P4 switch.
Thank you for your reply and suggestions.
I operate according to the website content in your answer. I ran a bandwidth test on another better-performing machine ( about 30GB of memory and 10-core CPU, compared to just 4GB of memory and 4-core CPU ) and configured it based on what was on the site. But the bandwidth is still less than 100Mbps, not much different from the original. But the example in the website can reach 1Gbps. Why ? Is it because the performance is not fully utilized ?
And the site mentioned that bmv2 is not meant to be a production-grade software switch. So is there any other option to replace Bmv2 ? After searching, I found the P4-ovs project.https://github.com/osinstom/P4-OvS Can it be used in mininet and have better performance ?
I have not done any performance tests with it, but the DPDK back end to the p4c compiler is being developed with packet processing performance in mind as a goal. It would be great if someone posted instructions on how to do a performance test using DPDK similar to the posted instructions for BMv2.