LFS(the Log-structured File System)系统详解


There was a large and growing gap between random I/O performance and sequential I/O performance:
Existing file systems perform poorly on many common workloads:

LFS文件系统的设计木主要是为了解决上面这以前文件系统所存在的两个问题:随机输入输出的性能和序列输入输出的性能相差很大;还有就是磁盘搜索和旋转延迟比较大。

LFS, short for the Log-structured File System. When writing to disk, LFS first buffers all updates (including metadata!) in an inmemory segment; when the segment is full, it is written to disk in one long, sequential transfer to an unused part of the disk. LFS never overwrites existing data, but ratheralwayswrites segments to free locations.


LFS文件系统的主要算法就是首先把所有的更新(包括元数据)缓存在内存中的成为segment的单位中。当segment填满之后,里面的数据就写入到磁盘中未使用的地方。 特别要注意的是:LFS并不会覆写已有的数据,而是把segment中的数据写入到磁盘中新的位置。(这样在磁盘中就会有old data和new data,在后面会详细讲到)


This basic idea, of simply writing all updates (such as data blocks, inodes, etc.) to the disk sequentially, sits at the heart of LFS. If you understand this, you get the basic idea. But as with all complicated systems, the devil is in the details.


  • 6
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
git-lfs-windows-v3.4.1.exe 是 Git Large File Storage (Git LFS) 的 Windows 版本安装程序。Git LFS 是一个用于管理大型文件的扩展工具,它能够帮助 Git 更好地处理和存储大型文件。 首先,我们需要下载 git-lfs-windows-v3.4.1.exe 安装程序,并运行它。安装程序将引导我们完成安装过程。 安装过程中,我们可以选择安装路径,一般情况下保持默认即可。安装完成后,会自动将 Git LFS 添加到系统环境变量中,以便可以在命令行中直接使用 Git LFS 命令。 接下来,我们需要在 Git 仓库中启用 Git LFS。进入到需要使用 Git LFS 的仓库目录中,在命令行中运行以下命令: ``` $ git lfs install ``` 这个命令会为当前仓库初始化 Git LFS。初始化成功后,可以通过以下命令来跟踪需要使用 Git LFS 管理的文件类型: ``` $ git lfs track "<file_extension>" ``` 其中 `<file_extension>` 是需要使用 Git LFS 管理的文件扩展名,例如,对于大型视频文件,可以使用以下命令来跟踪: ``` $ git lfs track "*.mp4" ``` 接下来,我们可以使用正常的 Git 命令来操作这些大型文件,Git LFS 会自动将文件上传到远程存储库,并在克隆和拉取时自动下载文件。 如果需要取消某个文件的 Git LFS 管理,可以使用以下命令: ``` $ git lfs untrack "<file>" ``` 其中 `<file>` 是要取消跟踪的文件路径。 总之,通过下载并安装 git-lfs-windows-v3.4.1.exe,然后在仓库中进行初始化和配置,我们就可以使用 Git LFS 来更好地管理和处理大型文件。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值