linux cache fs,FS-Cache 调研,

FS-Cache 调研,

最近需要使用到 FSCache,今天调研一下FS-Cache,主要记录一些索引,方便以后查阅:

63bcb6e8076de5d56f77607a42ac4b79.png

RedHat 文档:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-fscache (此文档讲解较为详细)

内核社区文档:https://www.kernel.org/doc/Documentation/filesystems/caching/fscache.txt

FS-Cache: A Network Filesystem Caching Facility:https://people.redhat.com/dhowells/fscache/FS-Cache.pdf

NFS 相关,请阅读:https://www.cnblogs.com/xuyaowen/p/NFS_install.html (之前写的关于nfs安装相关的内容)

使用NFS缓存减少IO https://blog.csdn.net/luckytanggu/article/details/78476634 (此篇文章较为实践,我也进行了相同的测试,显示fscache起作用,大家可以参考)

关于linux内核中对文件系统的cache大家可以参考此链接:https://www.kernel.org/doc/Documentation/filesystems/caching/ (内核文件系统cache详细文档)

FS-Cache 配置文件解析:

###############################################################################

#

# Copyright (C)2006,2010Red Hat, Inc. All Rights Reserved.

# Written by David Howells (dhowells@redhat.com)

#

# This program isfree software; you can redistribute it and/or

# modify it under the terms of the GNU General Public License

# as published by the Free Software Foundation; either version

#2of the License, or (at your option) any later version.

#

###############################################################################dir /var/cache/fscache # 自定义缓存目录

tag mycache # 标签,用于区分多个缓存

brun10%# 剩余空间大于这个设置值时,自动进行缓存

bcull7%# 剩余空间大于这个设置值时,开始自动删除使用频率最低的缓存

bstop3%# 剩余空间小于这个设置值时,缓存功能关闭

# 开头的参数则是按照文件数来计算%, 其原理与根据block数(剩余空间)计算是一样的。

frun10%fcull7%fstop3%# Assuming you're using SELinux with the default security policy included in

# this package

secctx system_u:system_r:cachefiles_kernel_t:s0

关于nfs fsc 选项的说明(fsc选项):

84f6dfbeb71f5bef6af2c03592c7faa6.png

阅读摘要:

yum install cachefilesd;

挂载命令:直接mount服务端共享的目录到本地的/mnt目录,必须使用-o fsc参数选项

保持更新,资源来源自网络,此文章主要是用来索引,如果您有相关问题,请关注cnblogs.com/xuyaowen;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值