<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 25, 2017 at 10:39 AM, Amar Tumballi <span dir="ltr"><<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jul 25, 2017 at 9:33 AM, Raghavendra Gowdappa <span dir="ltr"><<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_-1812258496429795451gmail-HOEnZb"><div class="m_-1812258496429795451gmail-h5"><br>
<br>
----- Original Message -----<br>
> From: "Pranith Kumar Karampuri" <<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>><br>
> To: "Raghavendra G" <<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>><br>
> Cc: "Gluster Devel" <<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>><br>
> Sent: Tuesday, July 25, 2017 7:51:07 AM<br>
> Subject: Re: [Gluster-devel] Changing the relative order of read-ahead and open-behind<br>
><br>
><br>
><br>
> On Mon, Jul 24, 2017 at 5:11 PM, Raghavendra G < <a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a> ><br>
> wrote:<br>
><br>
><br>
><br>
><br>
><br>
> On Fri, Jul 21, 2017 at 6:39 PM, Vijay Bellur < <a href="mailto:vbellur@redhat.com" target="_blank">vbellur@redhat.com</a> > wrote:<br>
><br>
><br>
><br>
><br>
> On Fri, Jul 21, 2017 at 3:26 AM, Raghavendra Gowdappa < <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> ><br>
> wrote:<br>
><br>
><br>
> Hi all,<br>
><br>
> We've a bug [1], due to which read-ahead is completely disabled when the<br>
> workload is read-only. One of the easy fix was to make read-ahead as an<br>
> ancestor of open-behind in xlator graph (Currently its a descendant). A<br>
> patch has been sent out by Rafi to do the same. As noted in one of the<br>
> comments, one flip side of this solution is that small files (which are<br>
> eligible to be cached by quick read) are cached twice - once each in<br>
> read-ahead and quick-read - wasting up precious memory. However, there are<br>
> no other simpler solutions for this issue. If you've concerns on the<br>
> approach followed by [2] or have other suggestions please voice them out.<br>
> Otherwise, I am planning to merge [2] for lack of better alternatives.<br>
><br>
><br>
> Since the maximum size of files cached by quick-read is 64KB, can we have<br>
> read-ahead kick in for offsets greater than 64KB?<br>
><br>
> I got your point. We can enable read-ahead only for files whose size is<br>
> greater than the size eligible for caching quick-read. IOW, read-ahead gets<br>
> disabled if file size is less than 64KB. Thanks for the suggestion.<br>
><br>
> I added a comment on the patch to move the xlators in reverse to the way the<br>
> patch is currently doing. Milind I think implemented it. Will that lead to<br>
> any problem?<br>
<br>
</div></div>From gerrit:<br>
<br>
<comment><br>
<br>
It fixes the issue too and it is a better solution than the current one as it doesn't run into duplicate cache problem. The reason open-behind was loaded as an ancestor of quick-read was that it seemed unnecessary that quick-read should even witness an open. However,<br>
<br>
* looking into code qr_open is indeed setting some priority for the inode which will be used during purging of cache due to exceeding cache limit. So, it helps quick read to witness an open.<br>
* the real benefit of open-behind is avoiding fops over network. So, as long as open-behind is loaded in client stack, we reap its benefits.<br>
* Also note that if option "read-after-open" is set in open-behind, an open is anyways done over network irrespective of whether quick-read has cached the file, which to me looks unnecessary. By moving open-behind as a descendant of quick-read, open-behind won't even witness a read when the file is cached by quick-read. But, if read-after-open option is implemented in open-behind with the goal of fixing non-posix compliance for the case of open fd on a file is unlinked, we might regress. But again, even this approach doesn't fix the compliance problem completely. One has to turn open-behind off to be completely posix complaint in this scenario.<br>
<br>
Given the reasons above, it helps just moving open-behind as a descendant of read-ahead.<br>
<br>
</comment><br>
<div class="m_-1812258496429795451gmail-HOEnZb"><div class="m_-1812258496429795451gmail-h5"><br></div></div></blockquote><div><br></div></div></div><div>Analysis looks good. But I would like us (all developers) to backup the theories like this with some data. <br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>How about you plan a test case which can demonstrate the difference ? </div></div></div></div></blockquote><div><br></div><div>What is the scenario you want to measure here?<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I will help you set up metrics measuring with graphs [1] on experimental branch [2] to actually measure and graphically represent the hypothesis.<br><br></div><div>We can set this as an example for future for anyone to try the permutation & combination of different xlator order. Who knows we may realize, for different work load, different order may be suitable. <br><br></div><div>Regards,<br></div><div>Amar<br><br>[1] - <a href="https://github.com/amarts/glustermetrics" target="_blank">https://github.com/amarts/<wbr>glustermetrics</a> <br></div><div>[2] - <a href="https://github.com/gluster/glusterfs/tree/experimental" target="_blank">https://github.com/gluster/<wbr>glusterfs/tree/experimental</a><br><br> </div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_-1812258496429795451gmail-HOEnZb"><div class="m_-1812258496429795451gmail-h5">
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> Thanks,<br>
> Vijay<br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-devel mailing list<br>
> <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
> <a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
><br>
><br>
><br>
> --<br>
> Raghavendra G<br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-devel mailing list<br>
> <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
> <a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
><br>
><br>
><br>
> --<br>
> Pranith<br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-devel mailing list<br>
> <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
> <a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
</div></div></blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-1812258496429795451gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Raghavendra G<br></div>
</div></div>