[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 04/16] xfs: dynamic speculative EOF preallocation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 9 Nov 2010 11:08:05 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20101108114325.GA19289@xxxxxxxxxxxxx>
References: <1289206519-18377-1-git-send-email-david@xxxxxxxxxxxxx> <1289206519-18377-5-git-send-email-david@xxxxxxxxxxxxx> <20101108114325.GA19289@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
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.


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>