Linux Device Mapper development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Zdenek Kabelac <zkabelac@redhat.com>
Cc: sandeen@redhat.com,
	device-mapper development <dm-devel@redhat.com>,
	Daniel Browning <db@kavod.com>
Subject: Re: A thin-p over 256 GiB fails with I/O errors with non-power-of-two chunk
Date: Tue, 22 Jan 2013 08:51:32 -0500	[thread overview]
Message-ID: <20130122135132.GA24851@redhat.com> (raw)
In-Reply-To: <50FE739C.5090200@redhat.com>

On Tue, Jan 22 2013 at  6:10am -0500,
Zdenek Kabelac <zkabelac@redhat.com> wrote:

> Dne 21.1.2013 19:49, Mike Snitzer napsal(a):
> >
> >Switching the thin-pool lvcreate to use --chunksize 1152K at least
> >enables me to format the filesystem.
> >
> >And both the thin-pool and thin device have an optimal_io_size that
> >matches the chunk_size of the underlying raid volume:
> >
> >cat /sys/block/dm-9/queue/optimal_io_size
> >1179648
> >cat /sys/block/dm-10/queue/optimal_io_size
> >1179648
> >
> >I'm still investigating the limits issue when --chunksize 1152K isn't
> >used for the thin-pool lvcreate.
> 
> Just a comment for the selection of thin chunksize here -
> 
> I think it has couple aspects here - by default (unless changed via
> lvm.conf {allocation/thin_pool_chunk_size}) it is targeting for 64K
> and scales chunksize up to fit thin metadata within 128MB.
> (compiled in as DEFAULT_THIN_POOL_OPTIMAL_SIZE)
> So lvm2 here scaled from 64k to 256k in multiTB case.

Not quite sure what you mean by "to fit thin metadata within 128MB".
Why is fitting within 128MB the goal?  I recall Joe helping to establish
the rule of thumb for lvm2 but I don't recall specifics at this point.

> lvcreate currently doesn't look out for geometry of underlying PV(s)
> during its allocation (somewhat chicken-egg problem) - yet there are
> possible ways to try to put this into equation - thought it might
> not be actually wanted by the user - since for snapshots the smaller
> chunksize is more usable
> (>1MB is quite a lot here IMHO) - but it probably worth some thinking.

I've found that the mkfs.xfs (which uses direct IO) will work if the
thinp chunksize is a factor of the raid0 chunksize.  So all of the
following thinp chunksizes "work" given that the raid0 chunksize is
1152K: 64K, 128K, 384K, 576K, 1152K

I haven't done extensive IO testing on the result XFS filesystem though.
So I don't want to get too far into shaping lvm2's chunksize selection
algorithm until I can dive into the kernel's limits stacking further
(which I'm doing now).

  reply	other threads:[~2013-01-22 13:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 10:19 A thin-p over 256 GiB fails with I/O errors with non-power-of-two chunk Daniel Browning
2013-01-21 18:49 ` Mike Snitzer
2013-01-22 11:10   ` Zdenek Kabelac
2013-01-22 13:51     ` Mike Snitzer [this message]
2013-01-23 22:16       ` [PATCH] dm thin: fix queue limits stacking when data device has compulsory merge_bvec_fn Mike Snitzer

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=20130122135132.GA24851@redhat.com \
    --to=snitzer@redhat.com \
    --cc=db@kavod.com \
    --cc=dm-devel@redhat.com \
    --cc=sandeen@redhat.com \
    --cc=zkabelac@redhat.com \
    /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