博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HowTo: Linux Check IDE / SATA Hard Disk Transfer Speed
阅读量:4284 次
发布时间:2019-05-27

本文共 2692 字,大约阅读时间需要 8 分钟。

轉載自

 

HowTo: Linux Check IDE / SATA Hard Disk Transfer Speed

 

So how do you find out how fast is your hard disk under Linux? Is it running at SATA I (150 MB/s) or SATA II (300 MB/s) speed without opening computer case or chassis?

You can use the hdparm command to check hard disk speed. It provides a command line interface to various hard disk ioctls supported by the stock Linux ATA/IDE/SATA device driver subsystem. Some options may work correctly only with the latest kernels (make sure you have cutting edge kernel installed). I also recommend to compile hdparm with the include files from the latest kernel source code. It provides more accurate result.

Measure Hard Disk Data Transfer Speed

Login as the root and enter the following command:
$ sudo hdparm -tT /dev/sda
OR
$ sudo hdparm -tT /dev/hda
Sample outputs:

/dev/sda: Timing cached reads:   7864 MB in  2.00 seconds = 3935.41 MB/sec Timing buffered disk reads:  204 MB in  3.00 seconds =  67.98 MB/sec

For meaningful results, this operation should be repeated 2-3 times. This displays the speed of reading directly from the Linux buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under test. Here is a for loop example, to run test 3 time in a row:
for i in 1 2 3; do hdparm -tT /dev/hda; done

Where,

  • -t :perform device read timings
  • -T : perform cache read timings
  • /dev/sda : Hard disk device file

To find out SATA hard disk speed, enter:
sudo hdparm -I /dev/sda | grep -i speed
Output:

*	Gen1 signaling speed (1.5Gb/s)	   *	Gen2 signaling speed (3.0Gb/s)

Above output indicate that my hard disk can use both 1.5Gb/s or 3.0Gb/s speed. Please note that your BIOS / Motherboard must have support for SATA-II.

dd Command

You can use the dd command as follows to get speed info too:

dd if=/dev/zero of=/tmp/output.img bs=8k count=256krm /tmp/output.img

Sample outputs:

262144+0 records in262144+0 records out2147483648 bytes (2.1 GB) copied, 23.6472 seconds, 90.8 MB/s

GUI Tool

You can also use disk utility located at System > Administration > Disk utility menu.

Read Only Benchmark (Safe option)

Then, select > Read only:

 

Fig.01: Linux Benchmarking Hard Disk Read Only Test Speed


The above option will not destroy any data.

 

Read and Write Benchmark (All data will be lost so be careful)

Visit System > Administration > Disk utility menu > Click Benchmark > Click Start Read/Write Benchmark button:

Fig.02:Linux Measuring read rate, write rate and access time

30 comments…  }

  • Jonas November 6, 2007, 1:50 pm

    $ sudo hdparm /dev/sda (and following)

    should be
    $ sudo hdparm -tT /dev/sda

转载地址:http://zesgi.baihongyu.com/

你可能感兴趣的文章
C#Nullable<T>可空的值类型,C#中的?使用整理
查看>>
EntityFramework中JSON序列化循环引用----JavaScriptSerializer
查看>>
EntiryFramework中事务操作实例
查看>>
删除github上的远程分支
查看>>
Visual Studio Code 1.8 发布
查看>>
SQL Server Management Studio 2016 (SSMS)
查看>>
EF中Sum()异常:到值类型“System.Decimal”的强制转换失败,因为具体化值为 null。
查看>>
Visual Studio Code插件之Atom One Dark Syntax Theme
查看>>
EntiryFramework中事务操作(二)TransactionScope
查看>>
EF获取非跟踪数据之DBSet.AsNoTracking()
查看>>
关于EF6.0整理
查看>>
C# using 关键字使用整理
查看>>
EF日期格式筛选_EF常用日期筛选逻辑整理
查看>>
EF日期筛选异常:SqlServer.DATEDIFF”函数的 DATEPART 参数必须是文字字符串。
查看>>
C# 托管资源 与 非托管资源
查看>>
C#析构函数
查看>>
C#IDisposable 接口&资源释放
查看>>
cssnext简介
查看>>
PostCss简介
查看>>
比较全的前端整理
查看>>