<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hello, Amar,</p>
<p><br>
</p>
<p>It still fails in quorum test.</p>
<p>The root inode resolution succeeds, and stat is called. It <span style="font-size: 12pt;">fails because of quorum check in afr translator. </span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"> </span><br>
</p>
<div id="Signature">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Sincerely,</div>
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
Zhitao</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Amar Tumballi <atumball@redhat.com><br>
<b>Sent:</b> Friday, March 24, 2017 10:24:53 PM<br>
<b>To:</b> Zhitao Li<br>
<b>Cc:</b> Niels de Vos; Poornima Gurusiddaiah; Gluster Devel; gluster-users@gluster.org; Zhitao Li; Zhitao Li<br>
<b>Subject:</b> Re: Could we not always call lookup for root_dir in fuse_getattr to improve performance?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Test this patch <a href="https://review.gluster.org/#/c/16945/">https://review.gluster.org/#/c/16945/</a><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Mar 24, 2017 at 9:42 AM, Zhitao Li <span dir="ltr">
<<a href="mailto:zhitaoli1201@outlook.com" target="_blank">zhitaoli1201@outlook.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_-2753040592691438660divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Dear Amar, </p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Thanks very much for your kind help!</span></p>
<p><span style="font-size:12pt"> </span><br>
</p>
<p><span style="font-size:12pt">I have seen the patch you submit.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p>I disable the check and do regression test locally. It indeed <b>brings a bug in "tests/basic/afr/quorum.t"</b>(for tests/ec/, there exists failure but it is hard to reappear the failure).</p>
<p><br>
</p>
<p>For quorum test, it fails in line_no 36. The case is that for a volume with replica 2, a brick is killed and quorum-reads is on, quorum-type is fixed. Stat on the root_dir will fail because of quorum check(afr/afr-read-txn.c). <wbr>However, lookup will
succeed without quorum check. This is what I have got.</p>
<p>So the solution maybe more complex than removing the nodeid==1 check directly.</p>
<p><br>
</p>
<p>Thank you!</p>
<div id="m_-2753040592691438660Signature">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
Best regards,</div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
Zhitao Li</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-2753040592691438660divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Amar Tumballi <<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>><br>
<b>Sent:</b> Friday, March 24, 2017 9:13:35 PM<br>
<b>To:</b> Zhitao Li<br>
<b>Cc:</b> Niels de Vos; Poornima Gurusiddaiah; Gluster Devel; <a href="mailto:gluster-users@gluster.org" target="_blank">
gluster-users@gluster.org</a>; Zhitao Li; Zhitao Li<br>
<b>Subject:</b> Re: Could we not always call lookup for root_dir in fuse_getattr to improve performance?</font>
<div> </div>
</div>
<div>
<div class="h5">
<div>
<div dir="ltr">
<div>
<div>Went through the code base again. Yes, as you said, we can get rid of fuse_getattr() not checking nodeid==1 path.<br>
<br>
</div>
Patch here: <a href="https://review.gluster.org/16944" target="_blank">https://review.gluster.org/<wbr>16944</a><br>
<br>
</div>
-Amar<br>
<div><br>
<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Mar 24, 2017 at 2:57 AM, Zhitao Li <span dir="ltr">
<<a href="mailto:zhitaoli1201@outlook.com" target="_blank">zhitaoli1201@outlook.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">
<div id="m_-2753040592691438660m_1011345600268860472divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Hello, everyone!</p>
<p><br>
</p>
<p>I am now optimizing the performance of "ls". <span style="font-size:12pt">When there are many little files directly </span><span style="font-size:12pt">in mount point(root dir of glusterfs</span><span style="font-size:12pt">)</span><span style="font-size:12pt">,
I find that fuse_getattr takes near half time of total </span><span style="font-size:12pt">"ls". Strictly, the nodeid==1 check in fuse_getattr will call look operation instead of stat, and lookup will always miss the md-cache, so it will do real lookup and
cost about 3ms a time in my case. </span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p>I doubt whether the special check of nodeid==1 is necessary. I disable the check, it works normal for ls. However, in the "tests" of gluster, it fails(quorum.t). In that case, lookup in root_dir is essential.</p>
<p><br>
</p>
<p>Up to now, we know that lookup bring high cost in fuse_getattr and it is essential in some case. Could anyone give some advice to improve fuse_getattr(lookup in root_dir) without bringing bugs? </p>
<p><br>
</p>
<p>I have been trying to deal with this for many days. Your help is greatly in need. </p>
<p><br>
</p>
<div id="m_-2753040592691438660m_1011345600268860472Signature">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
</div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
Best regards,</div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
Zhitao Li</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="m_-2753040592691438660gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Amar Tumballi (amarts)<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Amar Tumballi (amarts)<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>