<div dir="ltr">Couple of more areas to explore:<br>1. purging kernel dentry and/or page-cache too. Because of patch [1], upcall notification can result in a call to inode_invalidate, which results in an &quot;invalidate&quot; notification to fuse kernel module. While I am sure that, this notification will purge page-cache from kernel, I am not sure about dentries. I assume if an inode is invalidated, it should result in a lookup (from kernel to glusterfs). But neverthless, we should look into differences between entry_invalidation and inode_invalidation and harness them appropriately.<br><div><div class="gmail_extra"><br></div><div class="gmail_extra">2. Granularity of invalidation. For eg., We shouldn&#39;t be purging page-cache in kernel, because of a change in xattr used by an xlator (eg., dht layout xattr). We have to make sure that [1] is handling this. We need to add more granularity into invaldation (like internal xattr invalidation, user xattr invalidation, entry invalidation in kernel, page-cache invalidation in kernel, attribute/stat invalidation in kernel etc) and use them judiciously, while making sure other cached data remains to be present.<br><br></div><div class="gmail_extra">[1] <a href="http://review.gluster.org/12951">http://review.gluster.org/12951</a><br><br><div class="gmail_quote">On Wed, Aug 10, 2016 at 10:35 PM, Dan Lambright <span dir="ltr">&lt;<a href="mailto:dlambrig@redhat.com" target="_blank">dlambrig@redhat.com</a>&gt;</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"><br>
There have been recurring discussions within the gluster community to build on existing support for md-cache and upcalls to help performance for small file workloads. In certain cases, &quot;lookup amplification&quot; dominates data transfers, i.e. the cumulative round trip times of multiple LOOKUPs from the client mitigates benefits from faster backend storage.<br>
<br>
To tackle this problem, one suggestion is to more aggressively utilize md-cache to cache inodes on the client than is currently done. The inodes would be cached until they are invalidated by the server.<br>
<br>
Several gluster development engineers within the DHT, NFS, and Samba teams have been involved with related efforts, which have been underway for some time now. At this juncture, comments are requested from gluster developers.<br>
<br>
(1) .. help call out where additional upcalls would be needed to invalidate stale client cache entries (in particular, need feedback from DHT/AFR areas),<br>
<br>
(2) .. identify failure cases, when we cannot trust the contents of md-cache, e.g. when an upcall may have been dropped by the network<br>
<br>
(3) .. point out additional improvements which md-cache needs. For example, it cannot be allowed to grow unbounded.<br>
<br>
Dan<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Raghavendra Gowdappa&quot; &lt;<a href="mailto:rgowdapp@redhat.com">rgowdapp@redhat.com</a>&gt;<br>
&gt;<br>
&gt; List of areas where we need invalidation notification:<br>
&gt; 1. Any changes to xattrs used by xlators to store metadata (like dht layout<br>
&gt; xattr, afr xattrs etc).<br>
&gt; 2. Scenarios where individual xlator feels like it needs a lookup. For<br>
&gt; example failed directory creation on non-hashed subvol in dht during mkdir.<br>
&gt; Though dht succeeds mkdir, it would be better to not cache this inode as a<br>
&gt; subsequent lookup will heal the directory and make things better.<br>
&gt; 3. removing of files<br>
&gt; 4. writev on brick (to invalidate read cache on client)<br>
&gt;<br>
&gt; Other questions:<br>
&gt; 5. Does md-cache has cache management? like lru or an upper limit for cache.<br>
&gt; 6. Network disconnects and invalidating cache. When a network disconnect<br>
&gt; happens we need to invalidate cache for inodes present on that brick as we<br>
&gt; might be missing some notifications. Current approach of purging cache of<br>
&gt; all inodes might not be optimal as it might rollback benefits of caching.<br>
&gt; Also, please note that network disconnects are not rare events.<br>
&gt;<br>
&gt; regards,<br>
&gt; Raghavendra<br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.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></div>