From: amit sehas <cun23@yahoo.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: rte_pktmbuf_alloc() out of rte_mbufs
Date: Wed, 27 Nov 2024 01:21:04 +0000 (UTC) [thread overview]
Message-ID: <1128887693.3323512.1732670464665@mail.yahoo.com> (raw)
In-Reply-To: <20241126165106.6e13ac9c@hermes.local>
looking at code for rte_eth_tx_buffer_flush(), in the error case where some buffers were not sent, it has a default callback which will enqueue the buffers back to the mempool, and in the non error case as well when the call is done it will enqueue the buffers back to the mempool ...
this is what we have relied on for ever, otherwise we would not be able to utilize it at all ... in the transmit case we never explicitly free the buffers ...and we are able to run the product through 100s of millions of packet transmits, its only under special circumstances that we run into the said issue ..
I hope i am not misunderstanding something.
regards
On Tuesday, November 26, 2024 at 04:51:09 PM PST, Stephen Hemminger <stephen@networkplumber.org> wrote:
On Tue, 26 Nov 2024 23:50:25 +0000 (UTC)
amit sehas <cun23@yahoo.com> wrote:
> Dumping the stats every 10 minutes suggest that there is no slow leak of buffers. The problem arises when the system is under stress and starts performing extra disk i/o. In this situation dpdk accumulates the buffers and does not return them back to the mempool right away thereby accumulating all the 4k buffers allocated to the queue.
>
> rte_eth_tx_buffer_flush() should be flushing the buffers and returning them to the mempool ... is there any additional API that can make sure that this happens.
If you read the code in rte_ethdev.h
The rte_eth_tx_buffer_flush is just does a send of the packets that application has aggregated
via rte_eth_tx_buffer.
It does nothing vis-a-vis mempools are causing the driver (PMD) to complete transmits.
There are some tuneables such as tx_free_thresh which control when driver should
start freeing sent mbufs.
Have you isolated the CPU's used by DPDK threads?
Is the application stalling because it starts swapping. You may have to mlockall to keep the
pages of application from swapping out.
prev parent reply other threads:[~2024-11-27 1:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <67781150.1429748.1732243135675.ref@mail.yahoo.com>
2024-11-22 2:38 ` amit sehas
2024-11-22 16:45 ` Stephen Hemminger
2024-11-26 17:57 ` amit sehas
2024-11-26 23:50 ` amit sehas
2024-11-27 0:51 ` Stephen Hemminger
2024-11-27 1:21 ` amit sehas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1128887693.3323512.1732670464665@mail.yahoo.com \
--to=cun23@yahoo.com \
--cc=stephen@networkplumber.org \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).