[Gluster-users] 回复: Re: [Linux-cachefs] [Gluster-devel] Can I use FSCache/Cachefiles with Gluster Native Client mode?

吴巍 wuwei.tsh at gmail.com
Fri Dec 7 07:48:00 UTC 2012


I am also interested in the way that how glusterfs can use FSCache/Cachefiles. I think the FUSE is the important part to change to use the local cache function of FSCache/Cachefiles.
In our case, we have to cache a lot of small files about 100KB average to improve the reading performance. The IO-cache xlator in Gluster surely does its work,but we want cache data much more than the memory can hold.
We have tested the NFS mount mode of GlusterFS, it works well. :)
And you know, the NFS mount method is not the best way to get/put data from/into the Gluster Volume, so I am still interested in the function of the local cache of gluster native client.
The gluster dev group has added the problem to their bug list: 
 https://bugzilla.redhat.com/show_bug.cgi?id=883785


Thanks for everybody.



Wei Wu

发件人: Suresh Jayaraman
发送时间: 2012-12-06 17:47
收件人: 吴巍
抄送: Anand Avati; Ric Wheeler; gluster-users; linux-cachefs; gluster-devel
主题: Re: [Gluster-users] [Linux-cachefs] [Gluster-devel] Can I use FSCache/Cachefiles with Gluster Native Client mode?
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 at gmail.com
> <mailto:wuwei.tsh at 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


>     There are no codes about FSCache in the source code of Gluster FS.
>     the command  "mount -t glusterfs server1:/test-volume /mnt/glusterfs
>     -o fsc"  will be executed by /sbin/mount.glusterfs, and the "-o fsc"
>     option will be ignored silently.  
>      
>     Thanks for everybody.
>      
>     ------------------------------------------------------------------------
>     Wei Wu
>      
>     *From:* Suresh Jayaraman <mailto:sjayaraman at suse.com>
>     *Date:* 2012-12-05 15 <tel:2012-12-05%C2%A015>:06
>     *To:* 吴巍 <mailto:wuwei.tsh at gmail.com>
>     *CC:* Ric Wheeler <mailto:ricwheeler at gmail.com>; gluster-users
>     <mailto:gluster-users at gluster.org>; linux-cachefs
>     <mailto:linux-cachefs at redhat.com>; gluster-devel
>     <mailto:gluster-devel at nongnu.org>
>     *Subject:* Re: [Linux-cachefs] [Gluster-devel] Can I use
>     FSCache/Cachefiles with Gluster Native Client mode?
>     On 12/03/2012 05:59 PM, Ric Wheeler wrote:
>     > On 12/02/2012 10:29 PM, 吴巍 wrote:
>     >> Hey,
>     >>
>     >> 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.
>      
>     >> active. How can I use the local cache function of FSCache with Gluster
>     >> Native Client  mount mode?
>     >>
>     > Adding in the fscache list to see if anyone there has experimented with
>     > this,
>     > 

-- 
Suresh Jayaraman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20121207/bc6581c5/attachment.html>


More information about the Gluster-users mailing list