2011年1月17日 星期一

用dd簡單測Linux的io

read:
# time dd if=/dev/sda of=/dev/zero bs=8k count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 73.0053 s, 112 MB/s
real    1m13.025s
user    0m0.230s
sys     0m7.700s





write:
#time dd if=/dev/zero of=/tmp/fake.file bs=8k count=1000000

1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 81.6353 s, 100 MB/s

real    1m21.758s
user    0m0.160s
sys     0m8.440s

read and write:
#time dd if=/tmp/fake.file of=/tmp/fake.file.out bs=8k count=1000000
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 207.892 s, 39.4 MB/s

real    3m27.960s
user    0m0.320s
sys     0m17.310s


檢查Linux Block size
# dumpe2fs /dev/sdb1 | grep -i 'Block size'


測試 Ram Disk的速度.(:/tmp採用Ram Disk)
# time dd if=/dev/zero of=/tmp/fake.file bs=8k count=400000
400000+0 records in
400000+0 records out
3276800000 bytes (3.3 GB) copied, 1.33236 s, 2.5 GB/s

沒有留言:

張貼留言