From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Artemy Kapitula <dalt74@gmail.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v0] Implement new cache mode "target"
Date: Thu, 15 Aug 2019 16:27:45 +0200 [thread overview]
Message-ID: <20190815142745.GD7415@linux.fritz.box> (raw)
In-Reply-To: <20190815135309.GC10996@stefanha-x1.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]
Am 15.08.2019 um 15:53 hat Stefan Hajnoczi geschrieben:
> On Wed, Aug 07, 2019 at 04:09:54PM +0300, Artemy Kapitula wrote:
>
> Hi,
> Please use "scripts/get_maintainer.pl -f block.c" to find out which
> maintainers to email. qemu-devel@nongnu.org is a high-traffic list and
> patches not CCed to the right maintainer may not get quick review.
>
> > There is an issue with databases in VM that perform too slow
> > on generic SAN storages. The key point is fdatasync that flushes
> > disk on SCSI target.
> >
> > The QEMU blockdev "target" cache mode intended to be used with
> > SAN storages and is a mix of "none" by using direct I/O and
> > "unsafe" that omit device flush.
> >
> > Such storages has its own data integrity protection and can
> > be operated with direct I/O without additional fdatasyc().
> >
> > With generic SCSI targets like LIO or SCST it boost performance
> > up to 100% on some profiles like database with transaction journal
> > (postrgesql/mssql/oracle etc) or virtualized SDS (ceph/rook inside
> > VMs) which performs block device cache flush on journal record.
>
> If the physical storage controller has a Battery Backed Unit (BBU) or
> similar then flush requests are not required with O_DIRECT. This has
> been a common enterprise storage configuration for many years and is
> already supported in QEMU today:
>
> Configure the guest with cache=none and disable the emulated storage
> controller's write cache (e.g. -device virtio-blk-pci,write-cache=off).
> Inside the guest /sys/block/$BLKDEV/queue/write_cache should show "write
> through".
>
> I think this patch is not necessary since write-cache=off already
> exists. cache=target is also slower since the guest sends unnecessary
> flush requests to the emulated storage controller.
Two more comments:
1. The proposed cache mode can already be configured as
cache.direct=on,cache.no-flush=on. I don't think we intend to add new
aliases for combinations of these options. The existing aliases exist
for compatibility reasons.
2. If fdatasync() takes noticable time on such storage, this is a host
kernel problem. If we know that there is nothing to be synced, the
kernel should just return immediately without involving any I/O.
Kevin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2019-08-15 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 13:09 [Qemu-devel] [PATCH v0] Implement new cache mode "target" Artemy Kapitula
2019-08-15 13:53 ` Stefan Hajnoczi
2019-08-15 14:27 ` Kevin Wolf [this message]
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=20190815142745.GD7415@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=dalt74@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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.