How to test NFS performance with dd on Linux?

Updated: Feb 17



NFS performance is important for the production environment. In this tutorial, we will review how to use DD command to test local storage and NFS storage performance.


Test nfs storage performance on Linux

There are some differences between each testing command. We choose dd command in the following example.


dd - without conv=fsync or oflag=direct. This uses filesystem cache.

scp - This is bottlenecked by a single CPU core performing encryption, and eventually by OpenSSH's built-in 64KiB buffer size.

rsync - This uses filesystem cache, and cannot bypass the cache.

Note: These tests examples will drop filesystem cache. Please use them carefully.


Test write performance of the local storage with dd command

Drop cache before every test.

echo 3 > /proc/sys/vm/drop_caches
dd if=/dev/zero of=/tmp/testfile.bin bs=1M count=10000 conv=fsync

Test read performance of the local storage with dd command

Drop cache before every test.

echo 3 > /proc/sys/vm/drop_caches
dd if=/tmp/testfile.bin of=/dev/null bs=1M


Test streaming write performance of the NFS client with dd command

Drop cache before every test

echo 3 > /proc/sys/vm/drop_caches
dd if=/dev/zero of=/mnt/nfs/testfile.bin bs=1M count=10000 conv=fsync

Test streaming read performance of NFS client with dd command

Drop cache before every test

echo 3 > /proc/sys/vm/drop_caches
dd if=/mnt/nfs/testfile.bin of=/dev/null bs=1M

Related Post:

Use Linux nfsiostat to troubleshoot nfs performance issue

Troubleshoot high iowait issue on Linux



89 views

Join our mail group. Get a free Linux account on Cloud.

Never miss a post!

Want a free Linux account?  This account can be used to login to our cloud server and practice Linux commands.

 
kamateravps.gif
topbackgroud.png

✔ Linux Commands   ✔ Linux Skills    ✔ LinuxPerformance   ✔ Linux Interview

Some articles are from the public internet. If you find your article misused or undesired here and you don't want us to display it, please let us know and we'll remove it immediately.