On 05/28/2010 02:15 AM, íÁÒË ëÏÒÅÎÂÅÒÇ wrote:
The description was got from qemu manual.
Please review, edit, apply adn update the website :)
Hmm, I don't think we should duplicate the qemu cache value descriptions
in our docs, it might be a better idea to link to qemu docs with a note
to check the hypervisor docs for meaning of the different values.
diff -u docs/formatdomain.html.in docs.new/formatdomain.html.in
--- docs/formatdomain.html.in 2010-05-27 11:35:33.995122526 +0600
+++ docs.new/formatdomain.html.in 2010-05-27 13:36:27.362623268 +0600
@@ -517,10 +520,30 @@
<dt><code>driver</code></dt>
<dd>If the hypervisor supports multiple backend drivers, then the optional
<code>driver</code> element allows them to be selected. The
<code>name</code>
- attribute is the primary backend driver name, while the optional
<code>type</code>
- attribute provides the sub-type. The optional <code>cache</code>
attribute
+ attribute is the primary backend driver name (for example, "qemu"),
+ while the optional <code>type</code> attribute provides the
sub-type.
+ For qemu, possible values are: "raw", "qcow",
"qcow2", "vmdk" and some other.
+
+ <p>The optional <code>cache</code> attribute
controls the cache mechanism, possible values are "default",
"none",
- "writethrough" and "writeback". <span
class="since">Since 0.1.8</span>
+ "writethrough" and "writeback".</p>
+
+ <p>Writethrough caching means that the host
+ page cache will be used to read and write data but write notification will
+ be sent to the guest only when the data has been reported as written by the
+ storage subsystem.</p>
+
+ <p>Writeback caching will report data writes as completed as soon as
+ the data is present in the host page cache. This is safe as long as you trust
your host.
+ If your host crashes or loses power, then the guest may experience data
corruption.</p>
+
+ <p>The host page cache can be avoided entirely with
<code>cache='none'</code>.
+ This will attempt to do disk IO directly to the guests memory.</p>
+
+ <p>As said in qemu-kvm-0.12.3 manual: Some block drivers perform badly with
<code>cache='writethrough'</code>, most notably,
+ qcow2. If performance is more important than correctness,
<code>cache='writeback'</code>
+ should be used with qcow2.</p>
+ <span class="since">Since 0.1.8</span>
I know this 'since' piece is from the existing docs, but it's not really
correct: it only applies to the <driver> tag in general. We should have
a separate 'since 0.6.0' for the cache attribute.
- Cole