FreeBSD: Benchmark The Disks Seek And Transfer Performance

How do I perform a simple and rather naive benchmark of the disks seek and transfer performance under FreeBSD operating system? How do I perform a simple measurement of the I/O read command overhead for my RAID-1 array under FreeBSD operating systems?

You need to use the diskinfo command, which displays out information about a disk device, and optionally runs a naive performance test on the device. The -t option is used for a simple performance test.

Simple Measurement Of The I/O Read

The -c option triggers a simple measurement of the I/O read command overhead, enter:
# diskinfo -c /dev/aacd0
Sample Outputs:

/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

Simple Benchmark Of The Disks

The -t option triggers a simple and rather naive benchmark of the disks seek and transfer performance, enter:
# diskinfo -t /dev/aacd0
Sample Outputs:

/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

Other Software

Bonnie++ Performance Test of Filesystem I/O : Bonnie tests the speed of file I/O using standard C library calls. It does reads and writes of blocks, testing for the limit of sustained data rate (usually limited by the drive or controller) and updates on a file (better simulating normal operating conditions and quite dependent on drive and OS optimisations).


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum