From: Ido Schimmel <idosch@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, shuah@kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next] selftests: net/forwarding: spawn sh inside vrf to speed up ping loop
Date: Sun, 18 Aug 2024 14:23:29 +0300 [thread overview]
Message-ID: <ZsHZsemDSrG-qG__@shredder> (raw)
In-Reply-To: <20240817203659.712085-1-kuba@kernel.org>
On Sat, Aug 17, 2024 at 01:36:59PM -0700, Jakub Kicinski wrote:
> Looking at timestamped output of netdev CI reveals that
> most of the time in forwarding tests for custom route
> hashing is spent on a single case, namely the test which
> uses ping (mausezahn does not support flow labels).
>
> On a non-debug kernel we spend 714 of 730 total test
> runtime (97%) on this test case. While having flow label
> support in a traffic gen tool / mausezahn would be best,
> we can significantly speed up the loop by putting ip vrf exec
> outside of the iteration.
>
> In a test of 1000 pings using a normal loop takes 50 seconds
> to finish. While using:
>
> ip vrf exec $vrf sh -c "$loop-body"
>
> takes 12 seconds (1/4 of the time).
>
> Some of the slowness is likely due to our inefficient virtualization
> setup, but even on my laptop running "ip link help" 16k times takes
> 25-30 seconds, so I think it's worth optimizing even for fastest
> setups.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Thanks!
next prev parent reply other threads:[~2024-08-18 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-17 20:36 [PATCH net-next] selftests: net/forwarding: spawn sh inside vrf to speed up ping loop Jakub Kicinski
2024-08-18 11:23 ` Ido Schimmel [this message]
2024-08-20 3:21 ` Hangbin Liu
2024-08-20 22:30 ` patchwork-bot+netdevbpf
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=ZsHZsemDSrG-qG__@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.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).