Main Site Documentation

Is there a way to increase ethernet speed?


#1

Hello,

I want to send data-arrays with ethernet from my cobra board to the pc. The time between two Socket.Send{…} is 5-8 msec if my packet is between 1-1470 Bytes. Is there a way to increase the speed for the send function? It would be great if i can send in every msec.


#2

Only by sending larger packets


#3

Thanks for your answer.
I think that larger packets are not the solution. the time between the packets should be less to react quickly to events at the cobra-side.


#4

Run Wireshark on the PC and inspect the packets. Make sure they are not padded up to the MTU size or there isn’t a delay between transmissions. Experiment with different buffer sizes… Maybe there is a sweet spot?

The fact that a 1 byte to 1470 bytes takes the same time tells me something is buffering up to the MTU size before sending. Can you convince it to send earlier?


#5

Make sure the Nagle algorithm is disabled on the sending socket. This is done by setting the NoDelay TCP socket option to true.

When someone says there is a delay between packets, Nagle is usually the reason. But, 8ms is low for the delays I am used to seeing.


#6

Im sending with UDP. So the Nagle algorithm cant be the problem.
1 byte to 1470 bytes doesnt take the same time. But 1 byte takes about 3ms and 1470 about 7ms. 3ms is because of the overhead and I cant make it faster, can I?
I think I have to live with it.

Thank you for your answers.


#7

is garbage collection occurring a lot?

what is your total transmit rate?


#8

How should I know if its occuring a lot?
My total transmit rate is about 1Byte/3ms=333B/s respectivily 1470Byte/7ms=210000B/s.


#9

You will see GC messages occurring in output window.

210000B/s is an good rate for a 72MHZ processor.


#10

There are no GC messages.

So I think I`m ok with my delays and rate.
Thanks for all your help.