DPDK / FD.io VPP low bandwidth compared to kernel networking

I am looking at VPP (https://fd.io/) to run on top of DPDK, in the cloud, specifically in AWS.The Idea is to get lower latency / improved performance by using DPDK to do kernel bypass.

Pim van Pelt has videos talking about his 1Tbps router that runs VPP and a bunch of Mellanox cards. https://www.youtube.com/watch?v=ptm9h-Lf0gg

I did a test on AWS that compiled vpp, and ran a iperf3 server on one instance, and then the client on another instance. the client instance could choose to use one of two nics, one that is kernel managed, or one that is VPP manged.

with the kernel, there was about 10Gbit/s bandwidth reported.
with iperf3 on the VPP LD_PRELOAD library, the report showed only about 5Gbit/s.

I’m new to VPP, and DPDK. this is the first working test between machines.
I used vfio-pci to drive it, is there something better?

I ran VPP pinned to a single core.

VCL config was copy paste from some doc

running a bandwidth test while stating latency as the goal might come off as strange, but I feel like it should be able to do the same bandwidth as the kernel, as its meant to be a efficient alternative to the kernel networking stack.

the test is heavily inspired by this short guide on how to test the ld preload library LD_PRELOAD the VCL — The Vector Packet Processor v26.10-rc0-165-g3c36ed059 documentation

the vpp startup config used is basicall a copy from the sample config here, with some parts removed VCL Socket Interface — envoy 1.39.0-dev-aeabfe documentation

What are the best practices of running VPP? in particular in AWS?

I didn’t fully figure this out. but what I can say is that when using the linux-cp plugin to create a TUN interface between the kernel and VPP, and having iperf use that, then the bandwidth did go all the way to 10Gbit/s.

perhaps the issue had something to do with how the LD_PRELOAD library is implemented, causing overhead in a way that capped the bandwidth. idk.