本文来源电子发烧友社区,作者:刘建华, 帖子地址:https://bbs.elecfans.com/jishu_2307426_1_1.html
挂载好了sata硬盘,这里做一下磁盘速度测试:
通过df -h命令查看磁盘情况:
# df -h
Filesystem Size Used Available Use% Mounted on
none 344.4M 0 344.4M 0% /dev
/dev/mmcblk0p7 6.8G 501.0M 6.3G 7% /
tmpfs 375.3M 0 375.3M 0% /dev/shm
tmpfs 375.3M 12.0K 375.3M 0% /tmp
tmpfs 375.3M 224.0K 375.1M 0% /run
/dev/sda5 78.4G 56.0M 74.3G 0% /mnt/sata
/dev/mmcblk0p1 191.6M 1.8M 175.7M 1% /extp
2、通过hdparm测试读取速率
先测试sata硬盘的
# hdparm -tT /dev/sda5
/dev/sda5:
Timing buffer-cache reads: 420 MB in 0.51 seconds = 839503 kB/s
Timing buffered disk reads: 478 MB in 3.00 seconds = 163015 kB/s
cahce读取840M/s,磁盘持续读取163M/s。
再测一下开发板的:
# hdparm -tT /dev/mmcblk0p7
/dev/mmcblk0p7:
Timing buffer-cache reads: 414 MB in 0.50 seconds = 831310 kB/s
Timing buffered disk reads: 126 MB in 3.00 seconds = 42988 kB/s
cahce读取830M/s,磁盘持续读取43M/s。
# time dd if=/dev/sda5 bs=1024 count=1000000 of=1Gb.file
1000000+0 records in
1000000+0 records out
real 0m44.173s
user 0m0.590s
sys 0m26.740s
# time dd if=/dev/mmcblk0p7 bs=1024 count=1000000 of=1Gb.file
1000000+0 records in
1000000+0 records out
real 0m52.214s
user 0m0.570s
sys 0m25.760s
写入速度SSD为:44M/s,EMMC为:19.2M/s。
从测试结果来看,开发板的磁盘读取与写入与台式机的性能差不多。
全部0条评论
快来发表一下你的评论吧 !