Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UDP Packet loss due to collissions

1 view
Skip to first unread message

KaGe...@gmail.com

unread,
Aug 25, 2006, 2:24:42 PM8/25/06
to
Hi all,

I have written a UDP socket server that listens for incoming UDP data.
On load testing the system I took 4 UDP client applications
transmitting a 80 byte data grams a 1000 times every 50 ms. This wants
to say that a total of 4000 datagrams must arrive at the server in 50
000 ms, which is the case.

I then upped the amount of clients to 6 and perfromed the same test,
expecting to see the result of 6000 data grams. But to my discovery on
averidge only 5500 datagrams every make it into the server.

The question then arrises: Is this due to packet collisions on the
shared resource?
1) Does this mean if 4 applications sends it means that 50 ms / 4 =
12.5 ms is the max time required for succesfull packet aquiring without
any loss?
2) f I therefore up the transmission rate more than one pakcet arrive
at the server simultaniously, colliding and cuasing a loss in data?
3) Does both packets get lost in casses of such collissions?

This is what I think happens and any light on the matter is greatly
appreciated.

Regards

K

Bertel Brander

unread,
Aug 25, 2006, 7:18:57 PM8/25/06
to
KaGe...@gmail.com wrote:
> This is what I think happens and any light on the matter is greatly
> appreciated.

UDP is unreliable by design, if you need reliable communication you
need to use TCP or handle some error check and retransmission yourself.

I don't think that the problem i collision, you can probably have
the 4 clients run in days without any problems.

The problem is most likely congestion, that is, the rate of data
you can reliable transfer is exceeded.

--
Absolutely not the best homepage on the net:
http://home20.inet.tele.dk/midgaard
But it's mine - Bertel

Tom Handal

unread,
Aug 26, 2006, 6:26:21 PM8/26/06
to
I would agree with Bertel...

What kind of link are you using 10Mbit, 100? 1000?

By my calculations, you are sending 1.6 MBytes/Sec from each client.

Multiply that by 4 clients, you have 6.4 MBytes/Sec on the network.

For 6 clients, you have 9.6 MBytes/Sec on the network.

Now, assuming you are using a 100MBit network, we can deduce the
following:

First, it is 100 mega BIT, not byte... so, we are talking about
13,107,200 Bytes/Sec
(This is (100 * 1024 * 1024)/8 = 13,107,200)

Remember, this is theoretical, so you will not always reach maximum
potential... which is what we are calculating...

So, since you are transmitting 9.6 Mega Bytes/Sec and the MAX is
13.1Mega Bytes/Sec...

You can see why you are starting to get loss... you are getting close
to your theoretical transfer speed...

So, my suggestion is upgrade you network to 1000 MBit... Then you
should be able to do 6 clients without any trouble...

Tom Handal
www.tomhandal.com

0 new messages