file fragmentation

Richard Todd rmtodd at servalan.uucp
Wed Mar 6 10:01:56 AEST 1991


greywolf at unisoft.UUCP (The Grey Wolf) writes:
><476 at bally.Bally.COM> by siva at bally.Bally.COM (Siva Chelliah/50000)

># I have few questions :
>#    1 ) Is there a way to find out the  fragmentation of a file system 
>#        (like the Norton utility for DOS)?

>What kind of filesystem -- Berkeley's Fast File System or System V's
>Usel^H^H^HNIX filesystem?

>If it's Berkeley, you can just run fsck -n on it.
>If it's System V, you can just forget it.

Actually, if it's a System V Slow Filesystem :-), there is a program called
"fsanalyse" lurking in one of the source group archives which can be used to
report the fragmentation state of your filesystem.  

As for Berkeley Fast File System, I'm not sure if "fsck -n" will report what
the guy's after.  There seems to be two things denoted by the term 
"fragmentation": 1. the presence of files that are in non-contiguous blocks
on the disk, necessitating lots of seeks in order to read the entire file, and
2. the fraction of the total file space that's allocated from "fragments" 
(in the BSD FFS sense, i.e. portions of a whole block allocated for the small
end-portions of files) instead of from whole blocks.  I think the fragmentation
that fsck -n reports is the second type, not the first; certainly the second
type should be easier to compute, given that fsck presumably already has all
the info of how many fragments, etc. are allocated in core already; figuring 
out how the blocks belonging to each file are scattered about the disk and
giving an estimate of (type 1) fragmentation is a more difficult problem.  
Alas, the amount of "type 1" fragmentation (scattering of files across the 
disks) is the figure you're interested in if you're wondering how much
disk performance you're losing, and I don't know offhand of a package that
computes this....

However, all this may be moot for the original poster's purposes.  I
note that this thread has been crossposted to comp.unix.aix, so I assume 
the original poster is using an AIX box.  On the RISC/6000 flavor of AIX (I
don't know about the others) they don't use *either* the BSD or SysV types
of filesystem layout; they use a filesystem layout all their own.  Good luck
in finding utilities that will spit out statistics about (RISC) AIX 
filesystems; you'll need it....
--
Richard Todd	rmtodd at uokmax.ecn.uoknor.edu  rmtodd at chinet.chi.il.us
	rmtodd at servalan.uucp
Motorola Skates On Intel's Head!



More information about the Comp.unix.aix mailing list