nfsSpeedTest
nfsSpeedTest copied to clipboard
nfsSpeedTest is a wrapper for dd written in Perl. It was created mainly for testing the performance of file systems or network file shares (e.g. NFS), but can be used for generating large files (e.g....
nfsSpeedTest
nfsSpeedTest is a wrapper for dd written in Perl. It was created mainly for testing the performance of file systems or network file shares (e.g. NFS), but can be used for generating large files (e.g. swap files) or for testing the network. For the write test, by default, it reads from /dev/zero and outputs to a random file (e.g. nfsSpeedTest-someRandomMD5Hash). For the read test, it can again use dd or Perl's sysread call. Variable block sizes are supported.
Output when run with no options (help/usage):
Purpose: Writes the file "nfsSpeedTest-randomMD5Hash" to the local directory using dd if=/dev/zero or if=/dev/urandom (optional). For a read test it does dd if=nfsSpeedTest-randomMD5Hash of=/dev/null or uses perl's sysread call (optional). For a read and write (i.e. copy) test it uses dd if=nfsSpeedTest-randomMD5Hash of=nfsSpeedTest-randomMD5Hash-copy. All tests tell you the bandwidth in MB/s and mbps.
Usage:
nfsSpeedTest -b <blockSize> -c
-b : block size e.g. 2k, 2m, if not specified defaults to 4k -c : change to
Examples
write a 4GB file using /dev/zero, do a read test using dd, do a copy test, then delete the file
nfsSpeedTest -s 4g
write a 512MB file using /dev/zero, do a read test using dd, don't do a copy test, then delete the file
nfsSpeedTest -s 512m -y
write a 4GB file with 32k block size, don't do a copy test, don't delete the file
nfsSpeedTest -s 4g -b 32k -y -d
write a 2GB file and then make it into a swap file
nfsSpeedTest -s 2GB -r -y -d
mv nfsSpeedTest-somRandomMD5Hash /swapFile
mkswap /swapFile
swapon /swapFile