All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Durgin <josh.durgin-4GqslpFJ+cxBDgjK7y7TUQ@public.gmane.org>
To: Ugis <ugis22-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sage Weil <sage-4GqslpFJ+cxBDgjK7y7TUQ@public.gmane.org>
Cc: "ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"ceph-users-Qp0mS5GaXlQ@public.gmane.org"
	<ceph-users-Qp0mS5GaXlQ@public.gmane.org>,
	Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-lvm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: poor read performance on rbd+LVM, LVM overload
Date: Sun, 20 Oct 2013 11:21:24 -0700	[thread overview]
Message-ID: <52641F24.6000406@inktank.com> (raw)
In-Reply-To: <CAE63xUO4ZrzObMFeQ=FXGFnqpwWsjCiiDr2_VhOt91h=djofYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 10/20/2013 08:18 AM, Ugis wrote:
>>> output follows:
>>> #pvs -o pe_start /dev/rbd1p1
>>>    1st PE
>>>      4.00m
>>> # cat /sys/block/rbd1/queue/minimum_io_size
>>> 4194304
>>> # cat /sys/block/rbd1/queue/optimal_io_size
>>> 4194304
>>
>> Well, the parameters are being set at least.  Mike, is it possible that
>> having minimum_io_size set to 4m is causing some read amplification
>> in LVM, translating a small read into a complete fetch of the PE (or
>> somethinga long those lines)?
>>
>> Ugis, if your cluster is on the small side, it might be interesting to see
>> what requests the client is generated in the LVM and non-LVM case by
>> setting 'debug ms = 1' on the osds (e.g., ceph tell osd.* injectargs
>> '--debug-ms 1') and then looking at the osd_op messages that appear in
>> /var/log/ceph/ceph-osd*.log.  It may be obvious that the IO pattern is
>> different.
>>
> Sage, here follows debug output. I am no pro in reading this, but
> seems read block size differ(or what is that number following ~ sign)?

Yes, that's the I/O length. LVM is sending requests for 4k at a time,
while plain kernel rbd is sending 128k.

<request logs showing this>

> How to proceed with tuning read performance on LVM? Is there some
> chanage needed in code of ceph/LVM or my config needs to be tuned?
> If what is shown in logs means 4k read block in LVM case - then it
> seems I need to tell LVM(or xfs on top of LVM dictates read block
> side?) that io block should be rather 4m?

It's a client side issue of sending much smaller requests than it needs
to. Check the queue minimum and optimal sizes for the lvm device - it
sounds like they might be getting set to 4k for some reason.

Josh

WARNING: multiple messages have this Message-ID (diff)
From: Josh Durgin <josh.durgin@inktank.com>
To: Ugis <ugis22@gmail.com>, Sage Weil <sage@inktank.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
	"ceph-users@ceph.com" <ceph-users@ceph.com>,
	Mike Snitzer <snitzer@redhat.com>,
	linux-lvm@redhat.com
Subject: Re: [linux-lvm] [ceph-users] poor read performance on rbd+LVM, LVM overload
Date: Sun, 20 Oct 2013 11:21:24 -0700	[thread overview]
Message-ID: <52641F24.6000406@inktank.com> (raw)
In-Reply-To: <CAE63xUO4ZrzObMFeQ=FXGFnqpwWsjCiiDr2_VhOt91h=djofYw@mail.gmail.com>

On 10/20/2013 08:18 AM, Ugis wrote:
>>> output follows:
>>> #pvs -o pe_start /dev/rbd1p1
>>>    1st PE
>>>      4.00m
>>> # cat /sys/block/rbd1/queue/minimum_io_size
>>> 4194304
>>> # cat /sys/block/rbd1/queue/optimal_io_size
>>> 4194304
>>
>> Well, the parameters are being set at least.  Mike, is it possible that
>> having minimum_io_size set to 4m is causing some read amplification
>> in LVM, translating a small read into a complete fetch of the PE (or
>> somethinga long those lines)?
>>
>> Ugis, if your cluster is on the small side, it might be interesting to see
>> what requests the client is generated in the LVM and non-LVM case by
>> setting 'debug ms = 1' on the osds (e.g., ceph tell osd.* injectargs
>> '--debug-ms 1') and then looking at the osd_op messages that appear in
>> /var/log/ceph/ceph-osd*.log.  It may be obvious that the IO pattern is
>> different.
>>
> Sage, here follows debug output. I am no pro in reading this, but
> seems read block size differ(or what is that number following ~ sign)?

Yes, that's the I/O length. LVM is sending requests for 4k at a time,
while plain kernel rbd is sending 128k.

<request logs showing this>

> How to proceed with tuning read performance on LVM? Is there some
> chanage needed in code of ceph/LVM or my config needs to be tuned?
> If what is shown in logs means 4k read block in LVM case - then it
> seems I need to tell LVM(or xfs on top of LVM dictates read block
> side?) that io block should be rather 4m?

It's a client side issue of sending much smaller requests than it needs
to. Check the queue minimum and optimal sizes for the lvm device - it
sounds like they might be getting set to 4k for some reason.

Josh

  parent reply	other threads:[~2013-10-20 18:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 14:46 poor read performance on rbd+LVM, LVM overload Ugis
2013-10-16 14:46 ` [linux-lvm] " Ugis
2013-10-16 16:16 ` Sage Weil
2013-10-16 16:16   ` [linux-lvm] " Sage Weil
     [not found]   ` <alpine.DEB.2.00.1310160914360.22271-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2013-10-17  9:06     ` David McBride
2013-10-17  9:06       ` [linux-lvm] " David McBride
2013-10-17 15:18   ` Mike Snitzer
2013-10-17 15:18     ` [linux-lvm] " Mike Snitzer
     [not found]     ` <20131017151828.GB28859-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-18  7:56       ` Ugis
2013-10-18  7:56         ` [linux-lvm] " Ugis
2013-10-19  0:01         ` Sage Weil
2013-10-19  0:01           ` [linux-lvm] " Sage Weil
     [not found]           ` <alpine.DEB.2.00.1310181657151.19763-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2013-10-20 15:18             ` Ugis
2013-10-20 15:18               ` [linux-lvm] " Ugis
     [not found]               ` <CAE63xUO4ZrzObMFeQ=FXGFnqpwWsjCiiDr2_VhOt91h=djofYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-20 18:21                 ` Josh Durgin [this message]
2013-10-20 18:21                   ` [linux-lvm] [ceph-users] " Josh Durgin
2013-10-21  3:58                 ` Sage Weil
2013-10-21  3:58                   ` [linux-lvm] " Sage Weil
2013-10-21 14:11                   ` Christoph Hellwig
2013-10-21 14:11                     ` [linux-lvm] " Christoph Hellwig
     [not found]                     ` <20131021141147.GA30189-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-10-21 15:01                       ` Mike Snitzer
2013-10-21 15:01                         ` [linux-lvm] " Mike Snitzer
     [not found]                         ` <20131021150129.GA28099-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-21 15:06                           ` Mike Snitzer
2013-10-21 15:06                             ` [linux-lvm] " Mike Snitzer
2013-10-21 16:02                         ` Sage Weil
2013-10-21 16:02                           ` [linux-lvm] " Sage Weil
     [not found]                           ` <alpine.DEB.2.00.1310210853140.29488-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2013-10-21 17:48                             ` Mike Snitzer
2013-10-21 17:48                               ` [linux-lvm] " Mike Snitzer
     [not found]                               ` <20131021174850.GA29416-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-21 18:05                                 ` Sage Weil
2013-10-21 18:05                                   ` [linux-lvm] " Sage Weil
2013-10-21 18:06                         ` Christoph Hellwig
2013-10-21 18:06                           ` [linux-lvm] " Christoph Hellwig
     [not found]                           ` <20131021180616.GA7196-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-10-21 18:27                             ` Mike Snitzer
2013-10-21 18:27                               ` [linux-lvm] " Mike Snitzer
2013-10-30 14:53                               ` Ugis
2013-10-30 14:53                                 ` [linux-lvm] " Ugis

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=52641F24.6000406@inktank.com \
    --to=josh.durgin-4gqslpfj+cxbdgjk7y7tuq@public.gmane.org \
    --cc=ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ceph-users-Qp0mS5GaXlQ@public.gmane.org \
    --cc=linux-lvm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=sage-4GqslpFJ+cxBDgjK7y7TUQ@public.gmane.org \
    --cc=snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ugis22-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 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.