Re: Lost UDP packets
Re: Lost UDP packets
- Subject: Re: Lost UDP packets
- From: Mark Hunt <email@hidden>
- Date: Mon, 27 Sep 2004 20:30:33 +0100
Justin
Before you waste any time looking at source code, I think you misunderstood - my tests were performed on the
receiving machine, and I'm now pretty certain that:
a) all my TX packets get onto the wire ok, and
b) they're being dropped in the RX queue/buffer of the receiving socket.
I'm going to try increasing the priority of my RX thread, so it can try to empty the queue faster. This is kinda urgent data, and a blocked socket call consumes no CPU time, whatever it's priority, right?
I'm currently broadcasting, but multicasting looks attractive.
Mark
On Monday, September 27, 2004, at 05:01 pm, Justin Walker wrote:
On Sep 27, 2004, at 7:49, Mark Hunt wrote:
Ok,
A few printf's and some netstat evidence reveals:
The lost packets _are_ being dropped "due to full socket buffers" - the netstat lost packet count exactly matches the missing packets in my app.
I'll try to look at the code later today, but FYI, UDP datagrams are not stored in socket buffers. They are sent as-is to IP (which may fiddle around if they need to be fragmented; otherwise, they go straight to the device layer for transmission.
Also, the packet loss occurs around the same packet index every time. The first lost packet is always about #102, and all remaining packets of the 160-170 sent are lost.
That makes sense, given a finite device queue.
The socket SO_RCVBUF size is 224k (biggest I can get, and I do read it back to check), and my packets are 1048 UDP bytes each, so there should be plenty of room.
This value should not have an effect on the problem.
These packets are sent as a burst at 30Hz intervals, so there's plenty of time to empty the buffers.
I don't understand why I'm over-running. It doesn't happen very often (about once every 3 to 5 seconds) but it should be avoidable.
You aren't overrunning buffers, you are overrunning queues. See my earlier replies.
In case it got lost in the shuffle: are these packets being broadcast or sent to specified (unicast) addresses?
All machines are Dual 2Gig G5s. The link is 1000baseTX <full-duplex>, according to ifconfig.
We're using Small Tree Dual gigabit cards to add the extra network to the receivers. Since they didn't need drivers installing, I assume Apple's driver is handling the chipset. Where do I go to find it's plist (sorry for the dumb question)?
You can find 'Info.plist' inside the kext (which is a directory). Use "ls -lR" or "find".
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Some people have a mental
| horizon of radius zero, and
| call it their point of view.
| -- David Hilbert
*--------------------------------------*-------------------------------*
This message was checked by Mcafee Virusscan Enterprise
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden