Tôi có hệ thống Linux Centos gắn kết một số chia sẻ NFS, tôi có thể sử dụng kỹ thuật nào để đo tốc độ / độ trễ / tốc độ I / O khi đọc và ghi tệp từ chia sẻ đó? Kỹ thuật này cũng có thể được áp dụng cho ổ cứng cục bộ cho mục đích so sánh?
Tôi có hệ thống Linux Centos gắn kết một số chia sẻ NFS, tôi có thể sử dụng kỹ thuật nào để đo tốc độ / độ trễ / tốc độ I / O khi đọc và ghi tệp từ chia sẻ đó? Kỹ thuật này cũng có thể được áp dụng cho ổ cứng cục bộ cho mục đích so sánh?
Câu trả lời:
Tôi có thể sử dụng kỹ thuật nào để đo tốc độ / độ trễ / tốc độ I / O khi đọc và ghi tệp từ chia sẻ đó?
Bạn có thể sử dụng ddđể làm điều này:
# 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
(Kích thước tệp = bs * countphải gấp đôi RAM)
hoặc xem qua một số công cụ điểm chuẩn: Bonnie ++ , IOzone , ví dụ:
# bonnie++ -d /mnt/nfs/bonnie/ -s 2048 -r 1024 -u 0
Using uid:0, gid:0.
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
svr201NTC-647.lo 2G  1473  96 46620   3 48033   4  1785  99 3525478 100 +++++ +++
Latency              8647us      86us     268us    5064us      66us   23566us
Version  1.96       ------Sequential Create------ --------Random Create--------
svr201NTC-647.local -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   580   2  5742  13   429   2   423   1  7540  12   392   1
Latency               244ms   22747us    4549ms    3849ms    1641us     999ms
1.96,1.96,svr201NTC-647.localdomain,1,1319514624,2G,,1473,96,46620,3,48033,4,1785,99,3525478,100,+++++,+++,16,,,,,580,2,5742,13,429,2,423,1,7540,12,392,1,8647us,86us,268us,5064us,66us,23566us,244ms,22747us,4549ms,3849ms,1641us,999ms
# iozone -aRcU /mnt/nfs/ -f /mnt/nfs/testfile > logfile
Thêm chi tiết: http://nfs.sourceforge.net/nfs-howto/ar01s05.html
Kỹ thuật này cũng có thể được áp dụng cho ổ cứng cục bộ cho mục đích so sánh?
Chắc chắn, bạn có thể sử dụng nó để đánh giá ổ cứng cục bộ để so sánh.
Có lẽ nó có thể hữu ích: http://www.alfaExloit.com/f Richos_web/leer.php?id=161
Trong liên kết ở trên, bạn sẽ tìm thấy một tập lệnh tạo tập tin hữu ích trong khoảng 1-4Mb, theo cách đó có thể kiểm tra tốc độ đọc / ghi.