[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCP, UDP and multicast



Stefano Vicenzetto wrote:
> b) If the sender is Developer board and the receiver is NT PC, the frequency
> of printf is lower and not constant: it seems that developer board sends
> burst of data and then waits for a while.
> 
> We changed the amount of data sent on each "send()" from 4 bytes to 10Kbytes
> (using multicast), but the behaviour is the same.
> 
> What could be the reason of these different performances? Any suggestion
> would be appreciated.

Do you have enough evidence yet to reach the conclusion in (b) that the dev 
board sends in bursts? Even if it does, what kind of timing difference are you 
seeing? Why are they substantial enough to cause a problem, or are ou just 
curious why TCP behaves differently? (I think that TCP will aggregate your 
send calls in the stack and so there isn't guaranteed to be a 1-to-1 
correspondence between tcp send calls and packets transmitted)

Do you know whether any UDP packets are getting dropped?
What happens when the linux PC is the receiver?
Have you ruled out that the NT PC is introducing a delay before the UDP 
datagrams are available to the application layer?

You could use your linux PC on a hub between the other two and use tcp dump to 
see the timing of the packets being sent.
You could send a unique identifier in each UDP and check whether every UDP 
sent is received on the NT PC.

Maybe you are overloading the send buffer - do you check for errors on send? 
(perhaps not the reason for the bursts, but something to check for more info...)

Also curious about your sending of 10kbyte datagrams - ethernet MTU is 1500 
bytes, no? Doesn't that mean each 10kbyte send would generate about 7 packets?

Regards,
  Dave