[Top] [All Lists]

Re: Inode and dentry cache behavior

To: Shrinand Javadekar <shrinand@xxxxxxxxxxxxxx>
Subject: Re: Inode and dentry cache behavior
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 12 May 2015 07:44:42 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CABppvi4CA_FOuJz8zrr=gNguzKKrQqG5Q30gfP9YMf1KSCM8jQ@xxxxxxxxxxxxxx>
References: <CABppvi55C+vE7Ei8u=_ntC_heDQb4HwUcKom-_9hGkunk84Sfw@xxxxxxxxxxxxxx> <20150423224324.GM15810@dastard> <CABppvi7+Mu78FAM75YvJvekX2CHtKk4yeMrU7j35fvvWRb923Q@xxxxxxxxxxxxxx> <20150424061554.GN15810@dastard> <CABppvi6N6McmfLgAPcP9cxXxPrBMaD81UyeiVHWOaxrJisSN=g@xxxxxxxxxxxxxx> <20150429013024.GU15810@dastard> <CABppvi63mY=-UFEyupF2-TQux+arOaCy+B-rtckvZziuachCbA@xxxxxxxxxxxxxx> <CABppvi4CA_FOuJz8zrr=gNguzKKrQqG5Q30gfP9YMf1KSCM8jQ@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, May 11, 2015 at 02:07:39PM -0700, Shrinand Javadekar wrote:
> In case you're curious, the solutions to this problem are being
> discussed at [1] on the Swift side.
> O_TMPFILE and linkat() aren't available in all kernels (and python)
> and therefore not a viable option right away. Among few others, one of
> the proposals is to shard the tmp directory into say 256 dirs and
> create these files inside those dirs. That way files won't get created
> in a single AG. Are there any other problems if this is done?

Yes, you don't get any locality between files in the same directory
once you move them to their final location in the hash tree. You'll
end up with the same problems you are trying to solve now as the
object count goes up - you'll simply have taken a different path to
the same destination....

Create your temp files in their eventual destination directory -
doing anything else is pretty much guaranteed to compromise all the
locality algorithms the filesystem uses. Without good locality
within the data set, performance of lookups and writeback will
degrade to large seek time random IO pretty quickly.


Dave Chinner

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