LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-13-2006, 10:38 AM   #1
rikusg
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Rep: Reputation: 0
How to reliably detect UDP packet loss.


Hi there,

My understanding is that given reliable transmission (ie no tx buffer overrun), UDP packets may be lost on three levels:

1. On the wire if your ethernet is suspect.
2. In the ethernet driver if there are not enough Rx buffer descriptors.
3. In the IP stack if the UDP socket buffers are to small and not serviced fast enough by your application.


My question is how do you reliably tell where packets get lost?

netstat -su will give you packet receive errors

This supposedly is an indication of the number of packets lost by means of (3).

I have a very good ethernet, but maybe packets are lost in my switch? How to detect this?

I have a good ethernet device (Intel e1000) and driver with 4096 rx buffer descriptors. How do I detect buffer overrun?

Is netstat -su a reliable counter for socket buffer overrun?

Regards
 
Old 07-13-2006, 12:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I dont' understand why you're trying to use UDP when what you
want are features of TCP. UDP is by definition connection-
less and doesn't implement those checks.


Cheers,
Tink
 
Old 07-14-2006, 03:50 AM   #3
rikusg
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
There are reasons to use UDP instead of TCP.

1. The source of the UDP data is an embedded device streaming data at a steady rate of up to 256Mb/s over gigabit ethernet as 128 streams of UDP datagrams. The device does not have the resources to do this using TCP.

2. The data flows over gigE LAN as follows: Device -> switch -> Consumer (High-end Linux server). Technically if there are no significant additional traffic switched to the Consumer, and the Consumer processes the UDP frames fast enough it should all work fine. This is the case most of the time.

I have configured 1 second worth of buffering per UDP socket receiving each one of the above mentioned UDP streams. Once every couple of hours there seems to be a glitch where upto a couple of hundred frames are lost (I know this since I put sequence nrs in the UDP packets).

I am simply trying to find out if there is an easy way to check whether I have overrun in my socket buffers. Increasing the buffers might alter my results but it is not conclusive.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
packet loss. bruse Linux - Networking 1 09-01-2005 08:24 AM
70% packet loss bingviini Linux - Networking 5 11-18-2004 11:35 AM
50% packet loss only with Linux alexdanoob Linux - Networking 2 04-21-2004 05:24 AM
What can cause packet loss? Micah Linux - Hardware 8 03-15-2004 12:31 AM
90% packet loss to router? OatBran Linux - Networking 7 11-19-2001 01:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration