[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] new knob to tweak caching mode for backends



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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.