DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Robin Jarry" <rjarry@redhat.com>
To: "Anthony Harivel" <aharivel@redhat.com>,
	"Aman Singh" <aman.deep.singh@intel.com>,
	"Yuying Zhang" <yuying.zhang@intel.com>
Cc: <dev@dpdk.org>, <david.marchand@redhat.com>, <ktraynor@redhat.com>
Subject: Re: [PATCH 2/2] app/testpmd: add testpmd based sleeping
Date: Fri, 17 Mar 2023 20:25:56 +0100	[thread overview]
Message-ID: <CR8WLEQI1D79.1Q0XRA6LH6ZU5@ringo> (raw)
In-Reply-To: <20230316151438.186241-2-aharivel@redhat.com>

Anthony Harivel, Mar 16, 2023 at 16:14:
> 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>

Given the amount of time testpmd is used in local development and
automated testing, adding such an option is a great addition to save CPU
power.

Thanks Anthony.

Reviewed-by: Robin Jarry <rjarry@redhat.com>


      parent reply	other threads:[~2023-03-17 19:26 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
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 [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=CR8WLEQI1D79.1Q0XRA6LH6ZU5@ringo \
    --to=rjarry@redhat.com \
    --cc=aharivel@redhat.com \
    --cc=aman.deep.singh@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@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 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).