UDP performance and loss

Well, I guess there is little you could do about it.

UDP has no inherent nature about flow-control or exponential back-off as TCP. The sender just sends on and on and packet lost is generally not in the sender??s interest.

Even for simple flow TCP senders with such a simple link, you would see jigsaw throughput due to TCP??s congestion control behavior.

What I can recommend is, just for this simple scenario, that you implement some active measuring algorithm at each endpoint to determine how fast you can inject your packets into the network so as not to clog it.

Hope this helps!

Best regards,

Cody


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tomer G
Sent: 2006??7??19?? 16:52
To: Windows System Software Devs Interest List
Subject: [ntdev] UDP performance and loss

Hi

my question is not exactly in the drivers area,

I’m testing UDP performance with two PC’s

connected by crosscable 100Mbps ethernet.

the product I’m testing it for transmits simplex UDP packets

(no retransmit) and the UDP data buffers are 1024 bytes.

I guess that with crosscable I should get good performance with little packet loss,

but when I get to about 10Mbps(~1.2Mbyte/sec)

I start getting packet loss.

how can I increase the throughput and still keep it reliable?

Thanks, Tom


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Tom,

You didn’t mention what mechanism you are using to actually source and sink
the packets, I going to assume you have written a WINSOCK application. This
type of usage is very sensitive to receive buffer size (make it large
enough). Some other things to consider are to use a switch (not a hub)
instead of the cross-over cable. This will give the NICs the best shot at
negotiating a true FDX attachment. Lastly, try a readily available
performance ‘test’ tool like iPerf. Setting the RX buffer large and the
size of the UDP packet near the MTU limit I have seen FDX links (on 1Ge)
reach 400Mb/s or more on realitively nominal hardware. At 100Mb/s-e the
same setups can saturate the link. The things to watch out for are the
interrupt behavior of the receiving NIC and the available buffer provided to
UDP to stick packets into.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tomer G
Sent: Wednesday, July 19, 2006 4:52 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UDP performance and loss

Hi
my question is not exactly in the drivers area,

I’m testing UDP performance with two PC’s
connected by crosscable 100Mbps ethernet.
the product I’m testing it for transmits simplex UDP packets
(no retransmit) and the UDP data buffers are 1024 bytes.
I guess that with crosscable I should get good performance with little
packet loss,
but when I get to about 10Mbps(~1.2Mbyte/sec)
I start getting packet loss.

how can I increase the throughput and still keep it reliable?

Thanks, Tom


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Unless you are using a packet sniffer, you don’t know whether the packet
loss is occurring on the wire, at the sender, or at the receiver.

For best performance with UDP/IP, you want to turn OFF receive buffering
in the kernel (setsockopt SO_RCVBUF = 0) in order to eliminate a
(potential) buffer copy, use async I/O in your app, and make sure that
you always keep a pool of buffers issued to the IP stack. How many
you’ll need depends on your application. Since performance is your
goal, you’ll want to keep a relatively large number, say, 32. When any
receive completes, issue another one, usually with the same buffer.

This is not, of course, a device driver question, so a different forum
is more appropriate.

– arlie


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tomer G
Sent: Wednesday, July 19, 2006 1:52 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] UDP performance and loss

Hi
my question is not exactly in the drivers area,

I’m testing UDP performance with two PC’s
connected by crosscable 100Mbps ethernet.
the product I’m testing it for transmits simplex UDP packets
(no retransmit) and the UDP data buffers are 1024 bytes.
I guess that with crosscable I should get good performance with little
packet loss,
but when I get to about 10Mbps(~1.2Mbyte/sec)
I start getting packet loss.

how can I increase the throughput and still keep it reliable?

Thanks, Tom


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thank you all,

Arlie I implemented all the technics you mentioned
and got to about 40Mbps without packet loss
I think its pretty good
I also found out many ndis filter packet sniffer tools
degrade this kind of performance

thanks,
Tom