DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Lukáš Šišmiš" <sismis@cesnet.cz>
To: "Morten Brørup" <mb@smartsharesystems.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>
Cc: anatoly.burakov@intel.com, ian.stokes@intel.com, dev@dpdk.org,
	bruce.richardson@intel.com
Subject: Re: [PATCH] net: increase the maximum of RX/TX descriptors
Date: Tue, 5 Nov 2024 22:20:38 +0100	[thread overview]
Message-ID: <64a18700-194e-4c8f-aeba-125ec3802740@cesnet.cz> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F884@smartserver.smartshare.dk>


On 05. 11. 24 17:50, Morten Brørup wrote:
>> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
>> Sent: Tuesday, 5 November 2024 16.55
>>
>> On Tue, 5 Nov 2024 09:49:39 +0100
>> Morten Brørup <mb@smartsharesystems.com> wrote:
>>
>>>> I suspect AF_PACKET provides an intermediate step which can buffer
>> more
>>>> or spread out the work.
>>> Agree. It's a Linux scheduling issue.
>>>
>>> With DPDK polling, there is no interrupt in the kernel scheduler.
>>> If the CPU core running the DPDK polling thread is running some other
>> thread when the packets arrive on the hardware, the DPDK polling thread
>> is NOT scheduled immediately, but has to wait for the kernel scheduler
>> to switch to this thread instead of the other thread.
>>> Quite a lot of time can pass before this happens - the kernel
>> scheduler does not know that the DPDK polling thread has urgent work
>> pending.
>>> And the number of RX descriptors needs to be big enough to absorb all
>> packets arriving during the scheduling delay.
>>> It is not well described how to *guarantee* that nothing but the DPDK
>> polling thread runs on a dedicated CPU core.
>>
>> That why any non-trivial DPDK application needs to run on isolated
>> cpu's.
> Exactly.
> And it is non-trivial and not well described how to do this.
>
> Especially in virtual environments.
> E.g. I ran some scheduling latency tests earlier today, and frequently observed 500-1000 us scheduling latency under vmware vSphere ESXi. This requires a large number of RX descriptors to absorb without packet loss. (Disclaimer: The virtual machine configuration had not been optimized. Tweaking the knobs offered by the hypervisor might improve this.)
>
> The exact same firmware (same kernel, rootfs, libraries, applications etc.) running directly on our purpose-built hardware has scheduling latency very close to the kernel's default "timerslack" (50 us).
>
Thanks for the feedback, I am currently not 100% I ran my earlier 
experiments on isolcpus and whether it had a massive impact or not.

But here is a decent guide on latency tuning I found the other day 
though virtual environments are not exactly described.

https://rigtorp.se/low-latency-guide/


  reply	other threads:[~2024-11-05 21:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 12:48 Lukas Sismis
2024-10-29 14:37 ` Morten Brørup
2024-10-30 13:58   ` Lukáš Šišmiš
2024-10-30 15:20     ` Stephen Hemminger
2024-10-30 15:40       ` Lukáš Šišmiš
2024-10-30 15:58         ` Bruce Richardson
2024-10-30 16:06         ` Stephen Hemminger
2024-11-05  8:49           ` Morten Brørup
2024-11-05 15:55             ` Stephen Hemminger
2024-11-05 16:50               ` Morten Brørup
2024-11-05 21:20                 ` Lukáš Šišmiš [this message]
2024-10-30 15:06 ` [PATCH v2 1/2] net/ixgbe: " Lukas Sismis
2024-10-30 15:06   ` [PATCH v2 2/2] net/ice: " Lukas Sismis
2024-10-30 15:42 ` [PATCH v3 1/1] net/bonding: make bonding functions stable Lukas Sismis
2024-10-30 15:42   ` [PATCH v3 1/2] net/ixgbe: increase the maximum of RX/TX descriptors Lukas Sismis
2024-10-30 16:26     ` Morten Brørup
2024-11-01 11:16       ` Bruce Richardson
2024-10-30 15:42   ` [PATCH v3 2/2] net/ice: " Lukas Sismis
2024-10-30 16:26     ` Morten Brørup
2024-10-31  2:24   ` [PATCH v3 1/1] net/bonding: make bonding functions stable lihuisong (C)
2024-11-06  2:14     ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2024-10-29 12:46 [PATCH] net: increase the maximum of RX/TX descriptors Lukas Sismis

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=64a18700-194e-4c8f-aeba-125ec3802740@cesnet.cz \
    --to=sismis@cesnet.cz \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.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).