cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tiago0297
Adventurer
Adventurer
1,036 Views
Registered: ‎03-22-2018

C++ TCP Socket program with PetaLinux throughput

Hi,

I'm working on a project that uses sockets to communicate two ZedBoards with PetaLinux. I'm using C++ to write the communication program. 

Everything works fine, the communication is running perfectly but I'm having a hard time on measuring how much Mbps am I getting from the ethernet connection between the ZedBoards. 

I tried to write some code to make some measurements but I'm not so sure if my results is right. I got around 10 Mbps on this communication.

It is there some documentation that specifies the usual throughput for TCP Sockets in PetaLinux? What are your opinion about the results I got?

Thanks in advance

 

0 Kudos
5 Replies
jsara
Participant
Participant
1,021 Views
Registered: ‎08-14-2015

There is a tech report on zynq ethernet performance.  Don't remember the number, but it provides benchmark values using iperf.  10 megabits per second is reasonable on a 10basedT link but very bad for a 100basedT or GigE link.   

rfs613
Scholar
Scholar
1,017 Views
Registered: ‎05-28-2013

I would recommend using a standard tool to measure your ethernet performance, as a baseline. One such commonly used tool is iperf3, there are others as well.

Without knowing more about your hardware specifics, it is hard to say if 10Mpbs is normal. Assuming Gigabit connections, the value seems low. But there could be misconfiguration, bad cable, etc. It could also be inefficient coding, inappropriate buffer sizes, etc.

 

tiago0297
Adventurer
Adventurer
999 Views
Registered: ‎03-22-2018

@jsara @rfs613 

Thank you for the answers. I'm making some more research based on what you said.

About my specifcs, I'm using a ZedBoard with Marvell 88E1518 PHY. The program I'm using is a very simple client-server with socket example, exchanging data between my PC and a ZedBoard. 

How can I tell if I'm using a 10basedT, 100basedT or GigE link when using PetaLinux?

0 Kudos
961 Views
Registered: ‎04-20-2017

The fastest write/read over ethernet to the ramdisk fs I saw on zed board were 70 MB/sec.

I assume ever socket should even be faster. If you are connected over gigabit and talking about mbits then 10 is sluggish

Build ETH-tools in your petalinux image. With that you can read all the lower layer network settings

0 Kudos
rfs613
Scholar
Scholar
940 Views
Registered: ‎05-28-2013


How can I tell if I'm using a 10basedT, 100basedT or GigE link when using PetaLinux?

As mentioned, the "ethtool" utility can be used to query the current link. Another way is to look at kernel messages (on serial console, or using "dmesg") when you plug/unplug the cable. Normally it will report link down/up as well as the rate.

 

The Marvell 88E1518 PHY is gigabit capable, as is the Ethernet controller on the Zedboard. I did a couple of searches for "Zedboard ethernet throughput" and found reports ranging from 250 Mbps to 700 Mbps. This is roughly what I would expect: the CPU will max out before you reach 1000 Mbps.

0 Kudos