NAS Storage Performance Testing Using DD Command

N

nixsavy

Guest
In this article I will show you the power linux dd command to analyse NAS storage performance (throughput). dd command basically copies a file (from standard input to standard output, by default) with a changeable I/O block size , using specific input and output block sizes. Here we are using dd command to test the throughput of NAS nodes that is attached to the linux server. You need to bit careful when working with linux dd command on production system as its bit dangerous if you not use in proper way.

Here we assume NAS shares are mounted on linux server using nfs/smb protocol.

For Read Performance

Code:
# dd if=/dev/zero of=/nas-mount-point/samplefile bs=1M count=1024 oflag=direct
For Write Performance

Code:
# dd if=/nas-mount-point/samplefile of=/dev/null bs=1M count=1024 iflag=direct
where,


Code:
if=file              => Read from file instead of standard input.
of=file              => Write to file instead of standard output.
bs=1M                => Set both input and output block sizes to bytes
count=1024            => Copy n blocks from the input file.
iflag=flag            => Access the input file using the flags specified by the flag argument.
oflag=flag            => Access the output file using the flags specified by the flag argument.
oflag with 'direct' argument
oflag=direct          => Use direct I/O for data, avoiding the buffer cache.

Looping Script with DD command

This script line will create 1000 files with each 1MB in size.

Code:
for i in [`seq 1 1000`]; do dd if=/dev/zero of=/nas-mount-point/samplefile$i bs=1M count=1024 oflag=direct;done
Sample Output

Code:
536870912 bytes (537 MB) copied, 5.19611 s, 102 MB/s
 

Attachments

Last edited:


Members online


Top