linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Surovegin <ebs@ebshome.net>
To: Jacky Lam <jackylam@astri.org>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Small UDP packet performance
Date: Sun, 18 Jan 2004 21:28:06 -0800	[thread overview]
Message-ID: <20040119052806.GA26841@gate.ebshome.net> (raw)
In-Reply-To: <00b101c3de3e$9c34f200$9104050a@JACKYLAM>


On Mon, Jan 19, 2004 at 11:44:55AM +0800, Jacky Lam wrote:
>     Currently, I find that my PPC 405EP board has some problem about the
> throughput of small UDP packet (188 bytes). The throughput is just only
> ~0.01%. However, for large packet, say 1K, the throughput is very good. It
> is more than 50%. Is it a problem of PPC Linux, ethernet driver or generic
> Linux? Is there any way to tune it? Thanks.

When talking about IP stack/driver performance usually you should pay
attention to the packets per second (pps) not throughput (whatever you
mean under this term).

If you analyze your test cases using pps you'll probably notice that
performance of your 405ep board is the same in both cases (at least if
in your tests you were _sending_ data from the 405ep).

When computing "throughput" with small packet size don't forget to add
L1/L2/L3 overhead (inter frame gap, Ethernet frame headers, IP and UDP
headers), in case of UDP total overhead per packet is 66 bytes of
Ethernet bandwidth;

To demonstrate this point, consider the following (generated) table:

UDP min size - 18, max size - 1472, overhead 66
  20, rate 145348
 120, rate  67204
 220, rate  43706
 320, rate  32383
 420, rate  25720
 520, rate  21331
 620, rate  18221
 720, rate  15903
 820, rate  14108
 920, rate  12677
1020, rate  11510
1120, rate  10539
1220, rate   9720
1320, rate   9018
1420, rate   8411

First column - is the size of UDP payload, "rate" is the theoretical
maximum number of packets you can fit in 100Mb link.

Let's say you box is fast enough to send 10K packets per second. As
you see it's more than enough to saturate 100Mb Ethernet with big
packets (UDP payload > ~1120 bytes).

But with 200-sized UDP payload you can only fill ~2.7% of 100Mb link.

Also, please note, that usually you can _send_ more packets than
receive and if you flood the box with a lot of packets you can
experience so called "congestion collapse" (google "Beyond Softnet"
for more details). This can be solved by modifing ethernet driver to
use NAPI (some work is in progress for 4xx).

Eugene

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2004-01-19  5:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-19  3:44 Small UDP packet performance Jacky Lam
2004-01-19  5:28 ` Eugene Surovegin [this message]
2004-01-19  5:47   ` Eugene Surovegin
2004-01-20  0:48   ` Jacky Lam
2004-01-20  1:02     ` Eugene Surovegin
2004-01-20 23:23       ` Andrew May
2004-01-21  1:16         ` Eugene Surovegin
2004-01-21  2:05           ` Andrew May
2004-01-21  3:38             ` Eugene Surovegin
2004-01-22  9:26             ` Jacky Lam

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=20040119052806.GA26841@gate.ebshome.net \
    --to=ebs@ebshome.net \
    --cc=jackylam@astri.org \
    --cc=linuxppc-embedded@lists.linuxppc.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).