How to increase the number of threads created by the NFS daemon in RHEL 4, 5, 6, 7 and 8?

Solution Verified - Updated -


  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8


  • In case of a NFS server with a high load, it may be advisable to increase the number of the threads created during the nfsd server start up.
  • How to increase the threads created by nfs daemon in Red Hat Enterprise Linux?
  • nfs thread count / nfsd thread count


Red Hat Enterprise Linux 4, 5, 6 and Red Hat Enterprise Linux 7 (deprecated).

Edit the following line in /etc/sysconfig/nfs


RPCNFSDCOUNT is the number of threads that will be started. Increase this to start more threads.

Red Hat Enterprise Linux 7 (current) and Red Hat Enterprise Linux 8

Edit the following line in /etc/nfs.conf


Increasing the number on this line will increase the number of threads started.

  • To bring the configuration changes into affect the NFS service needs to be restarted:
# systemctl restart nfs-server.service
  • For RHEL 6
# service nfs restart
  • NOTE:- Make sure that NFS shares are unmounted from the clients before restarting the nfs-server.service to
    avoid stale issues.

Diagnostic Steps

NOTE: The following is only applicable to RHEL versions prior to RHEL 6. Beginning with RHEL 6, the thread stats are no longer updated, and are always zero. See Why does value for busy threads in 'th'(thread) line remains zero in /proc/net/rpc/nfsd? for further details.

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 :
    grep "^th" /proc/net/rpc/nfsd
    sleep 300

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.


Edit the following line in /etc/rc.d/init.d/nfs

Don't edit the init script.  Modify the nfs sysconfig file in /etc/sysconfig/nfs, by uncommenting (remove the leading #) and changing the count as desired.

$ grep COUNT /etc/sysconfig/nfs


Ok. so what for RHEL6 admins who see "kernel: nfsd: too many open connections, consider increasing the number of threads"? Is there a way to set the number of NFSd's ? Just up the number untill this is not seen?

No longer works in RHEL 8.x. Any idea how to do this if it is still relevant.

I didi not test it, but:

and =>

Changes in NFS The NFS configuration file is "/etc/nfs.conf".

You can change the number of threads without the need to restart the NFS service by calling e.g.:

# rpc.nfsd 16

Check the number of threads by grepping the ps output for nfsd or by:

# cat /proc/fs/nfsd/threads

Of course, this is just a runtime change and it is not a persistent change.