FS-Cache和CacheFS 有什么不同吗?(转载)
2019-12-03 16:02:41来源:博客园 阅读 ()
FS-Cache和CacheFS 有什么不同吗?(转载)
FS-Cache and CacheFS. Are there any differences between these two? Initially, I thought both were same. But no, it’s not.
CacheFS is the backend implementation which caches the data onto the disk and mainpulates it, while FS-Cache is an interface which talks to CacheFS.
So why do we need two levels here?
FS-Cache was introduced as an API or front-end for CacheFS, which can be used by any file system driver. The file system driver talks with the FS-Cache API which inturn talks with CacheFS in the back-end. Hence, FS-Cache acts as a common interface for the file system drivers without the need to understand the backend CacheFS complexities, and how its implemented.
The only drawback is the additional code that needs to go into each file system driver which needs to use FS-Cache. ie.. Every file system driver that needs to talk with FS-Cache, has to be patched with the support to do so. Moreover, the cache structure differs slightly between file systems using it, and thus lacks a standard. This unfortunately, prevents FS-Cache from being used by every network filesystem out there.
The data flow would be as:
VFS <-> File system driver (NFS/CIFS etc..) <-> FS-Cache <-> CacheFS <-> Cached data
CacheFS need not cache every file in its entirety, it can also cache files partially. This partial caching mechanism is possible since FS-Cache caches ‘pages’ rather than an entire file. Pages are smaller fixed-size segments of data, and these are cached depending on how much the files are read initially.
FS-Cache does not require an open file to be loaded in the cache, prior being accessed. This is a nice feature as far as I understand, and the reasons are:
a) Not every open file in the remote file system can be loaded into cache, due to size limits. In such a case, only certain parts (pages) may be loaded. And the rest of the file should be accessed normally over the network.
b) The cache won’t necessarily be large enough to hold all the open files on the remote system.
c) Even if the cache is not populated properly, the file should be accessible. ie.. the cache should be able to be bypassed totally.
This hopefully clears the differences between FS-Cache and CacheFS.
原文链接:https://arvimal.blog/2014/09/14/fs-cache-and-cachefs-what-are-the-differences/
保持更新,更多内容请关注 cnblogs.com/xuyaowen;
原文链接:https://www.cnblogs.com/xuyaowen/p/fscache-and-cachefs.html
如有疑问请与原作者联系
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- 什么是API 2020-06-10
- Kubernetes学习与应用(01)——什么是Kubernetes 2020-06-09
- 容器技术之LXC 2020-05-16
- Linux,Unix,GNU 到底有什么样的渊源? 2020-05-15
- 操作系统-核心级线程 2020-03-10
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash