FreeBSD: Teste de performance do HD

No Linux temos o programa hdparm que faz esse teste de velocidade do HD, mas como ter essa mesma medição sendo feito em discos no FreeBSD?

No FreeBSD o programa a ser usado é o diskinfo

Teste de leitura

diskinfo -c /dev/ad4

A opção -c é pra fazer testes simples de leitura.

A saída será algo parecido com

/dev/ad4
	512         	# sectorsize
	80026361856 	# mediasize in bytes (75G)
	156301488   	# mediasize in sectors
	155061      	# Cylinders according to firmware.
	16          	# Heads according to firmware.
	63          	# Sectors according to firmware.
	ad:6PT2KPW0 	# Disk ident.

I/O command overhead:
	time to read 10MB block      0.158553 sec	=    0.008 msec/sector
	time to read 20480 sectors   2.636794 sec	=    0.129 msec/sector
	calculated command overhead			=    0.121 msec/sector

Teste de transferência

diskinfo -t /dev/ad4

O parâmetro -t é para os testes de transferências

A saída seria algo como

/dev/ad4
	512         	# sectorsize
	80026361856 	# mediasize in bytes (75G)
	156301488   	# mediasize in sectors
	155061      	# Cylinders according to firmware.
	16          	# Heads according to firmware.
	63          	# Sectors according to firmware.
	ad:6PT2KPW0 	# Disk ident.

Seek times:
	Full stroke:	  250 iter in   7.321225 sec =   29.285 msec
	Half stroke:	  250 iter in   5.101744 sec =   20.407 msec
	Quarter stroke:	  500 iter in   8.013486 sec =   16.027 msec
	Short forward:	  400 iter in   2.371713 sec =    5.929 msec
	Short backward:	  400 iter in   3.760721 sec =    9.402 msec
	Seq outer:	 2048 iter in   0.260730 sec =    0.127 msec
	Seq inner:	 2048 iter in   0.265152 sec =    0.129 msec
Transfer rates:
	outside:       102400 kbytes in   1.496662 sec =    68419 kbytes/sec
	middle:        102400 kbytes in   1.598540 sec =    64058 kbytes/sec
	inside:        102400 kbytes in   3.015930 sec =    33953 kbytes/sec
Share this post

Join the conversation