xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	andrew.cooper3@citrix.com
Cc: xen-devel@lists.xen.org
Subject: new knob to tweak caching mode for backends
Date: Mon, 26 May 2014 19:06:17 +0200	[thread overview]
Message-ID: <20140526170617.GA29136@aepfle.de> (raw)


Currently libxl (and xend) has no knob to control cache mode of backend
driver for block devices. libvirt and qemu have:
cache=off|none|directsync|writeback|unsafe|writethrough.

The xen qdisk driver in qemu defaults to "writeback". If the diskspec in
domU…cfg has 'direct-io-safe' then qdisk will default to directsync AIO.

I think these defaults are fine as they provide some sort of data
integrity.


But there is one issue: all the flushing thats going on during guest
triggered writes does slows down the guest. There should be a knob to
skip the regular flushes on the host.  If the given backing file will
contain throw-away data its up the the admin to make this decision.

The use case I have in mind are guest installations, which trigger alot
of disk io. We see a speedup from 22min down to 10min if qemu is forced
to use cache=unsafe. 

I wonder if and how such a knob should be exposed in domU.cfg:disk=[]
To me it looks like a bool similar to direct-io-safe is enough. If the
flag is set in xenstore, xen qdisk sets BDRV_O_NO_FLUSH to skip flushes.


Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2014-05-26 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 17:06 Olaf Hering [this message]
2014-05-27 16:50 ` new knob to tweak caching mode for backends Jim Fehlig
2014-05-27 17:08   ` Stefano Stabellini
2014-05-27 20:18     ` Jim Fehlig
2014-05-28  8:53     ` Olaf Hering
2014-05-28 11:26       ` Stefano Stabellini
2014-06-10 13:34       ` Ian Jackson

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=20140526170617.GA29136@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).