From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Nir Tzachar <nir.tzachar@gmail.com>
Cc: "David Miller" <davem@davemloft.net>,
"Linux Networking Development Mailing List"
<netdev@vger.kernel.org>,
"Caitlin Bestler" <caitlin.bestler@gmail.com>,
"Chris Van Hoof" <vanhoof@redhat.com>,
"Clark Williams" <williams@redhat.com>,
"Neil Horman" <nhorman@tuxdriver.com>,
"Nivedita Singhvi" <niv@us.ibm.com>,
"Paul Moore" <paul.moore@hp.com>,
"Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>,
"Steven Whitehouse" <steve@chygwyn.com>,
"Ziv Ayalon" <zivayalon@gmail.com>
Subject: Re: [RFCv4 PATCH 2/2] net: Allow protocols to provide an unlocked_recvmsg socket method
Date: Thu, 17 Sep 2009 18:21:13 -0300 [thread overview]
Message-ID: <20090917212113.GC3691@ghostprotocols.net> (raw)
In-Reply-To: <9b2db90b0909170709n400859c6q13514b315970dde9@mail.gmail.com>
Em Thu, Sep 17, 2009 at 05:09:19PM +0300, Nir Tzachar escreveu:
> Hello.
>
> Below are some test results with the patch (only part 1, as I did not
> manage to apply part 2).
I forgot to mention that the patches were made against DaveM's
net-next-2.6 tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
If you have a linux-2.6 git tree, just do:
cd linux-2.6
git remote add net-next git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
git branch -b net-next-recvmmsg net-next/master
And you should be able to apply the two patches cleanly.
> The test application is attached below, and works as follows:
>
> I set out to measure the latency which can be saved by this patch, and
> the application is designed accordingly. It is composed of three
> parts: a producer, which time-stamps packets and sends them as fast as
> possible, a mirror, which receives messages and bounces them to a
> remote destination and finally, a consumer, which receives messages as
> fast as possible and measures latency and throughout.
>
> Both the produce and consumer are executed on the same host and the
> mirror on a remote host. Both hosts are running linux 2.6.31 with v4
> of the patch (but, as I said before, only part 1, with the unlocked_*
> stuff). All processes are executed under SCHED_FIFO. Both hosts are
Here is the problem, the patch, as mentioned above, was made against
net-next-2.6.
I'll rework the 2nd patch so that you can test with both.
> connected by a switched 1G Ethernet network. The mirror is executed on
> a 8-core nahelem beast, and the producer and consumer on my desktop,
> which is a quad. /proc/cpuinfo and lspcis and .configs can be supplied
> if needed. Network cards are Intel Corporation 82566DM-2 Gigabit
> Network and Broadcom Corporation NetXtreme II BCM5709 Gigabit
> Ethernet.
>
> The results (which follow below) clearly show the advantages of using
> recvmmsg over recvmsg both latency wise and throughput wise. The
> addition of a sendmmsg would also have a huge impact, IMO.
Yeah, there are even some smarts that can be done in the sendmmsg case,
like avoiding passing the same payload to multiple destinations, just
marking the mmsghdr size with zero that would thus mean "use the latest
non-zero sized payload".
> Receiving batches of 30 packets, each of 1024 bytes, results with no
> latency improvements, but with a ~55% throughput improvement, from 72
> megabytes per second to 111. Repeating the same test, but with
> batches of 3000, displays the same behaviour. The more interesting
> result (to me, at least :) is when using small packets. Sending
> packets of size 100 and receiving in batches of 30 gives 470 micro
> latency and 244669 packets per second. On the other hand, without
> recvmmsg we get 750 micro latency and 210818 packets per second. A
> huge improvement here.
>
> I think that with a bit more tinkering we can even stretch these results a bit.
I guess so too, with luck I'll be able to test this over a 10 Gbit/s
link today, will use my and your test cases.
Thanks a lot!
- Arnaldo
next prev parent reply other threads:[~2009-09-17 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 17:07 [RFCv4 PATCH 2/2] net: Allow protocols to provide an unlocked_recvmsg socket method Arnaldo Carvalho de Melo
2009-09-17 14:09 ` Nir Tzachar
2009-09-17 21:21 ` Arnaldo Carvalho de Melo [this message]
2009-09-17 21:53 ` Arnaldo Carvalho de Melo
[not found] ` <20090923000925.GA6011@ghostprotocols.net>
[not found] ` <9b2db90b0909222123x7e547210p5755adf9f8ae875f@mail.gmail.com>
[not found] ` <20090923043813.GA6464@ghostprotocols.net>
2009-10-01 9:49 ` Nir Tzachar
2009-10-01 15:03 ` Arnaldo Carvalho de Melo
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=20090917212113.GC3691@ghostprotocols.net \
--to=acme@redhat.com \
--cc=caitlin.bestler@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=nir.tzachar@gmail.com \
--cc=niv@us.ibm.com \
--cc=paul.moore@hp.com \
--cc=remi.denis-courmont@nokia.com \
--cc=steve@chygwyn.com \
--cc=vanhoof@redhat.com \
--cc=williams@redhat.com \
--cc=zivayalon@gmail.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).