问题描述
看来,Linux的VFS缓存默认情况下不使用FUSE文件系统的工作。例如,读呼叫似乎被系统地转发到保险丝文件系统。
It seems that the Linux VFS cache does not work by default with a FUSE filesystem. For example, the "read" call seems to be systematically forwarded to the FUSE filesystem.
我在一个特定的FUSE远程文件系统工作。我需要一个非常积极的缓存。
I work on a FUSE specific remote filesystem. I need a very aggressive cache.
我需要实现我自己的页面缓存?或者是有可能激活Linux的VFS缓存为这个特殊的文件系统FUSE?还是没有人知道一个良好的代理/缓存文件系统FUSE(或者说是一种C库,并且不用重新发明轮子)?
Do I need to implement my own page cache? Or is it possible to activate the Linux VFS cache for this particular FUSE filesystem? Or does someone know a good proxy/cache FUSE filesystem (or a kind of C library to do that without reinventing the wheel)?
奖金的问题:
如果我要实现我自己的页面缓存,我觉得使用Redis的守护进程做LRU的东西。我几乎确信它可以为高速缓存元数据的一个很好的选择。但是对于页,我不知道,这将是比简单的本地目录(与VFS缓存)或大于的/ dev / shm的更好。不过,我会失去LRU自动清洗。是否有人知道一种的/ dev / shm的具有自动清洗LRU?
If I have to implement my own page cache, I think to use a REDIS daemon to do the LRU stuff. I'm nearly sure that it can be a good option for caching metadata. But for pages, I'm not sure that it will be better than a simple local directory (with VFS cache) or than /dev/shm. But I will lose LRU automatic cleaning. Does someone know a sort of /dev/shm with automatic LRU cleaning?
一些额外的信息:文件系统为只读和远程端几乎是一成不变的;远程端包含我不能复制到本地目录非常大的文件。
Some additional information: the filesystem is read-only and the remote side is nearly immutable; the remote side contains very big files that I can't copy to a local directory.
推荐答案
我觉得VFS缓存不会在FUSE工作。有保险丝缓存解决方案,或者你可以实现你的。
I think VFS cache will not work on FUSE. There are caching solutions for FUSE or you can implement yours.
通过一个小的搜索,我发现;他们声称,这是简单的。
With a small search, I found fuse-cache; they claim that it is simple.
这篇关于是否有可能有一个Linux VFS缓存,一个FUSE文件系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!