Armbian实用工具认真写命令

在 Linux 上检测硬盘速度

2022-04-15  本文已影响0人  岑吾

在Linux中可以用hdparm 命令来测试硬盘速度。

安装

ubuntu

sudo apt install hdparm

centos

sudo yum install hdparm

使用

hdparm -tT /dev/sda

为了检测更精准,这个操作应该重复2-3次 。这显示了无需访问磁盘,直接从 Linux 缓冲区缓存中读取的速度。这个测量实际上是被测系统的处理器、高速缓存和存储器的吞吐量的指标。这是一个 for 循环的例子,连续运行测试 5 次:

for i in 1 2 3 4 5; do hdparm -tT /dev/sda; done

/dev/sda:
 Timing cached reads:   16310 MB in  1.99 seconds = 8198.86 MB/sec
 Timing buffered disk reads: 432 MB in  3.01 seconds = 143.62 MB/sec

/dev/sda:
 Timing cached reads:   16492 MB in  1.99 seconds = 8289.34 MB/sec
 Timing buffered disk reads: 748 MB in  3.00 seconds = 249.00 MB/sec

/dev/sda:
 Timing cached reads:   15774 MB in  1.99 seconds = 7926.59 MB/sec
 Timing buffered disk reads: 374 MB in  3.00 seconds = 124.58 MB/sec

/dev/sda:
 Timing cached reads:   16544 MB in  1.99 seconds = 8315.83 MB/sec
 Timing buffered disk reads: 384 MB in  3.01 seconds = 127.78 MB/sec

/dev/sda:
 Timing cached reads:   15244 MB in  1.99 seconds = 7658.94 MB/sec
 Timing buffered disk reads: 390 MB in  3.01 seconds = 129.77 MB/sec

更多参数解析

上一篇 下一篇

猜你喜欢

热点阅读