iSCSi有BlockIO以及FileIO两种模式,此次通过dd对两种模式下的性能做初步测试。
1.BlockIO
1.1 Write
[root@euca-nc send_targets]# dd if=/dev/zero of=/dev/sdb bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 184.596 s, 116 MB/s
[root@euca-nc send_targets]# dd if=/dev/zero of=/dev/sdb bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 184.558 s, 116 MB/s
[root@euca-nc send_targets]# dd if=/dev/zero of=/dev/sdb bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 184.375 s, 116 MB/s
[root@euca-nc send_targets]# dd if=/dev/zero of=/dev/sdb bs=1M count=20480 oflag=direct,nonblock
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 217.965 s, 98.5 MB/s
[root@euca-nc send_targets]# dd if=/dev/zero of=/dev/sdb bs=1M count=20480 oflag=direct,nonblock
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 218.112 s, 98.5 MB/s
[root@euca-nc send_targets]# dd if=/dev/zero of=/dev/sdb bs=1M count=20480 oflag=direct,nonblock
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 217.395 s, 98.8 MB/s
1.2 Read
[root@euca-nc nodes]# dd if=/dev/sdb of=/dev/zero bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 206.854 s, 104 MB/s
[root@euca-nc nodes]# dd if=/dev/sdb of=/dev/zero bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 201.447 s, 107 MB/s
[root@euca-nc nodes]# dd if=/dev/sdb of=/dev/zero bs=1M count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 196.335 s, 109 MB/s
[root@euca-nc nodes]# dd if=/dev/sdb of=/dev/zero bs=1M count=20480 iflag=direc
t,nonblock
20480+0 records in20480+0 records out
21474836480 bytes (21 GB) copied, 245.947 s, 87.3 MB/s
[root@euca-nc nodes]# dd if=/dev/sdb of=/dev/zero bs=1M count=20480 iflag=direc
t,nonblock
20480+0 records in20480+0 records out
21474836480 bytes (21 GB) copied, 265.259 s, 81.0 MB/s
[root@euca-nc nodes]# dd if=/dev/sdb of=/dev/zero bs=1M count=20480 iflag=direc
t,nonblock
20480+0 records in20480+0 records out
21474836480 bytes (21 GB) copied, 240.701 s, 89.2 MB/s
2.FileIO
在FileIO测试中,使用xfs作为文件系统进行测试。
2.1 Write
[root@euca-nc file]# dd if=/dev/zero of=fileio bs=1M count=20480
20438+0 records in
20437+0 records out
21429952512 bytes (21 GB) copied, 183.968 s, 116 MB/s
[root@euca-nc file]# dd if=/dev/zero of=fileio bs=1M count=20480
20438+0 records in
20437+0 records out
21429952512 bytes (21 GB) copied, 183.56 s, 117 MB/s
[root@euca-nc file]# dd if=/dev/zero of=fileio bs=1M count=20480
20438+0 records in
20437+0 records out
21429952512 bytes (21 GB) copied, 183.473 s, 117 MB/s
[root@euca-nc file]# dd if=/dev/zero of=fileio bs=1M count=20480 oflag=direct,nonblock
20438+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 202.732 s, 106 MB/s
[root@euca-nc file]# dd if=/dev/zero of=fileio bs=1M count=20480 oflag=direct,nonblock
20438+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 204.445 s, 105 MB/s
[root@euca-nc file]# dd if=/dev/zero of=fileio bs=1M count=20480 oflag=direct,nonblock
20438+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 203.631 s, 105 MB/s
2.2 Read
[root@euca-nc file]# dd if=fileio of=/dev/zero bs=1M count=20480
20437+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 151.723 s, 141 MB/s
[root@euca-nc file]# dd if=fileio of=/dev/zero bs=1M count=20480
20437+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 151.402 s, 142 MB/s
[root@euca-nc file]# dd if=fileio of=/dev/zero bs=1M count=20480
20437+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 151.282 s, 142 MB/s
[root@euca-nc file]# dd if=fileio of=/dev/zero bs=1M count=20480 iflag=direct,nonblock
20437+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 280.978 s, 76.3 MB/s
[root@euca-nc file]# dd if=fileio of=/dev/zero bs=1M count=20480 iflag=direct,nonblock
20437+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 279.511 s, 76.7 MB/s
[root@euca-nc file]#
[root@euca-nc file]# dd if=fileio of=/dev/zero bs=1M count=20480 iflag=direct,nonblock
20437+0 records in
20437+0 records out
21429747712 bytes (21 GB) copied, 279.005 s, 76.8 MB/s