adastra
adastra

Reputation: 55

How do you calculate DPDK mempool requirements?

How do you figure out what settings need to be used to correctly configure a DPDK mempool for your application?

Specifically using rte_pktmbuf_pool_create():

EAL arguments:

My setup:

Will be receiving 10GB/s UDP packets over a 100gbe link. Plan is to strip the headers and write the payload to a file. Right now trying to get it working for 2GB/s to a single queue.

Reviewed the DPDK Programmers guide: https://doc.dpdk.org/guides/prog_guide/mempool_lib.html Also searched online but the resources seem limited. Would appreciate any help or a push in the right direction.

Upvotes: 1

Views: 761

Answers (1)

Vipin Varghese
Vipin Varghese

Reputation: 4798

based on the updates from comments the question can be summarized as

what are the correct settings to be used for DPDK mbuf|mempool which needs to handle 9000B UDP payload for processing 10Gbps packets on 100Gbps MLX CX-5 NIC with single or multiple queues

Let me summarize my suggestions below for this unique case

[for 100Gbps]

  1. as per MLX DPDK performance report for test case 4, for packet size 1518 we get theoretical and practical Million Packets per sec as 8.13
  2. Hence for 9000B payload this will be, 9000B/1518B=6 is around 8.13/6 = 1.355 MPps
  3. With MLX CX-5 1 queue achieve a mx of 36Mpps - so with 1 queue and JUMBo enabled, you should get the 9000B into a single queue

note: 10Gbps it will be 0.1355Mpps

Settings for MBUF or mempool:

  1. if your application logic requires 0.1 seconds to process the payload, I recommend you to use 3 * max expected packets. So roughly 10000 packets
  2. Each payload has total size of 10000B (data_room_size) as single contiguous buffer.
  3. priv_size is wholly dependant upon your logic to store metadata

Note: in case multiple queue, I always configure for worst case scenario, that is I assume there will be elephant flow which can fall onto specific queue. So if with 1 queue you have created 10000 elements, for multiple queues I use 2.5 * 10000

Upvotes: 2

Related Questions