[Top] [All Lists]

Re: hole punching performance

To: Florian Weimer <fw@xxxxxxxxxxxxx>
Subject: Re: hole punching performance
From: "Bradley C. Kuszmaul" <kuszmaul@xxxxxxxxx>
Date: Tue, 15 Jan 2013 16:34:50 -0500
Cc: Dave Chinner <david@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=9uBw+22r4lbW0diyecSwOy9pHcdyxXgc7t+3W9LuuHA=; b=nwxvU6iupIwcUlDrRrTpbNf+A7HqGc+b/Dsa9T9nYhzLFiU9XbHq+31AVL9xFF/5EE z3HS8uTQO4DMKOKcbOpuiwCBKB4vZw4XwHH9U7DMOY6fM5rb0pdLwNyIY3/wiT9Iv973 4do5es0C6vcCgG7kDD7w/KhbbCv0VhWgC2NkeLdz7rF49mfpWAR2f9WeS+PxNHWPt5Tr RgdJhtv+OSjMaoarzA+f/vZYHjCDnLElMEZ+Z6NbCPhhveAeGO6CpSLx5FwtMXlbeAD5 4JWwGRTDIjkLC2pYOrgDPb6R+XztE+rv51PXr+1EQsYkxG5RXW2dEZPD0hzYacyQfQmc oZXA==
In-reply-to: <87mwwaqgkj.fsf@xxxxxxxxxxxxxxxxx>
References: <CAKSyJXf66H2U-BF-aYnSr2fF24_6LJw6swOx1RhUc_3Eqayaiw@xxxxxxxxxxxxxx> <87pq195t8q.fsf@xxxxxxxxxxxxxxxxx> <CAKSyJXfQsmemZ3H9A92UezsPCXfn37LXP3tpPMkiwtvR4=eY2g@xxxxxxxxxxxxxx> <20130113194941.GB27055@xxxxxxx> <20130113225545.GA19173@dastard> <87mwwaqgkj.fsf@xxxxxxxxxxxxxxxxx>
So does it cost a lot to read all the extents just to read the first block?  I don't generally open a file without immediately reading some block, so it doesn't really matter to me if there is a high cost for open() or a high cost for the first read().


On Tue, Jan 15, 2013 at 4:31 PM, Florian Weimer <fw@xxxxxxxxxxxxx> wrote:
* Dave Chinner:

> On Sun, Jan 13, 2013 at 01:49:41PM -0600, Ben Myers wrote:
>> On Sun, Jan 13, 2013 at 11:36:27AM -0500, Bradley C. Kuszmaul wrote:
>> > On Sun, Jan 13, 2013 at 4:26 AM, Florian Weimer <fw@xxxxxxxxxxxxx> wrote:
>> > > I once was a heavy Berkeley DB user and had files with dozens
>> > > of gigabytes containing hundreds of thousands of extents, and
>> > > open() times in the order of minutes were not unusual with a
>> > > cold cache and other concurrent read activities from the same
>> > > RAID device.
>> Ouch.  I would not have expected open times that bad.
> That will only happen if the extent list needs to be read during the
> open() call. That will only occur if O_TRUNC is set. Otherwise, the
> extents are read on the first syscall that needs them to be read in
> (read, write, alloc, punch, truncate, etc) and that's when the
> latency occurs.

Indeed, I think I have misremembered.  The delay occurred when
Berkeley DB tried to read the first page from disk.

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