[Top] [All Lists]

Re: hole punching performance

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: hole punching performance
From: "Bradley C. Kuszmaul" <kuszmaul@xxxxxxxxx>
Date: Tue, 15 Jan 2013 22:25:23 -0500
Cc: Florian Weimer <fw@xxxxxxxxxxxxx>, Ben Myers <bpm@xxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=h4SozV/1nlmeykSmraHouVzFdfnjR9AwrN1KsBtDQm8=; b=wFNWdQOgAsMDUWv+H4y4yfaciWjYTcN9JYtiLz/2jV4ccM9RkIlN7K0NqfzrhXKCPm QRGWfJhqLyqDYDUJSoAWBTZG2Qj+V27I8ZyS1W3tQqNXdvgsrHhrzT94gT/VJt4a0SMS ZP5XhYd9GqQeThUiFUatC0B2icgf0vf75+6e/uvzRyykDBSud1l79diU6n98U4xRYTqr cgENpfgnrUm07AXTbG1kh2F3PvPO2cWlYEg9Th/O+mC9i8A95jr3RPLgxBL6H2O01kA4 RvEaUhuyHx67gwzTlG1JyKyXKuRwpO5faU11kou+T6Q+Bff+zRyxBSdpRk2CzeJOMvX7 1TAQ==
In-reply-to: <20130116032210.GD2498@dastard>
References: <87pq195t8q.fsf@xxxxxxxxxxxxxxxxx> <CAKSyJXfQsmemZ3H9A92UezsPCXfn37LXP3tpPMkiwtvR4=eY2g@xxxxxxxxxxxxxx> <20130113194941.GB27055@xxxxxxx> <20130113225545.GA19173@dastard> <87mwwaqgkj.fsf@xxxxxxxxxxxxxxxxx> <CAKSyJXdejNhNgqq6g8N4n6Cjz2s3+m=JUvanTRfDtF72d2RxFg@xxxxxxxxxxxxxx> <20130115225435.GB2498@dastard> <CAKSyJXfs-vfUKybDiQR2mSdP18am06CHsx0io6bF9HLWmvWoFA@xxxxxxxxxxxxxx> <20130116000051.GC2498@dastard> <CAKSyJXfc22B77Y5633tP8t6=JVn7vS_q2jXxAj5tZYV3GF1KmA@xxxxxxxxxxxxxx> <20130116032210.GD2498@dastard>
I'm doing direct I/O.  

The definition of "extent" that I'm probing is how much inode or metadata must be read in order to execute the first read of a file.

The file will always be sparse.

On Tue, Jan 15, 2013 at 10:22 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
On Tue, Jan 15, 2013 at 09:46:36PM -0500, Bradley C. Kuszmaul wrote:
> But if I populate the file with a collection of near-1MB writes at random
> offsets, I'm likely to end up with one extent per write.

Maybe. What you get depends on a lot of factors

e.g. buffered IO will give different extent allocations to direct
IO. Synchronous buffered IO will give different patterns to async
buffered IO. Adding random fdatasync() calls will give different
patterns again. And even better, if you are doing async buffered IO,
different amounts of memory pressure can give you different

> Each non-hole
> line in xfs_bmap is an extent, right?

Well, that depends on your definition of an extent. e.g. is a
contiguous region on disk that alternates between written and
unwritten state one extent? From an physical perspective
it is a single extent, but from a logical perspective (i.e.
for indexing) it is multiple extents....

FWIW, if you are intending that the file is non-sparse at the end of
all the writes (i.e. you fill all the holes), they preallocating the
file before starting any writes is a good idea because it guarantees
you'll end up with a minimal number of physical extents when the
file is completely written....


Dave Chinner

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