Hi David,<br><br>I think you&#39;re worried about the situation wherein&nbsp; the application&nbsp; receives a &quot;write complete&quot; response from glusterfs, but glusterfs is still holding data in its buffers waiting to write to the backend filesystem at a later point in time. If thats the case, only write-behind does delay writes. <br>
<br><div class="gmail_quote">On Sat, Jan 31, 2009 at 11:21 AM, David Sickmiller <span dir="ltr">&lt;<a href="mailto:david@careerliaison.com">david@careerliaison.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I am starting to run MySQL on GlusterFS with AFR. &nbsp;Being aware that databases are deliberate about writing data to the disk instead of in-memory buffers, I would like to avoid using translators that risk data integrity, or I&#39;d at least like to be aware of any trade-offs I&#39;m making. &nbsp;I&#39;ve seen that others are indeed using MySQL on GlusterFS but haven&#39;t seen this particular issue addressed. &nbsp;I&#39;d like to be able to recover from a hardware failure without losing any transactions.<br>

<br>
It would seem that the write-behind translator would be out of the question, because even hardware write cache is discouraged unless it has battery backup. &nbsp;The Gluster wiki says that write-behind gets disabled on files with mandatory locks, but I think MySQL&#39;s InnoDB uses advisory locks on Linux.<br>

<br>
Is io-threads safe? &nbsp;This sounds possibly similar to write-behind and could hold written data in buffers.</blockquote><div><br>io-threads is different from write-behind. The write system call does not return in the application, till the data is written on the backend filesystem.<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
I suspect io-cache should be safe, because I believe it&#39;s only used for reading, although it shouldn&#39;t provide much benefit for a well-tuned DBMS. &nbsp;I&#39;m guessing read-ahead should also be safe.</blockquote><div>
<br>Yes, they are safe. But since they cache the data, if multiple clients are writing to same server, consider tuning cache timeouts to suit your purpose.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
If I increase data-lock-server-count to 2 (the number of bricks I&#39;m using), will this effectively give me confirmation that each write was successful on both servers? &nbsp;If so, what happens if one brick is unavailable? &nbsp;Or am I misunderstanding the purpose of this option?</blockquote>
<div><br>Whenever afr returns an error code saying write to be complete, its indeed complete on all its children. data-lock-server-count ensures data integrity. If you&#39;re very much concerned about data integrity, having data-lock-server-count equal to the number of children of afr is good, but it comes at the expense of reduced performance.<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
Thanks in advance,<br>
David<br>
<br>
-- <br>
David Sickmiller<br>
o: 866-636-9605 x 101<br>
c: 517-745-3706<br>
f: 810-632-7275<br>
<br>
Career Liaison, LLC -- Applying Done Right<br>
<a href="http://www.careerliaison.com" target="_blank">www.careerliaison.com</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a><br>
<a href="http://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">http://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Raghavendra G<br><br>