All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: stan@hardwarefreak.com, xfs@oss.sgi.com
Subject: Re: higher agcount on LVM2 thinp volumes
Date: Fri, 30 Aug 2013 13:38:00 +1000	[thread overview]
Message-ID: <20130830033800.GX12779@dastard> (raw)
In-Reply-To: <B40ABF48-E2CB-4C02-9DF9-B68BB84341C3@colorremedies.com>

On Thu, Aug 29, 2013 at 09:21:15PM -0600, Chris Murphy wrote:
> 
> On Aug 29, 2013, at 8:58 PM, Dave Chinner <david@fromorbit.com> wrote:
> > 
> > Check the contents of
> > /sys/block/<dev>/queue/{minimum,optimal}_io_size for the single
> > device, the standard LV and the thinp device.
> 
> physical device:
> 
> [root@f19s ~]# cat /sys/block/sda/queue/minimum_io_size 
> 512
> [root@f19s ~]# cat /sys/block/sda/queue/optimal_io_size 
> 0
> 
> conventional LV on that physical device:
>      
> [root@f19s ~]# cat /sys/block/dm-0/queue/minimum_io_size 
> 512
> [root@f19s ~]# cat /sys/block/dm-0/queue/optimal_io_size 
> 0
> 
> 
> thinp pool and LV:
> 
> lrwxrwxrwx. 1 root root       7 Aug 29 20:46 vg1-thinp -> ../dm-3
> 
> [root@f19s ~]# cat /sys/block/dm-3/queue/minimum_io_size 
> 512
> [root@f19s ~]# cat /sys/block/dm-3/queue/optimal_io_size 
> 262144
> [root@f19s ~]# 
> 
> lrwxrwxrwx. 1 root root       7 Aug 29 20:47 vg1-data -> ../dm-4
> 
> [root@f19s ~]# cat /sys/block/dm-4/queue/minimum_io_size 
> 512
> [root@f19s ~]# cat /sys/block/dm-4/queue/optimal_io_size 
> 262144

Yup, there's the problem - minimum_io_size is 512 bytes, which is
too small for a stripe unit to be set to. Hence sunit/swidth get set
to zero.

The problem here is that minimum_io_size is not the minimum IO size
that can be done, but the minimum IO size that is *efficient*. For
example, my workstation has a MD RAID0 device with a 512k chunk size
and two drives:

$ cat /sys/block/md0/queue/minimum_io_size 
524288
$ cat /sys/block/md0/queue/optimal_io_size 
1048576

Here we see the minimum *efficient* IO size is the stripe chunk size
(i.e. what gets written to a single disk) and the optimal is an IO
that hits all disks at once.

So, what dm-thinp is trying to tell us is that the minimum
*physical* IO size is 512 bytes (i.e. /sys/.../physical_block_size)
but the efficient IO size is 256k. So dm-thinp is exposing the
information incorrectly. What it shoul dbe doing is setting both the
minimum_io_size and the optimal_io_size to the same value of 256k...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-08-30  3:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  6:09 higher agcount on LVM2 thinp volumes Chris Murphy
2013-08-30  1:44 ` Stan Hoeppner
2013-08-30  2:08   ` Chris Murphy
2013-08-30  2:58     ` Dave Chinner
2013-08-30  3:21       ` Chris Murphy
2013-08-30  3:38         ` Dave Chinner [this message]
2013-08-30 17:55           ` Chris Murphy
2013-08-31  1:22             ` Eric Sandeen
2013-09-01  3:39               ` Chris Murphy
2013-08-30  3:04 ` Eric Sandeen
2013-08-30  3:18   ` Chris Murphy
2013-08-30  3:19     ` Eric Sandeen
2013-08-30  3:24       ` Chris Murphy
2013-08-30  3:29         ` Chris Murphy
2013-08-30  3:35         ` Eric Sandeen

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=20130830033800.GX12779@dastard \
    --to=david@fromorbit.com \
    --cc=lists@colorremedies.com \
    --cc=stan@hardwarefreak.com \
    --cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.