Easy Linux or UNIX Network Load Testing

You can easily test out Linux/UNIX network Load using standard dd and scp commands.


=> Use dd to create a large file.

=> Use scp to copy file from one system to another system. scp copies files between hosts on a network. It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh. Make sure both local and remote system owned by you i.e. co-operation from another host on the network is required for test network load.

Step # 1: Create a large file

Use dd command as follows to create a large file (e.g. 1024M x 2count = 2GB):
$ dd if=/dev/zero of=/tmp/big.file bs=1024M count=50

Step # 2: Use scp to transfer file

Now copy a file to remote host using scp:
$ scp /tmp/big.file user@remote.server.com:/tmp

Any error or crash indicates problem with system load testing.

Please note that if the server has two+ network cards, make sure that the test is run and uses each of the network cards. Disable NIC using ifconfig command or alter routing using route command for testing purpose.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

9 comments… add one
  • kotnik Jan 6, 2007 @ 6:49

    I sometimes use ping -f (reqest sent is a dot, answer recieved is a backspace) for testing. It tells a little about network, but I like fast drawing in terminal 🙂

  • 🛡️ Vivek Gite (Author and Admin) nixCraft Jan 6, 2007 @ 7:25

    Yup, it will not give any idea about network load testing but you get all dots (visuals). I guess that gives some sort of satisfaction.. LOL

  • mb Jan 8, 2007 @ 14:43

    It is a bad idea in my opinion to test the load on a network by adding a large amount of traffic on the network. Particularly on a WAN, if you didn’t have a network bottleneck before the test, you certainly will during the test! Always be aware of what kind of bandwidth you have to the destination. Throw this kind of traffic on a slow international link and watch business traffic performance die during the copy. Lastly, on a network that has QOS, you will only get the performance of the network as it is tuned for the SCP traffic which may not be a true representation of network load.

  • mike Jan 10, 2007 @ 19:21

    If you run this on older hardware, your as likely to run into CPU or disk bottlenecks as a network bottleneck. Using the technique described, you are encrypting all of your traffic on one end and decrypting on the other end, eating up CPU cycles on both machines. You are also relying on disk I/O to read the data on the sending side and write on the receiving side. Try using ‘TTCP’ instead. No encryption is necessary, nor is I/O to the disk subsystem. Use TTCP with caution, however. This tool can fill up a network pipe easily–especially in UDP mode, which blasts as much traffic as it can generate.

  • 🛡️ Vivek Gite (Author and Admin) nixCraft Jan 10, 2007 @ 19:42

    mb and mike,

    I am aware of problem you have stated here. However in this example box was connected to 1000Mbps port and I needed to test this entire load testing for production.

    Appreciate your posts/suggestions.

  • kofi adumatta Mar 16, 2007 @ 13:44

    pls i will like to get note on linux and unix networking .

  • mendem Nov 15, 2008 @ 16:06

    phewww… use lmbench

  • sean Nov 23, 2008 @ 20:14

    Load testing the network with SCP is only valid on a LAN <1ms latency and if disk I/O is actually capable or greater than the network throughput which is nearly never the case.

    If you are testing network links that are greater than 1ms, or where the bandwidth delay product is greater than 4K SCP also fails becuase it moves data in 4 K blocks, so the transmit pathway will be idle waiting on acknowledges.

  • Mark Apr 23, 2010 @ 20:44

    Why not use iPerf? That’s what it’s designed for, and it gives a ton more info than copying large files!

Leave a Reply

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

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.