https://access.redhat.com/solutions/2216
SOLUTION 已验证 - 已更新 2019年一月8日05:54 -
环境
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7 (deprecated)
- NFS
问题
- In case of a NFS server with a high load, it may be advisable to increase the number of the threads created during the
nfsdserver start up. - How to increase the threads created by nfs daemon in Red Hat Enterprise Linux?
- RPCNFSDCOUNT
- nfs thread count / nfsd thread count
决议
Edit the following line in /etc/sysconfig/nfs
RPCNFSDCOUNT=8
RPCNFSDCOUNT is the number of threads that will be started. Increase this to start more threads.
Note: this method is deprecated in RHEL 7. The preferred method is to set 'threads' in /etc/nfs.conf. RHEL 8 will not support /etc/sysconfig/nfs.
/etc/sysconfig/nfs: RHEL 7 (deprecated)/etc/nfs.conf: RHEL 7, RHEL 8
诊断步骤
To check if there are enough threads started, execute the following command:
cat /proc/net/rpc/nfsd
Review the following line:
th 16 0 2.610 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
The first number is the total number of NFS server threads started. The second number indicates whether at any time all of the threads were running at once. The remaining numbers are a thread count time histogram.
You may use a script similar to the following to monitor thread usage over time:
while :
do
date
grep "^th" /proc/net/rpc/nfsd
sleep 300
done
- NOTE: This has changed in RHEL 6: Why does value for busy threads in 'th'(thread) line remains zero in /proc/net/rpc/nfsd?

博客围绕Red Hat Enterprise Linux系统中NFS服务器高负载时如何增加nfs守护进程创建的线程数展开。介绍了不同版本(RHEL 4 - 8)的环境,给出决议,如在RHEL 7中旧方法已弃用,RHEL 8不支持某方法,还提供了诊断线程启动数量的步骤。
3362

被折叠的 条评论
为什么被折叠?



