NFS tips and tricks: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Created page with " == nfsd: too many open connections, consider increasing the number of threads == NFS uses threads on the server to handle incoming and outgoing I/O requests. Using threads helps NFS scale to handle large numbers of clients and large numbers of I/O requests. dmesg display when reach some high number of clients. should increase Number of NFS daemons (''nfsd'') by changing the RPCNFSDCOUNT variable in <code>/etc/default/nfs-kernel-server</code> on a Debian-based machine....")
 
No edit summary
Line 6: Line 6:
Find the number of NFS daemons in two ways
Find the number of NFS daemons in two ways
ps -aux | grep nfs
ps -aux | grep nfs
or
$ ps -aux | grep nfs | wc -l


To change nfsd count temperarly, use  
To change nfsd count temperarly, use  
# rpc.nfsd 16
# rpc.nfsd 16


To change nfsd count permenently increase RPCNFSDCOUNT variable in  /etc/default/nfs-kernel-server (Ubuntu 20.04) then  restart nfs-server.service
To change nfsd count permenently increase RPCNFSDCOUNT variable in  /etc/default/nfs-kernel-server (Ubuntu 20.04)  
 
then  restart nfs server.
$ cat /etc/default/nfs-kernel-server
# Number of servers to start up
RPCNFSDCOUNT=64
...
$ sudo systemctl restart nfs-server.service
$ ps -aux | grep nfs | wc -l               
65
</syntaxhighlight>
</syntaxhighlight>



Revision as of 09:56, 2 January 2024

nfsd: too many open connections, consider increasing the number of threads

NFS uses threads on the server to handle incoming and outgoing I/O requests. Using threads helps NFS scale to handle large numbers of clients and large numbers of I/O requests.

dmesg display when reach some high number of clients. should increase Number of NFS daemons (nfsd) by changing the RPCNFSDCOUNT variable in /etc/default/nfs-kernel-server on a Debian-based machine. (Ubuntu 20.04)

Find the number of NFS daemons in two ways
ps -aux | grep nfs
or 
$ ps -aux | grep nfs | wc -l

To change nfsd count temperarly, use 
# rpc.nfsd 16

To change nfsd count permenently increase RPCNFSDCOUNT variable in  /etc/default/nfs-kernel-server (Ubuntu 20.04) 
then  restart nfs server.
$ cat /etc/default/nfs-kernel-server 
# Number of servers to start up
RPCNFSDCOUNT=64
...
$ sudo systemctl restart nfs-server.service
$ ps -aux | grep nfs | wc -l                
65

Check nfs status

$ nfsstat -r
Server rpc stats:
calls      badcalls   badfmt     badauth    badclnt
0          0          0          0          0

References