[dpdk-users] Behavior of pktgen's "rate" option
castets.j at gmail.com
Fri Mar 17 13:59:25 CET 2017
On Fri, Mar 17, 2017 at 1:25 AM, Wiles, Keith <keith.wiles at intel.com> wrote:
> Be careful in how you setup and change the size of a packet. Changing the size while Pktgen is running can lead to some weird performance. The problem is the packets already in flight are not changed to the new size or they are stuck on the TX done queue. The new TX flush API needs to be added to the PMDs and then in Pktgen I can flush all of the buffers back to the mempool and then alter the size of the mbuf. You did not state the version of Pktgen you are using, as DPDK 16.11 added some support for pktgen to locate and update all of the mbuf, I think that is kind of a hack on my part.
Pktgen Ver: 3.1.2 (DPDK 17.02.0)
> The code in Pktgen takes your rate and packet size to determine the number of packets to send at a given rate to obtain you desired rate. I thought the calculation accounted for the number of TX cores, but maybe that is a bug. I would have expected 16Gbps in the two core case if I did not account for that config. I do not have direct access to the machine to verify the code.
> Try stopping the traffic before changing any of the configs, changing the rate should work while Pktgen is sending. The problem is if the size of content needs to change the system should be halted. Also if you want to do a some more debugging, try quiting Pktgen between configurations and see if that works better. It is not what I intended on the usage of Pktgen is to quit all of the time.
To generate traffic, I'm loading the lua configuration file (attached
to my first email) from pktgen.
This lua file starts with:
So I'm not changing parameters while pktgen is sending.
Anyway, the results are the same if I stop pktgen between tests:
* 1 core, pktsize 64 bytes, rate 20: 8Gbps
* 2 cores, pktsize 64 bytes, rate 20: 28Gbps
* 1 core, pktsize 128 bytes, rate 20: 14Gbps
> I will try to have a look this weekend when I get back home.
More information about the users