Berkeley file system tuning

Robert Breckinridge Beatie breck at aimt.UU.NET
Fri Jan 13 01:43:26 AEST 1989


In article <5324 at bsu-cs.UUCP>, dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
> In article <310 at sagpd1.UUCP> banderso at sagpd1.UUCP (Bruce Anderson) writes:
> >First, I gather that using multiple disk sections is supposed to
> >increase speed...
> 
> I've heard this said, but I don't see why breaking up a disk into
> pieces will speed up access.  The only exception I can see is the rare
> case when you have a big partition containing files that are almost
> never accessed.  If this partition is at the end of the disk the disk
> head almost never has to travel that far.

I interpreted his question as referring to cylinder groups in the BSD Fast
File System.  There are two (performance related) reasons that I can
think of for Cylinder Groups.  How effective Cylinder Groups are, I cannot
say.  The BSD file system certainly seems faster than the old style file
system, but how much of that is due to the 8K (fs_bsize actually) block
size and how much is due to improved locality of reference resulting from
Cylinder Groups?

First: I think the BSD file system attempts to keep inodes that are all
referenced by the same directory in the same cylinder group.  This way
when you stat(2) all the files in a directory the inodes that the system
will have to read will probably be (somewhat) closer together.

Second: If the file system manages to keep all the blocks for a file in
the same cylinder group as that file's inode, then the seek distance from
inode to file-data will (typically) be smaller than in the old-stype
file system.  I'm not sure how big a win this is, since under the BSD
file system, the disk heads will have to seek across cylinder groups
all the time.


-- 
Breck Beatie	    				(408)748-8649
{uunet,ames!coherent}!aimt!breck  OR  breck at aimt.uu.net
"Sloppy as hell Little Father.  You've embarassed me no end."



More information about the Comp.unix.questions mailing list