UNIX Disk I/O Performance (long)

Andrew J. Piziali piziali at convex.com
Wed Feb 13 01:13:48 AEST 1991


I was measuring some of the performance parameters of a new hard disk on my IBM
PC-AT last night and trying to weight the plusses and minuses of various disk
configurations and how they would affect file system performance under the
Xenix operating system.  First I'll report the disk performance in various
configurations and then discuss how they might affect UNIX file system
performance.  I'd like this base article to spawn a discussion about UNIX file
system tuning on both small and large systems.

The new disk is a Seagate ST251-1, 40 MB, 28 ms average access time.  The peak
data transfer rate off the disk is 510 Kb/s (17 sect/track * 512 byte/sect * 
3,600 rev/min * 1 track/rev * 1/60 min/sec).  The measured track-to-track seek
time is 9 ms and the measured average seek time is 28 ms.  At various sector
interleaves the data transfer rates from disk surface to physical memory for
full track reads are:
					Effective Transfer
			Interleave	Rate (KB/sec)
		
			1:1		256
			2:1		254
			3:1		170
			4:1		128
			5:1		102
			6:1		 85

Single sector reads have the following transfer rates as a function of sector
interleave:
					Effective Transfer
			Interleave	Rate (KB/sec)

			1:1		 28
			2:1		 71
			3:1		170

Note that the full track read and sector read effective transfer rates are the
same at a 3:1 interleave.  It is also interesting that the transfer rate is
only marginally increased changing from a 2:1 to a 1:1 sector interleave.

The IBM Xenix 1.0 "mkfs" program requires "gap" and "block" parameters to build
a file system on a disk.  To the best of my understanding, "gap" refers to the
number of sectors between consecutive disk blocks (512 bytes on this system)
and "block" refers to the number of disk blocks in a cylinder (102).  These
parameters allow mkfs to maximize the data transfer rate off the disk by
allocating disk blocks in an optimum fashion but what is optimum depends on the
frequency of access of small and large files and the fragmentation of the file
system.

If the files usually accessed are one or two disk blocks in size or the file
system is quite fragmented (consecutive file disk blocks are not arranged on
consecutive disk sectors) the sector interleave should be chosen to maximize
data transfer rates of random sector reads and the mkfs gap selected to match
this interleave.  For the disk described above, a 3:1 interleave and gap of 2
would be chosen.

If the files usually access are always larger than a disk block and the file
system is not fragmented the sector interleave should be chosen to maximize
data transfer rates of full track reads and the mkfs gap selected to match this
interleave.  Again, the disk above would be formatted with a 1:1 interleave and
the mkfs gap chosen to be zero.
--
Home:	           andy at piziali.lonestar.org                |
{convex,egsner,frontier,laczko}!piziali!andy  ________------+------________
Office:                   piziali at convex.com               / \     
           {sun,texsun,uunet}!convex!piziali              *---*



More information about the Comp.unix.xenix.sco mailing list