what technique can I use to measure the I/O speed/latency/rate when
reading and writing files from that share?
您可以使用dd执行此操作:
# time dd if=/dev/zero of=/mnt/nfs/testfile bs=16k count=128k
131072+0 records in
131072+0 records out
2147483648 bytes (2.1 GB) copied, 111.656 seconds, 19.2 MB/s
real 1m51.678s
user 0m0.066s
sys 0m1.482s
# time dd if=/mnt/nfs/testfile of=/dev/null bs=16k
131072+0 records in
131072+0 records out
2147483648 bytes (2.1 GB) copied, 4.96762 seconds, 432 MB/s
real 0m4.969s
user 0m0.046s
sys 0m0.720s
(文件大小= bs * count应该是RAM的两倍)
或者看看一些基准工具:Bonnie++,IOzone,例如:
# bonnie++ -d /mnt/nfs/bonnie/ -s 2048 -r 1024 -u 0
Using uid:0, gid:0.
Writing a byte at a time...done