kernel: nfsd: too many open TCP sockets, consider increasing the number of threads

编程知识 更新时间:2023-05-02 05:30:51

在/var/log/syslog中看到如下报错:

 

kernel: nfsd: too many open TCP sockets, consider increasing the number of nfsd threads

网上搜了外国的一篇文章这样说的(红帽系列):

The threads in question are set in /etc/sysconfig/nfs:

USE_KERNEL_NFSD_NUMBER="4"

 

Debian系列是在 /etc/default/nfs-kernel-server

RPCNFSDCOUNT= 32

我的是CENTOS7 

# cat /etc/sysconfig/nfs |egrep -v "^#|^$"
RPCNFSDARGS=""
RPCNFSDCOUNT=16
RPCMOUNTDOPTS=""
STATDARG=""
SMNOTIFYARGS=""
RPCIDMAPDARGS=""
RPCGSSDARGS=""
GSS_USE_PROXY="yes"
BLKMAPDARGS=""

 

Cause

This message is generated by some rule-of-thumb checking, and should not be taken as a indication of a definite problem.  Rather, it warns of a situation which might cause low performance under load.  The number of TCP connections open to nfsd (nfs server, port 2049) is checked and if the number is considered higher than the server might be able to keep up with, the message is logged.

 

The message is given when connections to the NFS server's port 2049 are greater than  [(number of threads + 3) * 20].  For example, at the default of 4, the message will be logged if connections to port 2049 exceed 140.  The presence of connections does not necessarily mean all of them are currently making requests.  However, it does signify a certain number of NFS clients with file systems mounted, and if many of them were heavily using NFS resources, the NFS Server might not keep up with it's work as promptly as desired.

 

When choosing a new setting, it can sometimes be helpful to manually check the number of nfsd connections, especially over time or at peak work times.  To do so, give the following command (at a terminal on the NFS Server).

 

用这种方法查看有多少nfs 连接:

netstat -nt | grep -c :2049

 

设置的线程值为32的话,那么可以允许的最大连接数为 (32+3)*20 ,也就是700个。可以根据自己的实际环境去设置。

 

 

本文参考自:http://www.novell/support/kb/doc.php?id=7010903

 

更多推荐

kernel: nfsd: too many open TCP sockets, consider increasing the number of threa

本文发布于:2023-04-26 06:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/2cfaf2d617f786bfc30f699a069cfce2.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:open   TCP   kernel   nfsd   number

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 104559文章数
  • 26215阅读数
  • 0评论数