P4 VM Performance

Hi,

I have tested the performance of the P4 VM provided in the GitHub tutorial. I find that the testing result is way too much from expectation. For instance, the bandwidth of P4 network is 40MB/s, while the VM without P4 is 33.9 GB/s. That is 3 orders of difference. The delay of P4 switch is 2.3 sec, while it is 0.09 sec without P4. Does anyone have any ideas? Thank you.

Best,
Gong

Hello Gong,

The idea is very simple: read the documentation, such as the README file that comes with the model.

It says it in the very beginning (in the third paragraph to be exact), that I am quoting for your convenience:

bmv2 is not meant to be a production-grade software switch . It is meant to be used as a tool for developing, testing and debugging P4 data planes and control plane software written for them. As such, the performance of bmv2 - in terms of throughput and latency - is significantly less than that of a production-grade software switch like Open vSwitch. For more information about the performance of bmv2, refer to this document.

Happy hacking,
Vladimir

1 Like

If you have not already read it, the linked document mentioned in Vlad’s quote of the README is especially relevant, and has details on how to get the best performance possible out of the BMv2 software switch. Even in that situation, BMv2 is really intended for development and testing.

I have not personally done performance testing with the p4c DPDK back end, but it has definitely been developed with performance on a general purpose CPU in mind, much more so than BMv2 has been.

1 Like

Hello

We are realising one scenario using a few P4 VMs (around 3) and having hosts attached to both ends.

Ping between the hosts is working but when we are running the iperf between these hosts, it is not showing any traffic and bandwidth.

Need direction/guidance to look into this in further detail.

Given that your topic is different than the original one that started this particular thread of conversation, it seems better to create a new topic on the forum.

Also, if you want help on detailed problems like this, it helps others help you if you can be as detailed as possible about what software you have installed, where you got it, what version it is, exactly what steps you followed, what you expected to happen, and what you saw instead.