> On 3 Sep 2020, at 15:27, Benoit Ganne (bganne) via lists.fd.io 
> <bganne=cisco....@lists.fd.io> wrote:
> 
>> I'm confused about what buffers-per-numa and buffer data-size are
>> referring to?  If I'm trying to determine overall packet buffer
>> occupancy levels, should I use buffers-per-numa or data-size?
> 
> A buffer in VPP is composed of a 128-bytes header, a 128-bytes scratchpad (to 
> allow eg. tunneling w/o moving data) and the data buffer.
> 'data-size' specify the size of the data buffer, ie the total size of the 
> buffer will be 256-bytes + data-size.
> 'buffers-per-numa' is the number of buffers to allocate per NUMA node. On a 
> standard 2-socket server with 2 NUMA nodes, you'll allocate a total of 2 * 
> buffers-per-numa buffers.
> So the memory consumption for buffers should be something like 2 * 
> buffers-per-numa * (256 + data-size).
> Now, this is not exactly true, because the buffers are aligned on cachelines, 
> are not split accross pages and the total will rounded up to the pagesize, so 
> there will be some additional overhead, but it should gives you the right 
> order of magnitude.
> 
>> Would this change if I use DPDK? Meaning, is the buffer allocated by DPDK
>> queue memory or VPP?
> 
> No, even with DPDK the buffer pool is managed by VPP. There is some overhead 
> in that case because each buffer must accommodate an additional dpdk header.

Yes, when dpdk is used we have 3 additional cachelines used, 2 for rte_mbuf and 
one for mempool header.
So It looks like this:

[64] - dpdk mempool header (only if dpdk is used)
[128] - dpdk rte_mbuf (only if dpdk is used)
[128] - vlib_buffer_t
[128] - headroom
[2048] - data

Total: 2496 bytes, 2304 without dpdk

— 
Damjan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#17329): https://lists.fd.io/g/vpp-dev/message/17329
Mute This Topic: https://lists.fd.io/mt/76605334/21656
Mute #vpp: https://lists.fd.io/g/fdio+vpp-dev/mutehashtag/vpp
Mute #vnet: https://lists.fd.io/g/fdio+vpp-dev/mutehashtag/vnet
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to