About nixCraft

Topics

Easy Linux or UNIX Network Load Testing

Posted by Vivek Gite [Last updated: January 3, 2007]

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.

Tell us how we're doing: Please answer a few questions about your experience to help us improve nixCraft.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. kotnik Says:

    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 :)

  2. nixcraft Says:

    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

  3. mb Says:

    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.

  4. mike Says:

    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.

  5. nixcraft Says:

    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.

  6. kofi adumatta Says:

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

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.