From: Jason Dillaman <dillaman@redhat.com>
To: Huan Zhang <huan.zhang.jn@gmail.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: rbd_aio_flush cause guestos sync wirte poor iops?
Date: Wed, 16 Mar 2016 09:37:30 -0400 (EDT) [thread overview]
Message-ID: <578851288.38782223.1458135450823.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAFU9Co=d-CstfhbiP3ztdpNTFp03SMGy8ciRw8xxBXkxw7TjRw@mail.gmail.com>
As previously mentioned [1], the fio rbd engine ignores the "sync" option. You need to use "fsync=1" to issue a flush after each write to simulate what "sync=1" is doing. When running fio within a VM against an RBD image, QEMU is not issuing sync writes to RBD -- it's issuing AIO writes and a AIO flush (as instructed by the guest OS). Looking at the man page for O_SYNC [2], which is what that fio option enables in supported engines, that flag will act "as though each write(2) was followed by a call to fsync(2)".
[1] http://lists.ceph.com/pipermail/ceph-users-ceph.com/2016-February/007780.html
[2] http://man7.org/linux/man-pages/man2/open.2.html
--
Jason Dillaman
----- Original Message -----
> From: "Huan Zhang" <huan.zhang.jn@gmail.com>
> To: ceph-devel@vger.kernel.org
> Sent: Wednesday, March 16, 2016 12:52:33 AM
> Subject: rbd_aio_flush cause guestos sync wirte poor iops?
>
> Hi,
> We test sync iops with fio sync=1 for database workloads in VM,
> the backend is librbd and ceph (all SSD setup).'
> The result is sad to me. we only get ~400 IOPS sync randwrite with
> iodepth=1
> to iodepth=32.
> But test in physical machine with fio ioengine=rbd sync=1, we can
> reache ~35K IOPS.
> seems the qemu rbd is the bottleneck.
>
> qemu version is 2.1.2 with rbd_aio_flush patched.
> rbd cache is off, qemu cache=none.
>
> IMHO, ceph use sync write for every write to disk, so
> rbd_aio_flush can ignore the sync
> cache command if rbd cache is off so that we can get higher
> iops(similar to direct=1 write)
> for sync=1 iops, right?
>
> Very appreciated to get your reply!
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-03-16 13:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 4:52 rbd_aio_flush cause guestos sync wirte poor iops? Huan Zhang
2016-03-16 13:37 ` Jason Dillaman [this message]
2016-03-17 4:58 ` Huan Zhang
2016-03-18 12:02 ` Jason Dillaman
2016-03-21 4:44 ` Huan Zhang
2016-03-21 12:56 ` Jason Dillaman
2016-03-22 6:53 ` Huan Zhang
2016-04-06 4:02 ` Huan Zhang
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=578851288.38782223.1458135450823.JavaMail.zimbra@redhat.com \
--to=dillaman@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=huan.zhang.jn@gmail.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.