天天看点

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

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 ​<code>​nfsd​</code>​ server 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 ​<code>​/etc/sysconfig/nfs​</code>​

​​Raw​​

​<code>​RPCNFSDCOUNT​</code>​ 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 ​<code>​/etc/nfs.conf​</code>​. RHEL 8 will not support ​<code>​/etc/sysconfig/nfs​</code>​.

​<code>​/etc/sysconfig/nfs​</code>​: RHEL 7 (deprecated)

​<code>​/etc/nfs.conf​</code>​: RHEL 7, RHEL 8

To check if there are enough threads started, execute the following command:

Review the following line:

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:

继续阅读