<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><br><div>1,In the code,readdir-ahead didn't package up the readdir request into a bigger request, it just packaged up the dentries, if the dentries' size was greater than the request size, the bigger request returned to the client, wasn't it?</div><div>2,The requests from the Readdir-ahead Xlator wind down to next Xlator ,did they send to a server or brodcast to all the servers?</div><div>3,As you have said, the preload is in progress, a readdir from application waits for its completion. And If I change the buffer(request) size, will the application wait for a long time? Could it be a stream, the readdir from application fetches dentries in the buffer, and the readdir-ahead xlator pre-fetches dentries from the servers?</div><div>4,When does it can be a larger buffer, like io-cache,which cached the data/dentries read before? As you know, ls is so slow.</div><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2016-02-23 10:00:51, "Raghavendra Gowdappa" &lt;<a href="mailto:rgowdapp@redhat.com">rgowdapp@redhat.com</a>&gt; wrote:
&gt;
&gt;
&gt;----- Original Message -----
&gt;&gt; From: "Keiviw" &lt;<a href="mailto:keiviw@163.com">keiviw@163.com</a>&gt;
&gt;&gt; To: <a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>
&gt;&gt; Sent: Tuesday, February 23, 2016 6:20:28 AM
&gt;&gt; Subject: [Gluster-devel] Readdir-ahead
&gt;&gt; 
&gt;&gt; I have two questions about the performance,readdir-ahead.
&gt;&gt; 1. In the code,the request max_size is 131072,128K. If i change the max_size
&gt;&gt; to a larger size, what will happen?
&gt;
&gt;readdir-ahead winds down readdir calls with a buffer of size "max_size". If you increase the size, each readdir (including those "preload" requests which are not issued by application) will be done with a bigger buffer to fetch dentries.
&gt;
&gt;&gt; 2. As what i have said in question 1, for a larger buffer, if the second
&gt;&gt; readdir arrives, the denty will return from the buffer or from the server?
&gt;
&gt;Only if a preload (a readdir request not initiated by application, but instead triggered by readdir-ahead in an attempt to pre-emptively fill the read-ahead buffer) is in progress, a readdir from application waits for its completion. For all other cases, readdir-ahead is bypassed. Also note that readdir-ahead is "per-fd" based cache. So, barring cases like duping an fd (including fork() ), one shouldn't get parallel readdir requests on a single fd.
&gt;
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; _______________________________________________
&gt;&gt; Gluster-devel mailing list
&gt;&gt; <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
&gt;&gt; http://www.gluster.org/mailman/listinfo/gluster-devel
</pre></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>