FreeBSD 如何测试硬盘的性能

时间:2019-11-20 08:53:57  来源:igfitidea点击:

如何对硬盘进行性能测试。
在Linux中如何查看硬盘参数?

查看磁盘I/O开销:

diskinfo -c选项可以查看磁盘的IO开销:

# diskinfo -c /dev/aacd0

输出示例:

/dev/aacd0
	512         	# sectorsize
	299573968896	# mediasize in bytes (279G)
	585105408   	# mediasize in sectors
	36421       	# Cylinders according to firmware.
	255         	# Heads according to firmware.
	63          	# Sectors according to firmware.

I/O command overhead:
	time to read 10MB block      0.062739 sec	=    0.003 msec/sector
	time to read 20480 sectors   1.169154 sec	=    0.057 msec/sector
	calculated command overhead			=    0.054 msec/sector

Linux查看硬盘性能

使用 -t选项可以查看硬盘的读写速度和寻址时间:

# diskinfo -t /dev/aacd0

输出示例:

/dev/aacd0
	512         	# sectorsize
	299573968896	# mediasize in bytes (279G)
	585105408   	# mediasize in sectors
	36421       	# Cylinders according to firmware.
	255         	# Heads according to firmware.
	63          	# Sectors according to firmware.

Seek times:
	Full stroke:	  250 iter in   0.724105 sec =    2.896 msec
	Half stroke:	  250 iter in   0.716784 sec =    2.867 msec
	Quarter stroke:	  500 iter in   2.109663 sec =    4.219 msec
	Short forward:	  400 iter in   1.621695 sec =    4.054 msec
	Short backward:	  400 iter in   1.624951 sec =    4.062 msec
	Seq outer:	 2048 iter in   0.119046 sec =    0.058 msec
	Seq inner:	 2048 iter in   0.217687 sec =    0.106 msec
Transfer rates:
	outside:       102400 kbytes in   0.649656 sec =   157622 kbytes/sec
	middle:        102400 kbytes in   0.523038 sec =   195779 kbytes/sec
	inside:        102400 kbytes in   0.745649 sec =   137330 kbytes/sec