Various pre-install queries from potential user

Martin Maney ubuntu at two14.net
Fri Oct 1 03:07:20 UTC 2004


On Fri, Oct 01, 2004 at 10:43:30AM +1000, Rob Weir wrote:
> On Thu, Sep 30, 2004 at 09:30:07AM -0500, Martin Maney said
> > Are you sure?  It may depend on the filesystem, but if I remember
> > correctly one of the things that ext2 has long done to try to avoid
> > fragmentation is to intentionally disperse files across the multiple
> > groups of blocks it divides the partition into internally.  It seems
> 
> If you have multiple partitions, and need to access data from all of
> them, your disk will have to seek between their physical locations on
> the platter.  If it's all one partition, then ext2 or whatever can try
> to group data.

You might want to look over the description of ext2's workings here:
http://www.oreilly.com/catalog/linuxkernel2/chapter/ch17.pdf.  Down at
about page 22 of the chapter, it talks about how ext2 allocates things. 
Two key points:

 * new directories are placed so as to evenly scatter them across block
   groups

 * new files are placed in or near the group containing their parent
   directory

So in fact ext2 will spread files more or less evenly across the entire
partition, and a single big filesystem will be the *worst* case for
inter-file seeks, at least as long as it's not pretty close to full!

I can't speak to how resiser, XFS, JFS, et. al. do things - I've never
been sufficently interested in their inner workings to get to know them
- but as I said before, there is an inherent tension between packing
data snugly (minizing seek distances) and avoiding fragmentation, so I
expect there will be comparable tradeoffs in their designs as well,
since no one wants to have to stop useful work for the occasional round
of defragging.  :-/

-- 
I've just realised that one of the things I really hate hate hate
about Windows is that it doesn't have any personality. It's corporate
and it hates me but it wouldn't ever do anything but smile falsely
and refuse to talk to me.  -- Jo Walton http://www.bluejo.demon.co.uk





More information about the ubuntu-users mailing list