Question: Need help determining why file transfers are slow on local LAN.
When I test network throughput, it’s best to remove as many variables as possible such as disk i/o or CPU limitations. Here’s the procedure I use, which can illustrate the typical max you will ever see in your network.
Both these utilities should be available on most modern *nix systems, either preinstalled, via packages, or able to be compiled from source.
Run the following command on one computer to set up the UDP listener. (Using UDP will give higher performance numbers because of the lack of TCP overhead to transfer.) > nc -ulp 5000 > /dev/null
On the other machine, run the following command, substituting the listener’s ip address, to send a stream of zeros across the network to the nc listener. The pv utility will show the current performance as tracked by the receiver. > pv < /dev/zero | nc -u listener-ip-address 5000
- The theoretical max on a Gig Ethernet connection is 119MB/s (notice, MB, not Mb)
- TCP can also be tested by removing the -u in both nc commands
- In real world applications, you’ll never reach the performance numbers illustrated in the pv output.
This method gives predictable results in a well designed network with properly functioning equipment. For that reason, it is a good tool to help discover if the network itself or the networking equipment is contributing to the perceived “slowness”.