前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >nfs v4.0协议下的服务器load升高问题

nfs v4.0协议下的服务器load升高问题

原创
作者头像
domain0
修改2020-07-16 16:43:55
1.5K0
修改2020-07-16 16:43:55
举报
文章被收录于专栏:运维一切运维一切

在使用nfs v4.0协议挂载nfs文件系统的时候,存在一个seq id序列号瓶颈问题,具体内容请看https://access.redhat.com/solutions/2142081

  • There is a limitation to the Linux NFS4.0 client implementation that an "open_owner" is mapped to a userid. This results in a bottleneck if one user opens and closes a lot of files in a short period of time. Each OPEN / CLOSE operation has to wait for a sequence id, which essentially serializes each OPEN / CLOSE request. If an NFS server's response time for OPEN / CLOSE requests increases due to some secondary load or complication, this NFS4 client limitation can become pronounced, and in some cases, cause an unresponsive machine.
  • The NFS4.1 protocol addresses the limitation of serialization of OPENs per open_owner. For more information, see RFC 5661 Section 9.10

故障时的现象:

服务器load无限升高,但是应用的cpu使用率并不高

故障触发条件:

短时间内read close大量的文件

解决的方案:

1. 使用nfs v3协议挂载规避

2. 使用nfs v4.1协议挂载

k8s pv的v3挂载实例:

代码语言:javascript
复制
apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs-test-pv
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 1000Gi
  mountOptions:
  - vers=3
  - nolock
  - proto=tcp
  - noatime
  - nodiratime
  - noexec
  - hard
  - rsize=524288
  - wsize=524288
  nfs:
    path: /[nfs-id]/[mount-path]/
    server: [nfs-server-ip]
  persistentVolumeReclaimPolicy: Retain
  storageClassName: nfs-test-pv
  volumeMode: Filesystem
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-test-pvc
  namespace: default
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 1000Gi
  storageClassName: nfs-test-pv
  volumeMode: Filesystem
  volumeName: nfs-test-pv

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档