nfs 传图片加水印写入磁盘很慢原因排查mount -t nfs -o async,noac,nosuid,noexec,rsize=32768,wsize=32768 xx:/

 

安全挂载参数:
mount –t nfs –o nosuid,noexec,nodev,rw 192.168.43.117:/data /mnt

nosuid:不希望共享的存储被执行setuid的功能;
noexec:不希望共享的存储被执行二进制文件;
nodev: 不希望共享的存储创建的设备。

noac:不开启缓存

有人报出一个bug,说使用noac无效,但是使用actimeo=0可以解决这个问题。 验证过,这个选项确实可以解决问题。为了避免频繁的网络请求,我使用actimeo=1

 

说是这些选项的用途吧:

ac: attribute cache   目的是缓存文件属性信息,防止过于频繁的对nfs服务器的网络请求。(cache时间的长短可以配置,使用man nfs查看)

noac: 也就是不缓存了

 

ac的时间长短可以通过下面四个选项配置:

        acregmin=n     The minimum time (in seconds) that the NFS client caches attributes of a regular file before it requests fresh attribute information from a server.  If this option is not specified, the NFS client uses a 3-second minimum.

       acregmax=n     The maximum time (in seconds) that the NFS client caches attributes of a regular file before it requests fresh att

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值