UDP load generator - Yun too slow?

Hi all,

I'm trying to make a load generator to disturb the traffic over Ethernet. The goal is to be able to preform stress test on industrial networks and components. I want to be able to generate as close as possible to 100 Mbps (let all the components go into error). We used to do this with target computers and Real-Time simulink models, but i want to simplify it (and make it more portable). My hope was the 400Mhz processor of the YUN could do the job.

The first try was to just write a Python script, with as little code as possible. This to get the maximum output (in messages) from the YUN. See code below:

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP

for x in range (0,9999):
    sock.sendto(bytes(MESSAGE), (UDP_IP, UDP_PORT))

print ("done, executed loop ", x, " times")


The problem i'm running into is that with this script i can't achieve more then 42 Mbps (wireshark summary measurement). Is their any way to code this more efficiently or get more speed? In the final product i should be able to configure the % load i want to put onto the line, so more code should be added in a later stage. Is the YUN not fit for the job? Could a custom image help? (i'm in no way a programmer so the linux side of this arduino is still uncharted territory for me for the most part...)

Any help is appreciated.

42 Mbps looks like the max wireless bandwidth. Are you sure you're running over ethernet? Can you disable wifi and retry? http://playground.arduino.cc/Hardware/Yun#disable_wifi

If I were you I will pick up some kind of ARM Cortex A board which come with 1000Mb port . then use it as UDP load generator for multiple 100Mb feeds.