This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM437x IDK ethernet bandwidth

Other Parts Discussed in Thread: 4430

Hello!

I modified CPSW Ethernet example from http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_NDK

Program uses TCP socket to receive data from other device and send it immediately back.
Maximum bandwidth I got was around 38 Mbps.
Tried different buffer and message size and different platforms (with x86 or ARM).
Devices were connected directly throught ethernet cable.

I have to use Gigabit Ethernet Port.

How can I achieve higher bandwidth?

Thank you!

  • Do you mean 38 Mega bits per second or 38 Mega bytes per second?

    How are you measuring throughput?

    Which code versions are you using?

    Alan
  • Mega bits per second.
    I have a simple program for Linux which sends few thousand messages through tcp socket and receives them back from AM437x IDK. It measures time between start and end of transmission and divides size of all messages by time elapsed.
    It sends and receives so actually it is more like 76 Mbps but still far from Gigabit.

    I use newest version of SDK, 02.00.01: software-dl.ti.com/.../index_FDS.html
  • Since your measurements are so far from the expected throughput, I'm suspecting there is something fundamentally miss-configured. It sounds like at least one side of the connection is not able to keep up.

    Is there any chance that the ethernet driver on either side is configured for 100Mbps rather than gigabit ethernet?

    What are the sizes of the transmit and receive TCP buffers on both machines?

    Are you familiar with the WireShark network analyzer product?

    www.wireshark.org/

    I'm hoping that an analysis of the TCP packet traffic that occurs while your test application is running will reveal something.

    Since your network is basically closed, there is probably no need to configure any filters. Just start WireShark and double click on the Local Area Connection your AM437 is connected to. Run your test, then stop the capture (the square red button) and have a look (in the upper WireShark window) at the packets passing between the Windows machine and your AM437. Hopefully something will pop out. WireShark will tag re-transmissions. Also verify that the packet sizes are as you configured. You can also see the timestamps of the packets. There should be no long delays between packets. I'm wondering if either side's TCP window size is too small to allow continuous packet transmission.

    Alan

  • Our test environment contain Laptop running Windows and single board with ARM processor running Linux. We are able to connect Laptop and Linux board together and get bandwidth ~400 Mbit/s which is exactly maximal value for Linux board. But after we connect Sitara to Laptop or to Linux board we get the same result ~38 Mbit/s. We checked configuration settings after auto-negotiation and was set to 1Gbit/s.  Also we try to forced 100Mbit/s on and we get exactly the same bandwith. 

    Running Wireshark on windows show us that during starting connection:

    • Windows tcp window size set to 8192
    • Sitara tcp windows size set to 64240

    Now we are trying to send 1000 packages with size of 1KB. And we can see that:

    Communication after that looks like this:

    • Laptop send Request packet with various size from 1078 to 5894
    • Sitara always send Respond with size 1078
    • From time to time TCP Retransmission occur

    I also take closer look into TCP window size and I can see that every request from 192.168.1.2 (windows laptop) decrease Sitara TCP window size until it head to zero and we can see this:

     On sitara console we cen see such information about persist timeout.

    We did not find in documentation force on Sitara site connection speed. How to achieve it?

    Dump of wireshark:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/4405.TCP_5F00_Sitara_5F00_Gigabit.7z

    Thanks in advance :)

  • I'm still studying the wireshark trace. Have you made any progress on this?

    One thing I notice is that the Sitara is only sending packets of length 1078 bytes, whereas the windows machine is blasting out 4430 byte packets. Can you increase the Sitara's max transmit packet size to see if that improves performance?

    Alan
  • I made a few tests with different buffer size on both sides: 1kB, 2kB and 4kB.

    Here's dump:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/8688.wireshark_5F00_sitara.7z

    Thank you!

  • I'm sorry for the long delay in replying.

    I still haven't had any time to study the wire shark traces you provided. Have you made any progress?

    Alan
  • Hi Alan,

    Sadly we run out of reaserch time for this problem. We try to dobule check everything but we do not have enough knowledge to debug network stack. I tested also system load in time of communication and it was about 2~3% which looks reasonable for such slow bandwidth. I also try to search for more information and I found:

    http://processors.wiki.ti.com/index.php/AM335x-PSP_04.06.00.11_Features_and_Performance_Guide

    which show us maximal bandwidth for older version of processor is above 300 Mbits/sec with about ~98% of system load. This test was done on linux using iperf, the same software was used in our case to measure bandwidth between Linux board and Windows laptop.

    We do not have idea how to change echo sample and its RTOS configuration or network option to improve move speed. Propably in next week we come back to this problem with fresh mind and after that if we fail we will drop idea of usage AM437x with RTOS for gigabit ethernet.

    Thanks in advance :)