Here we assume NAS shares are mounted on linux server using nfs/smb protocol.
For Read Performance
# dd if=/dev/zero of=/nas-mount-point/samplefile bs=1M count=1024 oflag=direct
For Write Performance
# dd if=/nas-mount-point/samplefile of=/dev/null bs=1M count=1024 iflag=direct
where,
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.
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
536870912 bytes (537 MB) copied, 5.19611 s, 102 MB/s
0 komentar:
Posting Komentar