[PATCH 04/16] xfs: dynamic speculative EOF preallocation

Dave Chinner david at fromorbit.com
Mon Nov 8 18:08:05 CST 2010


On Mon, Nov 08, 2010 at 06:43:25AM -0500, Christoph Hellwig wrote:
> > For default settings, ???e size and the initial extents is determined
> 
> weird character.
> 
> > The allocsize mount option still controls the minimum preallocation size, so
> > the smallest extent size can stil be bound in situations where this behaviour
> > is not sufficient.
> 
> Do we also need a way to keep an upper boundary?  Think lots of slowly
> growing log files on a filesystem not having tons of free space.

Perhaps - it's one of the things I've been debating backwards and
forwards and done nothing about yet.

It's hard to trim back preallocation before we hit ENOSPC via a
static threshold (e.g. 1% free space could be terabytes of space), but
once ENOSPC is hit we drop new preallocation completely. Perhaps a
gradual decrease in the maximum prealloc size based on freespace
remaining? e.g.

freespace	max prealloc size
  >5%		  full extent (8GB)
  4-5%		   2GB (8GB >> 2)
  3-4%		   1GB (8GB >> 3)
  2-3%		 512MB (8GB >> 4)
  1-2%		 256MB (8GB >> 5)
  <1%		 128MB (8GB >> 6)

I'm open to other ideas on what to do here.

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com




More information about the xfs mailing list