>> I Download the GlusterFS 3.2.7 Release and it works well. And I want >> to improve the reading performance with FSCache/Cachefiles model. >> I use the command line: >> mount -t glusterfs server1:/test-volume /mnt/glusterfs -o fsc >> and no error reported. But the local cache function of FSCache is not Does Glusterfs support fscache? File systems typically have to be modified to include support for fscache (see fs/cifs/fscache*.[c,h] or fs/nfs/fscache*.[c,h] in the kernel source for example). IOW, they have to be fscache aware to be able to use the persistent disk caching. Have you checked if the option 'fsc' is being silently ignored? Try mounting with '-vvv' to see whether it reveals more. What do you mean by "local cache function of FSCache is not active"? Did you mean that the files are not getting cached? or File are not being fetched from the cache when re-read? If it is already supported, are you running the cachefilesd user-space daemon? FS-Cache by default uses /var/cache/fscache dir for caching. You could check whether the cached files are being seen there. Also, /proc/fs/fscache/stats might reveal more details about pages marked for caching, retrieved successfully from cache or cache returned -ENODATA etc.
From https://www.redhat.com/archives/linux-cachefs/2012-December/msg00002.html: On 12/06/2012 12:24 AM, Anand Avati wrote: > I believe FSCache must first be implemented in FUSE before any userspace > filesystem (like GlusterFS) can make use of it? > Sounds about right to me. Then, FUSE can ask FS-Cache to store / fetch data on behalf of Glusterfs. > On Wed, Dec 5, 2012 at 1:29 AM, 吴巍 <wuwei tsh gmail com > <mailto:wuwei tsh gmail com>> wrote: > __ > Now I'm sure that Gluster FS native client don't support FSCache. But wait, why do you really need FS-Cache in your case? If improving (re)-read performance is what matters to you, have you already taken a look at the IO-Cache translator the Glusterfs provides? Do you have a really slow network? Do you intend to keep your cache on an SSD? Note that FS-Cache/Cachefiles is not supposed to improve performance for all kinds of workloads. May be one way to know if your workload can benefit with FS-Cache or not is: - enable FS-Cache in NFS and try accessing the Gluster namespace via NFS - compare its performance with FS-Cache on NFS disabled
This is a project I thought about looking into once or twice, but haven't really so far yet. I took a very quick look at fscache for NFS, and it seems this should be doable in fuse, perhaps in a similar manner to NFS. One thing I noticed is that NFS appears to cache files opened read-only, which brings up a point to expand on Neils' comment. Have you tested NFS with or without fscache? Even if the latter configuration provides a benefit for your workload, you could also try the --fopen-keep-cache glusterfs option. This will prevent fuse from invalidating local page cache on every file open. FWIW, there is also page cache writeback support work in progress for fuse, but the current state is probably not yet suitable for deployment with gluster (though it should be testable). Either of these functionalities might be more immediate/relevant potential performance improvements for you than fscache.
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice. If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.