From: Stephen Hemminger <stephen@networkplumber.org>
To: Anthony Harivel <aharivel@redhat.com>
Cc: Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>,
dev@dpdk.org, rjarry@redhat.com, david.marchand@redhat.com,
ktraynor@redhat.com
Subject: Re: [PATCH 2/2] app/testpmd: add testpmd based sleeping
Date: Thu, 16 Mar 2023 09:17:43 -0700 [thread overview]
Message-ID: <20230316091743.1652bf17@hermes.local> (raw)
In-Reply-To: <20230316151438.186241-2-aharivel@redhat.com>
On Thu, 16 Mar 2023 16:14:38 +0100
Anthony Harivel <aharivel@redhat.com> wrote:
> Sleep for an incremental amount of time if the fwd engine has processed
> less than at least half a burst of packets (i.e 16pkts with default
> setting) on a polling iteration of testpmd.
>
> Upon detecting the threshold of >= 16 pkts on an Rxq, reset the sleep
> time to zero (i.e. no sleep).
>
> Sleep time will be increased on each iteration where the low load
> conditions remain up to a total of the max sleep time which is set by
> the user with the "--max-sleep-us NUM" command line argument or when in
> interactive "mode set max_sleep NUM".
>
> The default max_sleep value is 0, which means that no sleeps will occur
> and the default behaviour is unchanged from previously.
>
> Testing has been performed on AMD EPYC 7702 server with --nb-cores 12.
> The results were obtained via turbostat for each individual lcore:
>
> max_sleep 0 ====== ======== ======== ========
> idle 4Mpps 16Mpps Bursts
> =============== ====== ======== ======== ========
> C1-state % 0 0 0 0
> C2-state % 0 0 0 0
> % usage 100 100 100 100
> Watt / core 1.14 1.18 1.19 1.14
> =============== ====== ======== ======== ========
>
> max_sleep 500 ====== ======== ======== ========
> idle 4Mpps 16Mpps Bursts
> =============== ====== ======== ======== ========
> C1-state % 99 85 74 98.6
> C2-state % 0 0 0 0
> % usage 1 15 26 1
> Watt / core 0.04 0.18 0.28 0 04
> =============== ====== ======== ======== ========
>
> max_sleep 1000 ====== ======== ======== ========
> idle 4Mpps 16Mpps Bursts
> =============== ====== ======== ======== ========
> C1-state % 0 85 74 0.3
> C2-state % 99 0 0 97.6
> % usage 1 15 25 1
> Watt / core 0.02 0.18 0.28 0 02
> =============== ====== ======== ======== ========
>
> On most cases, the consumption of the cores is greatly improved while
> still performing zero packet loss.
>
> Latency test has been performed on each tests above. The CPU has a C1
> latency of 1us and a C2 latency of 400us. On the worst case scenario, Tx
> Burst of thousands packets every seconds, the following latency in us
> (micro seconds) has been observed:
>
> =========== ==== ===== ======
> max_sleep 0 500 1000
> ----------- ---- ----- ------
> max latency 14 560 1260
> min latency 5 5 6
> Avg latency 7 305 617
> =========== ==== ===== ======
>
> link: https://www.github.com/torvalds/linux/tree/master/tools/power/x86/turbostat
> Signed-off-by: Anthony Harivel <aharivel@redhat.com>
Testpmd is already grown beyond the original intended scope.
This seems like a feature which would be better added to forwarding example
apps. This is just feature creep here.
next prev parent reply other threads:[~2023-03-16 16:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 15:14 [PATCH 1/2] app/testpmd: fwd engines report processed packets Anthony Harivel
2023-03-16 15:14 ` [PATCH 2/2] app/testpmd: add testpmd based sleeping Anthony Harivel
2023-03-16 16:17 ` Stephen Hemminger [this message]
2023-03-16 17:05 ` Ferruh Yigit
2023-03-17 11:09 ` Anthony Harivel
2023-03-17 16:22 ` Stephen Hemminger
2023-03-21 11:45 ` Ferruh Yigit
2023-03-17 19:25 ` Robin Jarry
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=20230316091743.1652bf17@hermes.local \
--to=stephen@networkplumber.org \
--cc=aharivel@redhat.com \
--cc=aman.deep.singh@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ktraynor@redhat.com \
--cc=rjarry@redhat.com \
--cc=yuying.zhang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.