<br><br><div class="gmail_quote">On Sat, Apr 3, 2010 at 6:22 PM, Stephan von Krawczynski <span dir="ltr">&lt;<a href="mailto:skraw@ithnet.com">skraw@ithnet.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;">
<div><div></div><div class="h5">On Sat, 3 Apr 2010 17:02:38 +0400<br>
Raghavendra G &lt;<a href="mailto:raghavendra@gluster.com">raghavendra@gluster.com</a>&gt; wrote:<br>
<br>
&gt; On Fri, Apr 2, 2010 at 5:49 PM, Stephan von Krawczynski &lt;<a href="mailto:skraw@ithnet.com">skraw@ithnet.com</a>&gt;wrote:<br>
&gt;<br>
&gt; &gt; On Fri, 02 Apr 2010 14:41:36 +0100<br>
&gt; &gt; Gordan Bobic &lt;<a href="mailto:gordan@bobich.net">gordan@bobich.net</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; On 02/04/2010 12:32, Olivier Le Cam wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Following to a recent talk on the IRC channel, it came to my mind that<br>
&gt; &gt; &gt; &gt; caching lookups could (in this particular situation) greatly improve<br>
&gt; &gt; the<br>
&gt; &gt; &gt; &gt; performances.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Maybe some of the devs can explain whether this is plausible, but I<br>
&gt; &gt; &gt; somewhat doubt it. You would lose the integrity guarantees.<br>
&gt; &gt;<br>
&gt; &gt; If you&#39;re talking of data integrity here I doubt that it is there at all.<br>
&gt; &gt; Yesterday I checked a configuration with 2.0.9 replication and 3 clients<br>
&gt; &gt; with<br>
&gt; &gt; iocache. I found out that if I edit an ascii file on one client and save it<br>
&gt; &gt; back being the same size as before, another client still sees the old file<br>
&gt; &gt; content. I checked the servers and found that they all contained the<br>
&gt; &gt; correct<br>
&gt; &gt; new file version. So the data integrity is broken anyway when using iocache<br>
&gt; &gt; on<br>
&gt; &gt; clients<br>
&gt; &gt;<br>
&gt;<br>
&gt; This is quite expected, since the client on which the data is being read has<br>
&gt; cached the data. io-cache has cache-timeout option which can be tuned to<br>
&gt; force the clients to check whether the file has changed on server after<br>
&gt; configured time intervals.<br>
&gt;<br>
&gt; However also please note that, if the file is being modified and read from<br>
&gt; the same client, this issue would/should not have happened.<br>
<br>
</div></div>To make this point clear:<br>
There is no issue modifying and reading a file on the very same client.<br>
There is an issue modifying on client1 and reading on client2, and it is not<br>
solvable via io-cache options like cache-timeout. As you can see in my<br>
previous posts the cache-timeout is set to 1 (second). It is obvious that I<br>
was not able to check within one second on two interactive consoles.<br>
So I cannot tell you the influence cache-timeout really has, but obviously it<br>
does not work as you expected. The io-cache stays active on client2, although<br>
being older than 1 second and containing an outdated file content. Even if ls<br>
-l already delivers a _new_ file date and _new_ size the file content still<br>
may be outdated (an btw not matching the file size in ls).<br>
You may call that _broken_.<br></blockquote><div><br>Seems like its kernel which is doing caching. Can you apply the attached patch and start glusterfs with option --enable-direct-io-mode and rerun the tests?<br> <br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
&gt; &gt; &gt; Gordan<br>
<br>
&gt; --<br>
&gt; Raghavendra G<br>
<br>
--<br>
Regards,<br>
<font color="#888888">Stephan<br>
</font></blockquote></div><br><br clear="all">regards,<br>-- <br>Raghavendra G<br><br>