FS-Cache和CacheFS 有什麼不同嗎?(轉載)

来源:https://www.cnblogs.com/xuyaowen/archive/2019/12/03/fscache-and-cachefs.html
-Advertisement-
Play Games

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 imple ...


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;


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 一 Kubernetes DNS介紹1.1 Kubernetes DNS發展作為服務發現機制的基本功能,在集群內需要能夠通過服務名對服務進行訪問,因此需要一個集群範圍內的DNS服務來完成從服務名到ClusterIP的解析。DNS服務在Kubernetes的發展過程中經歷了3個階段,SkyDNS --... ...
  • 一 前言 幾大RPC框架介紹 1.支持多語言的RPC框架,google的gRPC,Apache(facebook)的Thrift 2.只支持特定語言的RPC框架,例如新浪的Motan 3.支持服務治理等服務化特性的分散式框架,例如阿裡的dubbo 4.擁有完整生態的spring cloud spri ...
  • 操作系統:macOs High Sierra 10.13.6 1.我用的homebrew安裝的nignx1.15.9,安裝完成之後會有下麵的提示: 網站根目錄在:/usr/local/var/www nginx配置文件位置:/usr/local/etc/nginx 註意:nginx被安裝到的目錄位置 ...
  • 問題描述:生產環境中需要經常運用NFS掛載,就在測試環境中測試一下,將伺服器中192.168.1.4 /u01/app/oracle/product/11.2.0/dbhome_1/dbs 掛載到192.168.1.3的/nfs/nfs_orcl, 將192.168.1.5/u01/app/orac ...
  • 這裡僅介紹我在Ubuntu 18.04下用到的工具軟體,都是正版免費的。 1、Office辦公套件 Ubuntu 18.04預設安裝後會提供LibreOffice辦公套件,功能還是可以的,但這裡推薦使用國產的WPS。WPS官方提供了免費的Linux版下載,下載地址:WPS Linux版本。初次使用W ...
  • 一、卸載自帶OpenJDK 一些Linux系統會自帶一個OpenJDK,在安裝OracleJDK之前,先卸載掉自帶的OpenJDK: 查找已經安裝的JDK組件: 刪除OpenJDK: 檢查是否刪除完成: [root@localhost ~]# java -version-bash: java: 未找 ...
  • 剛開始使用Ubuntu 18.04,這裡記錄下我用過的快捷鍵。 1、Super鍵:打開活動搜索界面 這個鍵就是win鍵,註意起作用的是鍵盤左邊的那個win鍵,右邊的無效(後面的快捷鍵中左右都有效)。此鍵按下後會出現一個搜索視窗,可以搜索想要的應用程式。此外還顯示正在運行的GUI應用程式以及工作區。 ...
  • ![](https://img2018.cnblogs.com/blog/1452965/201912/1452965-20191203120625575-897994852.png) ...
一周排行
    -Advertisement-
    Play Games
  • 概述:本文代碼示例演示瞭如何在WPF中使用LiveCharts庫創建動態條形圖。通過創建數據模型、ViewModel和在XAML中使用`CartesianChart`控制項,你可以輕鬆實現圖表的數據綁定和動態更新。我將通過清晰的步驟指南包括詳細的中文註釋,幫助你快速理解並應用這一功能。 先上效果: 在 ...
  • openGauss(GaussDB ) openGauss是一款全面友好開放,攜手伙伴共同打造的企業級開源關係型資料庫。openGauss採用木蘭寬鬆許可證v2發行,提供面向多核架構的極致性能、全鏈路的業務、數據安全、基於AI的調優和高效運維的能力。openGauss深度融合華為在資料庫領域多年的研 ...
  • openGauss(GaussDB ) openGauss是一款全面友好開放,攜手伙伴共同打造的企業級開源關係型資料庫。openGauss採用木蘭寬鬆許可證v2發行,提供面向多核架構的極致性能、全鏈路的業務、數據安全、基於AI的調優和高效運維的能力。openGauss深度融合華為在資料庫領域多年的研 ...
  • 概述:本示例演示了在WPF應用程式中實現多語言支持的詳細步驟。通過資源字典和數據綁定,以及使用語言管理器類,應用程式能夠在運行時動態切換語言。這種方法使得多語言支持更加靈活,便於維護,同時提供清晰的代碼結構。 在WPF中實現多語言的一種常見方法是使用資源字典和數據綁定。以下是一個詳細的步驟和示例源代 ...
  • 描述(做一個簡單的記錄): 事件(event)的本質是一個委托;(聲明一個事件: public event TestDelegate eventTest;) 委托(delegate)可以理解為一個符合某種簽名的方法類型;比如:TestDelegate委托的返回數據類型為string,參數為 int和 ...
  • 1、AOT適合場景 Aot適合工具類型的項目使用,優點禁止反編 ,第一次啟動快,業務型項目或者反射多的項目不適合用AOT AOT更新記錄: 實實在在經過實踐的AOT ORM 5.1.4.117 +支持AOT 5.1.4.123 +支持CodeFirst和非同步方法 5.1.4.129-preview1 ...
  • 總說周知,UWP 是運行在沙盒裡面的,所有許可權都有嚴格限制,和沙盒外交互也需要特殊的通道,所以從根本杜絕了 UWP 毒瘤的存在。但是實際上 UWP 只是一個應用模型,本身是沒有什麼許可權管理的,許可權管理全靠 App Container 沙盒控制,如果我們脫離了這個沙盒,UWP 就會放飛自我了。那麼有沒... ...
  • 目錄條款17:讓介面容易被正確使用,不易被誤用(Make interfaces easy to use correctly and hard to use incorrectly)限制類型和值規定能做和不能做的事提供行為一致的介面條款19:設計class猶如設計type(Treat class de ...
  • title: 從零開始:Django項目的創建與配置指南 date: 2024/5/2 18:29:33 updated: 2024/5/2 18:29:33 categories: 後端開發 tags: Django WebDev Python ORM Security Deployment Op ...
  • 1、BOM對象 BOM:Broswer object model,即瀏覽器提供我們開發者在javascript用於操作瀏覽器的對象。 1.1、window對象 視窗方法 // BOM Browser object model 瀏覽器對象模型 // js中最大的一個對象.整個瀏覽器視窗出現的所有東西都 ...