Test network speed

One of my actual projects uses a USB-Ethernet (LAN9512) interface. So I am interested in the real speed for this combination.

On the embedded device I used netcat with the following parameters:
nc -l -p 1234 | dd of=/dev/null

And on the host side I used netcat with:
dd if=/dev/urandom bs=4096 count=100000 | nc host.tld 1234

For the different counts I got the following numbers

count duration speed
1000 1 s 4.1 MB/s
10000 10.8 s 3.8 MB/s
100000 108 s 3.8 MB/s
1000000 1092 s 3.7 MB/s

Okay, the last test copied 4.1 GB and lasted 18 minutes.

Published by

Tom

Embedded firmware developer, sometimes Linux kernel developer.

Leave a Reply

Your email address will not be published. Required fields are marked *