From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Gionatan Danti <g.danti@assyoma.it>
Cc: linux-xfs@vger.kernel.org
Subject: Re: XFS reflink vs ThinLVM
Date: Wed, 15 Jan 2020 08:39:48 -0800 [thread overview]
Message-ID: <20200115163948.GF8257@magnolia> (raw)
In-Reply-To: <9d8e8614-9ae1-30ee-f2b4-1e45b90b27f8@assyoma.it>
On Wed, Jan 15, 2020 at 12:37:52PM +0100, Gionatan Danti wrote:
> On 14/01/20 09:45, Gionatan Danti wrote:
> > On 13/01/20 19:09, Darrick J. Wong wrote:
> > > xfs_io -c 'bmap -c -e -l -p -v <whatever>' test.img
> >
> > Ok, good to know. Thanks.
>
> Hi all, I have an additional question about extszinherit/extsize.
>
> If I understand it correctly, by default it is 0: any non-EOF writes on a
> sparse file will allocate how much space it needs. If these writes are
> random and small enough (ie: 4k random writes), a subsequent sequential read
> of the same file will have much lower performance (because sequential IO are
> transformed in random accesses by the logical/physical block remapping).
>
> Setting a 128K extszinherit (for the entire filesystem) or extsize (for a
> file/dir) will markedly improve the situation, as much bigger contiguous LBA
> regions can be read for each IO (note: I know SSD and NVME disks are much
> less impacted by fragmentation, but I am mainly speaking about HDD here).
>
> So, my question: there is anything wrong and/or I should be aware when using
> a 128K extsize, so setting it the same as cowextsize? The only possible
> drawback I can think is a coarse granularity when allocating from the sparse
> file (ie: a 4k write will allocate the full 128k extent).
>
> Am I missing something?
extszinherit > 0 disables delayed allocation, which means that (in your
case above) if you wrote 1G to a file (using the pagecache) you'd get
8192x 128K calls to the allocator instead of making a single 1G
allocation during writeback. If you have a lot of memory (or a high vmm
dirty ratio) then you want delalloc over extsize. Most of the time you
want delalloc, frankly.
--D
> Thanks.
>
> --
> Danti Gionatan
> Supporto Tecnico
> Assyoma S.r.l. - www.assyoma.it
> email: g.danti@assyoma.it - info@assyoma.it
> GPG public key ID: FF5F32A8
next prev parent reply other threads:[~2020-01-15 16:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 10:22 XFS reflink vs ThinLVM Gionatan Danti
2020-01-13 11:10 ` Carlos Maiolino
2020-01-13 11:25 ` Gionatan Danti
2020-01-13 11:43 ` Carlos Maiolino
2020-01-13 12:21 ` Gionatan Danti
2020-01-13 15:34 ` Gionatan Danti
2020-01-13 16:53 ` Darrick J. Wong
2020-01-13 17:00 ` Gionatan Danti
2020-01-13 18:09 ` Darrick J. Wong
2020-01-14 8:45 ` Gionatan Danti
2020-01-15 11:37 ` Gionatan Danti
2020-01-15 16:39 ` Darrick J. Wong [this message]
2020-01-15 17:45 ` Gionatan Danti
2020-01-17 21:58 ` Gionatan Danti
2020-01-17 23:42 ` Darrick J. Wong
2020-01-18 11:08 ` Gionatan Danti
2020-01-18 23:06 ` Darrick J. Wong
2020-01-19 8:45 ` Gionatan Danti
2020-01-13 16:14 ` Chris Murphy
2020-01-13 16:25 ` Gionatan Danti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200115163948.GF8257@magnolia \
--to=darrick.wong@oracle.com \
--cc=g.danti@assyoma.it \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox