From: Philo Lu <lulie@linux.alibaba.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: willemdebruijn.kernel@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, dsahern@kernel.org,
antony.antony@secunet.com, steffen.klassert@secunet.com,
linux-kernel@vger.kernel.org, dust.li@linux.alibaba.com,
jakub@cloudflare.com, fred.cc@alibaba-inc.com,
yubing.qiuyubing@alibaba-inc.com
Subject: Re: [PATCH v4 net-next 2/3] net/udp: Add 4-tuple hash list basis
Date: Thu, 17 Oct 2024 15:46:49 +0800 [thread overview]
Message-ID: <d9327631-0673-4e70-afe0-5923bda6fd45@linux.alibaba.com> (raw)
In-Reply-To: <7dde23ec-e813-4495-a0ca-6ed0f1276aa6@redhat.com>
On 2024/10/16 15:45, Paolo Abeni wrote:
> On 10/16/24 08:30, Philo Lu wrote:
>> On 2024/10/14 18:07, Paolo Abeni wrote:
>>> It would be great if you could please share some benchmark showing the
>>> raw max receive PPS performances for unconnected sockets, with and
>>> without this series applied, to ensure this does not cause any real
>>> regression for such workloads.
>>>
>>
>> Tested using sockperf tp with default msgsize (14B), 3 times for w/ and
>> w/o the patch set, and results show no obvious difference:
>>
>> [msg/sec] test1 test2 test3 mean
>> w/o patch 514,664 519,040 527,115 520.3k
>> w/ patch 516,863 526,337 527,195 523.5k (+0.6%)
>>
>> Thank you for review, Paolo.
>
> Are the value in packet per seconds, or bytes per seconds? Are you doing
> a loopback test or over the wire? The most important question is: is the
> receiver side keeping (at least) 1 CPU fully busy? Otherwise the test is
> not very relevant.
>
> It looks like you have some setup issue, or you are using a relatively
> low end H/W: the expected packet rate for reasonable server H/W is well
> above 1M (possibly much more than that, but I can't put my hands on
> recent H/W, so I can't provide a more accurate figure).
>
> A single socket, user-space, UDP sender is usually unable to reach such
> tput without USO, and even with USO you likely need to do an over-the-
> wire test to really be able to keep the receiver fully busy. AFAICS
> sockperf does not support USO for the sender.
>
> You could use the udpgso_bench_tx/udpgso_bench_rx pair from the net
> selftests directory instead.
>
> Or you could use pktgen as traffic generator.
>
I test it again with udpgso_bench_tx/udpgso_bench_rx. In server, 2 cpus
are involved, one for udpgso_bench_rx and the other for nic rx queue so
that the si of nic rx cpu is 100%. udpgso_bench_tx runs with payload
size 20, and the tx pps is larger than rx ensuring rx is the bottleneck.
The outputs of udpgso_bench_rx:
[without patchset]
udp rx: 20 MB/s 1092546 calls/s
udp rx: 20 MB/s 1095051 calls/s
udp rx: 20 MB/s 1094136 calls/s
udp rx: 20 MB/s 1098860 calls/s
udp rx: 20 MB/s 1097963 calls/s
udp rx: 20 MB/s 1097460 calls/s
udp rx: 20 MB/s 1098370 calls/s
udp rx: 20 MB/s 1098089 calls/s
udp rx: 20 MB/s 1095330 calls/s
udp rx: 20 MB/s 1095486 calls/s
[with patchset]
udp rx: 21 MB/s 1105533 calls/s
udp rx: 21 MB/s 1105475 calls/s
udp rx: 21 MB/s 1104244 calls/s
udp rx: 21 MB/s 1105600 calls/s
udp rx: 21 MB/s 1108019 calls/s
udp rx: 21 MB/s 1101971 calls/s
udp rx: 21 MB/s 1104147 calls/s
udp rx: 21 MB/s 1104874 calls/s
udp rx: 21 MB/s 1101987 calls/s
udp rx: 21 MB/s 1105500 calls/s
The averages w/ and w/o the patchset are 1104735 and 1096329, the gap is
0.8%, which I think is negligible.
Besides, perf shows ~0.6% higher cpu consumption of __udp4_lib_lookup()
with this patchset (increasing from 5.7% to 6.3%).
Thanks.
--
Philo
next prev parent reply other threads:[~2024-10-17 7:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 1:29 [PATCH v4 net-next 0/3] udp: Add 4-tuple hash for connected sockets Philo Lu
2024-10-12 1:29 ` [PATCH v4 net-next 1/3] net/udp: Add a new struct for hash2 slot Philo Lu
2024-10-12 1:29 ` [PATCH v4 net-next 2/3] net/udp: Add 4-tuple hash list basis Philo Lu
2024-10-14 10:07 ` Paolo Abeni
2024-10-16 6:30 ` Philo Lu
2024-10-16 7:45 ` Paolo Abeni
2024-10-16 8:47 ` Philo Lu
2024-10-17 7:46 ` Philo Lu [this message]
2024-10-12 1:29 ` [PATCH v4 net-next 3/3] ipv4/udp: Add 4-tuple hash for connected socket Philo Lu
2024-10-14 10:19 ` Paolo Abeni
2024-10-16 7:28 ` Philo Lu
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=d9327631-0673-4e70-afe0-5923bda6fd45@linux.alibaba.com \
--to=lulie@linux.alibaba.com \
--cc=antony.antony@secunet.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=fred.cc@alibaba-inc.com \
--cc=jakub@cloudflare.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=yubing.qiuyubing@alibaba-inc.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).