public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Flinders <P.Flinders@ftel.co.uk>
To: linux-kernel@vger.kernel.org
Subject: dropping UDP packets on send
Date: Mon, 12 Feb 2001 15:54:05 +0000	[thread overview]
Message-ID: <3A88071D.78A3D1FA@ftel.co.uk> (raw)

I'm trying to get some rough figures for the sort of performance
I could expect from a load-balancing application whose job would
be to re-direct incomming UDP packets to a set of target systems
(and handle fail-over etc).

To test this I wrote a very simple application that sends UDP packets
out as fast as possible, one which reads them as fast as possible but
does noting except the copy to user space and one which distributes
them reading a packet then sending it on to a destination, doing a round-
robin allocation of destinations.

The sender is as follows

    memset(buf, '\0', blocksize);
    while (--count >= 0) {
        *(unsigned short *)buf = ++seq;
        *(unsigned short *)(buf+2) = (unsigned short)lrand48();

        if ((r = write(sock, buf, blocksize)) != blocksize)
            ++write_errs;
    }

blocksize is 64

Up to about 1-2,000,000 packets I get about 100,000 packets per second
sent, the reader can keep up, the fowarding application can't - it tops
out at 34,000 packets per second or so (but it's simplistic as I only
want approximate figures - I can think of a couple of ways to improve
it).

If I try to send more than 2,000,000 packets something odd happens
the sender competes faster than expected but it doesn't send all of
the packets as seen by looking at the TX packet count. I don't see
any write failures (i.e write always returns 64 and write_errs is
always zero after the run).

Is this "expected" behaviour or is there a problem?

sender/distributer are running 2.4.1-pre7 on dual-processor PIII 866s
with 1G of PC-133 SDRAM and 3c905b/c ethernet cards (sender has
the "b" but if I swap over and send using the "c" I get the same result).


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://vger.kernel.org/lkml/

                 reply	other threads:[~2001-02-12 15:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3A88071D.78A3D1FA@ftel.co.uk \
    --to=p.flinders@ftel.co.uk \
    --cc=linux-kernel@vger.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