xHiveAI-A311D:USB的使用

开发板上有1个3.0 USB和3个2.0 USB接口。


1、USB3.0 测试

1.1、插入u盘到3.0接口

//查看u盘信息 fdisk -l /dev/sd*
root@Apoidea:~# fdisk -l /dev/sd*
Disk /dev/sda: 117.2 GiB, 125829120000 bytes, 245760000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sda1       4294967295 8589934589 4294967295    2T ff BBT
/dev/sda2       4294967295 8589934589 4294967295    2T ff BBT
/dev/sda3       4294967295 8589934589 4294967295    2T ff BBT
/dev/sda4       4294967295 6854241533 2559274239  1.2T ff BBT

1.2、 挂载usb

root@Apoidea:~# mount /dev/sda /mnt/

1.3、usb3.0 性能测试 (建议多次运行求平均值)

//写速度:time dd if=/dev/zero of=./testw.dbf bs=4k count=300000 数据量1172MB
root@Apoidea:/mnt#  time dd if=/dev/zero of=./testw.dbf bs=4k count=300000
300000+0 records in
300000+0 records out
1228800000 bytes (1.2 GB, 1.1 GiB) copied, 9.63392 s, 128 MB/s
real    0m10.062s
user    0m0.060s
sys     0m3.920s
//所以写速度为:4*300000/1024/10.062=116.5M/s

//读速度:time dd if=/dev/sda of=/dev/null bs=4k
root@Apoidea:/mnt#  time dd if=/dev/sda of=/dev/null bs=4k
521630+0 records in
521629+0 records out
2136592384 bytes (2.1 GB, 2.0 GiB) copied, 10.0825 s, 212 MB/s
real    0m10.104s
user    0m0.228s
sys     0m4.640s 
//读取速度为:4*521630/1024/10.104=201.6M/s

2、USB2.0 测试

2.1、插入u盘到2.0接口

//usb2.0口接入u盘 使用 fdisk -l /dev/sd* 查看u盘信息
root@Apoidea:~# fdisk -l /dev/sd*
Disk /dev/sdb: 117.2 GiB, 125829120000 bytes, 245760000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1       4294967295 8589934589 4294967295    2T ff BBT
/dev/sdb2       4294967295 8589934589 4294967295    2T ff BBT
/dev/sdb3       4294967295 8589934589 4294967295    2T ff BBT
/dev/sdb4       4294967295 6854241533 2559274239  1.2T ff BBT

 2.2、 挂载usb

root@Apoidea:~# mount /dev/sdb /mnt/
root@Apoidea:~# ls /mnt/
 CentOS-7-x86_64-DVD-2003.iso  'System Volume Information'

2.3、usb2.0 性能测试 (建议多次运行求平均值)

//写速度:time dd if=/dev/zero of=./testw.dbf bs=4k count=300000 数据量1172MB
root@Apoidea:/mnt# time dd if=/dev/zero of=./testw.dbf bs=4k count=300000
300000+0 records in
300000+0 records out
1228800000 bytes (1.2 GB, 1.1 GiB) copied, 16.6747 s, 73.7 MB/s
real    0m17.516s
user    0m0.100s
sys     0m5.964s

//读速度:time dd if=/dev/sdb of=/dev/null bs=4k
root@Apoidea:/mnt# time dd if=/dev/sdb of=/dev/null bs=4k
179390+0 records in
179389+0 records out
734777344 bytes (735 MB, 701 MiB) copied, 10.6944 s, 68.7 MB/s
real    0m10.712s
user    0m0.028s
sys     0m1.020s

猜你喜欢

转载自blog.csdn.net/danielyu_123456/article/details/110385855